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)
Sun, Nov 3, 2:10 AM
Unknown Object (File)
Sun, Nov 3, 2:10 AM
Unknown Object (File)
Sun, Nov 3, 2:10 AM
Unknown Object (File)
Sun, Nov 3, 1:45 AM
Unknown Object (File)
Sep 25 2024, 9:15 AM
Unknown Object (File)
Sep 18 2024, 2:34 PM
Unknown Object (File)
Sep 18 2024, 5:35 AM
Unknown Object (File)
Sep 18 2024, 1:23 AM
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 Passed
Unit
No Test Coverage
Build Status
Buildable 55205
Build 52094: arc lint + arc unit