efi/x86: Remove __efistub_global and add relocation check
authorArvind Sankar <nivedita@alum.mit.edu>
Thu, 16 Apr 2020 15:12:26 +0000 (11:12 -0400)
committerArd Biesheuvel <ardb@kernel.org>
Fri, 24 Apr 2020 12:52:16 +0000 (14:52 +0200)
commit26a92425f9a301fdeb5482e7891915ce43cc0556
treec529548c0533b2f748a3f3fd72154f939be79df8
parent420b6d00ca94ce5b6578b1bc12e767ac7a0251ac
efi/x86: Remove __efistub_global and add relocation check

Instead of using __efistub_global to force variables into the .data
section, leave them in the .bss but pull the EFI stub's .bss section
into .data in the linker script for the compressed kernel.

Add relocation checking for x86 as well to catch non-PC-relative
relocations that require runtime processing, since the EFI stub does not
do any runtime relocation processing.

This will catch, for example, data relocations created by static
initializers of pointers.

Signed-off-by: Arvind Sankar <nivedita@alum.mit.edu>
Link: https://lore.kernel.org/r/20200416151227.3360778-3-nivedita@alum.mit.edu
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
arch/x86/boot/compressed/vmlinux.lds.S
drivers/firmware/efi/libstub/Makefile
drivers/firmware/efi/libstub/efistub.h