All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paul Walmsley <pjw@kernel.org>
To: Rui Qi <qirui.001@bytedance.com>
Cc: pjw@kernel.org, palmer@dabbelt.com, aou@eecs.berkeley.edu,
	alex@ghiti.fr,  zhangchunyan@iscas.ac.cn,
	xujiakai2025@iscas.ac.cn,  linux-riscv@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] riscv: Fix ftrace_graph_ret_addr() to use the correct task pointer
Date: Wed, 13 May 2026 20:15:24 -0600 (MDT)	[thread overview]
Message-ID: <ddc3b007-e40b-578c-05fe-b6635fb439eb@kernel.org> (raw)
In-Reply-To: <20260408092915.46408-1-qirui.001@bytedance.com>

On Wed, 8 Apr 2026, Rui Qi wrote:

> The walk_stackframe() function is used to unwind the stack of a given
> task. When function graph tracing is enabled, ftrace_graph_ret_addr()
> is called to resolve the original return address if it was modified by
> the tracer.
> 
> The current code incorrectly passes 'current' instead of 'task' to
> ftrace_graph_ret_addr(). This causes incorrect return address resolution
> when unwinding a stack of a different task (e.g., when the task is
> blocked in __switch_to).
> 
> Fix this by passing 'task' instead of 'current' to match the behavior
> of other architectures (arm64, loongarch, powerpc, s390, x86).
> 
> Signed-off-by: Rui Qi <qirui.001@bytedance.com>

Thanks, queued for v7.1-rc.


- Paul

WARNING: multiple messages have this Message-ID (diff)
From: Paul Walmsley <pjw@kernel.org>
To: Rui Qi <qirui.001@bytedance.com>
Cc: pjw@kernel.org, palmer@dabbelt.com, aou@eecs.berkeley.edu,
	alex@ghiti.fr,  zhangchunyan@iscas.ac.cn,
	xujiakai2025@iscas.ac.cn,  linux-riscv@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] riscv: Fix ftrace_graph_ret_addr() to use the correct task pointer
Date: Wed, 13 May 2026 20:15:24 -0600 (MDT)	[thread overview]
Message-ID: <ddc3b007-e40b-578c-05fe-b6635fb439eb@kernel.org> (raw)
In-Reply-To: <20260408092915.46408-1-qirui.001@bytedance.com>

On Wed, 8 Apr 2026, Rui Qi wrote:

> The walk_stackframe() function is used to unwind the stack of a given
> task. When function graph tracing is enabled, ftrace_graph_ret_addr()
> is called to resolve the original return address if it was modified by
> the tracer.
> 
> The current code incorrectly passes 'current' instead of 'task' to
> ftrace_graph_ret_addr(). This causes incorrect return address resolution
> when unwinding a stack of a different task (e.g., when the task is
> blocked in __switch_to).
> 
> Fix this by passing 'task' instead of 'current' to match the behavior
> of other architectures (arm64, loongarch, powerpc, s390, x86).
> 
> Signed-off-by: Rui Qi <qirui.001@bytedance.com>

Thanks, queued for v7.1-rc.


- Paul

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

  reply	other threads:[~2026-05-14  2:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-08  9:29 [PATCH] riscv: Fix ftrace_graph_ret_addr() to use the correct task pointer Rui Qi
2026-04-08  9:29 ` Rui Qi
2026-05-14  2:15 ` Paul Walmsley [this message]
2026-05-14  2:15   ` Paul Walmsley

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=ddc3b007-e40b-578c-05fe-b6635fb439eb@kernel.org \
    --to=pjw@kernel.org \
    --cc=alex@ghiti.fr \
    --cc=aou@eecs.berkeley.edu \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=palmer@dabbelt.com \
    --cc=qirui.001@bytedance.com \
    --cc=xujiakai2025@iscas.ac.cn \
    --cc=zhangchunyan@iscas.ac.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.