HomeFreeBSD

vm_map_protect: allow to set prot and max_prot in one go.

Description

vm_map_protect: allow to set prot and max_prot in one go.

This prevents a situation where other thread modifies map entries
permissions between setting max_prot, then relocking, then setting prot,
confusing the operation outcome. E.g. you can get an error that is not
possible if operation is performed atomic.

Also enable setting rwx for max_prot even if map does not allow to set
effective rwx protection.

Reviewed by: brooks, markj (previous version)
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D28117

Details

Provenance
kibAuthored on Jan 12 2021, 12:43 PM
Reviewer
brooks
Differential Revision
D28117: vm_map_protect: allow to set prot and max_prot in one go.
Parents
rGd89e1db5a331: if_wg: fix modules load on !x86
Branches
Unknown
Tags
Unknown