Page MenuHomeFreeBSD

Set the arm64 Execute-never bits in more places.
ClosedPublic

Authored by andrew on Apr 13 2017, 10:33 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Jul 2, 2:14 PM
Unknown Object (File)
Mon, Jun 15, 11:23 PM
Unknown Object (File)
May 31 2026, 2:57 AM
Unknown Object (File)
May 22 2026, 6:10 AM
Unknown Object (File)
May 19 2026, 11:02 PM
Unknown Object (File)
May 19 2026, 1:17 PM
Unknown Object (File)
May 19 2026, 9:09 AM
Unknown Object (File)
May 16 2026, 11:03 PM
Subscribers

Details

Summary

We need to set the Execute-never bits when mapping device memory
as the hardware may perform speculative instruction fetches.

Set the Privileged Execute-ever bit on userspace memory to stop
the kernel if it is tricked into executing it.

Diff Detail

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 8711
Build 9049: arc lint + arc unit

Event Timeline

kib added inline comments.
sys/arm64/arm64/pmap.c
2731

Why using such rude check, instead of VM_MAXUSER_ADDRESS ?

This revision is now accepted and ready to land.Apr 13 2017, 12:45 PM
sys/arm64/arm64/pmap.c
2731

I'm not sure why I did that.

This revision was automatically updated to reflect the committed changes.