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)
Fri, Apr 5, 9:01 PM
Unknown Object (File)
Fri, Apr 5, 8:47 PM
Unknown Object (File)
Fri, Apr 5, 8:41 PM
Unknown Object (File)
Fri, Apr 5, 8:34 PM
Unknown Object (File)
Feb 29 2024, 6:50 AM
Unknown Object (File)
Jan 9 2024, 8:09 AM
Unknown Object (File)
Dec 20 2023, 2:13 AM
Unknown Object (File)
Nov 23 2023, 3:41 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

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

Event Timeline

kib added inline comments.
sys/arm64/arm64/pmap.c
2731 ↗(On Diff #27401)

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 ↗(On Diff #27401)

I'm not sure why I did that.

This revision was automatically updated to reflect the committed changes.