Thread (6 messages) read the whole thread 6 messages, 2 authors, 2025-12-16

Re: [PATCH v3 4/4] LoongArch: ftrace: Adjust register stack restore order in direct call trampolines

From: Steven Rostedt <rostedt@goodmis.org>
Date: 2025-12-16 17:10:20
Also in: bpf, lkml, loongarch

On Tue, 16 Dec 2025 17:47:53 +0800
Chenghao Duan [off-list ref] wrote:
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).

Reported-by: Youling Tang <redacted>
Signed-off-by: Chenghao Duan <redacted>
---
 samples/ftrace/ftrace-direct-modify.c       | 8 ++++----
 samples/ftrace/ftrace-direct-multi-modify.c | 8 ++++----
 samples/ftrace/ftrace-direct-multi.c        | 4 ++--
 samples/ftrace/ftrace-direct-too.c          | 4 ++--
 samples/ftrace/ftrace-direct.c              | 4 ++--
 5 files changed, 14 insertions(+), 14 deletions(-)
This is all LoongArch specific, but in case you need this to go through
your tree:

Acked-by: Steven Rostedt (Google) <rostedt@goodmis.org>

-- Steve
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help