From: Kui-Feng Lee <kuifeng@fb.com>
To: "alexei.starovoitov@gmail.com" <alexei.starovoitov@gmail.com>
Cc: "daniel@iogearbox.net" <daniel@iogearbox.net>,
"ast@kernel.org" <ast@kernel.org>,
"andrii@kernel.org" <andrii@kernel.org>,
"bpf@vger.kernel.org" <bpf@vger.kernel.org>
Subject: Re: [PATCH bpf-next v2 4/4] selftest/bpf: The test cses of BPF cookie for fentry/fexit/fmod_ret.
Date: Sun, 20 Mar 2022 08:43:43 +0000 [thread overview]
Message-ID: <6443c7fc6801f57d485d61d846bafda69f7cde73.camel@fb.com> (raw)
In-Reply-To: <20220318192114.pacmegfl3uglju6l@ast-mbp>
On Fri, 2022-03-18 at 12:21 -0700, Alexei Starovoitov wrote:
> On Tue, Mar 15, 2022 at 05:42:31PM -0700, Kui-Feng Lee wrote:
> >
> > +SEC("fentry/bpf_fentry_test1")
>
> Did we discuss whether it makes sense to specify cookie in the SEC()
> ?
>
> Probably no one will be using cookie when prog is attached to a
> specific
> function, but with support for poor man regex in SEC the cookie
> might be useful?
> Would we need a way to specify a set of cookies in SEC()?
> Or specify a set of pairs of kernel_func+cookie?
> None of it might be worth it.
It makes sense to me to provide a way to specify cookies in the source
code of a BPF program.
However, it could be a very complicated syntax and/or difficult to
read.
Kernel_func+cookie, even Kernel_func_pattern+cookie, pairs are easy to
understand.
For more complicated cases, giving cookies at user space programs would
be a better choice.
next prev parent reply other threads:[~2022-03-20 8:43 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-16 0:42 [PATCH bpf-next v2 0/4] Attach a cookie to a tracing program Kui-Feng Lee
2022-03-16 0:42 ` [PATCH bpf-next v2 1/4] bpf, x86: Generate trampolines from bpf_links Kui-Feng Lee
2022-03-16 0:42 ` [PATCH bpf-next v2 2/4] bpf, x86: Create bpf_trace_run_ctx on the caller thread's stack Kui-Feng Lee
2022-03-18 19:09 ` Alexei Starovoitov
2022-03-20 9:31 ` Kui-Feng Lee
2022-03-20 20:08 ` Alexei Starovoitov
2022-03-21 19:00 ` Kui-Feng Lee
2022-03-21 23:04 ` Andrii Nakryiko
2022-03-21 23:25 ` Alexei Starovoitov
2022-03-21 23:38 ` Andrii Nakryiko
2022-03-21 23:08 ` Andrii Nakryiko
2022-03-22 15:30 ` Kui-Feng Lee
2022-03-22 21:08 ` Andrii Nakryiko
2022-03-16 0:42 ` [PATCH bpf-next v2 3/4] bpf, x86: Support BPF cookie for fentry/fexit/fmod_ret Kui-Feng Lee
2022-03-18 19:13 ` Alexei Starovoitov
2022-03-21 23:24 ` Andrii Nakryiko
2022-03-21 23:37 ` Andrii Nakryiko
2022-04-12 16:50 ` Kui-Feng Lee
2022-03-22 1:15 ` Alexei Starovoitov
2022-03-22 4:32 ` Andrii Nakryiko
2022-04-06 5:35 ` Kui-Feng Lee
2022-04-06 17:00 ` Andrii Nakryiko
2022-03-21 23:18 ` Andrii Nakryiko
2022-03-22 16:08 ` Kui-Feng Lee
2022-03-22 21:06 ` Andrii Nakryiko
2022-04-06 22:44 ` Kui-Feng Lee
2022-03-16 0:42 ` [PATCH bpf-next v2 4/4] selftest/bpf: The test cses of " Kui-Feng Lee
2022-03-18 19:21 ` Alexei Starovoitov
2022-03-20 8:43 ` Kui-Feng Lee [this message]
2022-03-21 23:29 ` Andrii Nakryiko
2022-03-21 23:36 ` Andrii Nakryiko
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=6443c7fc6801f57d485d61d846bafda69f7cde73.camel@fb.com \
--to=kuifeng@fb.com \
--cc=alexei.starovoitov@gmail.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
/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