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)
Wed, Sep 18, 2:34 PM
Unknown Object (File)
Wed, Sep 18, 5:35 AM
Unknown Object (File)
Wed, Sep 18, 1:23 AM
Unknown Object (File)
Tue, Sep 17, 3:04 AM
Unknown Object (File)
Mon, Sep 16, 3:40 PM
Unknown Object (File)
Sun, Sep 15, 1:36 PM
Unknown Object (File)
Tue, Sep 10, 6:00 PM
Unknown Object (File)
Thu, Sep 5, 9:32 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 Not Applicable
Unit
Tests Not Applicable