Skip to content

[26.04_linux-nvidia]: Backport: "block: check bio split for unaligned bvec" - #554

Closed
jamieNguyenNVIDIA wants to merge 1 commit into
NVIDIA:26.04_linux-nvidiafrom
jamieNguyenNVIDIA:jamien/7.0/block-unaligned-bvec
Closed

[26.04_linux-nvidia]: Backport: "block: check bio split for unaligned bvec"#554
jamieNguyenNVIDIA wants to merge 1 commit into
NVIDIA:26.04_linux-nvidiafrom
jamieNguyenNVIDIA:jamien/7.0/block-unaligned-bvec

Conversation

@jamieNguyenNVIDIA

Copy link
Copy Markdown
Collaborator

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 @ c8ca6b8
Topic: jamien/7.0/block-unaligned-bvec

LP: https://bugs.launchpad.net/ubuntu/+source/linux-nvidia-bos/+bug/2165055

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]>
@jamieNguyenNVIDIA jamieNguyenNVIDIA self-assigned this Aug 25, 2026
@nirmoy nirmoy added the help wanted Extra attention is needed label Aug 25, 2026
@nirmoy

nirmoy commented Aug 25, 2026

Copy link
Copy Markdown
Collaborator

BaseOS Kernel Review

Warning

⚠️ Review needs attention

The block alignment check uses the original bvec instead of the iterator-adjusted range, so trimmed or advanced bios can bypass split validation and send invalid requests to drivers.

Findings: Critical 0 · High 0 · Medium 1 · Low 1

🔍 Review artifacts

📦 Kernel deb builds — 🟢 2/2 passed

Note

Build reports and debs are retained for 10 days after the PR closes.

Review metadata
  • Reviewed head: 50ed7cadafaa
  • Overall status: attention needed
  • Architectures: 2/2 successful

This comment is maintained by BaseOS Reviewer and updated when the GitHub watcher publishes a newer review.

@github-actions

Copy link
Copy Markdown
Contributor

PR Validation Report

Patchscan ✅ No Missing Fixes

All cherry-picked commits checked — no missing upstream fixes found.

PR Lint ✅ All checks passed

Details
Checking 1 commits...

Cherry-pick digest:
┌──────────────┬──────────────────────────────────────────────────────────────────┬────────────┬─────────┬───────────────────────────┐
│ Local        │ Referenced upstream / Patch subject                              │ Patch-ID   │ Subject │ SoB chain                 │
├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ 50ed7cadafaa │ 9b0c3673c885 block: check bio split for unaligned bvec           │ match      │ match   │ preserved + jamien added  │
└──────────────┴──────────────────────────────────────────────────────────────────┴────────────┴─────────┴───────────────────────────┘

Lint: all checks passed.

@nvmochs

nvmochs commented Aug 25, 2026

Copy link
Copy Markdown
Collaborator

No issues or concerns.

Acked-by: Matthew R. Ochs <[email protected]>

@clsotog clsotog left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Acked-by: Carol L Soto <[email protected]>

@nirmoy nirmoy added has_2_acks and removed help wanted Extra attention is needed has_1_ack labels Aug 25, 2026

@esot0 esot0 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Acked-by: Emily Soto <[email protected]>

@jamieNguyenNVIDIA

Copy link
Copy Markdown
Collaborator Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants