diff options
| author | Peter Zijlstra <peterz@infradead.org> | 2022-06-27 22:21:17 +0000 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-07-23 12:56:56 +0200 |
| commit | 813423f90f0553c81c5fb4d531fc688a5d506b24 (patch) | |
| tree | bf6801d7e3a51817c65cbc19ae83d919f7cfadec /scripts | |
| parent | 409f6047a43315f2b9661149cb29d6f2ef2440fe (diff) | |
| download | linux-813423f90f0553c81c5fb4d531fc688a5d506b24.tar.gz linux-813423f90f0553c81c5fb4d531fc688a5d506b24.tar.bz2 linux-813423f90f0553c81c5fb4d531fc688a5d506b24.zip | |
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.build | 1 | ||||
| -rwxr-xr-x | scripts/link-vmlinux.sh | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/scripts/Makefile.build b/scripts/Makefile.build index 33c1ed581522..2a0521f77e5f 100644 --- a/scripts/Makefile.build +++ b/scripts/Makefile.build @@ -233,6 +233,7 @@ objtool_args = \ $(if $(CONFIG_FRAME_POINTER),, --no-fp) \ $(if $(CONFIG_GCOV_KERNEL), --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 b5159fe1c4fc..d4d028595fb4 100755 --- a/scripts/link-vmlinux.sh +++ b/scripts/link-vmlinux.sh @@ -130,7 +130,7 @@ objtool_link() if is_enabled 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 |
