summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArd Biesheuvel <ardb@kernel.org>2025-03-12 09:12:05 +0100
committerIngo Molnar <mingo@kernel.org>2025-03-12 13:04:52 +0100
commite471a86a8c523eccdfd1c4745ed7ac7cbdcc1f3f (patch)
tree464fed529df4c35d6c8b1b95b277156af502cc91
parent9c54baab4401db249d6938806b812231e0259380 (diff)
x86/boot: Add back some padding for the CRC-32 checksum
Even though no uses of the bzImage CRC-32 checksum are known, ensure that the last 4 bytes of the image are unused zero bytes, so that the checksum can be generated post-build if needed. [ mingo: Added the 'obsolete' qualifier to the comment. ] Suggested-by: "H. Peter Anvin" <hpa@zytor.com> Signed-off-by: Ard Biesheuvel <ardb@kernel.org> Signed-off-by: Ingo Molnar <mingo@kernel.org> Cc: Ian Campbell <ijc@hellion.org.uk> Cc: Linus Torvalds <torvalds@linux-foundation.org> Link: https://lore.kernel.org/r/20250312081204.521411-2-ardb+git@google.com
-rw-r--r--arch/x86/boot/compressed/vmlinux.lds.S3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/x86/boot/compressed/vmlinux.lds.S b/arch/x86/boot/compressed/vmlinux.lds.S
index 48d0b5184557..3b2bc61c9408 100644
--- a/arch/x86/boot/compressed/vmlinux.lds.S
+++ b/arch/x86/boot/compressed/vmlinux.lds.S
@@ -48,7 +48,8 @@ SECTIONS
*(.data)
*(.data.*)
- . = ALIGN(0x200);
+ /* Add 4 bytes of extra space for the obsolete CRC-32 checksum */
+ . = ALIGN(. + 4, 0x200);
_edata = . ;
}
. = ALIGN(L1_CACHE_BYTES);