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 643EA42DEC; Thu, 6 Jul 2023 22:04:39 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A4A6342FB8; Thu, 6 Jul 2023 22:04:38 +0200 (CEST) Received: from mail-pg1-f170.google.com (mail-pg1-f170.google.com [209.85.215.170]) by mails.dpdk.org (Postfix) with ESMTP id DCCBE40A79 for ; Thu, 6 Jul 2023 22:04:37 +0200 (CEST) Received: by mail-pg1-f170.google.com with SMTP id 41be03b00d2f7-55adfa61199so850108a12.2 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=J9akbBp+k87NTJ3fjq63wpfaR7Qt+5lH9K0mrmkN65KD36L6MrehaKDs8vGImiEguY uHRzSvDtarTUAexLpHSz9UXrl5b8/tsgQf4FkCiYVfwr4sicwsXyOQ7fMw1vcKTxMmxN XakEPnjupuzel7kmfZhTV5a8yl7GQmdNLN1fpNUlYV+m3njBDuaU8EpuKmYi9xzTi2MO uUgH/ORNmmPaM6R0UZawmUIuwXOb6TXK7EBazRQb2oOTuKV6QZs/O1CqZPosl0dHkoHP TvUPK+5+TsLyuRogSUbE4Yc9j8t+jeDGRq0kEZTqwUGJpPYMQU6a9i+E87ruN42aOmn7 KsGA== X-Gm-Message-State: ABy/qLaIxwhkLY9n4zO0fhbRQVirKm1OynFOiV+mg4CfLA8ExtzrzCBo bksv9O44Mk10NhQMXjza2JZM4A== 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: 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, 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