x86: Undo return-thunk damage
authorPeter Zijlstra <peterz@infradead.org>
Tue, 14 Jun 2022 21:15:37 +0000 (23:15 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 23 Jul 2022 10:53:58 +0000 (12:53 +0200)
commit7bf553d9eebd6bdf70e10a2fc3a7fa6dd482347e
tree01c62cd65a33b4fffc09547ecb9e5697f7f82c2d
parent023a2b07d5c3436427d7b902d7cddc16469027ba
x86: Undo return-thunk damage

commit 15e67227c49a57837108acfe1c80570e1bd9f962 upstream.

Introduce X86_FEATURE_RETHUNK for those afflicted with needing this.

  [ bp: Do only INT3 padding - simpler. ]

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Borislav Petkov <bp@suse.de>
Reviewed-by: Josh Poimboeuf <jpoimboe@kernel.org>
Signed-off-by: Borislav Petkov <bp@suse.de>
[cascardo: CONFIG_STACK_VALIDATION vs CONFIG_OBJTOOL]
[cascardo: no IBT support]
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/include/asm/alternative.h
arch/x86/include/asm/cpufeatures.h
arch/x86/include/asm/disabled-features.h
arch/x86/kernel/alternative.c
arch/x86/kernel/module.c
arch/x86/kernel/vmlinux.lds.S