mirror-linux/samples/ftrace
Chenghao Duan bb85d206be samples/ftrace: Adjust LoongArch register restore order in direct calls
Ensure that in the ftrace direct call logic, the CPU register state
(with ra = parent return address) is restored to the correct state after
the execution of the custom trampoline function and before returning to
the traced function. Additionally, guarantee the correctness of the jump
logic for jr t0 (traced function address).

Cc: stable@vger.kernel.org
Fixes: 9cdc3b6a29 ("LoongArch: ftrace: Add direct call support")
Reported-by: Youling Tang <tangyouling@kylinos.cn>
Acked-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Signed-off-by: Chenghao Duan <duanchenghao@kylinos.cn>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
2025-12-31 15:19:25 +08:00
..
Makefile ftrace: Add sample with custom ops 2023-01-25 10:31:23 -05:00
ftrace-direct-modify.c samples/ftrace: Adjust LoongArch register restore order in direct calls 2025-12-31 15:19:25 +08:00
ftrace-direct-multi-modify.c samples/ftrace: Adjust LoongArch register restore order in direct calls 2025-12-31 15:19:25 +08:00
ftrace-direct-multi.c samples/ftrace: Adjust LoongArch register restore order in direct calls 2025-12-31 15:19:25 +08:00
ftrace-direct-too.c samples/ftrace: Adjust LoongArch register restore order in direct calls 2025-12-31 15:19:25 +08:00
ftrace-direct.c samples/ftrace: Adjust LoongArch register restore order in direct calls 2025-12-31 15:19:25 +08:00
ftrace-ops.c samples: ftrace: Make some global variables static 2023-02-07 12:48:00 -05:00
sample-trace-array.c tracing: samples: Initialize trace_array_printk() with the correct function 2025-05-12 13:07:22 -04:00
sample-trace-array.h tracing: Sample module to demonstrate kernel access to Ftrace instances. 2019-11-22 19:41:08 -05:00