aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorArd Biesheuvel <ardb@kernel.org>2025-04-08 10:52:56 +0200
committerIngo Molnar <mingo@kernel.org>2025-04-09 11:59:03 +0200
commitd9fa398fe82728ee703ad2bd9cf5247df9626470 (patch)
tree084cd584addc3f233f33d149e62314df0f3616ef
parentx86/boot: Move the EFI mixed mode startup code back under arch/x86, into startup/ (diff)
downloadwireguard-linux-d9fa398fe82728ee703ad2bd9cf5247df9626470.tar.xz
wireguard-linux-d9fa398fe82728ee703ad2bd9cf5247df9626470.zip
x86/boot/startup: Disable objtool validation for library code
The library code built under arch/x86/boot/startup is not intended to be linked into vmlinux but only into the decompressor and/or the EFI stub. This means objtool validation is not needed here, and may result in false positive errors for things like missing retpolines. So disable it for all objects added to lib-y Tested-by: Chaitanya Kumar Borah <chaitanya.kumar.borah@intel.com> Signed-off-by: Ard Biesheuvel <ardb@kernel.org> Signed-off-by: Ingo Molnar <mingo@kernel.org> Cc: H. Peter Anvin <hpa@zytor.com> Cc: Kees Cook <keescook@chromium.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: David Woodhouse <dwmw@amazon.co.uk> Cc: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Cc: Len Brown <len.brown@intel.com> Cc: Josh Poimboeuf <jpoimboe@redhat.com> Link: https://lore.kernel.org/r/20250408085254.836788-10-ardb+git@google.com
-rw-r--r--arch/x86/boot/startup/Makefile6
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/x86/boot/startup/Makefile b/arch/x86/boot/startup/Makefile
index 73946a3f6b3b..8919a1cbcb5a 100644
--- a/arch/x86/boot/startup/Makefile
+++ b/arch/x86/boot/startup/Makefile
@@ -4,3 +4,9 @@ KBUILD_AFLAGS += -D__DISABLE_EXPORTS
lib-$(CONFIG_X86_64) += la57toggle.o
lib-$(CONFIG_EFI_MIXED) += efi-mixed.o
+
+#
+# Disable objtool validation for all library code, which is intended
+# to be linked into the decompressor or the EFI stub but not vmlinux
+#
+$(patsubst %.o,$(obj)/%.o,$(lib-y)): OBJECT_FILES_NON_STANDARD := y