From: Andrew Morton <akpm@linux-foundation.org>
To: Nitesh Shetty <nj.shetty@samsung.com>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>,
Jens Axboe <axboe@kernel.dk>,
Christian Brauner <brauner@kernel.org>,
Keith Busch <kbusch@kernel.org>,
gost.dev@samsung.com, nitheshshetty@gmail.com,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3] iov_iter: Use iov_offset for length calculation in iov_iter_aligned_bvec
Date: Tue, 13 May 2025 17:28:45 -0700 [thread overview]
Message-ID: <20250513172845.48d1bf39307a543d4a36a1ed@linux-foundation.org> (raw)
In-Reply-To: <20250428095849.11709-1-nj.shetty@samsung.com>
On Mon, 28 Apr 2025 15:28:48 +0530 Nitesh Shetty <nj.shetty@samsung.com> wrote:
> If iov_offset is non-zero, then we need to consider iov_offset in length
> calculation, otherwise we might pass smaller IOs such as 512 bytes, in
> below scenario[1].
> This issue is reproducible using lib-uring test/fixed-seg.c application
> with fixed buffer on a 512 LBA formatted device.
>
> [1]
> At present we pass the alignment check,
> for 512 LBA formatted devices, len_mask = 511
> when IO is smaller, i->count = 512
> has an offset, i->io_offset = 3584
> with bvec values, bvec->bv_offset = 256, bvec->bv_len = 3840.
> In short, the first 256 bytes are in the current page,
> next 256 bytes are in the another page.
> Ideally we expect to fail the IO.
Thanks. Can you please send us a description of the userspace-visible
effects of this issue? That will help others to determine whether a
-stable backport is desirable and it will be helpful to people who are
wondering whether this patch will fix an issue they are experiencing.
prev parent reply other threads:[~2025-05-14 0:28 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20250428100738epcas5p3eb82b4ea94b229634f9319d23d7d7e14@epcas5p3.samsung.com>
2025-04-28 9:58 ` Nitesh Shetty
2025-05-13 11:25 ` Nitesh Shetty
2025-05-14 0:28 ` Andrew Morton [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=20250513172845.48d1bf39307a543d4a36a1ed@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=axboe@kernel.dk \
--cc=brauner@kernel.org \
--cc=gost.dev@samsung.com \
--cc=kbusch@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nitheshshetty@gmail.com \
--cc=nj.shetty@samsung.com \
--cc=viro@zeniv.linux.org.uk \
/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®