From: Jakub Kicinski <jakub.kicinski@netronome.com>
To: Matt Mullins <mmullins@fb.com>
Cc: <hall@fb.com>, <ast@kernel.org>, <daniel@iogearbox.net>,
<bpf@vger.kernel.org>, <netdev@vger.kernel.org>,
<linux-kernel@vger.kernel.org>,
Steven Rostedt <rostedt@goodmis.org>,
"Ingo Molnar" <mingo@redhat.com>, Martin KaFai Lau <kafai@fb.com>,
Song Liu <songliubraving@fb.com>, Yonghong Song <yhs@fb.com>
Subject: Re: [PATCH bpf] bpf: fix nested bpf tracepoints with per-cpu data
Date: Thu, 6 Jun 2019 15:13:46 -0700 [thread overview]
Message-ID: <20190606151346.6a9ed27e@cakuba.netronome.com> (raw)
In-Reply-To: <20190606185427.7558-1-mmullins@fb.com>
On Thu, 6 Jun 2019 11:54:27 -0700, Matt Mullins wrote:
> BPF_PROG_TYPE_RAW_TRACEPOINTs can be executed nested on the same CPU, as
> they do not increment bpf_prog_active while executing.
>
> This enables three levels of nesting, to support
> - a kprobe or raw tp or perf event,
> - another one of the above that irq context happens to call, and
> - another one in nmi context
> (at most one of which may be a kprobe or perf event).
>
> Fixes: 20b9d7ac4852 ("bpf: avoid excessive stack usage for perf_sample_data")
No comment on the code, but you're definitely missing a sign-off.
> ---
> This is more lines of code, but possibly less intrusive than the
> per-array-element approach.
>
> I don't necessarily like that I duplicated the nest_level logic in two
> places, but I don't see a way to unify them:
> - kprobes' bpf_perf_event_output doesn't use bpf_raw_tp_regs, and does
> use the perf_sample_data,
> - raw tracepoints' bpf_get_stackid uses bpf_raw_tp_regs, but not
> the perf_sample_data, and
> - raw tracepoints' bpf_perf_event_output uses both...
next prev parent reply other threads:[~2019-06-06 22:14 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-31 22:37 [PATCH bpf v2] bpf: preallocate a perf_sample_data per event fd Matt Mullins
2019-06-01 1:27 ` Song Liu
2019-06-01 3:12 ` Alexei Starovoitov
2019-06-03 13:08 ` Daniel Borkmann
2019-06-03 13:22 ` Daniel Borkmann
2019-06-03 22:58 ` Matt Mullins
2019-06-03 23:27 ` Alexei Starovoitov
2019-06-03 23:48 ` Daniel Borkmann
2019-06-03 23:54 ` Alexei Starovoitov
2019-06-04 0:43 ` Daniel Borkmann
2019-06-04 0:56 ` Alexei Starovoitov
2019-06-04 3:17 ` Matt Mullins
2019-06-06 18:54 ` [PATCH bpf] bpf: fix nested bpf tracepoints with per-cpu data Matt Mullins
2019-06-06 22:13 ` Jakub Kicinski [this message]
2019-06-06 22:39 ` Matt Mullins
2019-06-07 2:59 ` Andrii Nakryiko
2019-06-07 7:55 ` Steven Rostedt
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=20190606151346.6a9ed27e@cakuba.netronome.com \
--to=jakub.kicinski@netronome.com \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=hall@fb.com \
--cc=kafai@fb.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=mmullins@fb.com \
--cc=netdev@vger.kernel.org \
--cc=rostedt@goodmis.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