]> git.baikalelectronics.ru Git - kernel.git/commit
arm64: perf: strip PAC when unwinding userspace
authorMark Rutland <mark.rutland@arm.com>
Fri, 7 Dec 2018 18:39:27 +0000 (18:39 +0000)
committerWill Deacon <will.deacon@arm.com>
Thu, 13 Dec 2018 16:42:46 +0000 (16:42 +0000)
commit6212013fc9f6c337feb68e8801be5cbbf5556da1
treeda4af8576de9d0a0d470a6ec31331f4909667070
parent4e38aed9072f7d6f28504714f5c06994ffcd8198
arm64: perf: strip PAC when unwinding userspace

When the kernel is unwinding userspace callchains, we can't expect that
the userspace consumer of these callchains has the data necessary to
strip the PAC from the stored LR.

This patch has the kernel strip the PAC from user stackframes when the
in-kernel unwinder is used. This only affects the LR value, and not the
FP.

This only affects the in-kernel unwinder. When userspace performs
unwinding, it is up to userspace to strip PACs as necessary (which can
be determined from DWARF information).

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Kristina Martsenko <kristina.martsenko@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
arch/arm64/include/asm/pointer_auth.h
arch/arm64/kernel/perf_callchain.c