HomeFreeBSD

Restrict setting PTE execute permissions on RISC-V.

Description

Restrict setting PTE execute permissions on RISC-V.

Previously, RISC-V was enabling execute permissions in PTEs for any
readable page. Now, execute permissions are only enabled if they were
explicitly specified (e.g. via PROT_EXEC to mmap). The one exception
is that the initial kernel mapping in locore still maps all of the
kernel RWX.

While here, change the fault type passed to vm_fault and
pmap_fault_fixup to only include a single VM_PROT_* value representing
the faulting access to match other architectures rather than passing a
bitmask.

Reviewed by: markj
Sponsored by: DARPA
Differential Revision: https://reviews.freebsd.org/D17783

Details

Provenance
jhbAuthored on
Reviewer
markj
Differential Revision
D17783: Restrict setting PTE execute permissions on RISC-V.
Parents
rS340029: Set PTE_A and PTE_D for user mappings in pmap_enter().
Branches
Unknown
Tags
Unknown