summary refs log tree commit diff
path: root/arch/x86/realmode/Makefile
diff options
context:
space:
mode:
authorArvind Sankar <nivedita@alum.mit.edu>2020-02-24 18:21:28 -0500
committerBorislav Petkov <bp@suse.de>2020-02-25 13:18:29 +0100
commit003602ad5516e59940de42e44c8d8033387bb363 (patch)
tree43d5e8f4c77ac86e5d2e881a979c95ebb0eae3d4 /arch/x86/realmode/Makefile
parent0eea39a234dc52063d14541fabcb2c64516a2328 (diff)
downloadlinux-003602ad5516e59940de42e44c8d8033387bb363.tar.gz
x86/*/Makefile: Use -fno-asynchronous-unwind-tables to suppress .eh_frame sections
While discussing a patch to discard .eh_frame from the compressed
vmlinux using the linker script, Fangrui Song pointed out [1] that these
sections shouldn't exist in the first place because arch/x86/Makefile
uses -fno-asynchronous-unwind-tables.

It turns out this is because the Makefiles used to build the compressed
kernel redefine KBUILD_CFLAGS, dropping this flag.

Add the flag to the Makefile for the compressed kernel, as well as the
EFI stub Makefile to fix this.

Also add the flag to boot/Makefile and realmode/rm/Makefile so that the
kernel's boot code (boot/setup.elf) and realmode trampoline
(realmode/rm/realmode.elf) won't be compiled with .eh_frame sections,
since their linker scripts also just discard them.

  [1] https://lore.kernel.org/lkml/20200222185806.ywnqhfqmy67akfsa@google.com/

Suggested-by: Fangrui Song <maskray@google.com>
Signed-off-by: Arvind Sankar <nivedita@alum.mit.edu>
Signed-off-by: Borislav Petkov <bp@suse.de>
Reviewed-by: Nathan Chancellor <natechancellor@gmail.com>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
Tested-by: Nathan Chancellor <natechancellor@gmail.com>
Link: https://lkml.kernel.org/r/20200224232129.597160-2-nivedita@alum.mit.edu
Diffstat (limited to 'arch/x86/realmode/Makefile')
0 files changed, 0 insertions, 0 deletions