From: Jens Axboe <axboe@kernel.dk>
To: Hui Peng <benquike@gmail.com>
Cc: io-uring@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] io_uring: fix cloned compound buffer accounting and R_DISABLED restriction bypass
Date: Mon, 21 Sep 2026 10:04:28 -0600 [thread overview]
Message-ID: <bec7f54e-1f53-4d07-9b73-ee40300d6675@kernel.dk> (raw)
In-Reply-To: <20260919221725.3706704-1-benquike@gmail.com>
On 9/19/26 4:17 PM, Hui Peng wrote:
> Fix two issues in io_uring buffer registration and restriction
> enforcement:
>
> 1. In io_uring/rsrc.c, when registered compound buffers are cloned
> across rings via IORING_REGISTER_BUFFERS2 /
> IORING_RSRC_REGISTER_SPARSE, unaccounting on release can underflow
> mm->pinned_vm and user->locked_vm if head pages are unaccounted
> multiple times or against a different accounting context. Track per-
> imu accounting ownership cleanly.
> 2. In io_uring/register.c, enforce IO_RING_F_REG_RESTRICTED on rings
> created with IORING_SETUP_R_DISABLED so restricted opcodes cannot be
> invoked before restrictions are registered and enabled.
>
> Fixes: 735729844819 ("io_uring: move rsrc related data, core, and commands")
> Fixes: c43203154d8a ("io_uring/register: move io_uring_register(2) related code to register.c")
Sad to say, but this is mostly a pile of garbage. It breaks the current
and documented use case of how to use IORING_SETUP_R_DISABLED, and if you
had run the test suite, you would already know that.
And the two commits you reference? Did you even look at them, they are
just moving code around.
Two suggestions for you:
1) Don't send patches for things you don't understand
2) Upgrade to a better LLM, the one you are using is garbage
--
Jens Axboe
prev parent reply other threads:[~2026-09-21 16:04 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-19 22:17 [PATCH] io_uring: fix cloned compound buffer accounting and R_DISABLED restriction bypass Hui Peng
2026-09-21 16:04 ` Jens Axboe [this message]
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=bec7f54e-1f53-4d07-9b73-ee40300d6675@kernel.dk \
--to=axboe@kernel.dk \
--cc=benquike@gmail.com \
--cc=io-uring@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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