All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Rui Qi" <qirui.001@bytedance.com>
To: "Steven Rostedt" <rostedt@goodmis.org>, <palmer@dabbelt.com>,
	 <pjw@kernel.org>
Cc: <mhiramat@kernel.org>, <mark.rutland@arm.com>,
	<aou@eecs.berkeley.edu>,  <alex@ghiti.fr>,
	<linux-kernel@vger.kernel.org>,
	 <linux-trace-kernel@vger.kernel.org>,
	<linux-riscv@lists.infradead.org>
Subject: Re: [PATCH] riscv: ftrace: reject out-of-range non-direct targets
Date: Tue, 1 Sep 2026 10:29:06 +0800	[thread overview]
Message-ID: <bd8646c1-1ed7-4b04-a00b-ef31700a41fa@bytedance.com> (raw)
In-Reply-To: <20260831105820.22085739@gandalf.local.home>

On 8/31/26 10:58 PM, Steven Rostedt wrote:
> On Mon, 31 Aug 2026 11:50:45 +0800
> "Rui Qi" <qirui.001@bytedance.com> wrote:
> 
>> Hi Steven,
>>
>> Gentle ping on this patch. It's been over a month since submission
>> and I'd appreciate your review when you have a chance.
>>
>> The patch fixes ftrace_modify_call() on RISC-V to properly validate
>> old_addr/addr instead of always treating sites as FTRACE_ADDR, and
>> rejects out-of-range non-direct targets that can't be dispatched
>> through the existing ftrace_caller path.
> 
> This patch looks very architecture specific. Is there a generic ftrace
> issue you have with this? "out-of-range" issues are specific to an
> architecture (x86 doesn't have this issue).
> 
> You need the RISC-V maintainers to review and accept this patch. I don't
> see anything specific to generic ftrace infrastructure here, which is what
> I maintain.
> 
> -- Steve
> 

Hi Steven,

Thanks for the clarification. You're right, this is entirely
RISC-V specific -- the out-of-range issue comes from RISC-V's
AUIPC/JALR relocation limits, and the fix only touches
arch/riscv/kernel/ftrace.c. There's no generic ftrace change here.

Palmer, Paul, could you take a look at this patch? The core fix is
making ftrace_modify_call() honor its old_addr/addr arguments instead
of always validating against FTRACE_ADDR, and rejecting out-of-range
non-direct targets that can't fall back through ftrace_caller.

Thanks,
Rui

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

WARNING: multiple messages have this Message-ID (diff)
From: "Rui Qi" <qirui.001@bytedance.com>
To: "Steven Rostedt" <rostedt@goodmis.org>, <palmer@dabbelt.com>,
	 <pjw@kernel.org>
Cc: <mhiramat@kernel.org>, <mark.rutland@arm.com>,
	<aou@eecs.berkeley.edu>,  <alex@ghiti.fr>,
	<linux-kernel@vger.kernel.org>,
	 <linux-trace-kernel@vger.kernel.org>,
	<linux-riscv@lists.infradead.org>
Subject: Re: [PATCH] riscv: ftrace: reject out-of-range non-direct targets
Date: Tue, 1 Sep 2026 10:29:06 +0800	[thread overview]
Message-ID: <bd8646c1-1ed7-4b04-a00b-ef31700a41fa@bytedance.com> (raw)
In-Reply-To: <20260831105820.22085739@gandalf.local.home>

On 8/31/26 10:58 PM, Steven Rostedt wrote:
> On Mon, 31 Aug 2026 11:50:45 +0800
> "Rui Qi" <qirui.001@bytedance.com> wrote:
> 
>> Hi Steven,
>>
>> Gentle ping on this patch. It's been over a month since submission
>> and I'd appreciate your review when you have a chance.
>>
>> The patch fixes ftrace_modify_call() on RISC-V to properly validate
>> old_addr/addr instead of always treating sites as FTRACE_ADDR, and
>> rejects out-of-range non-direct targets that can't be dispatched
>> through the existing ftrace_caller path.
> 
> This patch looks very architecture specific. Is there a generic ftrace
> issue you have with this? "out-of-range" issues are specific to an
> architecture (x86 doesn't have this issue).
> 
> You need the RISC-V maintainers to review and accept this patch. I don't
> see anything specific to generic ftrace infrastructure here, which is what
> I maintain.
> 
> -- Steve
> 

Hi Steven,

Thanks for the clarification. You're right, this is entirely
RISC-V specific -- the out-of-range issue comes from RISC-V's
AUIPC/JALR relocation limits, and the fix only touches
arch/riscv/kernel/ftrace.c. There's no generic ftrace change here.

Palmer, Paul, could you take a look at this patch? The core fix is
making ftrace_modify_call() honor its old_addr/addr arguments instead
of always validating against FTRACE_ADDR, and rejecting out-of-range
non-direct targets that can't fall back through ftrace_caller.

Thanks,
Rui

  reply	other threads:[~2026-09-01  2:29 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-07 12:12 [PATCH] riscv: ftrace: reject out-of-range non-direct targets Rui Qi
2026-07-07 12:12 ` Rui Qi
2026-08-31  3:50 ` Rui Qi
2026-08-31  3:50   ` Rui Qi
2026-08-31 14:58   ` Steven Rostedt
2026-08-31 14:58     ` Steven Rostedt
2026-09-01  2:29     ` Rui Qi [this message]
2026-09-01  2:29       ` Rui Qi

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=bd8646c1-1ed7-4b04-a00b-ef31700a41fa@bytedance.com \
    --to=qirui.001@bytedance.com \
    --cc=alex@ghiti.fr \
    --cc=aou@eecs.berkeley.edu \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=linux-trace-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mhiramat@kernel.org \
    --cc=palmer@dabbelt.com \
    --cc=pjw@kernel.org \
    --cc=rostedt@goodmis.org \
    /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.