HomeFreeBSD

arm64: Add BTI support to pmap

Description

arm64: Add BTI support to pmap

Add a rangeset to the arm64 pmap to describe which address space needs
the Branch Target Identification (BTI) Guard Page flag set in the page
table.

On hardware that supports BTI the Guard Page flag tells the hardware
to raise an exception if the target of a BR* and BLR* instruction is
not an appropriate landing pad instruction.

To support this in userspace we need to know which address space
should be guarded. For this add a rangeset to the arm64 pmap when the
hardware supports BTI. The kernel can then use pmap_bti_set and
pmap_bti_clear mark and unmark which address space is guarded.

Sponsored by: Arm Ltd
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D42328

Details

Provenance
andrewAuthored on Apr 5 2023, 12:31 PM
Differential Revision
D42328: arm64: Add BTI support to pmap
Parents
rGa53204c22790: sk(4): Fix a typo in a source code comment
Branches
Unknown
Tags
Unknown