linux-yocto/samples/ftrace
Chenghao Duan 7d7010f5f0 samples/ftrace: Adjust LoongArch register restore order in direct calls
commit bb85d206be208bbf834883e948125a35ac59993a upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-01-08 10:17:11 +01:00
..
ftrace-direct-modify.c samples/ftrace: Adjust LoongArch register restore order in direct calls 2026-01-08 10:17:11 +01:00
ftrace-direct-multi-modify.c samples/ftrace: Adjust LoongArch register restore order in direct calls 2026-01-08 10:17:11 +01:00
ftrace-direct-multi.c samples/ftrace: Adjust LoongArch register restore order in direct calls 2026-01-08 10:17:11 +01:00
ftrace-direct-too.c samples/ftrace: Adjust LoongArch register restore order in direct calls 2026-01-08 10:17:11 +01:00
ftrace-direct.c samples/ftrace: Adjust LoongArch register restore order in direct calls 2026-01-08 10:17:11 +01:00
ftrace-ops.c samples: ftrace: Make some global variables static 2023-02-07 12:48:00 -05:00
Makefile ftrace: Add sample with custom ops 2023-01-25 10:31:23 -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