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)
Sat, Apr 26, 6:45 PM
Unknown Object (File)
Fri, Apr 25, 10:48 AM
Unknown Object (File)
Fri, Apr 25, 10:48 AM
Unknown Object (File)
Wed, Apr 23, 3:17 PM
Unknown Object (File)
Tue, Apr 22, 1:27 PM
Unknown Object (File)
Sun, Apr 13, 7:45 PM
Unknown Object (File)
Sat, Apr 12, 11:32 PM
Unknown Object (File)
Sat, Apr 12, 11:25 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