From: Hannes Reinecke <hare@suse.de>
To: Keith Busch <kbusch@meta.com>,
linux-block@vger.kernel.org, linux-fsdevel@vger.kernel.org
Cc: dm-devel@lists.linux.dev, hch@lst.de, axboe@kernel.dk,
brauner@kernel.org, djwong@kernel.org, viro@zeniv.linux.org.uk,
Keith Busch <kbusch@kernel.org>,
stable@vger.kernel.org
Subject: Re: [PATCH v3 5/5] block: validate user space vectors during extraction
Date: Thu, 25 Jun 2026 08:28:20 +0200 [thread overview]
Message-ID: <e49bf04f-2004-4ff8-995f-6a17a54b57fa@suse.de> (raw)
In-Reply-To: <20260624170905.3972095-6-kbusch@meta.com>
On 6/24/26 7:09 PM, Keith Busch wrote:
> From: Keith Busch <kbusch@kernel.org>
>
> The bio-based drivers don't necessarily check the alignment split, and
> stacking block drivers don't always handle a misalignment detected after
> submitting the bio. Validate user vectors against the device's
> dma_alignment as the bio is built from the iov_iter, rejecting
> misaligned early with -EINVAL.
>
> Cc: stable@vger.kernel.org
> Fixes: 5ff3f74e145a ("block: simplify direct io validity check")
> Fixes: 7eac33186957 ("iomap: simplify direct io validity check")
> Signed-off-by: Keith Busch <kbusch@kernel.org>
> ---
> block/bio.c | 56 +++++++++++++++++++++++++++++++++++++++++---
> block/blk-map.c | 2 +-
> block/fops.c | 2 +-
> fs/iomap/direct-io.c | 1 +
> include/linux/bio.h | 2 +-
> include/linux/uio.h | 10 +++++++-
> lib/iov_iter.c | 9 ++++++-
> 7 files changed, 74 insertions(+), 8 deletions(-)
>
Reviewed-by: Hannes Reinecke <hare@kernel.org>
Cheers,
Hannes
--
Dr. Hannes Reinecke Kernel Storage Architect
hare@suse.de +49 911 74053 688
SUSE Software Solutions GmbH, Frankenstr. 146, 90461 Nürnberg
HRB 36809 (AG Nürnberg), GF: I. Totev, A. McDonald, W. Knoblich
prev parent reply other threads:[~2026-06-25 6:28 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-24 17:09 [PATCH v3 0/5] block: validate direct I/O memory alignment Keith Busch
2026-06-24 17:09 ` [PATCH v3 1/5] block: use blkdev_iov_iter_get_pages status for errors Keith Busch
2026-06-25 6:20 ` Hannes Reinecke
2026-06-24 17:09 ` [PATCH v3 2/5] block: fix dio leak on metadata mapping error Keith Busch
2026-06-25 6:21 ` Hannes Reinecke
2026-06-24 17:09 ` [PATCH v3 3/5] loop: set dma_alignment from the backing file for direct I/O Keith Busch
2026-06-25 6:25 ` Hannes Reinecke
2026-06-24 17:09 ` [PATCH v3 4/5] zloop: set dma_alignment from the backing files " Keith Busch
2026-06-25 6:26 ` Hannes Reinecke
2026-06-24 17:09 ` [PATCH v3 5/5] block: validate user space vectors during extraction Keith Busch
2026-06-25 6:28 ` Hannes Reinecke [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=e49bf04f-2004-4ff8-995f-6a17a54b57fa@suse.de \
--to=hare@suse.de \
--cc=axboe@kernel.dk \
--cc=brauner@kernel.org \
--cc=djwong@kernel.org \
--cc=dm-devel@lists.linux.dev \
--cc=hch@lst.de \
--cc=kbusch@kernel.org \
--cc=kbusch@meta.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=stable@vger.kernel.org \
--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