Skip to content

arm64/boot: Forbid the use of BSS symbols in startup code

Ard Biesheuvel linux-arm-kernel lkml oe-kbuild-all 2 versions – Applied

Status from this message: Applied to arm64 (for-next/mm), thanks!

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest3 patches 5 repliesApplied
  2. v13 patches 3 repliesSuperseded

Changes in v2 from the cover letter

- fix build error due to missing declaration in #1
- work around Clang complaining about the ASSERT() expression in the linker script

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/3arm64/boot: Move init_pgdir[] and init_idmap_pgdir[] into __pi_ namespacearch/arm64/include/asm/pgtable.h arch/arm64/kernel/head.S arch/arm64/kernel/image-vars.h +2 more+8 -130 replies
2/3arm64/boot: Move global CPU override variables out of BSSarch/arm64/kernel/cpufeature.c+11 -110 replies
3/3arm64/boot: Disallow BSS exports to startup codearch/arm64/kernel/image-vars.h arch/arm64/kernel/vmlinux.lds.S+35 -293 replies

Reviews trailers per patch

None of the 3 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchYeoreum Yun
SeriesT-b R-b
1/3
2/3
3/3

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

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

From: Ard Biesheuvel <[email protected]>

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.

Changes since v1:
- fix build error due to missing declaration in #1
- work around Clang complaining about the ASSERT() expression in the linker script

Cc Yeoreum Yun <[email protected]>

Ard Biesheuvel (3):
arm64/boot: Move init_pgdir[] and init_idmap_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/head.S         |  6 +-
 arch/arm64/kernel/image-vars.h   | 66 ++++++++++----------
 arch/arm64/kernel/pi/pi.h        |  1 +
 arch/arm64/kernel/vmlinux.lds.S  | 10 +--
 6 files changed, 54 insertions(+), 53 deletions(-)

base-commit: 363cd2b81cfdf706bbfc9ec78db000c9b1ecc552

Signature · 1 line
2.49.0.987.g0cc8ee98dc-goog