From 4019bda695438896e14e6ac14ac131d13710641a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20B=C3=B8e?= Date: Thu, 27 Dec 2018 16:30:18 +0100 Subject: [PATCH] kconfig: Disable 'RETPOLINE' on unsupported platforms MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit RETPOLINE has been enabled by default on most platforms, but it is only supported on X86. Features should only be enabled if they are supported and active on the given platform. To rectify this we have RETPOLINE depend on X86, the only platform on which it is implemented. Signed-off-by: Sebastian Bøe --- kernel/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/Kconfig b/kernel/Kconfig index cd11f833b40..82b505d69b3 100644 --- a/kernel/Kconfig +++ b/kernel/Kconfig @@ -582,13 +582,13 @@ menu "Security Options" config RETPOLINE bool "Build with retpolines enabled" default y if !X86_NO_SPECTRE_V2 + # Currently only implemented for x86 + depends on X86 help This is recommended on platforms with speculative executions, to protect against branch target injection (AKA Spectre-V2). Full description of how retpolines work can be found here[1]. - Currently only the x86 port - [1] https://support.google.com/faqs/answer/7625886 config STACK_CANARIES