HomeFreeBSD

Let linuxulator mprotect mask unsupported bits before calling kern_mprotect.

Description

Let linuxulator mprotect mask unsupported bits before calling kern_mprotect.

After r349240 kern_mprotect returns EINVAL for unsupported bits in the prot
argument. Linux rtld uses PROT_GROWSDOWN and PROT_GROWS_UP when marking the
stack executable. Mask these bits like kern_mprotect used to do. For other
unsupported bits EINVAL is returned like Linux does.

Reviewed by: trasz, brooks
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D20864

Details

Provenance
tijlAuthored on Jul 10 2019, 8:19 AM
Parents
rG128c495e5090: Apply a workaround to be able to build clang 8.0.0 headers with clang
Branches
Unknown
Tags
Unknown

Event Timeline