def_bool $(cc-option,-mindirect-branch-register) || \
$(cc-option,-mretpoline-external-thunk)
-config INDIRECT_THUNK
- def_bool y
- depends on CC_HAS_INDIRECT_THUNK
-
config HAS_AS_CET_SS
# binutils >= 2.29 or LLVM >= 6
def_bool $(as-instr,wrssq %rax$(comma)0;setssbsy)
menu "Speculative hardening"
+config INDIRECT_THUNK
+ bool "Speculative Branch Target Injection Protection"
+ depends on CC_HAS_INDIRECT_THUNK
+ default y
+ help
+ Contemporary processors may use speculative execution as a
+ performance optimisation, but this can potentially be abused by an
+ attacker to leak data via speculative sidechannels.
+
+ One source of data leakage is via branch target injection.
+
+ When enabled, indirect branches are implemented using a new construct
+ called "retpoline" that prevents speculation.
+
config SPECULATIVE_HARDEN_ARRAY
bool "Speculative Array Hardening"
default y