arm64: unwind: add asynchronous unwind tables to kernel and modules
authorArd Biesheuvel <ardb@kernel.org>
Thu, 27 Oct 2022 15:59:06 +0000 (17:59 +0200)
committerWill Deacon <will@kernel.org>
Wed, 9 Nov 2022 18:06:35 +0000 (18:06 +0000)
commit68c76ad4a9571a2b603665c85cf8229bcf04982a
treec3128c1e56df0d7ee4742775f6955b8a53092a64
parentf0c4d9fc9cc9462659728d168387191387e903cc
arm64: unwind: add asynchronous unwind tables to kernel and modules

Enable asynchronous unwind table generation for both the core kernel as
well as modules, and emit the resulting .eh_frame sections as init code
so we can use the unwind directives for code patching at boot or module
load time.

This will be used by dynamic shadow call stack support, which will rely
on code patching rather than compiler codegen to emit the shadow call
stack push and pop instructions.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Reviewed-by: Sami Tolvanen <samitolvanen@google.com>
Tested-by: Sami Tolvanen <samitolvanen@google.com>
Link: https://lore.kernel.org/r/20221027155908.1940624-2-ardb@kernel.org
Signed-off-by: Will Deacon <will@kernel.org>
arch/arm64/Kconfig
arch/arm64/Makefile
arch/arm64/include/asm/module.lds.h
arch/arm64/kernel/pi/Makefile
arch/arm64/kernel/vmlinux.lds.S
arch/arm64/kvm/hyp/nvhe/Makefile
drivers/firmware/efi/libstub/Makefile
include/asm-generic/vmlinux.lds.h
scripts/module.lds.S