Page MenuHomeFreeBSD

Pass VM_PROT_EXECUTE to vm_fault for instruction faults
ClosedPublic

Authored by andrew on Dec 11 2018, 10:58 AM.
Tags
None
Referenced Files
F132286815: D18511.id.diff
Wed, Oct 15, 1:15 PM
F132286812: D18511.id51862.diff
Wed, Oct 15, 1:15 PM
F132286809: D18511.id52336.diff
Wed, Oct 15, 1:14 PM
Unknown Object (File)
Wed, Oct 15, 2:18 AM
Unknown Object (File)
Wed, Sep 24, 3:02 AM
Unknown Object (File)
Mon, Sep 22, 11:56 PM
Unknown Object (File)
Aug 25 2025, 9:55 AM
Unknown Object (File)
Aug 13 2025, 8:51 PM
Subscribers

Details

Summary

We need to tell vm_fault the reason for the fault was because we tried
to execute from the memory location. Without this it may return with
success as we only request read-only memory, then we return to the same
location and try to execute from the same memory address. This leads to
an infinite loop raising the same fault and returning to the same
invalid location.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Seems reasonable.

sys/arm64/arm64/trap.c
154 ↗(On Diff #51862)

How about bool?

andrew added inline comments.
sys/arm64/arm64/trap.c
154 ↗(On Diff #51862)

I thought about that but decided to keep with the existing style, lower is also a bool.

This revision was not accepted when it landed; it landed in state Needs Review.Dec 27 2018, 2:15 PM
This revision was automatically updated to reflect the committed changes.