bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: John Fastabend <john.fastabend@gmail.com>
To: Allan Zhang <allanzhang@google.com>,
	daniel@iogearbox.net, songliubraving@fb.com,
	netdev@vger.kernel.org, bpf@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, Allan Zhang <allanzhang@google.com>,
	Stanislav Fomichev <sdf@google.com>,
	Eric Dumazet <edumazet@google.com>
Subject: RE: [PATCH 1/1] bpf: Fix bpf_event_output re-entry issue
Date: Thu, 26 Sep 2019 09:20:56 -0700	[thread overview]
Message-ID: <5d8ce5686ef9f_34102b0cab5805c4b6@john-XPS-13-9370.notmuch> (raw)
In-Reply-To: <20190925234312.94063-2-allanzhang@google.com>

Allan Zhang wrote:
> BPF_PROG_TYPE_SOCK_OPS program can reenter bpf_event_output because it can
> be called from atomic and non-atomic contexts since we don't have
> bpf_prog_active to prevent it happen.
> 
> This patch enables 3 level of nesting to support normal, irq and nmi
> context.
> 
> We can easily reproduce the issue by running neper crr mode with 100 flows
> and 10 threads from neper client side.
> 
> Here is the whole stack dump:
> 
> [  515.228898] WARNING: CPU: 20 PID: 14686 at kernel/trace/bpf_trace.c:549 bpf_event_output+0x1f9/0x220
> [  515.228903] CPU: 20 PID: 14686 Comm: tcp_crr Tainted: G        W        4.15.0-smp-fixpanic #44
> [  515.228904] Hardware name: Intel TBG,ICH10/Ikaria_QC_1b, BIOS 1.22.0 06/04/2018
> [  515.228905] RIP: 0010:bpf_event_output+0x1f9/0x220

[...]
 
> Fixes: a5a3a828cd00 ("bpf: add perf event notificaton support for sock_ops")
> 
> Effort: BPF
> Signed-off-by: Allan Zhang <allanzhang@google.com>
> Reviewed-by: Stanislav Fomichev <sdf@google.com>
> Reviewed-by: Eric Dumazet <edumazet@google.com>
> ---

LGTM thanks.

Acked-by: John Fastabend <john.fastabend@gmail.com>

  reply	other threads:[~2019-09-26 16:21 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-25 23:43 [PATCH 0/1] bpf: Fix bpf_event_output re-entry issue Allan Zhang
2019-09-25 23:43 ` [PATCH 1/1] " Allan Zhang
2019-09-26 16:20   ` John Fastabend [this message]
2019-09-27 12:44   ` Daniel Borkmann

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=5d8ce5686ef9f_34102b0cab5805c4b6@john-XPS-13-9370.notmuch \
    --to=john.fastabend@gmail.com \
    --cc=allanzhang@google.com \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=edumazet@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=sdf@google.com \
    --cc=songliubraving@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;
as well as URLs for NNTP newsgroup(s).