[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5d8ce5686ef9f_34102b0cab5805c4b6@john-XPS-13-9370.notmuch>
Date: Thu, 26 Sep 2019 09:20:56 -0700
From: John Fastabend <john.fastabend@...il.com>
To: Allan Zhang <allanzhang@...gle.com>, daniel@...earbox.net,
songliubraving@...com, netdev@...r.kernel.org, bpf@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, Allan Zhang <allanzhang@...gle.com>,
Stanislav Fomichev <sdf@...gle.com>,
Eric Dumazet <edumazet@...gle.com>
Subject: RE: [PATCH 1/1] bpf: Fix bpf_event_output re-entry issue
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@...gle.com>
> Reviewed-by: Stanislav Fomichev <sdf@...gle.com>
> Reviewed-by: Eric Dumazet <edumazet@...gle.com>
> ---
LGTM thanks.
Acked-by: John Fastabend <john.fastabend@...il.com>
Powered by blists - more mailing lists