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)
Sat, Apr 27, 3:46 AM
Unknown Object (File)
Sat, Apr 27, 3:46 AM
Unknown Object (File)
Sat, Apr 27, 3:46 AM
Unknown Object (File)
Sat, Apr 27, 2:30 AM
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
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

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 21492
Build 20807: arc lint + arc unit

Event Timeline

Seems reasonable.

sys/arm64/arm64/trap.c
154

How about bool?

andrew added inline comments.
sys/arm64/arm64/trap.c
154

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.