arm64: stacktrace: Relax frame record alignment requirement to 8 bytes
authorPeter Collingbourne <pcc@google.com>
Wed, 26 May 2021 17:49:26 +0000 (10:49 -0700)
committerWill Deacon <will@kernel.org>
Wed, 26 May 2021 19:01:17 +0000 (20:01 +0100)
commit33c222aeda14596ca5b9a1a3002858c6c3565ddd
tree4ed5071a0bfa36a5d6f21eb92369ede461798403
parent76734d26b54192a31440039459eef2612da63ed4
arm64: stacktrace: Relax frame record alignment requirement to 8 bytes

The AAPCS places no requirements on the alignment of the frame
record. In theory it could be placed anywhere, although it seems
sensible to require it to be aligned to 8 bytes. With an upcoming
enhancement to tag-based KASAN Clang will begin creating frame records
located at an address that is only aligned to 8 bytes. Accommodate
such frame records in the stack unwinding code.

As pointed out by Mark Rutland, the userspace stack unwinding code
has the same problem, so fix it there as well.

Signed-off-by: Peter Collingbourne <pcc@google.com>
Link: https://linux-review.googlesource.com/id/Ia22c375230e67ca055e9e4bb639383567f7ad268
Acked-by: Andrey Konovalov <andreyknvl@gmail.com>
Reviewed-by: Mark Rutland <mark.rutland@arm.com>
Tested-by: Mark Rutland <mark.rutland@arm.com>
Link: https://lore.kernel.org/r/20210526174927.2477847-2-pcc@google.com
Signed-off-by: Will Deacon <will@kernel.org>
arch/arm64/kernel/perf_callchain.c
arch/arm64/kernel/stacktrace.c