[26.04_linux-nvidia-bos]: Backport: "block: check bio split for unaligned bvec" - #555
Closed
jamieNguyenNVIDIA wants to merge 1 commit into
Conversation
Offsets and lengths need to be validated against the dma alignment. This check was skipped for sufficiently a small bio with a single bvec, which may allow an invalid request dispatched to the driver. Force the validation for an unaligned bvec by forcing the bio split path that handles this condition. Fixes: 7eac331 ("iomap: simplify direct io validity check") Fixes: 5ff3f74 ("block: simplify direct io validity check") Reported-by: Carlos Maiolino <[email protected]> Signed-off-by: Keith Busch <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jens Axboe <[email protected]> (cherry picked from commit 9b0c367) Signed-off-by: Jamie Nguyen <[email protected]>
Collaborator
BaseOS Kernel ReviewWarning
|
Contributor
PR Validation ReportPatchscan ✅ No Missing FixesAll cherry-picked commits checked — no missing upstream fixes found. PR Lint ✅ All checks passedDetailsChecking 1 commits... Cherry-pick digest: ┌──────────────┬──────────────────────────────────────────────────────────────────┬────────────┬─────────┬───────────────────────────┐ │ Local │ Referenced upstream / Patch subject │ Patch-ID │ Subject │ SoB chain │ ├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤ │ 3d2ee8584a49 │ 9b0c3673c885 block: check bio split for unaligned bvec │ match │ match │ preserved + jamien added │ └──────────────┴──────────────────────────────────────────────────────────────────┴────────────┴─────────┴───────────────────────────┘ Lint: all checks passed. |
Collaborator
|
No issues or concerns.
|
clsotog
approved these changes
Aug 25, 2026
clsotog
left a comment
Collaborator
There was a problem hiding this comment.
Acked-by: Carol L Soto <[email protected]>
esot0
approved these changes
Aug 25, 2026
Collaborator
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Clean cherry-pick of mainline 9b0c367 ("block: check bio split for
unaligned bvec", v7.2-rc1) - block/blk.h | 2 ++
Fixes LTP dio04/dio10 on -64k, where a misaligned O_DIRECT buffer returns EIO
instead of EINVAL. Regression from 7eac331 / 5ff3f74 (v6.18-rc1);
4K kernels are unaffected. No Cc: stable upstream, so it will not reach 7.0.y
on its own.
Verified on 7.0.0-1015-nvidia-64k: dio04/dio10 fail on stock, pass with the
fix, and fail again on a control build with only these two lines reverted.
All 30 LTP dio cases pass.
Target: 26.04_linux-nvidia-bos @ 982ed1a
Topic: jamien/7.0-bos/block-unaligned-bvec
Verification was on the 26.04_linux-nvidia lineage; both branches are at 7.0.14
and the touched code is identical.
LP: https://bugs.launchpad.net/ubuntu/+source/linux-nvidia-bos/+bug/2165055