]> git.baikalelectronics.ru Git - kernel.git/commit
x86/entry: Fixup objtool/ibt validation
authorPeter Zijlstra <peterz@infradead.org>
Fri, 20 May 2022 08:26:04 +0000 (10:26 +0200)
committerBorislav Petkov <bp@suse.de>
Fri, 20 May 2022 10:04:56 +0000 (12:04 +0200)
commit9359d0a6edb7f407b564e04b201023a0d96dbbe3
tree220a9522053b41a1877cee8e2b2157f26ffc16a0
parent629736fd7ad106ed9a106ae50dce4fd6acf46a6c
x86/entry: Fixup objtool/ibt validation

Commit

  629736fd7ad1 ("x86/sev: Mark the code returning to user space as syscall gap")

added a bunch of text references without annotating them, resulting in a
spree of objtool complaints:

  vmlinux.o: warning: objtool: vc_switch_off_ist+0x77: relocation to !ENDBR: entry_SYSCALL_64+0x15c
  vmlinux.o: warning: objtool: vc_switch_off_ist+0x8f: relocation to !ENDBR: entry_SYSCALL_compat+0xa5
  vmlinux.o: warning: objtool: vc_switch_off_ist+0x97: relocation to !ENDBR: .entry.text+0x21ea
  vmlinux.o: warning: objtool: vc_switch_off_ist+0xef: relocation to !ENDBR: .entry.text+0x162
  vmlinux.o: warning: objtool: __sev_es_ist_enter+0x60: relocation to !ENDBR: entry_SYSCALL_64+0x15c
  vmlinux.o: warning: objtool: __sev_es_ist_enter+0x6c: relocation to !ENDBR: .entry.text+0x162
  vmlinux.o: warning: objtool: __sev_es_ist_enter+0x8a: relocation to !ENDBR: entry_SYSCALL_compat+0xa5
  vmlinux.o: warning: objtool: __sev_es_ist_enter+0xc1: relocation to !ENDBR: .entry.text+0x21ea

Since these text references are used to compare against IP, and are not
an indirect call target, they don't need ENDBR so annotate them away.

Fixes: 629736fd7ad1 ("x86/sev: Mark the code returning to user space as syscall gap")
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Borislav Petkov <bp@suse.de>
Link: https://lore.kernel.org/r/20220520082604.GQ2578@worktop.programming.kicks-ass.net
arch/x86/entry/entry_64.S
arch/x86/entry/entry_64_compat.S