Implement branch target protection using the branch target identification
authorkettenis <kettenis@openbsd.org>
Mon, 27 Mar 2023 19:02:47 +0000 (19:02 +0000)
committerkettenis <kettenis@openbsd.org>
Mon, 27 Mar 2023 19:02:47 +0000 (19:02 +0000)
commitaa60921aa22cd2c4d517dfbcb04731f5614b8130
tree3e22ada0a8ea5b676a0445207453fb1d01dd2417
parentad4909c5bd7a422ecb69d208c2c299bbf0ab6987
Implement branch target protection using the branch target identification
feature introduced in Armv8.5.  This provides "head-CFI" to complement
the "tail-CFI" provided by retguard.  Unfortunately most arm64 machines
don't support this feature yet.  But Apple M2 does support it and it
seems to work there.

ok deraadt@
sys/arch/arm64/arm64/aesv8-armx.S
sys/arch/arm64/arm64/pmap.c
sys/arch/arm64/arm64/trap.c
sys/arch/arm64/conf/Makefile.arm64
sys/arch/arm64/include/armreg.h
sys/arch/arm64/include/asm.h
sys/arch/arm64/include/pte.h