🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #4576

Re: [PATCH net v2 1/2] net/mlx5: HWS, fix modify header pattern compare on big-endian

#4576
From: Simon Horman
Date: Sun, 18 Oct 2026 15:03
19 lines
6671 bytes
On Mon, Oct 12, 2026 at 12:19:34PM +0200, Alexandre Cassen wrote:
> mlx5hws_pat_compare_pattern() casts each __be64 action to __be32 to
> compare only its control dword. On big-endian this keeps the data dword
> instead, which HWS clears from the pattern of set and add actions. Two
> such actions writing the same value into different fields then share a
> pattern and the second rule modifies the wrong field.
> 
> Read the first dword of each action from memory instead. Little-endian
> behavior is unchanged.
> 
> Discovered by an AI code review agent [1] and confirmed by code
> inspection. Not reproduced for lack of big-endian hardware running HWS.
> 
> Fixes: aefc15a0fa1c ("net/mlx5: HWS, added modify header pattern and args handling")
> Link: https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261010120147.135825-1-acassen%40corp.free.fr [1]
> Signed-off-by: Alexandre Cassen <acassen@corp.free.fr>

Reviewed-by: Simon Horman <horms@kernel.org>
Technical Details
Message-ID: <20261018150343.GN503057@horms.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-348068-linux-kernel-netdev=dewy.ru
References: <20261012101937.1335231-1-acassen@corp.free.fr> <20261012101937.1335231-2-acassen@corp.free.fr>

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-348068-linux-kernel-netdev=dewy.ru
From: horms@kernel.org (Simon Horman)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net v2 1/2] net/mlx5: HWS, fix modify header pattern
 compare on big-endian
Date: Sun, 18 Oct 2026 16:03:43 +0100
Organization: Usenet Network
Message-ID: <20261018150343.GN503057@horms.kernel.org>
References: <20261012101937.1335231-1-acassen@corp.free.fr>
 <20261012101937.1335231-2-acassen@corp.free.fr>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Info: usenet.network;
	logging-data="3350898"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:QYCbT2XrmXVCXbw487jGreq+mDg= sha256:x0ApsK/XsRciI/r2cHBN+a72uFUksBx/P6br1tiZ98o=
	sha1:qyQYadXDyF+6qxyLtZfqaA3YGgo= sha256:Ekhii+/WJbWMW/E3bhjWMBuMtgG6Xfx/6280l5qiC10=
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 A43E8110829; Sun, 18 Oct 2026 18:04:06 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.84
X-Spam-Status: No, score=-3.84 tagged_above=-9999 required=6.31
	tests=[DKIMWL_WL_HIGH=-0.34, 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 n5V2EUEyEdqc;
	Sun, 18 Oct 2026 18:04:03 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.232.135.74; helo=sto.lore.kernel.org; envelope-from=netdev+bounces-348068-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 sto.lore.kernel.org (sto.lore.kernel.org [172.232.135.74])
	by mail.dewy.ru (Postfix) with ESMTPS id ACA67110322; Sun, 18 Oct 2026 18:03:54 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1])
	by sto.lore.kernel.org (Postfix) with ESMTP id 74797606B2D; Sun, 18 Oct 2026 15:03:52 +0000 (UTC)
X-Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id 03D9E438010;
	Sun, 18 Oct 2026 15:03:50 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Eaemv+0y"
X-Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id EDBBC392C20;
	Sun, 18 Oct 2026 15:03:48 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18
X-ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
	t=1792335829; cv=none; b=kckSbRI0R2wXc04oaRHUCdwFudlMEObFQCryWJCnMJuNeGltVSKaa2DtskX8pm96j9/Juxn5rQ3ocfC10kFfLld6x2qAvA7ATZN/CWsF7yCUoTJCMIHUClnC3qMSCS5sMYgPyZXMS3J9kXJ9meP3r/DLUStJZ5SGOihuV2Bbv34=
X-ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org;
	s=arc-20240116; t=1792335829; c=relaxed/simple;
	bh=J34du2KwO5kFYXsI7Ma+wxYs9zoU8JcLzMXfohakjzg=;
	h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:
	 Content-Type:Content-Disposition:In-Reply-To; b=DASUBY2VWhtRfJxXMancIhfLUflhUAInSTIGdS5FCPvHoRFNwanoGcF2FH3F0JJg7XJSGj9xgwVmiiEXYx7SafAw5dEhNxFYMgO5sAP52+dxhzUMX+hxwwZ3dyNb/6EkEwMtmDO3pcw8KY2iES//TsxFdlk8vzaKPmJ6Sim1k/A=
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Eaemv+0y; arc=none smtp.client-ip=100.103.45.18
X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id E7FA01F000C4;
	Sun, 18 Oct 2026 15:03:45 +0000 (UTC)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org;
	s=k20260515; t=1792335828;
	bh=3idvbpRPPNNuOsbOHfSvGH2iKq6CKm7NL5PxAHJRj2A=;
	h=Date:From:To:Cc:Subject:References:In-Reply-To;
	b=Eaemv+0yb9JRqQQUtw83fvQYjarjbAygT/PDSXl/aKsoQsQFXMprbIWsjSimBJuZ7
	 WfHNhA55WS3Iz+vZQRD18Ft5wKvzb1pwlsiZBe05GeV5RkNSMHxMQb9AjJGFf9KuMi
	 KtMpM6inkurLfii7KGy0V6pmzDR5Za/4JlK1h5iSDrfyltawhnED5I7ljtYfZE/+At
	 sEPG8ZGyc4q8yPT8DUxJEYsOTQ0AtMvXKzfp7jA0xFAsDEGRlmKWLNxlt3jDltWauC
	 vP4B7nwaLL8kazcdnAdUToNHZL/I/KJIF4+oGEdugd9+gXsjiz3WEqAZQm/scg1Kxd
	 xVxtpvqUMVj/g==
X-Cc: Saeed Mahameed <saeedm@nvidia.com>, Leon Romanovsky <leon@kernel.org>,
	Tariq Toukan <tariqt@nvidia.com>, Mark Bloch <mbloch@nvidia.com>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@kernel.org>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Moshe Shemesh <moshe@nvidia.com>,
	Yevgeny Kliteynik <kliteyn@nvidia.com>,
	Hamdan Agbariya <hamdani@nvidia.com>, netdev@vger.kernel.org,
	linux-rdma@vger.kernel.org
X-Precedence: bulk
X-Mailing-List: netdev@vger.kernel.org
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-In-Reply-To: <20261012101937.1335231-2-acassen@corp.free.fr>