Thread (5 messages) 5 messages, 3 authors, 2021-01-27

Re: [PATCH v2] tracepoint: Do not fail unregistering a probe due to memory allocation

From: Steven Rostedt <rostedt@goodmis.org>
Date: 2021-01-27 14:32:59
Also in: lkml, netdev

On Wed, 27 Jan 2021 18:08:34 +1100
Alexey Kardashevskiy [off-list ref] wrote:
I am running syzkaller and the kernel keeps crashing in 
__traceiter_##_name. This patch makes these crashes happen lot less 
I have another solution to the above issue. But I'm now concerned with what
you write below.
quoted hunk ↗ jump to hunk
often (and so did the v1) but the kernel still crashes (examples below 
but the common thing is that they crash in tracepoints). Disasm points 
to __DO_TRACE_CALL(name) and this fixes it:

========================
--- a/include/linux/tracepoint.h
+++ b/include/linux/tracepoint.h
@@ -313,6 +313,7 @@ static inline struct tracepoint 
*tracepoint_ptr_deref(tracepoint_ptr_t *p)
                                                                         \
                 it_func_ptr =                                           \
 
rcu_dereference_raw((&__tracepoint_##_name)->funcs); \
+               if (it_func_ptr)                                        \
Looking at v2 of the patch, I found a bug that could make this happen.

I'm looking at doing something else that doesn't affect the fast path nor
does it bloat the kernel more than necessary.

I'll see if I can get that patch out today.

Thanks for the report.

-- Steve
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help