๐Ÿš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #16508

Re: [PATCH net-next v1 04/15] psp: add support for socket-less psp associations

#16508
From: netdev-bot+sashiko
Date: Sun, 15 Nov 2026 03:18
69 lines
10486 bytes
Thank you for your contribution! Sashiko AI review found 1 potential
issue(s) to consider.

Critical: 0 ยท High: 0 ยท Medium: 1 ยท Low: 0

If you believe none of the issues are legitimate, please reply to each
issue of Medium severity or higher and explain why the AI is wrong.
If any of them are legitimate and you plan to respin, please let patchwork
know by including "pw-bot: cr" as a separate line at the end of your reply
(one such reply per series is enough).

- [Medium] The commit message misdescribes how keys are handled by the
  new socket-less association API.

--

psp: add support for socket-less psp associations

This commit adds a registry of PSP associations that are not bound to a
socket. Each one is either an Rx or a Tx association and is referenced
by an ID. It also adds the rx-spi-alloc, assoc-add, assoc-del and
assoc-get netlink commands, which are admin-only, to manage these
associations.

> key material enters through netlink and is never reported back. no key
> is stored for rx associations, and users reference associations by id
> and never handle keys

[Severity: Medium]
Is this paragraph accurate? The code in this patch seems to do the
opposite in two places.

psp_nl_rx_spi_alloc_doit() in net/psp/psp_nl.c returns the
device-derived Rx key to user space:

net/psp/psp_nl.c:psp_nl_rx_spi_alloc_doit() {
    ...
	if (nla_put_u32(rsp, PSP_A_ASSOC_ID, pas->id) ||
	    nla_put_u32(rsp, PSP_A_ASSOC_DEV_ID, psd->id) ||
	    psp_nl_put_key(rsp, PSP_A_ASSOC_RX_KEY, version, &key)) {
    ...
}

psp_nl_put_key() emits PSP_A_KEYS_KEY with key_sz raw key bytes. The
rx-spi-alloc doc in psp.yaml says the same thing: the key "must be
passed to the peer out of band".

psp_nl_assoc_add_doit() also requires user space to supply the raw Tx
key bytes:

net/psp/psp_nl.c:psp_nl_assoc_add_doit() {
    ...
	err = psp_nl_parse_key(info, PSP_A_ASSOC_TX_KEY, &key, key_sz);
    ...
}

So user space does handle keys, and rx-spi-alloc does report key
material back.

The code only seems to guarantee two narrower things. No Rx key is
stored in the association, and assoc-get reports only the SPI.

Could the commit message describe that more precisely? For example:
"the Rx key is returned once, by rx-spi-alloc, and is never stored or
reported by assoc-get".

-- 
Sashiko AI review ยท https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261111005533.6436-1-toddfreed%40meta.com
Technical Details
Message-ID: <179471269504.2199510.18115986956046547098@kernel.org>
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-363537-linux-kernel-netdev=dewy.ru
References: <20261111005533.6436-5-toddfreed@meta.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-363537-linux-kernel-netdev=dewy.ru
From: netdev-bot+sashiko@kernel.org
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net-next v1 04/15] psp: add support for socket-less psp
 associations
