Article View: linux.kernel.netdev
Article #12586Re: [PATCH net-next v3 4/5] selftests: drv-net: psp: factor out psp connection setup
From: netdev-bot+sashiko
Date: Sat, 07 Nov 2026 20:59
Date: Sat, 07 Nov 2026 20:59
54 lines
9961 bytes
9961 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 "Here we are adding some more error
paths, so we just handle errors by closing the data sock".
--
selftests: drv-net: psp: factor out psp connection setup
This commit moves the PSP connection setup and the assoc uapi calls in
psp.py and psp_responder.c into helpers. Other tests that start with a key
exchange can then reuse that sequence. It also makes run_session() close
the data socket when conn_setup_psp() fails.
> The caller of conn_setup_psp() not handling errors was preexisting. Here
> we are adding some more error paths, so we just handle errors by closing
> the data sock to make the code a bit more robust.
[Severity: Low]
This isn't a bug, but is the "adding some more error paths" part still
accurate for v3?
Before this patch, conn_setup_psp() returned -1 in three cases:
psp_rx_assoc() returning NULL, recv() returning < 0, and psp_tx_assoc()
returning NULL.
After the patch, it fails in the same three cases:
rx_assoc() returns -1 when rsp is NULL
conn_setup_psp() returns -1 when recv() returns < 0
tx_assoc() returns -1 when tsp is NULL
The v3 changelog says the per-version key length table was replaced with
the key length from the kernel's rx-assoc reply. That table lookup looks
like the only new way this function could fail, so the sentence may be
left over from v1/v2.
The only behaviour change is in run_session():
if (conn_setup_psp(ys, opts, data_sock)) {
close(data_sock);
data_sock = -1;
}
Could the commit message give the actual reason for that change? For
example, the existing failures can leave a half set up data socket open.
--
Sashiko AI review ยท https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261106-psp-v3-0-a8dd38f5a727%40gmail.com
Technical Details
Message-ID:
<179408516862.994134.13048510473902240219@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-358523-linux-kernel-netdev=dewy.ruReferences:
<20261106-psp-v3-4-a8dd38f5a727@gmail.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-358523-linux-kernel-netdev=dewy.ru From: netdev-bot+sashiko@kernel.org Newsgroups: linux.kernel.netdev Subject: Re: [PATCH net-next v3 4/5] selftests: drv-net: psp: factor out psp connection setup Date: Sat, 07 Nov 2026 20:59:28 +0000 Organization: Usenet Network Message-ID: <179408516862.994134.13048510473902240219@kernel.org> References: <20261106-psp-v3-4-a8dd38f5a727@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="4191924"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:0Z3sLBCl1BT9YVqswsssY0ScGdo= sha256:AB5zMnwxTIB9Fz3/gS4Zi2RfgyUJI7ApZ55ivJgzLjA= sha1:bo4dhESPSd11e47LnkAm+NL7SQ0= sha256:BDFS6+BMfmRqKqL4+ag/G6fgQHmL8eCgvL9iwv/4x7U= 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 43ACE1134B0; Sun, 8 Nov 2026 00:01:33 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.4 X-Spam-Status: No, score=-3.4 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, URIBL_BLOCKED=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 n9A653D_W3hL; Sun, 8 Nov 2026 00:01:25 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-358523-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 6A00E1134A7; Sun, 8 Nov 2026 00:01:17 +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 199224326E; Sat, 7 Nov 2026 20:59:37 +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=1794085176; b=JMlRIV0dmN5yyGZA3H4tgg4ndp08Ng/m6MhdWvE25qnIrlmP3vEHezijf8pC1GVJOg7B FcwmJsuRJzukI4evaVfSmkjYu1GDr3nzoampEVtQi/sFkJYRijscJmwu38krG/EaQtZtF nISeDIGnflxIKjWM32ZJjXpPnMFKQfXilmwwZWyyqMNYAsRPlNYEmb4jfW8Pbp08L383Y pOdLY0TjIwySW7r9zBRBdh2kfGFh8EPZAoNFjzec9SsXVyCs9Y9j1+krXEDF8XEYvqKNW HF9cwUTmi+n2dBX79Nri7bM5tBcQ7wr8XsgFlbGCeG8CSbcIAjGFogzATjlRdZyYBdg== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794085176; 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=FVriCB8SqEw+1xBYoFV/PA9lO1dkif1FstYPaRAdYvk=; b=42kZXBs25+tsoWSpIw0cHhaFITo5ttFXwmORGDeKxXVcFG32JRcqNnnpSZBsQBiHFZuN VO9H3+mXXe6iFmFaQV2o8CzqPnOINdls3HyL4bcqhhquMoqZRD9KRu1CUatamZdEb9Ka3 N71pvfLHLIuzRVqfBESf1Q+site5haap++5vFxoq/1Ksewqi07IdkAtBWNW4iIEUJifki oWwEnbEceK+MTDNU+beP3bjnbNC6PYij0bS9VBzleDd/uRYJFL+pTqbUHWKh8/c4JDxWE lQsi9NBAAu7S0BjrMHSxt21D9TaJfTvGUnp7MYeuGGmX+YYTLkJjrW1Pwamguf15F3w== 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=NOSHuApg; 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 5C58C606D80A; Sat, 7 Nov 2026 20:59:36 +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=NOSHuApg 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=1794085170; b=Vp8IWnUbcBir7iOr6hpqNJhNUgUAs8fbt5z/+i5dGN9f7gqZjWRQLhFcljy+dbncTgsX KFiyszBfk2LZRJQyre8p7gVTqxJgUA2u/IEfv0m1EkE7Mcb1ri42Fvkc0EL25p+C+lVIc jgRbqF588M/xkL0c+MEPJkrH8x7bGAADn5139ZI0YiKWwAgBzoSGVCI0GZAeE2oIgjHVu p4Hg9wVgsyTAZfSRXKX84+zrJCEhGxxVn4j/YGBOOz10L6Yyq+M7/EUpqmLrz1Qahh6Xj +Lm1P81B8C082E2z2JahzhBLbF4B2PvikqXyZApICrjiEyVERxLk0NP1tMpqlIoyIow== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794085170; 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=FVriCB8SqEw+1xBYoFV/PA9lO1dkif1FstYPaRAdYvk=; b=atIGhLkMPX4MVHTsgf6lPylV6nrJBQ4Nz63a0Kl59tWpCXWwG6HGfS6Uqscah7Y1VbFa Eyjsp6SW4rRoH/Wz/R9u/+HhZBrLP5WlO+iWMNmtNCAfeBsGCrY0XaNf2ISR01SyFAPds XzvP0ZqZ5+3tKPpJWwNxkoqXCh+71005tM4u0OlnxvrL3nKFhO3nokv/9FgE9oZez3U8L rC+1njio/r+1pXWIrezXN7iPcyZnR8FN5wjQTEpRrdiuDlQQcmAnizOQghSjaFwnqN6cT qpKgmBIxOHEi+YCWGqZjpc21GCJghm9QfT9PgkpSzGJuTjRi6maW7uCccKJpe3ckZvQ== 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=NOSHuApg; 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 3E058606A33D; Sat, 7 Nov 2026 20:59:30 +0000 (UTC) X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0A8A81F0089F; Sat, 7 Nov 2026 20:59:28 +0000 (UTC) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1794085169; bh=FVriCB8SqEw+1xBYoFV/PA9lO1dkif1FstYPaRAdYvk=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=NOSHuApg/ruQ/bnmK42QQy5OkN7Z8oDpc+4I3aIf1LYgMPHEE56HIRESVuHwWMlwc LOVyvRl/xLj/TM/P74t6VLFPa7JOG/V7ZmNGcmXL/A2m5IrnzAaFomFEinS21MR4XL XCmXyuwqVl+ew1pkO9949ghwJ+LJJIZs96fqmjUOtbLC0IdwiMlL3UoG5skfAY7szq X2WfQmZYXLkCLLWkLTaJFlzXPgSHXtDvaHeJuHwxc7CTXeGrWB4V1FWQMB+dhMnz9O 9BC6zW77MgwiW72rdSTn1KYfl7vr0zmraG0L2Xs5OlV1D3PsjFFNIuiIhn0yOqgyxu IQtuUxGxoMizw== X-Cc: kuba@kernel.org, willemdebruijn.kernel@gmail.com, davem@davemloft.net, edumazet@kernel.org, pabeni@redhat.com, horms@kernel.org, corbet@lwn.net, skhan@linuxfoundation.org, rdunlap@infradead.org, donald.hunter@gmail.com, andrew+netdev@lunn.ch, shuah@kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-kselftest@vger.kernel.org X-In-Reply-To: <20261106-psp-v3-4-a8dd38f5a727@gmail.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