From: Sargun Dhillon <sargun@sargun.me>
To: netdev@vger.kernel.org
Cc: alexei.starovoitov@gmail.com, daniel@iogearbox.net
Subject: [net-next 0/2] BPF, kprobes: Add current_in_cgroup helper
Date: Sat, 6 Aug 2016 21:06:53 -0700 [thread overview]
Message-ID: <20160807040651.GA9262@ircssh.c.rugged-nimbus-611.internal> (raw)
This patchset includes a helper and an example to determine whether the kprobe
is currently executing in the context of a specific cgroup based on a cgroup
bpf map / array.
Sargun Dhillon (2):
bpf: Add bpf_current_in_cgroup helper
samples/bpf: Add example using current_in_cgroup
include/linux/bpf.h | 24 +++++++++++
include/uapi/linux/bpf.h | 11 +++++
kernel/bpf/arraymap.c | 2 +-
kernel/bpf/verifier.c | 4 +-
kernel/trace/bpf_trace.c | 34 +++++++++++++++
net/core/filter.c | 11 ++---
samples/bpf/Makefile | 4 ++
samples/bpf/bpf_helpers.h | 2 +
samples/bpf/trace_current_in_cgroup_kern.c | 44 ++++++++++++++++++++
samples/bpf/trace_current_in_cgroup_user.c | 66 ++++++++++++++++++++++++++++++
10 files changed, 193 insertions(+), 9 deletions(-)
create mode 100644 samples/bpf/trace_current_in_cgroup_kern.c
create mode 100644 samples/bpf/trace_current_in_cgroup_user.c
--
2.7.4
next reply other threads:[~2016-08-07 4:06 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-07 4:06 Sargun Dhillon [this message]
2016-08-07 4:32 ` [net-next 0/2] BPF, kprobes: Add current_in_cgroup helper Alexei Starovoitov
2016-08-07 4:56 ` Sargun Dhillon
2016-08-08 0:52 ` Alexei Starovoitov
2016-08-08 3:08 ` Sargun Dhillon
2016-08-08 3:52 ` Alexei Starovoitov
2016-08-08 9:27 ` Daniel Borkmann
2016-08-08 18:09 ` Sargun Dhillon
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=20160807040651.GA9262@ircssh.c.rugged-nimbus-611.internal \
--to=sargun@sargun.me \
--cc=alexei.starovoitov@gmail.com \
--cc=daniel@iogearbox.net \
--cc=netdev@vger.kernel.org \
/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