🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #12574

Re: [PATCH rdma-next 05/23] RDMA/mlx5: Reject QP transport types not enabled by FW capability

#12574
From: netdev-bot+sashiko
Date: Sat, 07 Nov 2026 20:24
64 lines
10290 bytes
Thank you for your contribution! Sashiko AI review found more severe
issue(s) in other patches of this series. This mail is only an FYI, in case
you want to address the nit picks below when you respin.

Low priority / nit picks for your consideration:

- [Low] The commit message says the new rc/uc/ud checks in
  check_qp_type() (drivers/infiniband/hw/mlx5/qp.c) refuse 'a transport…

--

RDMA/mlx5: Reject QP transport types not enabled by FW capability

This commit makes check_qp_type() in drivers/infiniband/hw/mlx5/qp.c also
check the rc, uc and ud general capability bits. QP creation for RC, UC
and UD now returns -EOPNOTSUPP when the matching bit is clear. Before
this change, only XRC and DC were gated on capabilities.

> Check the rc, uc and ud capabilities as well, so that QP creation is
> refused for a transport the FW does not support.

[Severity: Low]
Could the commit message explain why this is needed and what userspace
will see after it?

As far as I can tell, the new lines in check_qp_type() are the first
readers of the rc, uc and ud bits anywhere in the tree. With trusted FW,
the change seems to only move a CREATE_QP failure from the FW into the
driver.

The visible effect seems to come from the earlier patch "net/mlx5: Add
capability filtering in adversarial mode". In caps_filter.c,
mlx5_adversarial_filter_general() clears cmd_hca_cap and then restores
only an allow-list of fields:

mlx5_adversarial_filter_general() {
    ...
    memset(dst, 0, MLX5_UN_SZ_BYTES(hca_cap_union));
    ...
    MLX5_HCA_CAP_ALLOW(cmd_hca_cap, rc);
    ...
}

rc is on that list, but ud, uc and xrc are not. In confidential computing
guests running in adversarial mode, every UD and UC QP request would now
fail in check_qp_type():

    case IB_QPT_UD:
        if (!MLX5_CAP_GEN(dev->mdev, ud))
            goto out;

Only RC, RAW_PACKET and the internal special QP types could still be
created. This affects userspace. It also affects kernel ULPs such as
IPoIB until the later patch "RDMA/core: Suppress kverbs_provider for
adversarial_mode devices".

The driver itself clears these bits by policy, so would it be clearer to
describe that as the purpose of this patch? Could the message also say
whether this is a bug fix (with a Fixes: tag) or hardening, so stable
backporters can decide?

-- 
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261103163949.1554-1-yishaih%40nvidia.com
Technical Details
Message-ID: <179408308609.994134.6909095699902527577@kernel.org>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-358502-linux-kernel-netdev=dewy.ru
References: <20261103163949.1554-6-yishaih@nvidia.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-358502-linux-kernel-netdev=dewy.ru
From: netdev-bot+sashiko@kernel.org
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH rdma-next 05/23] RDMA/mlx5: Reject QP transport types not
 enabled by FW capability
