[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20210127093048.46a6c4eb@gandalf.local.home>
Date: Wed, 27 Jan 2021 09:30:48 -0500
From: Steven Rostedt <rostedt@...dmis.org>
To: Alexey Kardashevskiy <aik@...abs.ru>
Cc: Alexei Starovoitov <alexei.starovoitov@...il.com>,
LKML <linux-kernel@...r.kernel.org>,
Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
Matt Mullins <mmullins@...x.us>, paulmck <paulmck@...nel.org>,
Ingo Molnar <mingo@...hat.com>,
Alexei Starovoitov <ast@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>,
Dmitry Vyukov <dvyukov@...gle.com>,
Martin KaFai Lau <kafai@...com>,
Song Liu <songliubraving@...com>, Yonghong Song <yhs@...com>,
Andrii Nakryiko <andriin@...com>,
John Fastabend <john.fastabend@...il.com>,
KP Singh <kpsingh@...omium.org>,
netdev <netdev@...r.kernel.org>, bpf <bpf@...r.kernel.org>,
Kees Cook <keescook@...omium.org>,
Peter Zijlstra <peterz@...radead.org>,
Josh Poimboeuf <jpoimboe@...hat.com>
Subject: Re: [PATCH v2] tracepoint: Do not fail unregistering a probe due to
memory allocation
On Wed, 27 Jan 2021 18:08:34 +1100
Alexey Kardashevskiy <aik@...abs.ru> 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.
> 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
Powered by blists - more mailing lists