android_kernel_xiaomi_sm8450/arch/riscv/kernel
Jinjie Ruan 502dac909e riscv: Fix fp alignment bug in perf_callchain_user()
[ Upstream commit 22ab08955ea13be04a8efd20cc30890e0afaa49c ]

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: dbeb90b0c1 ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-10-17 15:07:54 +02:00
..
vdso riscv: vdso: fix section overlapping under some conditions 2022-12-08 11:23:57 +01:00
.gitignore .gitignore: add SPDX License Identifier 2020-03-25 11:50:48 +01:00
asm-offsets.c riscv: Enable per-task stack canaries 2024-05-02 16:23:36 +02:00
cacheinfo.c drivers: base: cacheinfo: Get rid of DEFINE_SMP_CALL_CACHE_FUNCTION() 2021-09-26 14:08:59 +02:00
cpu_ops_sbi.c RISC-V: Support cpu hotplug 2020-03-31 11:28:30 -07:00
cpu_ops_spinwait.c RISC-V: Add cpu_ops and modify default booting method 2020-03-31 11:25:56 -07:00
cpu_ops.c treewide: Convert macro and uses of __section(foo) to __section("foo") 2020-10-25 14:51:49 -07:00
cpu-hotplug.c RISC-V: Support cpu hotplug 2020-03-31 11:28:30 -07:00
cpu.c RISC-V: Rename and move plic_find_hart_id() to arch directory 2020-06-09 19:11:20 -07:00
cpufeature.c RISC-V: Add bitmap reprensenting ISA features common across CPUs 2020-05-04 14:08:59 -07:00
efi-header.S RISC-V: Add PE/COFF header for EFI stub 2020-10-02 14:31:16 -07:00
efi.c riscv: read-only pages should not be writable 2022-06-14 18:32:36 +02:00
entry.S riscv: fix oops caused by irqsoff latency tracer 2022-03-02 11:42:56 +01:00
fpu.S riscv: abstract out CSR names for supervisor vs machine mode 2019-11-05 09:20:42 -08:00
ftrace.c RISC-V: Don't check text_mutex during stop_machine 2023-03-17 08:45:13 +01:00
head.h RISC-V: Move DT mapping outof fixmap 2020-10-02 14:30:57 -07:00
head.S riscv: Initialize thread pointer before calling C functions 2022-06-09 10:20:47 +02:00
image-vars.h RISC-V: Add PE/COFF header for EFI stub 2020-10-02 14:31:16 -07:00
irq.c RISC-V: Remove do_IRQ() function 2020-06-09 19:11:24 -07:00
jump_label.c riscv: Add jump-label implementation 2020-07-30 11:37:43 -07:00
kgdb.c riscv: Fix "no previous prototype" compile warning in kgdb.c file 2020-07-09 20:09:30 -07:00
Makefile riscv: fix oops caused by irqsoff latency tracer 2022-03-02 11:42:56 +01:00
mcount-dyn.S riscv/ftrace: Add DYNAMIC_FTRACE_WITH_REGS support 2018-04-02 19:59:13 -07:00
mcount.S riscv: Workaround mcount name prior to clang-13 2021-05-22 11:40:53 +02:00
module-sections.c riscv: add missing header file includes 2019-10-28 00:46:01 -07:00
module.c riscv: Fix auipc+jalr relocation range checks 2022-03-16 14:16:01 +01:00
patch.c RISC-V: Don't check text_mutex during stop_machine 2023-03-17 08:45:13 +01:00
perf_callchain.c riscv: Fix fp alignment bug in perf_callchain_user() 2024-10-17 15:07:54 +02:00
perf_event.c riscv: perf_event: Make some funciton static 2020-05-11 13:48:19 -07:00
perf_regs.c perf/arch: Remove perf_sample_data::regs_user_copy 2020-11-09 18:12:34 +01:00
process.c riscv: process: Fix kernel gp leakage 2024-05-02 16:23:36 +02:00
ptrace.c riscv: Ensure the value of FP registers in the core dump file is up to date 2021-09-03 10:09:22 +02:00
reset.c riscv: set default pm_power_off to NULL 2022-08-21 15:15:21 +02:00
riscv_ksyms.c riscv: Add KASAN support 2020-01-22 13:09:58 -08:00
sbi.c RISC-V: Add mechanism to provide custom IPI operations 2020-08-20 10:55:40 -07:00
setup.c riscv: fix reserved memory setup 2022-11-16 09:57:14 +01:00
signal.c riscv: add icache flush for nommu sigreturn trampoline 2023-04-20 12:10:27 +02:00
smp.c RISC-V: Fix error code returned by riscv_hartid_to_cpuid() 2021-05-19 10:13:06 +02:00
smpboot.c riscv: topology: fix default topology reporting 2022-10-30 09:41:19 +01:00
soc.c mm: introduce include/linux/pgtable.h 2020-06-09 09:39:13 -07:00
stacktrace.c riscv: Use READ_ONCE_NOCHECK in imprecise unwinding stack mode 2023-03-17 08:45:12 +01:00
sys_riscv.c riscv: Allow PROT_WRITE-only mmap() 2022-10-26 13:25:10 +02:00
syscall_table.c riscv: add missing header file includes 2019-10-28 00:46:01 -07:00
time.c RISC-V: time: initialize hrtimer based broadcast clock event device 2023-03-11 16:39:27 +01:00
trace_irq.c riscv: fix oops caused by irqsoff latency tracer 2022-03-02 11:42:56 +01:00
trace_irq.h riscv: fix oops caused by irqsoff latency tracer 2022-03-02 11:42:56 +01:00
traps_misaligned.c riscv: fix misaligned access handling of C.SWSP and C.SDSP 2023-12-13 18:27:02 +01:00
traps.c riscv: Avoid enabling interrupts in die() 2023-03-17 08:45:08 +01:00
vdso.c riscv/vdso: make arch_setup_additional_pages wait for mmap_sem for write killable 2021-10-13 10:04:29 +02:00
vmlinux.lds.S RISC-V Patches for the 5.10 Merge Window, Part 1 2020-10-19 18:18:30 -07:00