arm64: head: move dynamic shadow call stack patching into early C runtime
authorArd Biesheuvel <ardb@kernel.org>
Wed, 14 Feb 2024 12:28:55 +0000 (13:28 +0100)
committerCatalin Marinas <catalin.marinas@arm.com>
Fri, 16 Feb 2024 12:42:30 +0000 (12:42 +0000)
commit8a6e40e1f68e9fc44497db88e0c0f21bb513c551
treee109a16ac0a462e4f711b10868d77c9ee9d6cc6f
parentdcfe969a641984fcd2b52aa257e478443612c050
arm64: head: move dynamic shadow call stack patching into early C runtime

Once we update the early kernel mapping code to only map the kernel once
with the right permissions, we can no longer perform code patching via
this mapping.

So move this code to an earlier stage of the boot, right after applying
the relocations.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Link: https://lore.kernel.org/r/20240214122845.2033971-54-ardb+git@google.com
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm64/include/asm/scs.h
arch/arm64/kernel/Makefile
arch/arm64/kernel/head.S
arch/arm64/kernel/module.c
arch/arm64/kernel/patch-scs.c [deleted file]
arch/arm64/kernel/pi/Makefile
arch/arm64/kernel/pi/patch-scs.c [new file with mode: 0644]