Article View: linux.kernel.netdev
Article #17023Re: [PATCH V1 rdma-next 02/24] net/mlx5: Derive adversarial mode from CC guest memory encryption
From: Leon Romanovsky
Date: Mon, 16 Nov 2026 09:45
Date: Mon, 16 Nov 2026 09:45
43 lines
9391 bytes
9391 bytes
On Tue, Nov 10, 2026 at 03:42:58PM +0200, Yishai Hadas wrote:
> Add mlx5_is_adversarial() to report whether the driver treats the NIC
> as untrusted. In a confidential computing guest, the hypervisor and any
> passthrough device are outside the guest's trust boundary, so the mode
> is derived from cc_platform_has(CC_ATTR_GUEST_MEM_ENCRYPT).
>
> This turns adversarial mode on automatically in such guests, without
> any administrator configuration.
>
> Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
> Signed-off-by: Yishai Hadas <yishaih@nvidia.com>
> ---
> drivers/net/ethernet/mellanox/mlx5/core/main.c | 7 +++++++
> include/linux/mlx5/driver.h | 1 +
> 2 files changed, 8 insertions(+)
>
> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/main.c b/drivers/net/ethernet/mellanox/mlx5/core/main.c
> index 1a45474ce03d..f9e10464a71b 100644
> --- a/drivers/net/ethernet/mellanox/mlx5/core/main.c
> +++ b/drivers/net/ethernet/mellanox/mlx5/core/main.c
> @@ -31,6 +31,7 @@
> */
>
> #include <linux/highmem.h>
> +#include <linux/cc_platform.h>
> #include <linux/module.h>
> #include <linux/init.h>
> #include <linux/errno.h>
> @@ -484,6 +485,12 @@ bool mlx5_is_roce_on(struct mlx5_core_dev *dev)
> }
> EXPORT_SYMBOL(mlx5_is_roce_on);
>
> +bool mlx5_is_adversarial(void)
> +{
> + return cc_platform_has(CC_ATTR_GUEST_MEM_ENCRYPT);
> +}
> +EXPORT_SYMBOL_GPL(mlx5_is_adversarial);
I would expect all drivers to follow the driver core's trust level instead.
https://lore.kernel.org/all/20261109-device-trust-core-v2-0-3b12d9a9f861@nvidia.com/
Thanks
Technical Details
Message-ID:
<20261116094522.GF11319@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-364150-linux-kernel-netdev=dewy.ruReferences:
<20261110134320.34408-1-yishaih@nvidia.com> <20261110134320.34408-3-yishaih@nvidia.com>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-364150-linux-kernel-netdev=dewy.ru From: leon@kernel.org (Leon Romanovsky) Newsgroups: linux.kernel.netdev Subject: Re: [PATCH V1 rdma-next 02/24] net/mlx5: Derive adversarial mode from CC guest memory encryption Date: Mon, 16 Nov 2026 11:45:22 +0200 Organization: Usenet Network Message-ID: <20261116094522.GF11319@unreal> References: <20261110134320.34408-1-yishaih@nvidia.com> <20261110134320.34408-3-yishaih@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: usenet.network; logging-data="2025444"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:JaVqOh/eiRopvCaewuMdvM3+Tlk= sha256:8mKjBMuKccu/7qloKsadCxKPxvN6XujB2lYBbLJ+qtI= sha1:tSk/mwXynkCiXyvDNV9dc9tz9+Q= sha256:jG3XUUtk9KgavJ9X8fQnT3TA7ojTpA11NNiupQQlz4w= 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 C34F2114B81; Mon, 16 Nov 2026 12:46:16 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.401 X-Spam-Status: No, score=-3.401 tagged_above=-9999 required=6.31 tests=[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 qvj1-_ia1UYb; Mon, 16 Nov 2026 12:46:12 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-364150-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 tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114]) by mail.dewy.ru (Postfix) with ESMTPS id 0FB55114B69; Mon, 16 Nov 2026 12:46:03 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by tor.lore.kernel.org (Postfix) with ESMTP id 8B8CD31306; Mon, 16 Nov 2026 09:45:39 +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=1794822327; b=b6kulW4LDDDnI8Z5izmWEPFW8ff2L9mAu4VWtZq6RJkZeclgGRhLXASgXMNZGJTCqP7u Dc6/FrpkS2TiZLCrg2eH3yxeENU1cXFhTi9MeT2p+QsscPqhKEfsZykkiRJYw3tZavTNW u5UrKd/I+2zfOGegQ69/E3PHgX1TSMm7hnDKqfX6UYQnw+8G36AQcu45PqocFzoBevMN3 xx+F7ehMm/sQFpwzRQIuNUCDStzuvMIhWVxeN21/rF8ae6Kcjacj96ooYheIj8lMb7JGU 76EKmGcCbQLtrqZ7CLqXjyRybYkC6OqMC/+7lFCYw06tFoWTfrVx34cCl9e6cKRu6SA== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794822327; 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=AcJ12s1T668XtamSJZSY4eaKeD4//TNPNhdEPiqg3+I=; b=aYs0Rqv+sv5r6iPEvJ+BMXZqPTiDICPcg6UcOPqC2OGKbnlv5G68Vx/82JhNgKVowxAd baQ3U/1b+xWrG/acSd9PTjcq8ssXgjV8AqP9G2WZX6/awg8sgah9OSgQbu6iMcC6HcPzT WZz3YdMdnYkhpSI68XQyHy+nrYuMOzWhYvMaMdvFF2gBKWJ/Um0T0j9vdXAQeFK475Hw0 C1MuaxAvLKiQaMrPjOJQPViRtp0FL3GsWOBeJX2EYeFOQ9ddCZJuySDU93EcwWNyvIwn7 fofRp3GLU4sxfn1LEa+0/kcEYdn2KLZ5e2GzZbHJNUsVX7myxJTG7LhQWYRf+85na3A== 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="RlID/iSc"; 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 AB117606A898; Mon, 16 Nov 2026 09:45:27 +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=RlID/iSc 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=1794822326; b=XyqM+f+sLJk5RgQ6w9i7yQqI45wYvQRrF0sAPXKQM6KTibpb+lIv2/eKU8U/qyLcp75H 1R2EkuesgBc5mQhh8Nr4QbMGNyw/RRBUvvszz8kap9NryUg20B79/s6Mk08kzMf1Db0+u zMAhfsGTUR/F6jHP+0jC6lBjZ62J9q3VYhE+RaZzgTivn1FoNbI6aw4Qk8ZYS6mvKTTk+ pgpZonxkz6mVMwaBZd0CldACONRKKXmHkPI0MeDkOcMxoxiFOUkSbiEGpY7vGLBS5Fz1q RVci4UArVsYWFaZ8XVftvb7BR25rNwPkRvRn1DcYzSIHpFSEhqSTwqzpycZXa7Yh9BQ== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794822326; h=Received:DKIM-Signature:Date:From:To:Cc:Subject:Message-ID: References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To; bh=AcJ12s1T668XtamSJZSY4eaKeD4//TNPNhdEPiqg3+I=; b=3gT39uNFpVcEvkFRJT5pFdp3EMqvltyi4Vb+TNE68eiV2EDS4riXHIn5W/bttiw6sKAO ts0EZXuQUJAxWFLtnOB+/XtkIPfwsRxBxtOZkoPHZSt53ugqfMovk1THV2+b3qMZnM51j wJkAiLR4+4oHsDJvjZVKWE/sIesTHRgUpM+UmkuIEcuEIFmoWHs6xyRMFPaerjr+MsBV0 N6K95xLQJ0Ighb3hfd03ffryX7JBq1+w0MVVGmGBfERQkQNqLPA3J3OT8foeBd2GNLZnz eWIg6ZpIs/S7dPWkprsml1lTNbH5gn2PYUSOd+oADYrYp6LJf/keYSLHwxhdsAuXo7g== 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="RlID/iSc"; 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 CCF06606A883; Mon, 16 Nov 2026 09:45:26 +0000 (UTC) X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id B02181F000C5; Mon, 16 Nov 2026 09:45:25 +0000 (UTC) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1794822326; bh=AcJ12s1T668XtamSJZSY4eaKeD4//TNPNhdEPiqg3+I=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=RlID/iScKk/npFb3nzVihDSZbSjR36bOTG5uFNynERlxJHAyAaxDDRWlmw1HygnIG 2IjNMrZrykMLbUgmfN2a64nDjKPoJzpCK4XCQAosnqgeO3HML34/NES0d6IMrgnl+u Eh2WK99Ek12/k7/jmvKXPKbBuFmDuHFVyLC2DdzOhZoT72O2jyuLBRw9WP6wt6qvXt epwPSekkeTf5kp6vN5xOiAJVXs9jCKEEY8JNWAX+JJc70vIKM+v9oHDeeixUbslmLu 4RZxu2MAJuEXzgxGI2YggIr/FM8NoIL2QGbV7tBJv+NzQx90i5ZtN8FOSvjkeEjxLK jDx056MEtnVhg== X-Cc: jgg@ziepe.ca, linux-rdma@vger.kernel.org, netdev@vger.kernel.org, saeedm@nvidia.com, tariqt@nvidia.com, mbloch@nvidia.com, kuba@kernel.org, pabeni@redhat.com, edumazet@kernel.org, davem@davemloft.net, andrew+netdev@lunn.ch, dtatulea@nvidia.com, moshe@nvidia.com, maorg@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-In-Reply-To: <20261110134320.34408-3-yishaih@nvidia.com>