All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] fprobe: Protect fprobe_return() with guard(rcu)()
@ 2026-09-28  0:35 Masami Hiramatsu (Google)
  2026-09-28  0:35 ` Masami Hiramatsu (Google)
  0 siblings, 1 reply; 8+ messages in thread
From: Masami Hiramatsu (Google) @ 2026-09-28  0:35 UTC (permalink / raw)
  To: Steven Rostedt, Paul E . McKenney, Frederic Weisbecker,
	Neeraj Upadhyay
  Cc: Mathieu Desnoyers, Josef Bacik, Masami Hiramatsu, linux-kernel,
	linux-trace-kernel, rcu

Hi,

Here is a bugfix (possible UAF) for fprobe found by Sashiko[1].
[1] https://sashiko.dev/#/bug/linux-e46bcd68-4a56-4f19-a255-e3772980e5e3

I think this fix is a short-term fix to make it safer. Eventually
I would like to replace all guard(rcu)() from fprobe with
preempt_disable_notrace(), because currently it introduces unneeded
overhead to fprobe.

- Introduce new call_rcu_tasks_rude() for async call.
- Add special non-preempt mode flag to rhashtable, which
  uses call_rcu_tasks_rude() instead of call_rcu() 
- Switching to use synchronize_rcu_tasks_rude() for unregistering.
- Replace call_rcu() with call_rcu_tasks_rude() in BPF.

But this is heavy depends on Tasks RCU, so I would like to check
with the RCU maintainers whether this idea aligns with the concept
behind Tasks RCU updates.

Thanks,

---

Masami Hiramatsu (Google) (1):
      fprobe: Protect fprobe_return() with guard(rcu)()


 kernel/trace/fprobe.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

--
Masami Hiramatsu (Google) <mhiramat@kernel.org>

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2026-09-29 23:30 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-28  0:35 [PATCH] fprobe: Protect fprobe_return() with guard(rcu)() Masami Hiramatsu (Google)
2026-09-28  0:35 ` Masami Hiramatsu (Google)
2026-09-28  0:51   ` sashiko-bot
2026-09-28 12:22     ` Masami Hiramatsu
2026-09-29 19:39       ` Steven Rostedt
2026-09-29 23:30         ` Masami Hiramatsu
2026-09-28 16:10   ` Paul E. McKenney
2026-09-29  0:13     ` Masami Hiramatsu

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.