Article View: linux.kernel.netdev
Article #26345[PATCH v5 25/33] driver core: Expose committed device trust level
From: Leon Romanovsky
Date: Thu, 03 Dec 2026 12:03
Date: Thu, 03 Dec 2026 12:03
57 lines
10402 bytes
10402 bytes
From: Leon Romanovsky <leonro@nvidia.com>
After probe failure or unbind, active trust returns to blocked while the
accepted operating level remains committed. IOMMU state and other
infrastructure can outlive the driver, so active trust alone cannot tell
them which operating level was accepted.
Expose the retained commitment separately. This lets infrastructure honor
the original level after probe failure or unbind without mistaking inactive
driver state for a new authorization opportunity.
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
---
drivers/base/trust.c | 13 +++++++++++++
include/linux/device/trust.h | 1 +
2 files changed, 14 insertions(+)
diff --git a/drivers/base/trust.c b/drivers/base/trust.c
index 8ed414d6eb0e..9f7478bd7a6d 100644
--- a/drivers/base/trust.c
+++ b/drivers/base/trust.c
@@ -157,6 +157,19 @@ enum device_trust_level device_get_trust_level(const struct device *dev)
}
EXPORT_SYMBOL_GPL(device_get_trust_level);
+/**
+ * device_get_committed_trust_level - Return the lifetime trust commitment
+ * @dev: device to inspect
+ *
+ * Return: %DEVICE_TRUST_BLOCKED before admission, otherwise the level fixed
+ * before driver setup. The commitment survives setup failure and unbind.
+ */
+enum device_trust_level device_get_committed_trust_level(const struct device *dev)
+{
+ return READ_ONCE(dev->trust_committed_level);
+}
+EXPORT_SYMBOL_GPL(device_get_committed_trust_level);
+
/**
* device_is_adversarial - Test whether a device is operated as an adversary
* @dev: device to inspect
diff --git a/include/linux/device/trust.h b/include/linux/device/trust.h
index f39523df03ae..250cf4004193 100644
--- a/include/linux/device/trust.h
+++ b/include/linux/device/trust.h
@@ -48,6 +48,7 @@ int device_trust_set_policy_locked(struct device *dev,
enum device_trust_policy policy);
int device_trust_set_policy(struct device *dev, enum device_trust_policy policy);
enum device_trust_level device_get_trust_level(const struct device *dev);
+enum device_trust_level device_get_committed_trust_level(const struct device *dev);
bool device_is_adversarial(const struct device *dev);
#endif /* _DEVICE_TRUST_H_ */
--
2.56.1
Technical Details
Message-ID:
<20261203-device-trust-core-v5-25-485cc6eddd46@nvidia.com>Path:
mbox-mo1.pugleaf.net!srl.newsdeef.eu.MISMATCH!feed-eu-txt.newsdeef.eu!feed-eu-ch.newsdeef.eu!srl.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-376565-linux-kernel-netdev=dewy.ruReferences:
<20261203-device-trust-core-v5-0-485cc6eddd46@nvidia.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srl.newsdeef.eu.MISMATCH!feed-eu-txt.newsdeef.eu!feed-eu-ch.newsdeef.eu!srl.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-376565-linux-kernel-netdev=dewy.ru From: leon@kernel.org (Leon Romanovsky) Newsgroups: linux.kernel.netdev Subject: [PATCH v5 25/33] driver core: Expose committed device trust level Date: Thu, 3 Dec 2026 14:03:47 +0200 Organization: Usenet Network Message-ID: <20261203-device-trust-core-v5-25-485cc6eddd46@nvidia.com> References: <20261203-device-trust-core-v5-0-485cc6eddd46@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="2482728"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:5B7MtOrE40LTZ78VRqgxJiGOtGA= sha256:TrFewyaZ2nlujl55nidmjBMfJLqhU2hhtrAfcyjHZnw= sha1:MRFx3vL1XYKWiWRgT4j2WboNZNo= sha256:dNNQpyz/yjug59ynIY0vI3ADgmSx8IX7dLpPA2izLx8= 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 66137117922; Thu, 3 Dec 2026 15:11:12 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -2.54 X-Spam-Status: No, score=-2.54 tagged_above=-9999 required=6.31 tests=[DCC_CHECK=1.1, DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.24, 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 tFMx7ej4AsDE; Thu, 3 Dec 2026 15:11:10 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=104.64.211.4; helo=sin.lore.kernel.org; envelope-from=netdev+bounces-376565-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 sin.lore.kernel.org (sin.lore.kernel.org [104.64.211.4]) by mail.dewy.ru (Postfix) with ESMTPS id DA12B1178DD; Thu, 3 Dec 2026 15:11:01 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sin.lore.kernel.org (Postfix) with ESMTP id BBBB52AF26; Thu, 3 Dec 2026 12:10:53 +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=1796299554; b=pRw7s/tuP7tVysvsWlp18Xad+qUIR84HbpLFTH35EvriFaQVG5FtEIdFFdpUzojeZFpA HA13rvc9ptwMv6mbNmZj5B85O04Bk7JN2Gl9qnbXb/SNORDyp14QZBBQOqPU6Ek/TBbo+ /wYKmEF70S4rjDw3dD21DGc1u4hyT83KA8bsHd2MyWowI+gNx6LJPc0wNXHh/NquEZ9e7 vHydcQI7dIEqNNWqYQwREd3RHFvUhD76+fPf5QkJEFDCNAtuZGyF7UaM5bXSxChLruf/R vavqlWO5Gyg5UIzqK7888nb7aLtB5fQNc2okPkYwHCJjhwb/pQxpV/8U0TQP1fu4CxQ== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796299554; h=X-Original-To:Received:Received:DKIM-Signature:From:To:Cc:Subject: Date:Message-ID:X-Mailer:In-Reply-To:References:X-Mailing-List: List-Id:List-Post:List-Help:List-Subscribe:List-Unsubscribe: List-Owner:Precedence:MIME-Version:Content-Type:X-Mailer: Content-Transfer-Encoding; bh=rZJSigvj+pTCgnG5y2QNi+gxQi9CD0t5ud+77470tGY=; b=sh4wSaCOGecapidk8w2XDRSnryHsuoQFKmgs4GGUHRTYGHCojk3j4DLyLxOGw6JovIVv IclU87xnF+PysT3FqCDP4YaHqTnmS1ELGLqu80cBjZt/sLWZahis456kMj+4yxTb1HKta 9gJKzLnAYvNMURYynpkxweyZaImygsREoF2q8VFiIWWy+t/DrcTgp3doAcqTbLiMhhrUE Qgu18d/rYKg5UD5DNLeObb2Lh9S6ZEoaDS7SvjLUtl54E+bXcScaeA4wK7RSsni1Nw0U7 g2/3YhP9keySRAw1NGpx1GW0fSRALthC3wY5xAwN9X0IY6fvWjf+ECwDtGUDcLqY2Cg== 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=Z4pP4vZq; 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 E6DB360A260C; Thu, 3 Dec 2026 12:05:53 +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=Z4pP4vZq 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=1796299538; b=z2+fYuPGvN7T4NVcavUkbAlGH3PmyztknaGHvJ9on7LRyuYsUYB1zQFhg3j+5GtwaAu+ CFHd0RxKtEQEyT5qAy3A63jnYwdp0/UaJXYmkSTeXVPJwF7YFRnZWUzRPdCVl/uwK8MTm V+jl9quceSVW2el45rJZiPIzj23ihEnA693XoUjzgBG3LWudvjElm3b8aVUynWcXHJU4i QBAqeFRN3NDHK5LURIhV7tsJpMA04oGa4pcncBxPHUZNnVVqARhDaZiDHITlKdVmUmu8v K14iiSLBY8biQMuYYXZzmGTsl3Dre4DrR+o0MrqORalin930StiUa906hAWnDzMoYSw== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796299538; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:MIME-Version:Content-Type:X-Mailer: Content-Transfer-Encoding; bh=rZJSigvj+pTCgnG5y2QNi+gxQi9CD0t5ud+77470tGY=; b=nOW1SWdEanngKcFzit3MI7BC1QZQnC+61mBAG6BKMUQ3U/bHOKCxOc3zWB4SrhDHvtmL CqPPeSNeYfrrAVzsvDpevi6AKCRTc9irpPomeKQ7pCObhO5QSAV/HCbpL3Fj9me0BuEaU GAUxbx5ewCOndS6RijLnieyCdGKb9lSiviw8Z7Q0uWS77YFLKO2isWZstF6K1lXxYba0i joivMIWFzORlRvY0eHJT7b5ewciSUQWpCx9I1BfOklL4oqbEKU7xROl1vAFZCEE3IRGjy Bu/rAw3ABw64NCtpyl7b4LY118SGCNfMjjVYyoNLJxyPR60F6najUmhw+gf+YilxbXg== 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=Z4pP4vZq; 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 0C2EC60A263F; Thu, 3 Dec 2026 12:05:37 +0000 (UTC) X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id D8FA71F0089C; Thu, 3 Dec 2026 12:05:36 +0000 (UTC) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796299537; bh=rZJSigvj+pTCgnG5y2QNi+gxQi9CD0t5ud+77470tGY=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=Z4pP4vZqTGVgq6zrZQ+QUOQ9DTl8rVkesOLASrcse4+Z+HuxANjEafBSPypEx8kKh aGN/Ev+wBkMwas83FomoL72D+M0/O/Zt6rc8S+qWxDEAhFNlyiLBBvV8Xvf/495kmq FvVNaXmYKZ1wXE8pJXWf1KPRerG7BZp+0jFGkulKOtcQnOjbix9Taomghiq3OFGaIJ uGukkPwdiWD93d91kwxZVxgv13cnrZ+7eEulBS2iBICIxSu6kwklf52awa53IBAkuV ZpwDqylGhJB6U+WPh3aad1+8dBwDELWbSiXC6KD9pftgY6I39loJtxJhppr4iFx69U 1mKUOqH2SQmnA== X-Cc: 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, linux-coco@lists.linux.dev, Alexey Kardashevskiy <aik@amd.com>, Luiz Augusto von Dentz <luiz.von.dentz@intel.com>, Greg Kroah-Hartman <gregkh@suse.de>, linux-sound@vger.kernel.org, Jason Gunthorpe <jgg@ziepe.ca> X-Mailer: git-send-email 2.56.1 X-In-Reply-To: <20261203-device-trust-core-v5-0-485cc6eddd46@nvidia.com> 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-Mailer: b4 0.17-dev-d2b70