Article View: linux.kernel.netdev
Article #21671[PATCH v4 25/33] driver core: Expose committed device trust level
From: Leon Romanovsky
Date: Tue, 24 Nov 2026 09:43
Date: Tue, 24 Nov 2026 09:43
57 lines
10330 bytes
10330 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 b968bfc937346..ddd570773a070 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 a3a583eeb484c..1ac9cb5b3ceb3 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:
<20261124-device-trust-core-v4-25-037eb0d17b1f@nvidia.com>Path:
mbox-mo1.pugleaf.net!srv.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-370192-linux-kernel-netdev=dewy.ruReferences:
<20261124-device-trust-core-v4-0-037eb0d17b1f@nvidia.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-370192-linux-kernel-netdev=dewy.ru From: leon@kernel.org (Leon Romanovsky) Newsgroups: linux.kernel.netdev Subject: [PATCH v4 25/33] driver core: Expose committed device trust level Date: Tue, 24 Nov 2026 11:43:56 +0200 Organization: Usenet Network Message-ID: <20261124-device-trust-core-v4-25-037eb0d17b1f@nvidia.com> References: <20261124-device-trust-core-v4-0-037eb0d17b1f@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="4104871"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:KcfGXKJVNscK8yFbP0JzV0MfTw0= sha256:Zh/AiCvvOBKEXqsYfHJSldphoSpntbZhvNtbOhR7gBc= sha1:zwm8CtJxHJppzinb+khnC64o/ms= sha256:ysPMnpcCjIKrq5tIhxxYSHD1n6a4apj3AxBoUseCeGU= 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 6CB9A125DE8; Tue, 24 Nov 2026 12:48:58 +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 23EYvQrE1o1Y; Tue, 24 Nov 2026 12:48:55 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=104.64.211.4; helo=sin.lore.kernel.org; envelope-from=netdev+bounces-370192-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 3811E125DEB; Tue, 24 Nov 2026 12:48:47 +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 9C07E2D14F; Tue, 24 Nov 2026 09:48:43 +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=1795513582; b=fF5Hld4e0TvbMNKvayfjhYL/XCWE8UjAWZU3ODbx2cgOBJP+1r+14oA+9z4tNeFEWXV7 2kDKau//srOfOAGichaoci9nQTCblUvUygtsYStUUh/Ik4+9odXVJdbd11iGFoa4j4nuK Cu8bdcoK82fesFYGxL7mmDByLSsVQ2/OXLCrLLwgsQ46Xs38YaNjGYaLwPF1VkPOZ9yg0 55sjzceldKUiqQFPoNaBdnkefNRkx1aihP7HTO9lotZgBs2qteQ9DV+x0M21lPWkblDPr 66vckVPi49Mw7SPalrD4gFFzcu54LnqhEZ1i6aO2+rW4e8HHzR1G7of896weTsjVNvA== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795513582; 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=cpTS94Nlb5etqG8ClWRhdF0oxfHbFp//wqSv3Y/5cKI=; b=nXq++eC4rtqyPwfVC/aEyyR4SNXd19HQXfUbBE85mYBMTqydw5ycXNyF+TTsmFL1y6pv 98fbEyCeelEIHcO8332E6Sd1CW19rdSoj2+fPPx6sSt/5h3shmzgYfH8XrSyjkzdcdSka YCstB7/YQYgffBwNSeKmwZm62SRFItxn1x3vZhMnFXr14hq3FbudGXhQaE2erFftXgvWq qUFul7QA5xiuBqcUo8vnXwzDqw5QMacyEGvH2XwBqXdOSnuW3Zef8+kwrkhsqBxHWduk7 z4ULTggpS5PF/85/TKHpwjTEq2Mn3eXt+jBwk9RzCYwipqb4ajWe9YxCjjaBbj8PiDg== 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=Gvw8DUWV; 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 44F746074011; Tue, 24 Nov 2026 09:46:22 +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=Gvw8DUWV 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=1795513576; b=Ztcnt6yshtn2dWMNpZZMJ8+QAnUqlx1OviYtb3uI/9ctx2aqWMBjTVga+PipmaVgHv87 LWYfgyDRWEy6RirV2pgT7se3Q6MhQQuS3pwdbP73QslyIVK5MDIRTGwsurCQrkKeVwLZ/ XM5fFovVhm0sV8GQ95rIEQGRixGFAbeRVgFn34eI9xgDyoPdUaP3WqEJX9rmNQS8pi5kO z1WNqbWY7ovIhFedk17ZzDizpYzp16TuB7LE6KGIhbN0gYN35eYfSk7eo3v9RDn6f9IwU JyJH/ZwIogFIl0DfE/h5x66X7zuveC/iGYFVN/ixGuSIBzlqVUfzjJ2bOZ1gIfq5ZyQ== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795513576; 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=cpTS94Nlb5etqG8ClWRhdF0oxfHbFp//wqSv3Y/5cKI=; b=a2hLA+nyumgHGUjKED/Eu9hTzX4p65QMx968ZMIDehR+rBwV5nERcIVMOsJgGACjrIHw lqxZT71ZVH3VeEZlPEEKdPLVdgU7KCNLi+mth5hU1WF5JJxLehO138W7u/isAavqq/88a 2QarEDGa/pzIgTsIi2JibXJRvEPS8BZtDTUyQEPRhWcD+Vvy+SQUbQuubhEi0xOFK11z1 V1MsEIXTSd6R9xKcihrVL+vf1p8xKYDl1Us4DVRbHE3EmQn3pk8BEx+++2SvjUBBiiIkc s4eP4zLz9IVQUCxymeeAhoGE7n1PizmqQSzCOgcFxjOteJjMJcalt0wR5w6tCk9IBbQ== 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=Gvw8DUWV; 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 5BB16606B033; Tue, 24 Nov 2026 09:46:16 +0000 (UTC) X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id D85131F000C4; Tue, 24 Nov 2026 09:46:14 +0000 (UTC) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1795513575; bh=cpTS94Nlb5etqG8ClWRhdF0oxfHbFp//wqSv3Y/5cKI=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=Gvw8DUWVJURXZPN6ZRi0RTKSYd8JK8tfvyMMCiQKqdmRKRyE+KMgApmRrT9+f9hRg SoaUHiR/UScRwQ7YxbuXQtviPo4xgeJvxCWRyLrzg518CTKdlmaqGFc+UgwlWJ0ExK 9YaN46IoUKkchdS0CPECdWS30cucl3toj+Ky1fabeo3WTstnBESvd6tkRHLMk/RGIJ fEcCIzF1iqWmYejBgHuCloMrflvYJl7mfjsahKGSbNtvt+rwHPw4r2k1LLv2TrERcg t5yQL9tI6ySCfsJGmi59PPrNr4BBN1yFWG7oJ0udsb8Mnq0YsBTJohxfqqIVXG7c8c X+/f2uxbfx+jA== 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: <20261124-device-trust-core-v4-0-037eb0d17b1f@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