Skip to content

Commit e471a86

Browse files
ardbiesheuvelIngo Molnar
authored andcommitted
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" <[email protected]> Signed-off-by: Ard Biesheuvel <[email protected]> Signed-off-by: Ingo Molnar <[email protected]> Cc: Ian Campbell <[email protected]> Cc: Linus Torvalds <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 9c54baa commit e471a86

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

arch/x86/boot/compressed/vmlinux.lds.S

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ SECTIONS
4848
*(.data)
4949
*(.data.*)
5050

51-
. = ALIGN(0x200);
51+
/* Add 4 bytes of extra space for the obsolete CRC-32 checksum */
52+
. = ALIGN(. + 4, 0x200);
5253
_edata = . ;
5354
}
5455
. = ALIGN(L1_CACHE_BYTES);

0 commit comments

Comments
 (0)