All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ard Biesheuvel <ardb+git@google.com>
To: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org, will@kernel.org,
	catalin.marinas@arm.com,  mark.rutland@arm.com,
	Ard Biesheuvel <ardb@kernel.org>,
	Yeoreum Yun <yeoreum.yun@arm.com>
Subject: [PATCH 0/3] arm64/boot: Forbid the use of BSS symbols in startup code
Date: Sat,  3 May 2025 13:21:38 +0200	[thread overview]
Message-ID: <20250503112137.1962910-5-ardb+git@google.com> (raw)

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



             reply	other threads:[~2025-05-03 11:25 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-03 11:21 Ard Biesheuvel [this message]
2025-05-03 11:21 ` [PATCH 1/3] arm64/boot: Move init_pgdir[] into __pi_ namespace Ard Biesheuvel
2025-05-03 11:28   ` Ard Biesheuvel
2025-05-05 13:54   ` kernel test robot
2025-05-05 23:50   ` kernel test robot
2025-05-03 11:21 ` [PATCH 3/3] arm64/boot: Disallow BSS exports to startup code Ard Biesheuvel
2025-05-03 11:45   ` Ard Biesheuvel
2025-05-03 11:21 ` [PATCH 2/3] arm64/boot: Move global CPU override variables out of BSS Ard Biesheuvel
2025-05-08 11:14 ` [PATCH 0/3] arm64/boot: Forbid the use of BSS symbols in startup code Yeoreum Yun

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250503112137.1962910-5-ardb+git@google.com \
    --to=ardb+git@google.com \
    --cc=ardb@kernel.org \
    --cc=catalin.marinas@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=will@kernel.org \
    --cc=yeoreum.yun@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.