]> git.baikalelectronics.ru Git - kernel.git/commit
x86/boot/compressed: Force hidden visibility for all symbol references
authorArd Biesheuvel <ardb@kernel.org>
Fri, 31 Jul 2020 23:07:46 +0000 (16:07 -0700)
committerIngo Molnar <mingo@kernel.org>
Fri, 14 Aug 2020 10:52:34 +0000 (12:52 +0200)
commit48c43bdfb28c9b589ee66f92df2ca1c15fef231e
treef94e41e776f29945c427689e5e2bf003cd6bf5bc
parent4a4e86cacd9fc51dd12ade862a83310bbdcff640
x86/boot/compressed: Force hidden visibility for all symbol references

Eliminate all GOT entries in the decompressor binary, by forcing hidden
visibility for all symbol references, which informs the compiler that
such references will be resolved at link time without the need for
allocating GOT entries.

To ensure that no GOT entries will creep back in, add an assertion to
the decompressor linker script that will fire if the .got section has
a non-zero size.

[Arvind: move hidden.h to include/linux instead of making a copy]

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Arvind Sankar <nivedita@alum.mit.edu>
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Tested-by: Nick Desaulniers <ndesaulniers@google.com>
Tested-by: Sedat Dilek <sedat.dilek@gmail.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
Acked-by: Arvind Sankar <nivedita@alum.mit.edu>
Link: https://lore.kernel.org/r/20200731230820.1742553-3-keescook@chromium.org
arch/x86/boot/compressed/Makefile
arch/x86/boot/compressed/vmlinux.lds.S
drivers/firmware/efi/libstub/Makefile
drivers/firmware/efi/libstub/hidden.h [deleted file]
include/linux/hidden.h [new file with mode: 0644]