-
- Downloads
x86/boot: Drop CRC-32 checksum and the build tool that generates it
Apart from some sanity checks on the size of setup.bin, the only remaining task carried out by the arch/x86/boot/tools/build.c build tool is generating the CRC-32 checksum of the bzImage. This feature was added in commit 7d6e737c ("x86: add a crc32 checksum to the kernel image.") without any motivation (or any commit log text, for that matter). This checksum is not verified by any known bootloader, and given that a) the checksum of the entire bzImage is reported by most tools (zlib, rhash) as 0xffffffff and not 0x0 as documented, b) the checksum is corrupted when the image is signed for secure boot, which means that no distro ships x86 images with valid CRCs, it seems quite unlikely that this checksum is being used, so let's just drop it, along with the tool that generates it. Instead, use simple file concatenation and truncation to combine the two pieces into bzImage, and replace the checks on the size of the setup block with a couple of ASSERT()s in the linker script. Signed-off-by:Ard Biesheuvel <ardb@kernel.org> Signed-off-by:
Ingo Molnar <mingo@kernel.org> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: Ian Campbell <ijc@hellion.org.uk> Cc: Linus Torvalds <torvalds@linux-foundation.org> Link: https://lore.kernel.org/r/20250307164801.885261-2-ardb+git@google.com
Showing
- Documentation/arch/x86/boot.rst 0 additions, 10 deletionsDocumentation/arch/x86/boot.rst
- arch/x86/boot/Makefile 2 additions, 5 deletionsarch/x86/boot/Makefile
- arch/x86/boot/compressed/vmlinux.lds.S 1 addition, 2 deletionsarch/x86/boot/compressed/vmlinux.lds.S
- arch/x86/boot/setup.ld 2 additions, 0 deletionsarch/x86/boot/setup.ld
- arch/x86/boot/tools/.gitignore 0 additions, 2 deletionsarch/x86/boot/tools/.gitignore
- arch/x86/boot/tools/build.c 0 additions, 247 deletionsarch/x86/boot/tools/build.c
Loading