Article View: linux.kernel.netdev
Article #18725[PATCH v3 23/31] driver core: Expose committed device trust level
From: Leon Romanovsky
Date: Wed, 18 Nov 2026 19:26
Date: Wed, 18 Nov 2026 19:26
57 lines
10362 bytes
10362 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 03a56f85f0f33..bf4f2c8b31d09 100644
--- a/drivers/base/trust.c
+++ b/drivers/base/trust.c
@@ -155,6 +155,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 0258e07f938d1..22d3a4dc768e8 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:
<20261118-device-trust-core-v3-23-d655875c4bfb@nvidia.com>Path:
mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-366396-linux-kernel-netdev=dewy.ruReferences:
<20261118-device-trust-core-v3-0-d655875c4bfb@nvidia.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-366396-linux-kernel-netdev=dewy.ru From: leon@kernel.org (Leon Romanovsky) Newsgroups: linux.kernel.netdev Subject: [PATCH v3 23/31] driver core: Expose committed device trust level Date: Wed, 18 Nov 2026 21:26:53 +0200 Organization: Usenet Network Message-ID: <20261118-device-trust-core-v3-23-d655875c4bfb@nvidia.com> References: <20261118-device-trust-core-v3-0-d655875c4bfb@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="2683187"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:l7IPs8VUaKBUpxFHso8E4to2UzM= sha256:Zk/F2A34Uxkn4Q2utbyYQYRelI6vQOvw67AAwe+UwLU= sha1:wz+EM2umV/R7ucB7Alim8Wojy/A= sha256:OhL8s57xAomEJxateL3bpJGvTVatPp26AT27DBorXQg= 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 2E3541153AD; Wed, 18 Nov 2026 22:39:08 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -2.301 X-Spam-Status: No, score=-2.301 tagged_above=-9999 required=6.31 tests=[DCC_CHECK=1.1, DCC_REPUT_70_89=0.1, 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 cud1mb8GhfVj; Wed, 18 Nov 2026 22:39:05 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-366396-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 sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mail.dewy.ru (Postfix) with ESMTPS id C390A11539B; Wed, 18 Nov 2026 22:38:56 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sea.lore.kernel.org (Postfix) with ESMTP id 45305146971; Wed, 18 Nov 2026 19:33:22 +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=1795030135; b=DpFTzUbm3tiSIzfchnzvQMkDrXMAzmxyKW059VS+m8w2EYPZjPcOjXRfy/wnN2vNFQvw DMm2ejKoYmTbeCAXa80kjYtxFwPlQQmgI1DqLR7k/qvCF6hD7x/YcV9bINL9TioDhaPgI 0UHk/6g59RRQOsKE1FetV8A0jVdQaoa7tf5BVRfsVEFRUCVcYbUT+qFnT1RQSrgXAbKK9 TlOO9tNqbZa6jFxXX3izGKylnQ3JH0t7uYZf2YZl1Ae3Ni1oeeHaofk1OgcQG9jwT6jLd pJ/vvKSHAkmB864whCQX6uVmFWvmWvkkw6jXpIiSC2JUz9Zl3HTPw9Kfi3gz0Zk/19g== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795030135; 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=yDvVfD4XGROkqlQ6t/rdrEpB1IqmVmjUCkZ/2kUJqAc=; b=XDBssR3uKlxeu1vPw1nHvC6Cmq/pqgfNxi3m3fISkDUZrdVrF4JulBIw1cKOtcI68PuF oCWg3sv+I5xKsedhqROHCbg16kBqPvNlRxojFStjp9WlUq3XZHF2nOUP4G62C2GyEV/gt 3zXuR3ldfi/KS50frOiJi4VhntoeG3NUHvXDReETUDj+yh1fEwb5Ajt5oNksHhNbHSAwr xohuW5Lazq4Vg58QoprVwjz3ESZeslryfOvytZRBamPjI9NE9KKX/KGWD3cOWDib4yEZU p4bURn2JPjQYr9g6FcQaJnoWGjakEA6BBB6rnSf+yUVDkjeWoAT7THumX9ULr4xJbAA== 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=ezAk30VY; 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 AF7336074EB3; Wed, 18 Nov 2026 19:28:55 +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=ezAk30VY 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=1795030129; b=bGldiYGqX8QSZhLVJf/k2SkeRqPDoAHV/qR10Loa5Mq9/F1MhOOScjUVDxeIS84LMplR GO18IZgH8VOO8FjnMyCtWrn0iUr/CzaEyU6ZSgEz7ML1CaaTXJ014Hw862D96Jdr61nA/ tC/wu9mDcflqikD7QgkZm4mux6LjjU8qOKrcVifsYQ9xvNCES13q7uerWAESxz//dSvfT CgLxegKKHpEsUR+Vz0hrCQ01ju7S5t8n0BXlbDdgvC7eC8eF+YOMkS0E1pUS82XojL1NR +Qn836Y8TegXDEB//tRRa2I21/2gc4olPreWJSr32fFyjzup9f6bC2g/36HvnyBBZow== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795030129; 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=yDvVfD4XGROkqlQ6t/rdrEpB1IqmVmjUCkZ/2kUJqAc=; b=wMl41V21n9WMEzAoHiSQ8euTZMzBkzmWhn8RDTrrVmQ059/HHyxLt5qa/HJz/PtqI1gG Ny2cchTQ2ImooNJn5B79A3eGouuuy/TaYQUS0dB4FWgE6Iy2m02vtJ4wQhMdhbyNo8Iu7 gy4PLasQ07Y4YtJsPKc35FO92+y9Tx9MKo4gqMGzjmWxBm6KAMrrgEN+kD8KMPybvKCA2 pFgDB8JVCQwJCkwM6crMsZY8bcYbkr/ssMMgowWSKj3Tw10yJPZu+pRhGMmGX2t+JYG/X h9oc61L8qzqd0FLo9dGj6PD4FizdVLr/H7p9KQ8A2vPgOinZBfcnWwUV/N9SAio8NXA== 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=ezAk30VY; 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 C8760606B125; Wed, 18 Nov 2026 19:28:49 +0000 (UTC) X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 61FF41F000C4; Wed, 18 Nov 2026 19:28:48 +0000 (UTC) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1795030129; bh=yDvVfD4XGROkqlQ6t/rdrEpB1IqmVmjUCkZ/2kUJqAc=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=ezAk30VYnRbpMbCNjIz6B9yXjadUXio8NcD87dyr8Lsgi4871qJE2Sw4g3Btt2vhl rFXyF4AmjPcc29B18lm9p8w5GCbZKsbmcoedjx+PvDjpv3DavftJ2Rf4JnjL4Hcsfm 1+M3BDfvsIX9MOYzmy1g0mYnJqcstG1NF35T1mHyuR1VeCwgdVlmsK8oH/Hw5cMYId Cr0XdZeCtynf+n3++KJN2cTR7ZohjWPW1uKTFQY6eUr7LTf7FNJ02SGb+Uq7COPlgW 8scImXuet37N8MouZgKIVIISVZ0SSa+bXn8OgN2smfCkLySiggOxueBYy7vXZ9VD8v unBmgaHFIIdgw== 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: <20261118-device-trust-core-v3-0-d655875c4bfb@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.15-dev-18f8f