🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: linux.kernel.netdev
1 messages
1 total messages Started by Leon Romanovsky Mon, 16 Nov 2026 09:45
Re: [PATCH V1 rdma-next 02/24] net/mlx5: Derive adversarial mode from CC guest memory encryption
#17023
Author: Leon Romanovsky
Date: Mon, 16 Nov 2026 09:45
43 lines
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
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads