bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/1] bpf: Fix bpf_event_output re-entry issue
@ 2019-09-25 23:43 Allan Zhang
  2019-09-25 23:43 ` [PATCH 1/1] " Allan Zhang
  0 siblings, 1 reply; 4+ messages in thread
From: Allan Zhang @ 2019-09-25 23:43 UTC (permalink / raw)
  To: daniel, songliubraving, netdev, bpf; +Cc: linux-kernel, Allan Zhang

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.

Allan Zhang (1):
  bpf: Fix bpf_event_output re-entry issue

 kernel/trace/bpf_trace.c | 26 +++++++++++++++++++++-----
 1 file changed, 21 insertions(+), 5 deletions(-)

-- 
2.23.0.351.gc4317032e6-goog


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-09-27 12:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2019-09-27 12:44   ` Daniel Borkmann

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).