summaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/vmlinux.lds.S
diff options
context:
space:
mode:
authorPeter Zijlstra <peterz@infradead.org>2022-06-14 23:15:37 +0200
committerBorislav Petkov <bp@suse.de>2022-06-27 10:33:58 +0200
commit15e67227c49a57837108acfe1c80570e1bd9f962 (patch)
tree1fd03816aa33ce35c51505a235fdf1f9fb58962d /arch/x86/kernel/vmlinux.lds.S
parentx86/retpoline: Use -mfunction-return (diff)
downloadlinux-15e67227c49a57837108acfe1c80570e1bd9f962.tar.xz
linux-15e67227c49a57837108acfe1c80570e1bd9f962.zip
x86: Undo return-thunk damage
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>
Diffstat (limited to '')
-rw-r--r--arch/x86/kernel/vmlinux.lds.S7
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/x86/kernel/vmlinux.lds.S b/arch/x86/kernel/vmlinux.lds.S
index 81aba718ecd5..ada7eb738113 100644
--- a/arch/x86/kernel/vmlinux.lds.S
+++ b/arch/x86/kernel/vmlinux.lds.S
@@ -283,6 +283,13 @@ SECTIONS
*(.retpoline_sites)
__retpoline_sites_end = .;
}
+
+ . = ALIGN(8);
+ .return_sites : AT(ADDR(.return_sites) - LOAD_OFFSET) {
+ __return_sites = .;
+ *(.return_sites)
+ __return_sites_end = .;
+ }
#endif
#ifdef CONFIG_X86_KERNEL_IBT