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
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
Unknown Object (File)
Sep 17 2024, 2:05 PM
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 Not Applicable
Unit
Tests Not Applicable