Re: [PATCH v3 3/7] x86/boot/compressed: Get rid of GOT fixup code
From: Kees Cook
Date: Mon Jun 29 2020 - 15:33:51 EST
On Mon, Jun 29, 2020 at 10:09:24AM -0400, Arvind Sankar wrote:
> From: Ard Biesheuvel <ardb@xxxxxxxxxx>
>
> In a previous patch, we have eliminated GOT entries from the decompressor
> binary and added an assertion that the .got section is empty. This means
> that the GOT fixup routines that exist in both the 32-bit and 64-bit
> startup routines have become dead code, and can be removed.
>
> While at it, drop the KEEP() from the linker script, as it has no effect
> on the contents of output sections that are created by the linker itself.
>
> Signed-off-by: Ard Biesheuvel <ardb@xxxxxxxxxx>
> Acked-by: Arvind Sankar <nivedita@xxxxxxxxxxxx>
> Signed-off-by: Arvind Sankar <nivedita@xxxxxxxxxxxx>
> From: Ard Biesheuvel <ardb@xxxxxxxxxx>
> Link: https://lore.kernel.org/r/20200523120021.34996-4-ardb@xxxxxxxxxx
> ---
> arch/x86/boot/compressed/head_32.S | 24 ++---------
> arch/x86/boot/compressed/head_64.S | 57 --------------------------
> arch/x86/boot/compressed/vmlinux.lds.S | 4 +-
> 3 files changed, 5 insertions(+), 80 deletions(-)
This makes me very happy! This code always bugged me. ;)
Reviewed-by: Kees Cook <keescook@xxxxxxxxxxxx>
--
Kees Cook