From: sashiko-bot@kernel.org
To: "Alex Markuze" <amarkuze@redhat.com>
Cc: bpf@vger.kernel.org
Subject: Re: [RFC PATCH net-next 03/12] io_uring/opaque: add backing accounting and immutable versions
Date: Wed, 11 Nov 2026 13:20:44 +0000 [thread overview]
Message-ID: <sashiko-outbox-209060@kernel.org> (raw)
In-Reply-To: <20261110132006.3280986-4-amarkuze@redhat.com>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Medium] io_uring/opaque: wake batch limit bypassed in
io_opaque_wake_budget()
--
commit 330c6e48123376b4807cfeaa9a7e897d4c81a279
Author: Alex Markuze <amarkuze@redhat.com>
io_uring/opaque: add backing accounting and immutable versions
This commit adds backing-byte and extent accounting, immutable payload
version references, bvec/anchor vector building, and generation handle
lookup for io_uring opaque TCP payload objects.
> diff --git a/io_uring/opaque.c b/io_uring/opaque.c
> new file mode 100644
> index 0000000000000..2fd9db898e672
> --- /dev/null
> +++ b/io_uring/opaque.c
> @@ -0,0 +1,399 @@
[ ... ]
> +static bool io_opaque_wake_budget(struct io_opaque_store *store)
> +{
> + struct io_opaque_req *op, *next;
> + unsigned long delay = MAX_JIFFY_OFFSET;
> + unsigned long now = jiffies;
> + unsigned int woken = 0;
> + bool stopped, more = false;
> +
> + guard(spinlock)(&store->wait_lock);
> + stopped = READ_ONCE(store->dead);
> + list_for_each_entry_safe(op, next, &store->budget_waits, wait) {
> + struct socket *sock = sock_from_file(op->req->file);
> +
> + if (!stopped && !READ_ONCE(op->stream->closed)) {
> + if (time_before(now, op->retry_at)) {
> + delay = min(delay, op->retry_at - now);
> + continue;
> + }
> + if (!io_opaque_budget_ready(op, now))
> + continue;
> + if (woken == IO_OPAQUE_WAKE_BATCH) {
> + delay = 1;
> + more = true;
> + continue;
> + }
> + }
> + list_del_init(&op->wait);
> + /* A wake is not a reservation; the collector rechecks on entry. */
> + woken++;
[Severity: Medium]
Can a closed-stream entry bypass the IO_OPAQUE_WAKE_BATCH limit here?
Once woken reaches IO_OPAQUE_WAKE_BATCH, any later entry on
store->budget_waits with op->stream->closed set skips the conditional block
and increments woken to IO_OPAQUE_WAKE_BATCH + 1. For all subsequent open,
budget-ready waiters on the list, woken == IO_OPAQUE_WAKE_BATCH is then
false, so they are all woken under a single store->wait_lock hold instead of
being deferred with woken >= IO_OPAQUE_WAKE_BATCH.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261110132006.3280986-1-amarkuze@redhat.com?part=3
next prev parent reply other threads:[~2026-11-11 13:20 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-10 13:19 [RFC PATCH net-next 00/12] io_uring: opaque TCP payload objects Alex Markuze
2026-11-10 13:19 ` [RFC PATCH net-next 01/12] net: add an exclusive TCP receive claim Alex Markuze
2026-11-11 13:20 ` sashiko-bot
2026-11-10 13:19 ` [RFC PATCH net-next 02/12] io_uring/opaque: add data structures and the UAPI header Alex Markuze
2026-11-10 13:19 ` [RFC PATCH net-next 03/12] io_uring/opaque: add backing accounting and immutable versions Alex Markuze
2026-11-11 13:20 ` sashiko-bot [this message]
2026-11-10 13:19 ` [RFC PATCH net-next 04/12] io_uring/opaque: add owned-page helpers for dense copies Alex Markuze
2026-11-10 13:19 ` [RFC PATCH net-next 05/12] io_uring/opaque: add store registration and IORING_OP_OPAQUE_OBJ Alex Markuze
2026-11-10 13:20 ` [RFC PATCH net-next 06/12] io_uring/opaque: allow rings to share a store Alex Markuze
2026-11-10 13:20 ` [RFC PATCH net-next 07/12] io_uring/opaque: add IORING_OP_OPAQUE_OBJ_SEND Alex Markuze
2026-11-11 13:20 ` sashiko-bot
2026-11-10 13:20 ` [RFC PATCH net-next 08/12] io_uring/opaque: add vectored IORING_OP_OPAQUE_OBJ_SEND Alex Markuze
2026-11-10 13:20 ` [RFC PATCH net-next 09/12] io_uring/opaque: add IORING_OP_OPAQUE_COLLECT Alex Markuze
2026-11-11 13:20 ` sashiko-bot
2026-11-10 13:20 ` [RFC PATCH net-next 10/12] io_uring/opaque: add IORING_OPAQUE_CREATE Alex Markuze
2026-11-11 13:20 ` sashiko-bot
2026-11-10 13:20 ` [RFC PATCH net-next 11/12] io_uring/opaque: add manual and automatic compaction Alex Markuze
2026-11-10 13:20 ` [RFC PATCH net-next 12/12] io_uring/opaque: add basic KUnit tests Alex Markuze
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=sashiko-outbox-209060@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=amarkuze@redhat.com \
--cc=bpf@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.