public inbox for io-uring@vger.kernel.org
 help / color / mirror / Atom feed
From: veygax <veyga@veygax.dev>
To: Christoph Hellwig <hch@infradead.org>, Keith Busch <kbusch@kernel.org>
Cc: Ming Lei <ming.lei@redhat.com>, Jens Axboe <axboe@kernel.dk>,
	"io-uring@vger.kernel.org" <io-uring@vger.kernel.org>,
	Caleb Sander Mateos <csander@purestorage.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] io_uring/rsrc: fix slab-out-of-bounds in io_buffer_register_bvec
Date: Mon, 22 Dec 2025 01:02:47 +0000	[thread overview]
Message-ID: <e0054c50-3ea2-48e4-b913-8cd861a34f72@veygax.dev> (raw)
In-Reply-To: <aUTjxJEDYYfOT_QG@infradead.org>

On 19/12/2025 05:33, Christoph Hellwig wrote:
> The above is simply an open coded version of doing repeated
> __bio_add_page calls.  Which would be rather suboptimal, but perfectly
> valid.

I can confirm iterating over num_bvecs in __bio_add_page produces the
same KASAN output.

	for (i = 0; i < num_bvecs; i++)
		__bio_add_page(bio, page + i, PAGE_SIZE, 0);

Also (to all CC's), please disregard this version of the patch. V2 has
been posted with typos fixed and a more performance efficient approach.
https://lore.kernel.org/io-uring/20251217214753.218765-3-veyga@veygax.dev/

-- 
- Evan Lambert / veygax



      parent reply	other threads:[~2025-12-22  1:03 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-17 21:04 [PATCH] io_uring/rsrc: fix slab-out-of-bounds in io_buffer_register_bvec veygax
2025-12-17 21:22 ` Caleb Sander Mateos
2025-12-18  0:32 ` Ming Lei
2025-12-18  0:37   ` veygax
2025-12-18  0:56     ` Keith Busch
2025-12-18  1:13       ` veygax
2025-12-18  2:58         ` Ming Lei
2025-12-18 23:00         ` Keith Busch
2025-12-19  3:28           ` Jens Axboe
2025-12-19  5:33       ` Christoph Hellwig
2025-12-21 23:29         ` Keith Busch
2025-12-22 22:08           ` Christoph Hellwig
2025-12-22  1:02         ` veygax [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=e0054c50-3ea2-48e4-b913-8cd861a34f72@veygax.dev \
    --to=veyga@veygax.dev \
    --cc=axboe@kernel.dk \
    --cc=csander@purestorage.com \
    --cc=hch@infradead.org \
    --cc=io-uring@vger.kernel.org \
    --cc=kbusch@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ming.lei@redhat.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