mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 06:44:00 -04:00
arm64/boot: Disallow BSS exports to startup code
BSS might be uninitialized when entering the startup code, so forbid the use by the startup code of any variables that live after __bss_start in the linker map. Signed-off-by: Ard Biesheuvel <ardb@kernel.org> Tested-by: Yeoreum Yun <yeoreum.yun@arm.com> Reviewed-by: Yeoreum Yun <yeoreum.yun@arm.com> Link: https://lore.kernel.org/r/20250508114328.2460610-8-ardb+git@google.com [will: Drop export of 'memstart_offset_seed', as this has been removed] Signed-off-by: Will Deacon <will@kernel.org>
This commit is contained in:
committed by
Will Deacon
parent
4afff6cc9a
commit
9053052107
@@ -319,6 +319,7 @@ SECTIONS
|
||||
|
||||
/* start of zero-init region */
|
||||
BSS_SECTION(SBSS_ALIGN, 0, 0)
|
||||
__pi___bss_start = __bss_start;
|
||||
|
||||
. = ALIGN(PAGE_SIZE);
|
||||
__pi_init_pg_dir = .;
|
||||
@@ -332,6 +333,7 @@ SECTIONS
|
||||
. = ALIGN(SEGMENT_ALIGN);
|
||||
__pecoff_data_size = ABSOLUTE(. - __initdata_begin);
|
||||
_end = .;
|
||||
__pi__end = .;
|
||||
|
||||
STABS_DEBUG
|
||||
DWARF_DEBUG
|
||||
|
||||
Reference in New Issue
Block a user