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
Unknown Object (File)
Dec 22 2023, 10:12 PM
Unknown Object (File)
Dec 21 2023, 6:07 PM
Unknown Object (File)
Nov 15 2023, 12:58 PM
Unknown Object (File)
Nov 15 2023, 12:55 PM
Unknown Object (File)
Aug 14 2023, 3:42 PM
Unknown Object (File)
Jul 4 2023, 5:03 PM
Unknown Object (File)
Jul 4 2023, 5:02 PM
Unknown Object (File)
Jul 4 2023, 5:00 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.