]> git.baikalelectronics.ru Git - kernel.git/commit
arm64/crash_core: Export KERNELPACMASK in vmcoreinfo
authorAmit Daniel Kachhap <amit.kachhap@arm.com>
Mon, 11 May 2020 13:01:55 +0000 (18:31 +0530)
committerWill Deacon <will@kernel.org>
Mon, 11 May 2020 13:29:10 +0000 (14:29 +0100)
commita71147587ba2866d7bdfaa03cbc5fd29f27baa8a
tree44602b748df33f01197088f883c4b096adccca2d
parent8d3e356fefe1224f76aa5cfaa7a3a7f06e74ea22
arm64/crash_core: Export KERNELPACMASK in vmcoreinfo

Recently arm64 linux kernel added support for Armv8.3-A Pointer
Authentication feature. If this feature is enabled in the kernel and the
hardware supports address authentication then the return addresses are
signed and stored in the stack to prevent ROP kind of attack. Kdump tool
will now dump the kernel with signed lr values in the stack.

Any user analysis tool for this kernel dump may need the kernel pac mask
information in vmcoreinfo to generate the correct return address for
stacktrace purpose as well as to resolve the symbol name.

This patch is similar to commit 4e38aed9072f7d6f2 ("arm64: expose user PAC
bit positions via ptrace") which exposes pac mask information via ptrace
interfaces.

The config gaurd ARM64_PTR_AUTH is removed form asm/compiler.h so macros
like ptrauth_kernel_pac_mask can be used ungaurded. This config protection
is confusing as the pointer authentication feature may be missing at
runtime even though this config is present.

Signed-off-by: Amit Daniel Kachhap <amit.kachhap@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Link: https://lore.kernel.org/r/1589202116-18265-1-git-send-email-amit.kachhap@arm.com
Signed-off-by: Will Deacon <will@kernel.org>
arch/arm64/include/asm/compiler.h
arch/arm64/kernel/crash_core.c