public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Alexey Kardashevskiy <aik@ozlabs.ru>
Cc: Alexei Starovoitov <alexei.starovoitov@gmail.com>,
	LKML <linux-kernel@vger.kernel.org>,
	Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
	Matt Mullins <mmullins@mmlx.us>, paulmck <paulmck@kernel.org>,
	Ingo Molnar <mingo@redhat.com>,
	Alexei Starovoitov <ast@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Dmitry Vyukov <dvyukov@google.com>,
	Martin KaFai Lau <kafai@fb.com>, Song Liu <songliubraving@fb.com>,
	Yonghong Song <yhs@fb.com>, Andrii Nakryiko <andriin@fb.com>,
	John Fastabend <john.fastabend@gmail.com>,
	KP Singh <kpsingh@chromium.org>, netdev <netdev@vger.kernel.org>,
	bpf <bpf@vger.kernel.org>, Kees Cook <keescook@chromium.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Josh Poimboeuf <jpoimboe@redhat.com>
Subject: Re: [PATCH v2] tracepoint: Do not fail unregistering a probe due to memory allocation
Date: Wed, 27 Jan 2021 09:30:48 -0500	[thread overview]
Message-ID: <20210127093048.46a6c4eb@gandalf.local.home> (raw)
In-Reply-To: <5ca3fcc1-b8fb-546e-5e75-3684efb19a6f@ozlabs.ru>

On Wed, 27 Jan 2021 18:08:34 +1100
Alexey Kardashevskiy <aik@ozlabs.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

      reply	other threads:[~2021-01-27 14:33 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-18  2:18 [PATCH v2] tracepoint: Do not fail unregistering a probe due to memory allocation Steven Rostedt
2020-11-18  4:54 ` Alexei Starovoitov
2020-11-18 12:46   ` Steven Rostedt
2021-01-27  7:08     ` Alexey Kardashevskiy
2021-01-27 14:30       ` Steven Rostedt [this message]

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=20210127093048.46a6c4eb@gandalf.local.home \
    --to=rostedt@goodmis.org \
    --cc=aik@ozlabs.ru \
    --cc=alexei.starovoitov@gmail.com \
    --cc=andriin@fb.com \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=dvyukov@google.com \
    --cc=john.fastabend@gmail.com \
    --cc=jpoimboe@redhat.com \
    --cc=kafai@fb.com \
    --cc=keescook@chromium.org \
    --cc=kpsingh@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=mingo@redhat.com \
    --cc=mmullins@mmlx.us \
    --cc=netdev@vger.kernel.org \
    --cc=paulmck@kernel.org \
    --cc=peterz@infradead.org \
    --cc=songliubraving@fb.com \
    --cc=yhs@fb.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