Skip to content

Commit 383499f

Browse files
Dave Martinctmarinas
authored andcommitted
arm64: BTI: Add Kconfig entry for userspace BTI
Now that the code for userspace BTI support is in the kernel add the Kconfig entry so that it can be built and used. [Split out of "arm64: Basic Branch Target Identification support" -- broonie] Signed-off-by: Mark Brown <[email protected]> Signed-off-by: Dave Martin <[email protected]> Reviewed-by: Kees Cook <[email protected]> Signed-off-by: Catalin Marinas <[email protected]>
1 parent 424037b commit 383499f

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

arch/arm64/Kconfig

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1522,6 +1522,28 @@ endmenu
15221522

15231523
menu "ARMv8.5 architectural features"
15241524

1525+
config ARM64_BTI
1526+
bool "Branch Target Identification support"
1527+
default y
1528+
help
1529+
Branch Target Identification (part of the ARMv8.5 Extensions)
1530+
provides a mechanism to limit the set of locations to which computed
1531+
branch instructions such as BR or BLR can jump.
1532+
1533+
To make use of BTI on CPUs that support it, say Y.
1534+
1535+
BTI is intended to provide complementary protection to other control
1536+
flow integrity protection mechanisms, such as the Pointer
1537+
authentication mechanism provided as part of the ARMv8.3 Extensions.
1538+
For this reason, it does not make sense to enable this option without
1539+
also enabling support for pointer authentication. Thus, when
1540+
enabling this option you should also select ARM64_PTR_AUTH=y.
1541+
1542+
Userspace binaries must also be specifically compiled to make use of
1543+
this mechanism. If you say N here or the hardware does not support
1544+
BTI, such binaries can still run, but you get no additional
1545+
enforcement of branch destinations.
1546+
15251547
config ARM64_E0PD
15261548
bool "Enable support for E0PD"
15271549
default y

0 commit comments

Comments
 (0)