summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorPeter Zijlstra <peterz@infradead.org>2022-06-27 22:21:17 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-07-23 12:54:10 +0200
commitcc3011cdbe5f834b0e9873b841d1be02be9a1524 (patch)
tree59b6f227f2a13fa8a96519a023f52b4e59cd1733 /scripts
parent12a13570054fcbf347aaf37824ea43915f9f739c (diff)
x86/retbleed: Add fine grained Kconfig knobs
commit f43b9876e857c739d407bc56df288b0ebe1a9164 upstream. Do fine-grained Kconfig for all the various retbleed parts. NOTE: if your compiler doesn't support return thunks this will silently 'upgrade' your mitigation to IBPB, you might not like this. Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Signed-off-by: Borislav Petkov <bp@suse.de> [cascardo: there is no CONFIG_OBJTOOL] [cascardo: objtool calling and option parsing has changed] Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/Makefile.build1
-rwxr-xr-xscripts/link-vmlinux.sh2
2 files changed, 2 insertions, 1 deletions
diff --git a/scripts/Makefile.build b/scripts/Makefile.build
index 2b988b6ccacb..17aa8ef2d52a 100644
--- a/scripts/Makefile.build
+++ b/scripts/Makefile.build
@@ -231,6 +231,7 @@ objtool_args = \
$(if $(CONFIG_FRAME_POINTER),, --no-fp) \
$(if $(CONFIG_GCOV_KERNEL)$(CONFIG_LTO_CLANG), --no-unreachable)\
$(if $(CONFIG_RETPOLINE), --retpoline) \
+ $(if $(CONFIG_RETHUNK), --rethunk) \
$(if $(CONFIG_X86_SMAP), --uaccess) \
$(if $(CONFIG_FTRACE_MCOUNT_USE_OBJTOOL), --mcount) \
$(if $(CONFIG_SLS), --sls)
diff --git a/scripts/link-vmlinux.sh b/scripts/link-vmlinux.sh
index 3c2adb7563f1..3819a461465d 100755
--- a/scripts/link-vmlinux.sh
+++ b/scripts/link-vmlinux.sh
@@ -120,7 +120,7 @@ objtool_link()
if [ -n "${CONFIG_VMLINUX_VALIDATION}" ]; then
objtoolopt="${objtoolopt} --noinstr"
- if is_enabled CONFIG_RETPOLINE; then
+ if is_enabled CONFIG_CPU_UNRET_ENTRY; then
objtoolopt="${objtoolopt} --unret"
fi
fi