Date: Sun, 15 Nov 2026 03:18:15 +0000
Organization: Usenet Network
Message-ID: <179471269504.2199510.18115986956046547098@kernel.org>
References: <20261111005533.6436-5-toddfreed@meta.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
	logging-data="1719136"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:Vja9nIIbQzXfdGZOv46sQd/XJGg= sha256:vybr4yuvZxfDlNqRpeHG2IITBXekAPJR2mwzHcyZYZ8=
	sha1:AyFlmIVwlKZW2N185A1ilWRDYCg= sha256:06+nXd7ldQWK7q9LDhXpjf3UTytHPyOGyOvM5dZDUpM=
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 D402711491F; Sun, 15 Nov 2026 06:18:51 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.501
X-Spam-Status: No, score=-3.501 tagged_above=-9999 required=6.31
	tests=[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 Zh8w4COXVkp2;
	Sun, 15 Nov 2026 06:18:48 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.232.135.74; helo=sto.lore.kernel.org; envelope-from=netdev+bounces-363537-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 2CFB311491A; Sun, 15 Nov 2026 06:18:39 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by sto.lore.kernel.org (Postfix) with ESMTP id 7BADA60C202; Sun, 15 Nov 2026 03:18:34 +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=1794712697;
	b=Oi9cC7nGebTJjf81T4SXr7DqbCKz/GZKtcaDaQX7muOaC970B+kr5Gv0CY6YNhq0qsMk
	 j895a1yqTgQ7WdH+TerG6Spv/aScg6iJ7QNHzuP3dxUo4UKegsZrB1yp1NpmoEDIOfiBC
	 FZsD86jXECuacwmf8yTPbbE+oM+qMuFjZWFRwSjDsIp0xtoDoa51Xfm/X5s/PbCxE5k9S
	 3i97p8mZi1ibf6epWbErCR9DUzDo2/yuZvSbFuvG2mCo3FpK/hz9sVe7I0QcvQWg+IFdw
	 qhKQid6+hshSjeujnHvW45kKsyCJ+KqEDrKHEpXEZfBUUxnEbYw4jMhGqlRO1yd+GOA==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1794712697;
	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=RHK+oDroh+BWIdQDKlDOU+2VRgKkyUtO9u0OdXOwLJs=;
	b=t63ucYVejHfSnasaoaNEn+ujaWYfBl/5LtZ7qqs1WTasWGyWac+ZykbdnDTgCebqTe13
	 pPv4wuMsi2her/uyZDgBmZlLwhBLdJWlbhgD9MOxReianIypdW0UP/HbH8iHoDII7TnzJ
	 3JTtD0xPIeycegxwrsbzfATJGBYO+h67BRPaQusVxXVRS0jUORrirsTkFxTYrtQg0HSNS
	 WhCFUlDElpMRK36ussitQbSxg+/YyZCzFBaALCb7U3SyXLE6rR3CqAJWOuIxKfSQuih3y
	 B19t/8JBxzuA6K6uqE8M/RCZk/q5pnTfLPVKNIRiYGdGJyIRk5HzPQZ/PyRvDfxl8bg==
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=guf6ZVDm;
	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 CD005606A8A6;
	Sun, 15 Nov 2026 03:18:17 +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=guf6ZVDm
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=1794712697;
	b=29edEMgNlNGYtWuXXmVbPV8FM1uZk2j9sFrSgPhB8MGd0Pq6p6y7R1hit81fC2aoyLdQ
	 bLR2AmEWEBK5+X0piA1vzHgQy0DdGocCOA3suiPrJPP/nqXTn3mB7E31+5EH2N7ESi95D
	 RqVEyt47hsWlsGlZFtyzGK8a0uXFCf3cmpDuGV3fT/PB+LLgg7JpXXiLnByCaSs2cUbtN
	 /2F5Swu0GMHU1JP7sTejF4RPd+isKuhSRbi55Lv8Xennha9cHSQk9oX2lbDC5QCtDWgzx
	 Rh8mEWdwlvQPGgjBUmEYRhI1FFDGDLOcWGQnqw+3Xznfia59fFSdsyYmEGGOdEI91Cg==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1794712697;
	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=RHK+oDroh+BWIdQDKlDOU+2VRgKkyUtO9u0OdXOwLJs=;
	b=LgMMv5u1cUfGuW/MbKwCZh1EYLnBIg9ZuXqtIVridXGX12pcrrbX4u/NGh1zKF18Mb8k
	 alsLkkUFkmePrxd+KJB8OC1pdx1jaEBvhGNKhzjzWKhosdxahuj052m6jQnGnLASa4RvU
	 TUzoZA29DqHdWNl9RxIVEvIcvkKpFPRICxQRNp32qddWrbz3uA6Ri9oQeXh/40X0meIm4
	 vk3bW6sI/v5VMslyxi8IkJrAVR+GiiHrXOiyb568CUpE6Y3k2HpAJnpo+t6sV01M4Jeli
	 Mo54X5y7GwaOzXn7i6/BAmYYNivp0h6jsVsarMJKDUTyI3b7f58Ql1B+z9HJIZXRKvQ==
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=guf6ZVDm;
	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 E4663606A889;
	Sun, 15 Nov 2026 03:18:16 +0000 (UTC)
X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 76E1D1F000C4;
	Sun, 15 Nov 2026 03:18:15 +0000 (UTC)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org;
	s=k20260515; t=1794712696;
	bh=RHK+oDroh+BWIdQDKlDOU+2VRgKkyUtO9u0OdXOwLJs=;
	h=Subject:From:To:Cc:Date:In-Reply-To:References;
	b=guf6ZVDmwaky8SEJp57VkXtN6Ss2A0cMWAFtCpeJkNgcuac1a0hgIhGyT7sas1KCS
	 1tXHkr0a09hmP/DodxQD7dfLH6N69ho5Wro6/JB0OeDs396wIrERLXi6qHFWZZ6Qjc
	 LoAel+Pp780j4ZGXc/H6v4iWnGWrvKjc0zcfsStIVQqKSZsfK2fHoWAbR5rsCifQSX
	 vSZ6ovuAVU3mnVw1UtlXD3ViRNRDkNQV0UCdX6rLp+bcyVAKdbnpzhgU9Lq++VvkyB
	 AQ+EJIpRrTQ4Yk7HRxxPCodwE5kA2GBr1TP7qwyx9U/YFsb2IE51b0x6VqyTapRsBY
	 r7Jze/vdNp5/g==
X-Cc: netdev@vger.kernel.org, davem@davemloft.net, andrew+netdev@lunn.ch,
 bjorn@kernel.org, bpf@vger.kernel.org, daniel@iogearbox.net,
 daniel.zahka@gmail.com, donald.hunter@gmail.com, edumazet@kernel.org,
 kuba@kernel.org, jhs@mojatatu.com, jiri@resnulli.us, john.fastabend@gmail.com,
 linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
 linux-kselftest@vger.kernel.org, linux-rdma@vger.kernel.org,
 martin.lau@linux.dev, pabeni@redhat.com, saeedm@nvidia.com, horms@kernel.org,
 tariqt@nvidia.com, weiwan@google.com, willemdebruijn.kernel@gmail.com
X-In-Reply-To: <20261111005533.6436-5-toddfreed@meta.com>
X-sashiko-severity: Medium
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