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 905CF45A97 for ; Thu, 3 Oct 2024 21:08:20 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6550840289; Thu, 3 Oct 2024 21:08:20 +0200 (CEST) Received: from mail-pl1-f172.google.com (mail-pl1-f172.google.com [209.85.214.172]) by mails.dpdk.org (Postfix) with ESMTP id 12634402B1 for ; Thu, 3 Oct 2024 21:08:19 +0200 (CEST) Received: by mail-pl1-f172.google.com with SMTP id d9443c01a7336-20b90ab6c19so15022105ad.0 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=V6zzLJYBZsQI9iTYQa4RFfAjteGJzC5nfM84zzoUnBYmajTYeL8IzG2gU8Qf6Ucmgz xprh9gDLv3MFAi7faBnWbRdFuSYOF9PHo1ek5GD2yoCNnFfHMm+BPAdg3wU8bPTZ6h39 T6izy75WdBajcE6UPc4YNB2f2dPiLUwQ8yeeW+i9hFWGuRQJJk+W9gEEftiFBBjB500B PAUpwCFZ/TbQkQKAc1fTxt/OxP55pEB7y5/xHN5QR/pV8k54H61opnla+PoLgnrNRnDM G1E3SSCir2/fGVSLHi6oONo03lYVBCY2VQnaD7tFfjHvTLxC/pkgRrUOT05pKwcW0Fk1 TKWw== X-Forwarded-Encrypted: i=1; AJvYcCXJKgQXj0dtUnVhppIKVW/9tmhfHsk5Ty5QNlDE9LDF7ziZ0XUbVPsAgz9QMazEa5IUkTJS6xA=@dpdk.org X-Gm-Message-State: AOJu0Yy0nr6ymedm2l2Xl/uC3EagoM6dpGVmgXlvL3CNGYfuYBRw+H6i s9DNW7a6ggLH+r76IgxW+jflUh4fPOxueVKMsWUw6MvnVGB+HI3jCKR/7c2fz7Q= 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: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-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.