]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC r316734, r316761: Support Execute-Never bit in the arm64 pmap.
authorandrew <andrew@FreeBSD.org>
Tue, 30 May 2017 12:44:01 +0000 (12:44 +0000)
committerandrew <andrew@FreeBSD.org>
Tue, 30 May 2017 12:44:01 +0000 (12:44 +0000)
commitedb010ea9cd5ce05e055474ade71fb8687a74eb6
tree15fdf8608cf475680c024e227c88c01ca3c49b3a
parent44c9bb43d0bd6f6d94443c9efa27cbaf86a38825
MFC r316734, r316761: Support Execute-Never bit in the arm64 pmap.

r316734:
Start to use the User and Privileged execute-never bits in the arm64
pagetables. This sets both bits when entering an address we know shouldn't
be executed.

I expect we could mark all userspace pages as Privileged execute-never to
ensure the kernel doesn't branch to one of these addresses.

While here add the ARMv8.1 upper attributes.

r316761:
Set the arm64 Execute-never bits in more places.

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.
sys/arm64/arm64/pmap.c
sys/arm64/include/pte.h