Date: Sat, 07 Nov 2026 20:24:46 +0000
Organization: Usenet Network
Message-ID: <179408308609.994134.6909095699902527577@kernel.org>
References: <20261103163949.1554-6-yishaih@nvidia.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
	logging-data="4186684"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:HZOloyiZEFCToUnUetJov6kmEL4= sha256:sowYNvm2pLqePQqFGCeN+QoN++caGmZqqstfbOUI7RY=
	sha1:Du7CmUNldUtYJR2bTRimUyYkFhM= sha256:5xukGAAcHBPBHmjFRnefd5UQJRGR+patskwQ+ZSK04c=
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 1A6571134A8; Sat,  7 Nov 2026 23:28:02 +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 TylobRyFEFsT;
	Sat,  7 Nov 2026 23:27:56 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-358502-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 58B351134A6; Sat,  7 Nov 2026 23:27:48 +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 A936347E36; Sat,  7 Nov 2026 20:24: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=1794083093;
	b=sUrOmn2IPbW1+HYMK3K3Ptdn4fNvUWyPugGlcxD7MbGxWFQZQNOwwWqasOyOT0E9MYCh
	 +5t1BobDGe7UPlx/dDK/b0qL2vpqpXkTdqvAa60SMHjPkmhK4jMo2ec2OpKjdnrExZaSY
	 hOH1kgZesUkDGm811LvAxv+oZhAMkRpIDHPInG29Z2giu7QT6jsP9Z4mEQ4ha0mp/ZgbW
	 ewzfb3b612rxzqq3VqtiHYCBeIhTZ1IRyOo/fA6myve/NpH7a3v/5yFvYllj6R//mGUJn
	 xrYMZDSXyzJV+dPLeCEc1ES2EkMBzVKGrhDqsK7GNZEwK8QNxP6O6Lul7yx214+OogQ==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1794083093;
	h=X-Original-To:Received:Received:DKIM-Signature:Subject:From:To:Cc:
	 Date:Message-ID:In-Reply-To:References:X-sashiko-severity:
	 Content-Type:Content-Transfer-Encoding:X-Mailing-List:List-Id:
	 List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner:
	 Precedence:MIME-Version;
	bh=5I5j3lcfn95BPYhvqhWqzDUccJWCWDr5bp0HOI0uXjs=;
	b=JmsIG3x5bVG9PsGcQSTk9UE22x4eXndh0bD2+A+i2m8S0SaBAVWYU2ZlLZnGA1nzCxNc
	 //N6KBn+HHZziPf8f71Nqy6jbWDrn7tITLjXIZFtXRAv+9N7YG4JJ+bQpRmiVkz+0aCXg
	 u5C6IRFpSaIqvitgUo7aohIbLSIg3S06hM7jHutMB9iqsf8U96330EjUx+x6OYFuWwMe7
	 PSpVN0dL/2c9nI57cPYZuXIcw45mxosmnWdeQeNGaEK+bRFtJP+04vKC+d7Qh1Q6XyxLC
	 OQp7jexQ6pEi6WF0zuorJOMYm5rj5jEXPzaWVx0WA/H53KG4s6Y/2BK6K+th3vIu7/A==
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=W2fbVZd7;
	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 7EFAA606D80E;
	Sat,  7 Nov 2026 20:24: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=W2fbVZd7
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=1794083087;
	b=IeSirVW5+RlvS1MwsIgFv63ZaQDgl6j0DBsh5OSTvYlMTr1lunOZE7ne1M47MaY1sdD3
	 jHRLMS/PIYaLoarCv730JFsan2xDr9FQwT01QZ6k6J2REf2SgM7XehhrJU0tmAx/YQcW5
	 6clhbySpbZNX4R4aTuuVYBFUqQ32RON8JTSbIdO6KxYMoHQtu8izPjQeRo+v1AdRYweuv
	 mcTxnCfqnTtOpW+Y0o82rI2u766NlPd8PvJmX/Z3xqNursp07RU5Mia/BTgXgNPhswPoe
	 E3NoNKPCfLo/kHToHP1Epf1I70dMTnnLTizyIef5SSMkmyWZeVnZxGSCIBhh2YauDTA==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1794083087;
	h=Received:DKIM-Signature:Subject:From:To:Cc:Date:Message-ID:
	 In-Reply-To:References:X-sashiko-severity:Content-Type:
	 Content-Transfer-Encoding:MIME-Version;
	bh=5I5j3lcfn95BPYhvqhWqzDUccJWCWDr5bp0HOI0uXjs=;
	b=Ii9joYPZ+7QH1KjfhVr00EbIc8pNBaOqgKFktO5a7IdngXEoYA9IeJgnJqcQF0rDfqVf
	 t7mjKabIjbkjB52kuTRsoLlwzhqZmhJFKzdElL+LgEWhYF3Ku7lODflMyxqO0gxnYgOj/
	 WzHv9fBVMETkOP/I9xY0t51NsH79PpACVt1WirY8HCl9Q73jYQP9WL6tFQv04HqU85z8v
	 9VyKSU1koRFUlfqxzd2GeHAiwyM3tn10sik5CnpCIF3rr08V3I8pehzbG+VS4Mo29EjDc
	 cMXQETfdJU9E9YCCIwDhVQ8JRsZ1BvWhs0LWrgZlvZt688mR3FEOfGeQkz7TNZugfmA==
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=W2fbVZd7;
	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 672FF606A32C;
	Sat,  7 Nov 2026 20:24:47 +0000 (UTC)
X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7C83A1F008A1;
	Sat,  7 Nov 2026 20:24:46 +0000 (UTC)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org;
	s=k20260515; t=1794083087;
	bh=5I5j3lcfn95BPYhvqhWqzDUccJWCWDr5bp0HOI0uXjs=;
	h=Subject:From:To:Cc:Date:In-Reply-To:References;
	b=W2fbVZd7OWYdWRZknc8NX3xTE1F1qjNzhYm4UfixWL4hb7QdHDkqvYgo8xKanH7b/
	 40H2U7Mt4kAEIpS0mk7rxDRJ0z3SzV3kd3HJwkt4gaA6/uy4+KvXpP0Ycg9SXxoyQ3
	 13cee8t1Oe5ziOAjqsD/SSWBe6gilyzGDHP49fFcvhMH6zDxP7RCS8YQj8y7Bh56KN
	 rfw1QfIJKN10IZXFTYlwJjTAhB8cuq1SSjku9nhuXP5ATs1mNGkuBpQFhIoRPeMZYe
	 FQ/0ZlClddhOmq32X83QNdjb3Wi38BQdK7/aKu4QcMRxCMM/FncOR12oT7xBeuBjvS
	 vjhhi06SvKt6w==
X-Cc: jgg@ziepe.ca, leon@kernel.org, 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-In-Reply-To: <20261103163949.1554-6-yishaih@nvidia.com>
X-sashiko-severity: Low
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