[PATCH v19 1/7] x86/cet/ibt: Update Kconfig for user-mode Indirect Branch Tracking

From
Yu-cheng Yu <hidden>
Date
2021-02-03 23:03:36
Also in
linux-arch, linux-doc, linux-mm, lkml
Reply to
Yu-cheng Yu, 2021-02-03
Indirect branch tracking is a hardware security feature that verifies near
indirect call/jump instructions arrive at intended targets, which are
labeled by the compiler with ENDBR opcodes.  If such instructions reach
unlabeled locations, the processor raises control-protection faults.

Check the compiler is up-to-date at config time.

Signed-off-by: Yu-cheng Yu <redacted>
---
 arch/x86/Kconfig | 1 +
 1 file changed, 1 insertion(+)
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 4628d4dadd34..63b878c4e4c6 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -1962,6 +1962,7 @@ config X86_CET
 	def_bool n
 	depends on X86_64
 	depends on AS_WRUSS
+	depends on $(cc-option,-fcf-protection)
 	select ARCH_USES_HIGH_VMA_FLAGS
 	select ARCH_HAS_SHADOW_STACK
 	select ARCH_MAYBE_MKWRITE
-- 
2.21.0
Thread (15 messages) 15 messages, 2 authors, last reply 2021-02-04
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help