]> git.baikalelectronics.ru Git - kernel.git/commit
arm64: unwind: strip PAC from kernel addresses
authorMark Rutland <mark.rutland@arm.com>
Fri, 13 Mar 2020 09:04:59 +0000 (14:34 +0530)
committerCatalin Marinas <catalin.marinas@arm.com>
Wed, 18 Mar 2020 09:50:20 +0000 (09:50 +0000)
commitc72b3850be77f96100c69b942cdbc93e9adc088a
treed3fc69c95fc694a21c510f69de2a482df68a02cb
parent4e77e9a08c7d1aedf0e4a7129fd41949193abe56
arm64: unwind: strip PAC from kernel addresses

When we enable pointer authentication in the kernel, LR values saved to
the stack will have a PAC which we must strip in order to retrieve the
real return address.

Strip PACs when unwinding the stack in order to account for this.

When function graph tracer is used with patchable-function-entry then
return_to_handler will also have pac bits so strip it too.

Reviewed-by: Kees Cook <keescook@chromium.org>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Reviewed-by: James Morse <james.morse@arm.com>
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Kristina Martsenko <kristina.martsenko@arm.com>
[Amit: Re-position ptrauth_strip_insn_pac, comment]
Signed-off-by: Amit Daniel Kachhap <amit.kachhap@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm64/kernel/stacktrace.c