Article View: linux.kernel.netdev
Article #17268Re: [PATCH 17/17] PCI: Replace untrusted state with device trust
From: Leon Romanovsky
Date: Mon, 16 Nov 2026 14:41
Date: Mon, 16 Nov 2026 14:41
70 lines
11567 bytes
11567 bytes
On Mon, Nov 16, 2026 at 09:20:46AM -0400, Jason Gunthorpe wrote:
> On Mon, Nov 16, 2026 at 06:38:25PM +0530, Aneesh Kumar K.V wrote:
> > > +static inline bool
> > > +pci_dev_default_is_restricted(const struct pci_dev *pdev)
> > > +{
> > > + enum device_trust_policy policy = READ_ONCE(pdev->dev.trust_policy);
> > > +
> > > + return policy == DEVICE_TRUST_POLICY_DISABLED ||
> > > + policy == DEVICE_TRUST_POLICY_ADVERSARY;
> > > +}
> > > +
> >
> > Could you clarify how this series will work alongside device acceptance
> > and private-memory access?
> >
> > In particular, what should callers of device_cc_accepted() use under
> > this model?
>
> Who is calling device_cc_accepted? I thought we were keeping that
> internal to the DMA PI?
>
> > My understanding is that trust describes the operating
> > policy, not TDISP acceptance or DMA access to private memory.
>
> Right.
>
> > Therefore,
> > neither FULL nor ADVERSARY alone indicates whether a device can access
> > private memory?
>
> Right.
>
> Once you turn on TDISP you effectively activate DMA, just like turning
> on the IOMMU.
>
> Userspace then gets to choose how the rest of the system behavess. You
> can still run a strict viommu with an adversarial driver even if you
> enabled TDISP and can DMA to all memory.
>
> I don't know if many people would choose that combination, but it is
> there.
>
> > You also mention that once a trust level other than DISABLED is set, it
> > cannot be changed during the device's lifetime. If a device initially
> > operates in ADVERSARY mode and later attestation justifies FULL
> > operation, is that transition intentionally unsupported for the existing
> > device object? As documented, unbind/rebind and reset preserve the
> > committed level.
>
> I think it should only be for the duration of a bound driver?
For now, I decided to disallow state changes because the IOMMU may outlive the
bound device. Unbinding does not fully reset the device, so we must quiesce it
to ensure complete security.
Thanks
>
> > It would help to describe how the trust framework fits together with
> > those separate mechanisms, including which pieces are left for follow-up
> > series.
>
> The main thing it brings is the pause to allow userspace to measure
> the device and put it into RUN if it so chooses before any driver is
> bound.
>
> It doesn't change how any of the DMA or TDSIP flows work.
>
> Jason
Technical Details
Message-ID:
<20261116144103.GU11319@unreal>Path:
mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-364463-linux-kernel-netdev=dewy.ruReferences:
<20261105-device-trust-core-v1-0-1e536825b4eb@nvidia.com> <20261105-device-trust-core-v1-17-1e536825b4eb@nvidia.com> <yq5amrr8yldi.fsf@kernel.org> <20261116132046.GI2532299@ziepe.ca>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-364463-linux-kernel-netdev=dewy.ru From: leon@kernel.org (Leon Romanovsky) Newsgroups: linux.kernel.netdev Subject: Re: [PATCH 17/17] PCI: Replace untrusted state with device trust Date: Mon, 16 Nov 2026 16:41:03 +0200 Organization: Usenet Network Message-ID: <20261116144103.GU11319@unreal> References: <20261105-device-trust-core-v1-0-1e536825b4eb@nvidia.com> <20261105-device-trust-core-v1-17-1e536825b4eb@nvidia.com> <yq5amrr8yldi.fsf@kernel.org> <20261116132046.GI2532299@ziepe.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: usenet.network; logging-data="2088702"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:3bQZ3d2wIMwrLEimiR2Dj39NZt0= sha256:3SihDPdvVcZnj5GeW0/Qxj3LYmbms9NLn4t6LmPlQY0= sha1:I1pAlw+8h+bNz2fIJRMui9KoaAA= sha256:Dt1oAPk3HqeJP2QFqv6fsC6rSM4y/iwXJEOezuZRB1M= Content-Disposition: inline List-ID: <netdev.vger.kernel.org> X-Mailpost-Empty-Hdrs: X-Spam-Level X-Received: from localhost (localhost [127.0.0.1]) by mail.dewy.ru (Postfix) with ESMTP id 7B8FA114C8B; Mon, 16 Nov 2026 17:41:28 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.501 X-Spam-Status: No, score=-3.501 tagged_above=-9999 required=6.31 tests=[DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key) header.d=kernel.org X-Received: from mail.dewy.ru ([127.0.0.1]) by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ftAJxdhn32Yy; Mon, 16 Nov 2026 17:41:22 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.232.135.74; helo=sto.lore.kernel.org; envelope-from=netdev+bounces-364463-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org X-Received: from sto.lore.kernel.org (sto.lore.kernel.org [172.232.135.74]) by mail.dewy.ru (Postfix) with ESMTPS id B2020114C88; Mon, 16 Nov 2026 17:41:14 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sto.lore.kernel.org (Postfix) with ESMTP id 4B6BE603782; Mon, 16 Nov 2026 14:41:14 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1794840072; b=hmxq9zncTQYqBRx176JoBzemqROCz+ewZ5UOYqcoFb6BmrwA/Zw3LLO44khVZe1YzyXs w8tfWKmvpZt0aYe885dFJ6cIz6ABfYyOFGNHk6klR7SFFIXIU9VUCE9Hb/DO7VnrFSlDI Bb6gfgiwUpLfjWETiaj2zOhzMEo78KPfYte4q4kDaifExod43dT462NqhuMKfHnSNL75A H3qO9QGfrzuyxULJmkaeP6/+2JTqOJ5zUrZNzxgpTnQeAv8I7XWZCMxWq9ZFiVBcpiyG3 NYvt1LAKyk1xj7PdkvA9sZUorTBgDRIc0alUiqjH++tK7ZpWkbdhD5lzpNBlR/WM2Nw== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794840072; h=X-Original-To:Received:Received:DKIM-Signature:Date:From:To:Cc: Subject:Message-ID:References:X-Mailing-List:List-Id:List-Post: List-Help:List-Subscribe:List-Unsubscribe:List-Owner:Precedence: MIME-Version:Content-Type:Content-Disposition:In-Reply-To; bh=rck2Y3eqNJgd+mBW5P64Rjy+9DMOjDHBgfT6pXds1IU=; b=GP/EgVYhFz0hPZztuIWSkrdjAh+01R6iJdqWfEtDe3Y+g/hUwsUvUWhBdURz/WF9s6El hkbcQPWjL69GyzSQEgLMUr8YX8OKRYnCJLrebLlR0ltj9N1xZT4aSX7CswALvZc+t5FAN cTAAPzdwjcKYxnxURsrXqyJ3iSD3oVsFtYynvUHcGrLZDHW6e1YRpiQ5OB7Yuw/fuQQ+j Lx6+YrN407JF4mdH3HfpjibRBHR409EPVTVUYh/oJA57WLLyoGPCPvY97L6nNDw3ay9zN Vv14qpUfumjJOkhN84EUMsMWlwcmtc+ZKCamEbxPob+wlnfSU3n95kaPLliKbBjNiJQ== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=hOouaY1x; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BAE43606A332; Mon, 16 Nov 2026 14:41:12 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=hOouaY1x X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1794840066; b=15YnUcdo6n7stjxezg4je0yIEtEcRp6PqHcFQI3mSPYWAPmF8ykCKn0YioDdux32SwBO rxXpSob16mz2SoVasThlGi6N1d6U2UkUQ4NvseAk82ygypWbptUo79904T8NmBMaTIf1i St3+tqcjoGemOn1V4wwrFrQpwFuAIu/gi16Xz6tHEEIR79dfLJFkQRP8v8OsbbmgHGEc8 rkMvNYXa9nWAPzd9YD1exisb0eRVKwBY+rugwf861yUKy4+P5WN5tAzhnU4SjtzajD5f/ YpVy4X6bu133y3Riepy6aEbCuCyRGAr6BPt+Y6OrC132dlMIAGky5XgMilAUb2NtjtQ== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794840066; h=Received:DKIM-Signature:Date:From:To:Cc:Subject:Message-ID: References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To; bh=rck2Y3eqNJgd+mBW5P64Rjy+9DMOjDHBgfT6pXds1IU=; b=wZ3o6u96dM0yK6ap2YbvJaC+zUpnRE7gNJOJ1o8y3kRj9UpKLeiAro7i2QjW6g5PQkKo jx2uf9DVwZy2keQeHDZ+QaURBRSm82O4XDMxSRRCqDgPk0cBTv0YcD1lFfV75b21GRKxs W3LPLUwrBCoi+NIy6I/jnN0zSXzLNWHbyjWs+rM3rgxkjpe/0PYEoJpZRoCQwZ9sSOsCE 6JON9QhJs4RKOQTO2w6dvHwup3R/bR0Ihu1cKE/Qjtw46nYcgjQCUu70E7+l4tqLVqBmI kJFI/TgNL+E2euGyYpvz2tGzblMK8N/orDq8PNUgspHucw+J3ndTe6a/t5vO1TvhR4A== X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=hOouaY1x; arc=none smtp.remote-ip=100.103.45.18 X-Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id ACA2B606A33E; Mon, 16 Nov 2026 14:41:06 +0000 (UTC) X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7C6861F000C5; Mon, 16 Nov 2026 14:41:05 +0000 (UTC) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1794840066; bh=rck2Y3eqNJgd+mBW5P64Rjy+9DMOjDHBgfT6pXds1IU=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=hOouaY1xsoh6wz7OkDEV9jecC1eeHdUzuBJ4iKZos36b0fe+StWs/XSmsTjHsGMfp e0tnBNKEzYBk5ocKoScl5rfojtpjaAq04YxAl9To16QUfCpYwnFZC1O4/NOMYIyx/J 6krsbqGk+aiylgCRzdnezjfMkr6lvaqVy59IDh4S8336RQTcF1BHCaLRWdCsPSIOp+ VVzuE3RLFUwu6bn36UH7ayClXyqoBHEqh0EEwT5lbksAWLyI95yck3v703WGi3w5hJ rBBp+t1wYkX1vn71MylXuHgsWdIYHoEXqOW4MLAWG3JYv7ky1boG/BvH4HGhBbkddM lkYNAFSJRMfOQ== X-Cc: "Aneesh Kumar K.V" <aneesh.kumar@kernel.org>, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, "Rafael J. Wysocki" <rafael@kernel.org>, Danilo Krummrich <dakr@kernel.org>, Dmitry Torokhov <dmitry.torokhov@gmail.com>, Andrew Lunn <andrew@lunn.ch>, Heiner Kallweit <hkallweit1@gmail.com>, Russell King <linux@armlinux.org.uk>, "David S. Miller" <davem@davemloft.net>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, Johannes Berg <johannes@sipsolutions.net>, Jonathan Corbet <corbet@lwn.net>, Shuah Khan <skhan@linuxfoundation.org>, Randy Dunlap <rdunlap@infradead.org>, Bjorn Helgaas <bhelgaas@google.com>, "Joerg Roedel (AMD)" <joro@8bytes.org>, Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>, Vasant Hegde <vasant.hegde@amd.com>, Will Deacon <will@kernel.org>, Robin Murphy <robin.murphy@arm.com>, David Woodhouse <dwmw2@infradead.org>, Lu Baolu <baolu.lu@linux.intel.com>, Johan Hovold <johan@kernel.org>, Eric Dumazet <edumazet@kernel.org>, Marcel Holtmann <marcel@holtmann.org>, Luiz Augusto von Dentz <luiz.dentz@gmail.com>, Nipun Gupta <nipun.gupta@amd.com>, Nikhil Agarwal <nikhil.agarwal@amd.com>, Pieter Jansen van Vuuren <pieter.jansen-van-vuuren@amd.com>, linux-kernel@vger.kernel.org, driver-core@lists.linux.dev, linux-input@vger.kernel.org, netdev@vger.kernel.org, linux-wireless@vger.kernel.org, linux-usb@vger.kernel.org, linux-bluetooth@vger.kernel.org, linux-acpi@vger.kernel.org, linux-doc@vger.kernel.org, linux-pci@vger.kernel.org, iommu@lists.linux.dev X-Mailing-List: netdev@vger.kernel.org X-List-Post: <mailto:netdev@vger.kernel.org> X-List-Help: <mailto:netdev+help@vger.kernel.org> X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org> X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org> X-List-Owner: <mailto:netdev+owner@vger.kernel.org> X-Precedence: list X-In-Reply-To: <20261116132046.GI2532299@ziepe.ca>