netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: sargun@sargun.me
Cc: netdev@vger.kernel.org, alexei.starovoitov@gmail.com,
	daniel@iogearbox.net, tj@kernel.org
Subject: Re: [PATCH net-next v5 0/3] Add test_current_task_under_cgroup bpf helper and test
Date: Fri, 12 Aug 2016 21:50:00 -0700 (PDT)	[thread overview]
Message-ID: <20160812.215000.1068569281494216770.davem@davemloft.net> (raw)
In-Reply-To: <20160812155433.GA12838@ircssh.c.rugged-nimbus-611.internal>

From: Sargun Dhillon <sargun@sargun.me>
Date: Fri, 12 Aug 2016 08:54:35 -0700

> This patchset includes a helper and an example to determine whether the probe is
> currently executing in the context of a specific cgroup based on a cgroup bpf
> map / array. The helper checks the cgroupsv2 hierarchy based on the handle in
> the map and if the current cgroup is equal to it, or a descendant of it. The
> helper was tested with the example program, and it was verified that the correct
> behaviour occurs in the interrupt context.
> 
> In an earlier version of this patchset I had added an "opensnoop"-like tool, and
> I realized I was basically reimplementing a lot of the code that already exists
> in the bcc repo. So, instead I decided to write a test that creates a new mount
> namespace, mounts up the cgroupv2 hierarchy, and does some basic tests.  I used
> the sync syscall as a canary for these tests because it's a simple, 0-arg
> syscall. Once this patch is accepted, adding support to opensnoop will be easy.
> 
> I also added a task_under_cgroup_hierarchy function in cgroups.h, as this
> pattern is used in a couple places. Converting those can be done in a later
> patchset.
> 
> Thanks to Alexei, Tejun, and Daniel for providing review.
> 
> v1->v2: Clean up
> v2->v3: Move around ifdefs out of *.c files, add an "integration" test
> v3->v4: De-genercize arraymap fetching function;
> 	rename helper from in_cgroup to under_cgroup (makes much more sense)
> 	Split adding cgroups task_under_cgroup_hierarchy function
> v4->v5: Fix formatting

Series applied, thanks.

      reply	other threads:[~2016-08-13  4:50 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-12 15:54 [PATCH net-next v5 0/3] Add test_current_task_under_cgroup bpf helper and test Sargun Dhillon
2016-08-13  4:50 ` David Miller [this message]

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=20160812.215000.1068569281494216770.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=alexei.starovoitov@gmail.com \
    --cc=daniel@iogearbox.net \
    --cc=netdev@vger.kernel.org \
    --cc=sargun@sargun.me \
    --cc=tj@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;
as well as URLs for NNTP newsgroup(s).