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 9471142DEC for ; Thu, 6 Jul 2023 22:04:38 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7E7C140A79; Thu, 6 Jul 2023 22:04:38 +0200 (CEST) Received: from mail-pf1-f176.google.com (mail-pf1-f176.google.com [209.85.210.176]) by mails.dpdk.org (Postfix) with ESMTP id C9BFC4014F for ; Thu, 6 Jul 2023 22:04:37 +0200 (CEST) Received: by mail-pf1-f176.google.com with SMTP id d2e1a72fcca58-666ed230c81so969823b3a.0 for ; Thu, 06 Jul 2023 13:04:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20221208.gappssmtp.com; s=20221208; t=1688673877; x=1691265877; 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=X9IZjQD2LTXlxnaBE3eIs5dbqGGgpJaxD8c3uvtAtks=; b=tB5MMZi33tZGN7Sn3b9OtxuK+WC2fkWZRq9vnkWAdgRZH7HjZApo/n/kYusw0ECq/D ucYjIGw8A7sIMOkZasVeNPjeP2TamUp8zdD2Due3ddjKYOdp6uhkKJSogmTecIsDbV/s ALWgjJcD6fxUy9Jn3oBNhT4FCtx6g8/uyuhwxvDNSMxjjQKC1hLkKAmNWPDdmaYRs9qk 02QUl/P5BV2vHFIyQ40NBpmzMcIE45fWrecPqj05d81F/z7QAW/SrKp/h5Ph6gZ6Oxhx y3G6mmGYlG4D/KNo4DoZ1n1my97qM3Qi7m3dvZ/L9Gcs7WbTqCmK4RMBQKttK85ucd7k tgXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688673877; x=1691265877; 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=X9IZjQD2LTXlxnaBE3eIs5dbqGGgpJaxD8c3uvtAtks=; b=N7jRThd989X2u2xb/TWfnOWNRBqfZ41bNQpQgMYC5OQLaBFzUT0wRPsxXCFIBsCJCt zteqJby1BGUVTJSXQkuvZsR6F1HDuXBGn/vbu2lWhJi+4sPWvXkvPLqfIRyWLdCflrhk x3K2oACXzbyvmYP3IBqERls20/7xKbJipd2M3Ge5dyDpqlako43lrC/Yx+n0Y9YtvC1t XsZMY0hIumoRb5whP0lMBLy8nZnCybFXA7ckgwIMaEKyMotguRSNs81Yu7Jhad6lloqG UBbMWZ/yehfsxWGmTGrzQYCOcVuOVdkseEZZ4Hp3mQfqUBQAb5espLSiNhIKJ9JFoXef G3VQ== X-Gm-Message-State: ABy/qLazsrH/Of2J8wArK7vLxMLH71M5VMH+jnyxmpc5v8XhQjeaxlUu k0si9kpF8Y7xEt3rXpD7JO6CWQ== X-Google-Smtp-Source: APBJJlHKJMxkU7JcM6fH1eYl6PKwVoUpCDmL9vV/wf5u1gj9jyRLilj6iYLfWfnybbvuV+0sLF2etA== X-Received: by 2002:a05:6a20:d90b:b0:12b:5277:6f83 with SMTP id jd11-20020a056a20d90b00b0012b52776f83mr3037133pzb.52.1688673876861; Thu, 06 Jul 2023 13:04:36 -0700 (PDT) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id y25-20020aa78559000000b0063f1a1e3003sm1620682pfn.166.2023.07.06.13.04.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Jul 2023 13:04:36 -0700 (PDT) Date: Thu, 6 Jul 2023 13:04:34 -0700 From: Stephen Hemminger To: Weifeng Su Cc: , , Subject: Re: [PATCH v2] pci: add O_CLOEXEC when open uio device Message-ID: <20230706130434.0b3a107d@hermes.local> In-Reply-To: <20230629025339.49404-1-suweifeng1@huawei.com> References: <20230629025339.49404-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, 29 Jun 2023 10:53:39 +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. > > Signed-off-by: Weifeng Su Makes sense, the eventfd used form VFIO is already marked as close on exec. Acked-by: Stephen Hamminger