Page MenuHomeFreeBSD

Do not preemptively create wired superpage mappings.
ClosedPublic

Authored by markj on Mar 21 2019, 4:18 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Nov 8, 3:44 AM
Unknown Object (File)
Oct 4 2024, 7:56 AM
Unknown Object (File)
Oct 1 2024, 9:09 PM
Unknown Object (File)
Sep 28 2024, 8:22 PM
Unknown Object (File)
Sep 13 2024, 3:07 AM
Unknown Object (File)
Sep 5 2024, 9:39 PM
Unknown Object (File)
Aug 28 2024, 3:46 AM
Unknown Object (File)
Aug 12 2024, 7:54 PM
Subscribers

Details

Summary

There are some corner cases that can create an unmapped, wired region in
a user address space:

  • msync(MS_INVALIDATE)
  • mprotect(PROT_NONE) -> mprotect(PROT_READ)
  • truncation of a vnode/shm object to a smaller size and back to a larger size

A fault on such a region can trigger preemptive superpage creation
with pmap_enter(PMAP_ENTER_WIRED, psind=1). However, the various
pmaps do not handle this properly and will create a wired superpage
without a leaf page in the pmap's radix tree, so demotion may fail
and cause the address range to be unmapped.

I am not yet sure that we should fix all of the pmaps to handle this,
but for now just make it impossible.

Diff Detail

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 23235
Build 22276: arc lint + arc unit

Event Timeline

This revision is now accepted and ready to land.Mar 21 2019, 5:16 PM

Update vm_fault_populate() as well.

This revision now requires review to proceed.Mar 21 2019, 6:49 PM
This revision is now accepted and ready to land.Mar 21 2019, 7:29 PM
This revision was automatically updated to reflect the committed changes.