From: Andrew Morton <akpm@linux-foundation.org>
To: Nitesh Shetty <nj.shetty@samsung.com>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>,
axboe@kernel.dk, gost.dev@samsung.com, nitheshshetty@gmail.com,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] iov_iter: Use iov_offset for length calculation in iov_iter_aligned_bvec
Date: Wed, 16 Apr 2025 16:55:12 -0700 [thread overview]
Message-ID: <20250416165512.990257538f61be5857e513ab@linux-foundation.org> (raw)
In-Reply-To: <20250415181419.16305-1-nj.shetty@samsung.com>
On Tue, 15 Apr 2025 23:44:19 +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
> with 256 bytes offset.
>
Please describe the userspace-visible effects of this flaw, if any?
> --- a/lib/iov_iter.c
> +++ b/lib/iov_iter.c
> @@ -820,7 +820,7 @@ static bool iov_iter_aligned_bvec(const struct iov_iter *i, unsigned addr_mask,
> size_t size = i->count;
>
> do {
> - size_t len = bvec->bv_len;
> + size_t len = bvec->bv_len - skip;
>
> if (len > size)
> len = size;
>
next prev parent reply other threads:[~2025-04-16 23:55 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20250415182307epcas5p4853044d013dbc943a8e54dca0f2a39c2@epcas5p4.samsung.com>
2025-04-15 18:14 ` Nitesh Shetty
2025-04-16 23:55 ` Andrew Morton [this message]
2025-04-25 19:55 ` Nitesh Shetty
2025-04-26 0:04 ` Jens Axboe
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=20250416165512.990257538f61be5857e513ab@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=axboe@kernel.dk \
--cc=gost.dev@samsung.com \
--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®