From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 682FF45A97; Thu, 3 Oct 2024 21:08:21 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8FFE140654; Thu, 3 Oct 2024 21:08:20 +0200 (CEST) Received: from mail-pl1-f169.google.com (mail-pl1-f169.google.com [209.85.214.169]) by mails.dpdk.org (Postfix) with ESMTP id 11C3040289 for ; Thu, 3 Oct 2024 21:08:19 +0200 (CEST) Received: by mail-pl1-f169.google.com with SMTP id d9443c01a7336-20b90984971so14401575ad.3 for ; Thu, 03 Oct 2024 12:08:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1727982498; x=1728587298; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=ovxSmGWWI4O71wuWfKNy1NpTx7Sw/tpQyjtjF/9IlYs=; b=wZiVXnNSmwUX+4ZhL+YpmlDE2+CQUycidxCInpa26g4IYQmBSDS78PyAeDvpZt5q9I 3TZGBHRekA0DMeYry1HdEvVE+DWNFPGm+ceURyXU21cLtzyLqWe44NrgPZ9pr08zPYDs OQybsh+T6j8RCR6uHlNSo3eAckd1IUWGI3j0ZbncwEfnONEfxP82fis44W26jkowXlSz ohaOL7f9r2R2xirTDzEivIeg5Iuv1jp7x52HGLYDo1ZKWHgJR6mMuh4CA7Uq9D+4WE3G Q4LO2Ph+SKdcKa0QMTvrfphybYY7qSfnI+mW6vAuQXmyyfF0UXHet7BUrH6NbgGtPG7q UKJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727982498; x=1728587298; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ovxSmGWWI4O71wuWfKNy1NpTx7Sw/tpQyjtjF/9IlYs=; b=uY+nEd+8V3OyHpDH2tLN7o6QeV4joI6zMufnAeA7dON4iw+uPTLH7GXupQlMsjQ8Qz sf9SroIdSAta5Dlqim4gRYwC2oZf6JRsHVVBzIaPJqrThT/dmqaDxG0TnSBGSvKlYaAf ZGL+XnjajfL5n2bKCufee5LEHFlYXmv9aDSdddkLdkl/1y9/6fVSZOxeEWUQ4QeoFjDC fzUcRwYt+xrq5EvUFOEsr8vu+BmqlwCbRO/49IrC7OtwV8wYuYgaMFzJUn1sw2iGzSWI Vo4n85r8TdXst2GXXLV1pu7i8/TJ9e6pNamvI8NHPYS+Vvn+QFa0wTPyZ2nSr8JNV2tZ A1Bw== X-Gm-Message-State: AOJu0YxDN9Ld0mqSWym8G3k/p9AXr1Mb+1OjNJqz2NfhRsVz8+/Xg7gO FR6LpkDIYeywrDI5uV4VVSvZEu+1Xw+kLcWwDie7ZIU7RLBmF6s76NUvk7uj0ckuUtXxkbEeArp p X-Google-Smtp-Source: AGHT+IGjbjpnHmbxnMQCkFfVVdJjcj+4LTk4ud7s2QGp03kQNlrePDrnS4U5sEzJlZJUNDxm378OOQ== X-Received: by 2002:a17:902:d4d1:b0:20b:8c13:5343 with SMTP id d9443c01a7336-20bfe2980a2mr2612815ad.47.1727982498042; Thu, 03 Oct 2024 12:08:18 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-20bfcc9ec3dsm1437975ad.223.2024.10.03.12.08.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Oct 2024 12:08:17 -0700 (PDT) Date: Thu, 3 Oct 2024 12:08:16 -0700 From: Stephen Hemminger To: Weifeng Su Cc: , , Subject: Re: [PATCH] pci: add O_CLOEXEC when open uio device Message-ID: <20241003120816.0192c7d7@hermes.local> In-Reply-To: <20230525030035.33872-1-suweifeng1@huawei.com> References: <20230525030035.33872-1-suweifeng1@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Thu, 25 May 2023 11:00:35 +0800 Weifeng Su wrote: > In this scenario, the DPDK process invokes a script which > inherits an open file descriptor (FD) for a UIO device. > After the script execution is complete, the UIO device's > close operation is called. However, in a new kernel version > (865a11f987ab5f03:uio/uio_pci_generic: Disable bus-mastering on release), > this close operation causes the PCI bus master bit to be cleared, > rendering the device unusable and leading to unexpected behavior. > This modification was made to prevent the UIO device's FD > from being inherited by the child process. > Cc: stable@dpdk.org > > Signed-off-by: Weifeng Su Makes sense that UIO fd's would be marked close on exec. But should the interrupt fd, and all the other fd's which EAL leaves. DPDK internal code doesn't invoke scripts. If your application is going to do so then it needs to lots more cleanup. Probably some variant of closing all fd's.