x86/retpoline: Add NOENDBR annotation to the SRSO dummy return thunk
authorBorislav Petkov (AMD) <bp@alien8.de>
Fri, 5 Apr 2024 14:46:37 +0000 (16:46 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 10 Apr 2024 14:36:01 +0000 (16:36 +0200)
commit63bd08629aeeeefa5ee728d08be327e756051c72
tree444a085b7bd90ce3d16a4ea22023ae47964258f0
parentac522af8db5c024eac693584778f031d1f2bdcc9
x86/retpoline: Add NOENDBR annotation to the SRSO dummy return thunk

commit b377c66ae3509ccea596512d6afb4777711c4870 upstream.

srso_alias_untrain_ret() is special code, even if it is a dummy
which is called in the !SRSO case, so annotate it like its real
counterpart, to address the following objtool splat:

  vmlinux.o: warning: objtool: .export_symbol+0x2b290: data relocation to !ENDBR: srso_alias_untrain_ret+0x0

Fixes: 4535e1a4174c ("x86/bugs: Fix the SRSO mitigation on Zen3/4")
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Link: https://lore.kernel.org/r/20240405144637.17908-1-bp@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/lib/retpoline.S