Page MenuHomeFreeBSD

posixshm largepage_mmap: fix a racy test
ClosedPublic

Authored by brooks on Jan 2 2024, 11:04 PM.
Tags
None
Referenced Files
Unknown Object (File)
Apr 30 2024, 8:42 PM
Unknown Object (File)
Apr 27 2024, 1:05 PM
Unknown Object (File)
Apr 27 2024, 1:02 PM
Unknown Object (File)
Apr 27 2024, 12:18 PM
Unknown Object (File)
Apr 27 2024, 11:53 AM
Unknown Object (File)
Apr 26 2024, 10:48 AM
Unknown Object (File)
Apr 24 2024, 8:27 PM
Unknown Object (File)
Apr 24 2024, 8:27 PM
Subscribers

Details

Summary

You can't ever safely map a single page and then map a superpage sized
mapping over it with MAP_FIXED. Even in a single-threaded program, ASLR
might mean you land too close to another mapping and on CheriBSD we
don't allow the initial reservation to grow because doing so requires
program changes that are hard to automate.

To avoid this, map the entire region we want to use upfront.

Obtained from: CheriBSD

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable