bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: John Fastabend <john.fastabend@gmail.com>
To: Daniel Borkmann <daniel@iogearbox.net>,
	John Fastabend <john.fastabend@gmail.com>,
	yhs@fb.com, andrii.nakryiko@gmail.com, ast@kernel.org
Cc: netdev@vger.kernel.org, bpf@vger.kernel.org
Subject: Re: [bpf-next PATCH v5 2/5] bpf: extend bpf_base_func_proto helpers with probe_* and *current_task*
Date: Mon, 25 May 2020 15:58:01 -0700	[thread overview]
Message-ID: <5ecc4d799cc25_718d2b15b962e5b8b1@john-XPS-13-9370.notmuch> (raw)
In-Reply-To: <3503d44d-799f-5440-781a-3c4cd2d89282@iogearbox.net>

Daniel Borkmann wrote:
> On 5/24/20 6:50 PM, John Fastabend wrote:
> > Often it is useful when applying policy to know something about the
> > task. If the administrator has CAP_SYS_ADMIN rights then they can
> > use kprobe + networking hook and link the two programs together to
> > accomplish this. However, this is a bit clunky and also means we have
> > to call both the network program and kprobe program when we could just
> > use a single program and avoid passing metadata through sk_msg/skb->cb,
> > socket, maps, etc.
> > 
> > To accomplish this add probe_* helpers to bpf_base_func_proto programs
> > guarded by a perfmon_capable() check. New supported helpers are the
> > following,
> > 
> >   BPF_FUNC_get_current_task
> >   BPF_FUNC_current_task_under_cgroup
> 
> Nit: Stale commit message?
> 

Correct, stale commit.

> >   BPF_FUNC_probe_read_user
> >   BPF_FUNC_probe_read_kernel
> >   BPF_FUNC_probe_read_user_str
> >   BPF_FUNC_probe_read_kernel_str
> > 
> > Signed-off-by: John Fastabend <john.fastabend@gmail.com>
> > Acked-by: Yonghong Song <yhs@fb.com>
> > ---

[...]

  reply	other threads:[~2020-05-25 22:58 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-24 16:50 [bpf-next PATCH v5 0/5] bpf: Add sk_msg and networking helpers John Fastabend
2020-05-24 16:50 ` [bpf-next PATCH v5 1/5] bpf, sk_msg: add some generic helpers that may be useful from sk_msg John Fastabend
2020-05-25 21:51   ` Daniel Borkmann
2020-05-25 22:57     ` John Fastabend
2020-05-26 18:33       ` Andrii Nakryiko
2020-05-26 20:51         ` John Fastabend
2020-05-26 21:29           ` Andrii Nakryiko
2020-05-26 23:12             ` Daniel Borkmann
2020-05-24 16:50 ` [bpf-next PATCH v5 2/5] bpf: extend bpf_base_func_proto helpers with probe_* and *current_task* John Fastabend
2020-05-25 21:52   ` Daniel Borkmann
2020-05-25 22:58     ` John Fastabend [this message]
2020-05-24 16:51 ` [bpf-next PATCH v5 3/5] bpf, sk_msg: add get socket storage helpers John Fastabend
2020-05-24 16:51 ` [bpf-next PATCH v5 4/5] bpf, selftests: add sk_msg helpers load and attach test John Fastabend
2020-05-26 18:07   ` Andrii Nakryiko
2020-05-24 16:51 ` [bpf-next PATCH v5 5/5] bpf, selftests: test probe_* helpers from SCHED_CLS John Fastabend
2020-05-26 18:09   ` 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=5ecc4d799cc25_718d2b15b962e5b8b1@john-XPS-13-9370.notmuch \
    --to=john.fastabend@gmail.com \
    --cc=andrii.nakryiko@gmail.com \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=netdev@vger.kernel.org \
    --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).