From: Yonghong Song <yonghong.song@linux.dev>
To: paulmck@kernel.org, Steven Rostedt <rostedt@goodmis.org>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>,
Frederic Weisbecker <frederic@kernel.org>,
Neeraj Upadhyay <neeraj.upadhyay@kernel.org>,
Boqun Feng <boqun.feng@gmail.com>,
Uladzislau Rezki <urezki@gmail.com>,
Masami Hiramatsu <mhiramat@kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Linux Next Mailing List <linux-next@vger.kernel.org>,
Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Subject: Re: linux-next: manual merge of the rcu tree with the ftrace tree
Date: Fri, 14 Nov 2025 10:31:45 -0800 [thread overview]
Message-ID: <5d6033df-b651-4daa-a804-dd142f441358@linux.dev> (raw)
In-Reply-To: <e2674451-21f2-4388-bf3c-8ca9946f81cf@paulmck-laptop>
On 11/14/25 9:05 AM, Paul E. McKenney wrote:
> On Fri, Nov 14, 2025 at 07:42:55AM -0500, Steven Rostedt wrote:
>> On Fri, 14 Nov 2025 13:52:26 +1100
>> Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>>
>>> Hi all,
>>>
>>> Today's linux-next merge of the rcu tree got a conflict in:
>>>
>>> kernel/trace/trace_syscalls.c
>>>
>>> between commit:
>>>
>>> a544d9a66bdf ("tracing: Have syscall trace events read user space string")
>>>
>>> from the ftrace tree and commit:
>>>
>>> 35587dbc58dd ("tracing: Guard __DECLARE_TRACE() use of __DO_TRACE_CALL() with SRCU-fast")
>>>
>>> from the rcu tree.
>>>
>>> I fixed it up (Maybe - see below) and can carry the fix as necessary. This
>>> is now fixed as far as linux-next is concerned, but any non trivial
>>> conflicts should be mentioned to your upstream maintainer when your tree
>>> is submitted for merging. You may also want to consider cooperating
>>> with the maintainer of the conflicting tree to minimise any particularly
>>> complex conflicts.
>> Thanks for the update.
>>
>>> diff --cc kernel/trace/trace_syscalls.c
>>> index e96d0063cbcf,3f699b198c56..000000000000
>>> --- a/kernel/trace/trace_syscalls.c
>>> +++ b/kernel/trace/trace_syscalls.c
>>> @@@ -878,6 -322,8 +890,7 @@@ static void ftrace_syscall_enter(void *
>>> * buffer and per-cpu data require preemption to be disabled.
>>> */
>>> might_fault();
>>> + preempt_rt_guard();
>>> - guard(preempt_notrace)();
>> My code made it so that preemption is not needed here but is moved later
>> down for the logic that does the reading of user space data.
>>
>> Note, it must have preemption disabled for all configs (including RT).
>> Otherwise, the data it has can get corrupted.
>>
>> Paul, can you change it so that you *do not* touch this file?
> I could, but I believe that this would re-introduce the migration failure.
>
> Maybe we should just defer this until both your patch and the RCU
> stack hit mainline, and port on top of those? Perhaps later in the
> merge window?
>
> I believe that migration needs to be disabled at this point, but I am
> again adding Yonghong on CC for his perspective.
Yes, migration needs to be disabled for rt kernel in order to let
bpf program running properly.
Regarding to non-rt kernel, currently preempt disable is used.
Is preempt disalbe just for bpf program or for something else
as well? Certainly perempt disable can help improve bpf prog
performance. From bpf prog itself, typically we can do with
migration disable, but in some places we may have to add
preempt disable, e.g.,
https://lore.kernel.org/bpf/20251114064922.11650-1-chandna.sahil@gmail.com/T/#u
https://lore.kernel.org/bpf/20251112163148.100949-1-chen.dylane@linux.dev/T/#m556837a5987bc048b8b9bbcc6b50728c441c139f
>
> Thanx, Paul
>
>> Thanks,
>>
>> -- Steve
>>
>>
>>>
>>> syscall_nr = trace_get_syscall_nr(current, regs);
>>> if (syscall_nr < 0 || syscall_nr >= NR_syscalls)
next prev parent reply other threads:[~2025-11-14 18:31 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-14 2:52 linux-next: manual merge of the rcu tree with the ftrace tree Stephen Rothwell
2025-11-14 12:42 ` Steven Rostedt
2025-11-14 13:35 ` Sebastian Andrzej Siewior
2025-11-14 15:46 ` Steven Rostedt
2025-11-14 16:00 ` Sebastian Andrzej Siewior
2025-11-14 16:22 ` Steven Rostedt
2025-11-14 16:33 ` Sebastian Andrzej Siewior
2025-11-14 16:48 ` Steven Rostedt
2025-11-14 17:02 ` Sebastian Andrzej Siewior
2025-11-14 17:11 ` Steven Rostedt
2025-11-14 17:00 ` Paul E. McKenney
2025-11-14 17:10 ` Sebastian Andrzej Siewior
2025-11-14 17:25 ` Paul E. McKenney
2025-11-14 17:40 ` Steven Rostedt
2025-11-14 17:41 ` Sebastian Andrzej Siewior
2025-11-14 18:26 ` Paul E. McKenney
2025-11-14 14:48 ` Frederic Weisbecker
2025-11-14 16:01 ` Steven Rostedt
2025-11-14 17:06 ` Paul E. McKenney
2025-11-14 18:58 ` Paul E. McKenney
2025-11-18 13:05 ` Frederic Weisbecker
2025-11-18 15:04 ` Paul E. McKenney
2025-12-02 0:57 ` Paul E. McKenney
2025-12-07 20:43 ` Paul E. McKenney
2025-12-08 0:17 ` Steven Rostedt
2025-12-08 4:21 ` Paul E. McKenney
2025-11-14 17:05 ` Paul E. McKenney
2025-11-14 18:31 ` Yonghong Song [this message]
2025-11-18 7:35 ` Sebastian Andrzej Siewior
2025-11-18 15:05 ` Paul E. McKenney
2025-11-30 18:49 ` Yonghong Song
2025-11-19 0:38 ` Paul E. McKenney
-- strict thread matches above, loose matches on Subject: below --
2025-11-06 1:24 Stephen Rothwell
2017-05-01 3:18 Stephen Rothwell
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=5d6033df-b651-4daa-a804-dd142f441358@linux.dev \
--to=yonghong.song@linux.dev \
--cc=bigeasy@linutronix.de \
--cc=boqun.feng@gmail.com \
--cc=frederic@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=mhiramat@kernel.org \
--cc=neeraj.upadhyay@kernel.org \
--cc=paulmck@kernel.org \
--cc=rostedt@goodmis.org \
--cc=sfr@canb.auug.org.au \
--cc=urezki@gmail.com \
/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