From: Matt Mullins <mmullins@fb.com>
To: "jakub.kicinski@netronome.com" <jakub.kicinski@netronome.com>
Cc: Song Liu <songliubraving@fb.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"daniel@iogearbox.net" <daniel@iogearbox.net>,
"bpf@vger.kernel.org" <bpf@vger.kernel.org>,
"rostedt@goodmis.org" <rostedt@goodmis.org>,
"ast@kernel.org" <ast@kernel.org>, Andrew Hall <hall@fb.com>,
"mingo@redhat.com" <mingo@redhat.com>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"Martin Lau" <kafai@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 22:39:03 +0000 [thread overview]
Message-ID: <90ffbb8e2251b1afc95d813b6fcc325e67f31118.camel@fb.com> (raw)
In-Reply-To: <20190606151346.6a9ed27e@cakuba.netronome.com>
On Thu, 2019-06-06 at 15:13 -0700, Jakub Kicinski wrote:
> 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.
Oops, I totally am. I'll give it some more time for opinions to roll
in, and I'll fix that before I resubmit :)
>
> > ---
> > 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:40 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
2019-06-06 22:39 ` Matt Mullins [this message]
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=90ffbb8e2251b1afc95d813b6fcc325e67f31118.camel@fb.com \
--to=mmullins@fb.com \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=hall@fb.com \
--cc=jakub.kicinski@netronome.com \
--cc=kafai@fb.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.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;
as well as URLs for NNTP newsgroup(s).