Page MenuHomeFreeBSD

g_raid concat: Fail requests to read beyond the end of the volume
ClosedPublic

Authored by jhb on Jul 27 2023, 11:51 PM.
Tags
None
Referenced Files
F102048984: D41222.diff
Wed, Nov 6, 11:36 PM
Unknown Object (File)
Sun, Oct 13, 2:40 AM
Unknown Object (File)
Sun, Oct 13, 2:10 AM
Unknown Object (File)
Sun, Oct 13, 2:10 AM
Unknown Object (File)
Oct 1 2024, 5:01 PM
Unknown Object (File)
Sep 30 2024, 2:52 AM
Unknown Object (File)
Sep 21 2024, 5:38 AM
Unknown Object (File)
Sep 18 2024, 3:00 AM
Subscribers

Details

Summary

Previously a debug kernel would trigger an assertion failure if an I/O
request attempted to read off the end of a concat volume, but a
non-debug kernel would use an invalid sub-disk to try to complete the
request eventually resulting in some sort of fault in the kernel.

Instead, turn the assertions into explicit checks that fail requests
beyond the end of the volume with EIO. For requests which run over
the end of the volume, return a short request.

PR: 257838
Reported by: Robert Morris <rtm@lcs.mit.edu>
Sponsored by: The FreeBSD Foundation

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 52881
Build 49772: arc lint + arc unit