Thread (9 messages) flat view 9 messages, 3 authors, 3d ago

Re: [PATCH v4 0/5] tracing: add ref_trace_final_put tracing

From: Peter Zijlstra <peterz@infradead.org>
Date: 2026-08-03 08:38:22
Also in: linux-mm, lkml

On Sat, Aug 01, 2026 at 06:59:40PM +0800, Eugene Mavick wrote:
When debugging use-after-free(UAF) bugs, knowing when the object reaches
0 references and enters final release can significantly aid the
debugging process.

There is currently no universal way to trace this information.

This patch series implements tracing of the final puts in the
most widely used refcounting implementations,
refcount_t(and thus kref which uses it), and percpu-ref.

The tracepoint records three fields:
- caller: function that called the refcounting
  function(refcount_sub_and_test, percpu_ref_put_many)
- ip: return address of the trace wrapper macro call
- obj: refcount object(struct percpu_ref, refcount_t)

Signed-off-by: Eugene Mavick <redacted>
I'm not sure this Changelog is convincing me. To me this just looks like
more weight / bloat without benefit.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help