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)
Thu, Dec 12, 6:51 PM
Unknown Object (File)
Mon, Dec 9, 4:57 AM
Unknown Object (File)
Nov 16 2024, 1:43 PM
Unknown Object (File)
Oct 9 2024, 2:34 AM
Unknown Object (File)
Sep 24 2024, 2:55 AM
Unknown Object (File)
Sep 23 2024, 10:22 PM
Unknown Object (File)
Sep 23 2024, 10:38 AM
Unknown Object (File)
Sep 23 2024, 12:17 AM
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.