From: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
To: Keith Busch <kbusch@meta.com>
Cc: linux-block@vger.kernel.org, linux-fsdevel@vger.kernel.org,
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, Hannes Reinecke <hare@kernel.org>,
0wnerD1ed <l7z@0b1t.tech>
Subject: Re: [PATCH RESEND 5/5] block: validate user space vectors during extraction
Date: Wed, 5 Aug 2026 21:46:03 +0900 [thread overview]
Message-ID: <anMscoGkR5BYjSGy@shinmob> (raw)
In-Reply-To: <20260720201057.1862857-6-kbusch@meta.com>
Cc+: 0wnerD1ed
On Jul 20, 2026 / 13:10, 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.
Recently, the new test case block/045 was added to blkests through a GitHub PR
[1]. The test case passes with the Linux master branch tags v7.2-rcX. Today, I
found that it fails with block/for-next branch tip [2]. I bisected and found
that this patch triggers the failure.
0wnerDied, Keith, may I ask your help to resolve the failure? I'm guessing
the test case needs to care device's dma alignment, but not so sure.
[1] https://github.com/linux-blktests/blktests/pull/251
[2] failure log of block/045
block/045 (test direct I/O full-trim bvec alignment) [failed]
runtime 0.550s ... 0.630s
--- tests/block/045.out 2026-08-03 19:26:40.407053612 +0900
+++ /home/shin/Blktests/blktests/results/nodev/block/045.out.bad 2026-08-05 20:48:33.366932845 +0900
@@ -1,2 +1,4 @@
Running block/045
+bio-full-trim: pread returned -1 (errno 22)
+bio-full-trim helper failed
Test complete
block/045 (zoned) (test direct I/O full-trim bvec alignment) [failed]
runtime 0.578s ... 0.636s
--- tests/block/045.out 2026-08-03 19:26:40.407053612 +0900
+++ /home/shin/Blktests/blktests/results/nodev_zoned/block/045.out.bad 2026-08-05 20:48:34.550929436 +0900
@@ -1,2 +1,4 @@
Running block/045
+bio-full-trim: pread returned -1 (errno 22)
+bio-full-trim helper failed
Test complete
next prev parent reply other threads:[~2026-08-05 12:47 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-20 20:10 [PATCH RESEND 0/5] block: validate direct I/O memory alignment Keith Busch
2026-07-20 20:10 ` [PATCH RESEND 1/5] block: use blkdev_iov_iter_get_pages status for errors Keith Busch
2026-07-20 20:10 ` [PATCH RESEND 2/5] block: fix dio leak on metadata mapping error Keith Busch
2026-07-20 20:10 ` [PATCH RESEND 3/5] loop: set dma_alignment from the backing file for direct I/O Keith Busch
2026-07-20 20:10 ` [PATCH RESEND 4/5] zloop: set dma_alignment from the backing files " Keith Busch
2026-07-20 20:10 ` [PATCH RESEND 5/5] block: validate user space vectors during extraction Keith Busch
2026-08-05 12:46 ` Shin'ichiro Kawasaki [this message]
2026-08-06 8:03 ` Shin'ichiro Kawasaki
2026-08-06 8:29 ` 0wnerD1ed
2026-08-06 9:54 ` Shin'ichiro Kawasaki
2026-07-29 19:15 ` [PATCH RESEND 0/5] block: validate direct I/O memory alignment Keith Busch
2026-07-29 19:18 ` Jens Axboe
2026-07-29 20:03 ` Keith Busch
2026-07-29 23:34 ` Jens Axboe
2026-07-30 11:26 ` Christoph Hellwig
2026-07-30 12:52 ` Keith Busch
2026-07-30 16:22 ` Jens Axboe
2026-07-30 13:25 ` Thorsten Leemhuis
2026-07-30 16:23 ` Jens Axboe
2026-07-30 16:46 ` Linus Torvalds
2026-07-31 14:11 ` 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=anMscoGkR5BYjSGy@shinmob \
--to=shinichiro.kawasaki@wdc.com \
--cc=axboe@kernel.dk \
--cc=brauner@kernel.org \
--cc=djwong@kernel.org \
--cc=dm-devel@lists.linux.dev \
--cc=hare@kernel.org \
--cc=hch@lst.de \
--cc=kbusch@kernel.org \
--cc=kbusch@meta.com \
--cc=l7z@0b1t.tech \
--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