]> git.ipfire.org Git - thirdparty/linux.git/commit
riscv: Fix fp alignment bug in perf_callchain_user()
authorJinjie Ruan <ruanjinjie@huawei.com>
Mon, 8 Jul 2024 03:28:46 +0000 (11:28 +0800)
committerPalmer Dabbelt <palmer@rivosinc.com>
Sun, 15 Sep 2024 06:57:15 +0000 (23:57 -0700)
commit22ab08955ea13be04a8efd20cc30890e0afaa49c
tree9089824839f440ba8cea0d3210607f538e3da2a7
parent8400291e289ee6b2bf9779ff1c83a291501f017b
riscv: Fix fp alignment bug in perf_callchain_user()

The standard RISC-V calling convention said:
"The stack grows downward and the stack pointer is always
kept 16-byte aligned".

So perf_callchain_user() should check whether 16-byte aligned for fp.

Link: https://riscv.org/wp-content/uploads/2015/01/riscv-calling.pdf
Fixes: dbeb90b0c1eb ("riscv: Add perf callchain support")
Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com>
Cc: Björn Töpel <bjorn@kernel.org>
Link: https://lore.kernel.org/r/20240708032847.2998158-2-ruanjinjie@huawei.com
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
arch/riscv/kernel/perf_callchain.c