kconfig: Disable 'RETPOLINE' on unsupported platforms

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 <sebastian.boe@nordicsemi.no>
This commit is contained in:
Sebastian Bøe 2018-12-27 16:30:18 +01:00 committed by Anas Nashif
commit 4019bda695

View file

@ -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