From: netdev-bot+sashiko@kernel.org
To: 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: Sat, 07 Nov 2026 20:59:28 +0000 [thread overview]
Message-ID: <179408516862.994134.13048510473902240219@kernel.org> (raw)
In-Reply-To: <20261106-psp-v3-4-a8dd38f5a727@gmail.com>
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
next prev parent reply other threads:[~2026-11-07 20:59 UTC|newest]
Thread overview: 10+ 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-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-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 [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
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=179408516862.994134.13048510473902240219@kernel.org \
--to=netdev-bot+sashiko@kernel.org \
--cc=andrew+netdev@lunn.ch \
--cc=corbet@lwn.net \
--cc=daniel.zahka@gmail.com \
--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@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®