[PATCH 0/3] arm64/boot: Forbid the use of BSS symbols in startup code

Ard Biesheuvel posted 3 patches 9 months, 2 weeks ago
There is a newer version of this series
arch/arm64/include/asm/pgtable.h |  2 -
arch/arm64/kernel/cpufeature.c   | 22 +++----
arch/arm64/kernel/image-vars.h   | 68 ++++++++++----------
arch/arm64/kernel/pi/pi.h        |  1 +
arch/arm64/kernel/vmlinux.lds.S  |  6 +-
5 files changed, 51 insertions(+), 48 deletions(-)
[PATCH 0/3] arm64/boot: Forbid the use of BSS symbols in startup code
Posted by Ard Biesheuvel 9 months, 2 weeks ago
From: Ard Biesheuvel <ardb@kernel.org>

Move any variables accessed or assigned by the startup code out of BSS,
and into .data, so that we can forbid the use of BSS variables
altogether, by ASSERT()'ing in the linker script that each symbol made
available to the startup code lives before __bss_start in the linker
map.

Cc: Yeoreum Yun <yeoreum.yun@arm.com>

Ard Biesheuvel (3):
  arm64/boot: Move init_pgdir[] into __pi_ namespace
  arm64/boot: Move global CPU override variables out of BSS
  arm64/boot: Disallow BSS exports to startup code

 arch/arm64/include/asm/pgtable.h |  2 -
 arch/arm64/kernel/cpufeature.c   | 22 +++----
 arch/arm64/kernel/image-vars.h   | 68 ++++++++++----------
 arch/arm64/kernel/pi/pi.h        |  1 +
 arch/arm64/kernel/vmlinux.lds.S  |  6 +-
 5 files changed, 51 insertions(+), 48 deletions(-)

-- 
2.49.0.906.g1f30a19c02-goog
Re: [PATCH 0/3] arm64/boot: Forbid the use of BSS symbols in startup code
Posted by Yeoreum Yun 9 months, 1 week ago
Hi Ard,

> From: Ard Biesheuvel <ardb@kernel.org>
>
> Move any variables accessed or assigned by the startup code out of BSS,
> and into .data, so that we can forbid the use of BSS variables
> altogether, by ASSERT()'ing in the linker script that each symbol made
> available to the startup code lives before __bss_start in the linker
> map.
>
> Cc: Yeoreum Yun <yeoreum.yun@arm.com>

Thanks for ccing me and with the your fix it looks good to me.
When you send the patch with fix, I'll test it.

Thanks.

--
Sincerely,
Yeoreum Yun