[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAOSviJ3d1EjLPEni6BCZT502c3WCf1o42d5OQb+2dFx=z29zew@mail.gmail.com>
Date: Tue, 13 May 2025 16:55:32 +0530
From: Nitesh Shetty <nitheshshetty@...il.com>
To: Nitesh Shetty <nj.shetty@...sung.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>, Alexander Viro <viro@...iv.linux.org.uk>,
Jens Axboe <axboe@...nel.dk>, Christian Brauner <brauner@...nel.org>, Keith Busch <kbusch@...nel.org>,
gost.dev@...sung.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3] iov_iter: Use iov_offset for length calculation in iov_iter_aligned_bvec
On Mon, Apr 28, 2025 at 4:23 PM Nitesh Shetty <nj.shetty@...sung.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.
>
> Fixes: 2263639f96f2 ("iov_iter: streamline iovec/bvec alignment iteration")
> Reviewed-by: Jens Axboe <axboe@...nel.dk>
> Reviewed-by: Anuj Gupta <anuj20.g@...sung.com>
> Signed-off-by: Nitesh Shetty <nj.shetty@...sung.com>
> ---
Hi Andrew,
Can you review and pick this change ?
Thank you,
Nitesh
Powered by blists - more mailing lists