From: "Daniel Zahka" <daniel.zahka@gmail.com>
To: <netdev-bot+sashiko@kernel.org>, <daniel.zahka@gmail.com>
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>
Subject: Re: [PATCH net-next v3 4/5] selftests: drv-net: psp: factor out psp connection setup
Date: Mon, 09 Nov 2026 08:03:22 -0500 [thread overview]
Message-ID: <DMQP8OMF2NZ2.3K3MJRWBNXWW@gmail.com> (raw)
In-Reply-To: <179408516862.994134.13048510473902240219@kernel.org>
On Sat Nov 7, 2026 at 3:59 PM EST, netdev-bot+sashiko wrote:
> 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.
>
Ah darn. I let local sashiko convince me it was a good idea not to
ignore the return code of conn_setup_psp(), even though it is purely a
preexisting "issue". Then, when I was writing the commit message, I
think I was looking at the code from the next patch where
handle_tx_assoc() rekey handler, has an extra check against the key
length.
If I have to respin, I'll probably drop the code chunk below entirely.
Otherwise if we can just edit the sentence:
"Here we are adding some more error paths, so we just handle errors by
closing the data sock".
so it says,
"Handle preexisting errors from conn_setup_psp(). No new error paths are
introduced."
Then it would be accurate.
> 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.
next prev parent reply other threads:[~2026-11-09 13:03 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-06 20:12 [PATCH net-next v3 0/5] psp: support rekeying psp protected tcp connections Daniel Zahka
2026-11-06 20:12 ` [PATCH net-next v3 1/5] psp: support rx rekey operation Daniel Zahka
2026-11-07 20:59 ` netdev-bot+sashiko
2026-11-09 12:30 ` Daniel Zahka
2026-11-06 20:12 ` [PATCH net-next v3 2/5] psp: support tx " Daniel Zahka
2026-11-06 20:12 ` [PATCH net-next v3 3/5] psp: defer tx key deletions for SADB drivers Daniel Zahka
2026-11-07 20:59 ` netdev-bot+sashiko
2026-11-09 12:40 ` Daniel Zahka
2026-11-06 20:12 ` [PATCH net-next v3 4/5] selftests: drv-net: psp: factor out psp connection setup Daniel Zahka
2026-11-07 20:59 ` netdev-bot+sashiko
2026-11-09 13:03 ` Daniel Zahka [this message]
2026-11-06 20:12 ` [PATCH net-next v3 5/5] selftests: drv-net: psp: add rekey tests Daniel Zahka
2026-11-07 20:59 ` netdev-bot+sashiko
2026-11-09 13:25 ` Daniel Zahka
2026-11-08 14:47 ` [PATCH net-next v3 0/5] psp: support rekeying psp protected tcp connections Willem de Bruijn
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=DMQP8OMF2NZ2.3K3MJRWBNXWW@gmail.com \
--to=daniel.zahka@gmail.com \
--cc=andrew+netdev@lunn.ch \
--cc=corbet@lwn.net \
--cc=davem@davemloft.net \
--cc=donald.hunter@gmail.com \
--cc=edumazet@kernel.org \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=netdev-bot+sashiko@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=rdunlap@infradead.org \
--cc=shuah@kernel.org \
--cc=skhan@linuxfoundation.org \
--cc=willemdebruijn.kernel@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®