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)
Mar 17 2024, 5:11 AM
Unknown Object (File)
Mar 14 2024, 1:36 PM
Unknown Object (File)
Mar 14 2024, 1:36 PM
Unknown Object (File)
Mar 11 2024, 12:45 AM
Unknown Object (File)
Jan 12 2024, 6:12 AM
Unknown Object (File)
Dec 20 2023, 6:02 AM
Unknown Object (File)
Sep 15 2023, 1:58 PM
Unknown Object (File)
Aug 16 2023, 5:16 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 Not Applicable
Unit
Tests Not Applicable