🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #1652

Re: [PATCH net 2/2] net/mlx5: HWS, fix modify header pool creation race

#1652
From: Alexandre Cassen
Date: Sat, 10 Oct 2026 10:35
24 lines
6898 bytes
(replying to Sashiko... strange feeling)

Adding back original recipients. Sashiko review at:
https://sashiko.dev/#/patchset/20261008204230.3222198-1-acassen@corp.free.fr?part=2


On 10/9/26 22:43, sashiko-bot@kernel.org wrote:
> Does mlx5_fs_hws_mh_pool_match() incorrectly truncate 64-bit modify actions to
> 32 bits during comparison?
This code predates the patch. On little-endian the cast keeps the first
half of each action. That half holds the type and field. Dropping the
value in the second half is intended since each rule passes its values
as arguments. mlx5hws_pat_compare_pattern() does the same.

but there is a real bug. Copy and add_field actions keep their 
destination in the second half. The core compares them in full but the 
pool match does not. Two copies that differ only in destination then
share a pool and the second rule writes to the wrong field. RDMA flow
actions can trigger it from userspace.

I will send a separate fix for this.

-- Alexandre
Technical Details
Message-ID: <3a18d136-36a5-4edf-a3df-0838d119c38e@corp.free.fr>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-344155-linux-kernel-netdev=dewy.ru
References: <20261008204230.3222198-1-acassen@corp.free.fr> <20261008204230.3222198-3-acassen@corp.free.fr> <sashiko-outbox-166055@kernel.org>

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-344155-linux-kernel-netdev=dewy.ru
From: acassen@corp.free.fr (Alexandre Cassen)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net 2/2] net/mlx5: HWS, fix modify header pool creation
 race
Date: Sat, 10 Oct 2026 12:35:23 +0200
Organization: Usenet Network
Message-ID: <3a18d136-36a5-4edf-a3df-0838d119c38e@corp.free.fr>
References: <20261008204230.3222198-1-acassen@corp.free.fr>
 <20261008204230.3222198-3-acassen@corp.free.fr>
 <sashiko-outbox-166055@kernel.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Info: usenet.network;
	logging-data="1306641"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:78YZ7EZt00E5bmggVxHaGMtUFYE= sha256:nzr+t63LWHSjtAFe7ZdfChNBm6x/NcDHut+IB0E2wzQ=
	sha1:069baQ2rejt0k9pX9nKbXhrU9BE= sha256:gCnS7yZ30qLu1QVahbIg+eU46g/s70oYD7PeMze++go=
Content-Language: en-US
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 64F7B10F8B7; Sat, 10 Oct 2026 13:35:44 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -0.75
X-Spam-Status: No, score=-0.75 tagged_above=-9999 required=6.31
	tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
	DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.249,
	MAILING_LIST_MULTI=-1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001,
	URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
	header.d=corp.free.fr
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 pxcYVFQ-Vr6y;
	Sat, 10 Oct 2026 13:35:40 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=104.64.211.4; helo=sin.lore.kernel.org; envelope-from=netdev+bounces-344155-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=none (p=none dis=none) header.from=corp.free.fr
X-Received: from sin.lore.kernel.org (sin.lore.kernel.org [104.64.211.4])
	by mail.dewy.ru (Postfix) with ESMTPS id C903210F6C4; Sat, 10 Oct 2026 13:35:33 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1])
	by sin.lore.kernel.org (Postfix) with ESMTP id 16B71283E5; Sat, 10 Oct 2026 10:35:31 +0000 (UTC)
X-Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id 1E59E3A3E73;
	Sat, 10 Oct 2026 10:35:28 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key) header.d=corp.free.fr header.i=@corp.free.fr header.b="E+lLVf5V"
X-Received: from rcs.proxad.net (rcs.proxad.net [212.27.60.169])
	(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 B08FB3164AA;
	Sat, 10 Oct 2026 10:35:26 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=212.27.60.169
X-ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
	t=1791628528; cv=none; b=jbXcCrzNuBO+Xqls2wMa8weM4saKA5IT83/RIR3nWJfPXs0LyMOtQCj2ChbOxgBx4hGLQPiUi1uHHGlbiednOWDX/fICxI+Y/H4cqKldesCT4ghGljF/8o7gPjUFZQ7xJtTo8n2jz3RdEfTz6Uy1BRC2BAlFb5Jo8EjK3ur51iw=
X-ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org;
	s=arc-20240116; t=1791628528; c=relaxed/simple;
	bh=CxYjDoDi1IBAPk7Vw2W4+iZXNvVefHGrj6UhQ2uHz38=;
	h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From:
	 In-Reply-To:Content-Type; b=oF5jGSWGYnRj1t/1wlLEY24DeGhMBp8QCT9li1oKCCDzDVhN9yLnuvxKwziOAVmFBueo7tEa+wlA16ZSq1AiLI9GeJ7cLdxqrFnu8b5BMOHZgoDCCCOR7fL8+cTour73x2bZOS2b2Q+V7Q+5GfA3CJ9aoYoJY7RDdKLKK8Bhsjw=
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=corp.free.fr; spf=pass smtp.mailfrom=corp.free.fr; dkim=pass (2048-bit key) header.d=corp.free.fr header.i=@corp.free.fr header.b=E+lLVf5V; arc=none smtp.client-ip=212.27.60.169
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=corp.free.fr
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=corp.free.fr
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=corp.free.fr; s=rcs;
	t=1791628525; bh=CxYjDoDi1IBAPk7Vw2W4+iZXNvVefHGrj6UhQ2uHz38=;
	h=Date:Subject:To:Cc:References:From:In-Reply-To:From;
	b=E+lLVf5Vv/FxBcFs33K7PURs8atbZmkDZHetka+uo374W2puub37ltCpjxTHkIc6A
	 zdP+1pTyVO3O90NHpfaylpo5N4UPJRfXO2HiBqFgk48Ll+NWvY/DZjTSrgQV6h6IiK
	 8o94LBaW/9oy7S7GW7wRgPEHyz9ygwIEywZIF8zIHxW09NES05QHllVNIKjENKp/TY
	 OitUgUmRMAZsKgvaRTdN7vvgyps+qoHImxgLnmmTb9ALVzy9ppxafq1wEtnST//dKa
	 fIow2+9Ej3d9rd/LTpMeJbEQu1WqR9zww2qnI2bWmBV9kgK0cUhJnq4x6vslIkTWnS
	 8OD55ilykO3Xw==
X-Received: from [0.0.0.0] (unknown [213.228.1.188])
	by rcs.proxad.net (Postfix) with ESMTPSA id 1868644C08F0;
	Sat, 10 Oct 2026 12:35:24 +0200 (CEST)
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-User-Agent: Mozilla Thunderbird
X-Cc: 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>,
 netdev@vger.kernel.org, linux-rdma@vger.kernel.org
X-In-Reply-To: <sashiko-outbox-166055@kernel.org>