Linux Trace Kernel
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Chenghao Duan <duanchenghao@kylinos.cn>
Cc: yangtiezhu@loongson.cn, mhiramat@kernel.org,
	mark.rutland@arm.com, hengqi.chen@gmail.com,
	chenhuacai@kernel.org, kernel@xen0n.name,
	zhangtianyang@loongson.cn, masahiroy@kernel.org,
	linux-kernel@vger.kernel.org, loongarch@lists.linux.dev,
	bpf@vger.kernel.org, youling.tang@linux.dev,
	jianghaoran@kylinos.cn, vincent.mc.li@gmail.com,
	linux-trace-kernel@vger.kernel.org,
	Youling Tang <tangyouling@kylinos.cn>
Subject: Re: [PATCH v3 4/4] LoongArch: ftrace: Adjust register stack restore order in direct call trampolines
Date: Tue, 16 Dec 2025 12:11:49 -0500	[thread overview]
Message-ID: <20251216121149.11ea9031@gandalf.local.home> (raw)
In-Reply-To: <20251216094753.1317231-5-duanchenghao@kylinos.cn>

On Tue, 16 Dec 2025 17:47:53 +0800
Chenghao Duan <duanchenghao@kylinos.cn> 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 <tangyouling@kylinos.cn>
> Signed-off-by: Chenghao Duan <duanchenghao@kylinos.cn>
> ---
>  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

      reply	other threads:[~2025-12-16 17:10 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-16  9:47 [PATCH v3 0/4] Fix the failure issue of the module_attach test case Chenghao Duan
2025-12-16  9:47 ` [PATCH v3 1/4] LoongArch: ftrace: Refactor register restoration in ftrace_common_return Chenghao Duan
2025-12-16  9:47 ` [PATCH v3 2/4] LoongArch: Enable exception fixup for specific ADE subcode Chenghao Duan
2025-12-16  9:47 ` [PATCH v3 3/4] LoongArch: BPF: Enhance trampoline support for kernel and module tracing Chenghao Duan
2025-12-16  9:47 ` [PATCH v3 4/4] LoongArch: ftrace: Adjust register stack restore order in direct call trampolines Chenghao Duan
2025-12-16 17:11   ` Steven Rostedt [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20251216121149.11ea9031@gandalf.local.home \
    --to=rostedt@goodmis.org \
    --cc=bpf@vger.kernel.org \
    --cc=chenhuacai@kernel.org \
    --cc=duanchenghao@kylinos.cn \
    --cc=hengqi.chen@gmail.com \
    --cc=jianghaoran@kylinos.cn \
    --cc=kernel@xen0n.name \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-trace-kernel@vger.kernel.org \
    --cc=loongarch@lists.linux.dev \
    --cc=mark.rutland@arm.com \
    --cc=masahiroy@kernel.org \
    --cc=mhiramat@kernel.org \
    --cc=tangyouling@kylinos.cn \
    --cc=vincent.mc.li@gmail.com \
    --cc=yangtiezhu@loongson.cn \
    --cc=youling.tang@linux.dev \
    --cc=zhangtianyang@loongson.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox