public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Aravinda Prasad <aravinda@linux.vnet.ibm.com>
To: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Hari Bathini <hbathini@linux.vnet.ibm.com>,
	daniel@iogearbox.net, peterz@infradead.org,
	linux-kernel@vger.kernel.org, acme@kernel.org,
	alexander.shishkin@linux.intel.com, mingo@redhat.com,
	paulus@samba.org, kernel@kyup.com, rostedt@goodmis.org,
	viro@zeniv.linux.org.uk, ananth@in.ibm.com,
	Linux Containers <containers@lists.linux-foundation.org>
Subject: Re: [RFC PATCH v2 0/3] perf/tracefs: Container-aware tracing support
Date: Fri, 5 Aug 2016 00:41:47 +0530	[thread overview]
Message-ID: <57A39373.5070803@linux.vnet.ibm.com> (raw)
In-Reply-To: <87h9b01ja2.fsf@x220.int.ebiederm.org>



On Thursday 04 August 2016 11:57 PM, Eric W. Biederman wrote:
> Aravinda Prasad <aravinda@linux.vnet.ibm.com> writes:
> 
>> On Thursday 04 August 2016 08:29 AM, Eric W. Biederman wrote:
>>> Hari Bathini <hbathini@linux.vnet.ibm.com> writes:
>>>
>>>> This RFC patch set supports filtering container specific events
>>>> when perf tool is executed inside a container. The patches apply
>>>> cleanly on v4.7.0-rc7
>>>>
>>>> Changes from v1:
>>>> 1/3. Revived earlier approach[1] with cgroup namespace instead
>>>>      of pid namespace
>>>> 2/3. New patch that adds instance support for uprobe events in
>>>>      tracefs filesystem
>>>> 3/3. New patch that adds "newinstance" mount option for tracefs
>>>>      filesystem
>>>        "newinstace" ick no.
>>>
>>> I see no justification anywhere why the perf cgroup is not enough for
>>> this.
>>
>> perf cgroup is not enough for uprobes, because even with perf cgroups a
>> user within a container can still list/delete uprobes registered in
>> other containers.
> 
> Just to be clear, even if there is one cgroup per container?

Yes. Uprobes with perf is two steps. First step is to define/add the
probe (for example: "perf probe /bin/zsh zfree"), which does not require
cgroup argument. Adding a probe writes an entry in
/sys/kernel/debug/tracing/uprobe_events file. uprobes_events file is
shared and hence users in other container can list/delete these entries.

Once added, the second step is to record. We can record by specifying
the cgroup argument with perf record and the events are filtered out
based on the cgroup.

The problem with the first step is handled (in patch 2 and 3) by
creating a separate uprobes_events file per-container by exploiting
already existing "instances" functionality.

Regards,
Aravinda

> 
> Eric
> 

-- 
Regards,
Aravinda

      reply	other threads:[~2016-08-04 19:12 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-27 21:27 [RFC PATCH v2 0/3] perf/tracefs: Container-aware tracing support Hari Bathini
2016-07-27 21:27 ` [RFC PATCH v2 1/3] perf: filter container events based on cgroup namespace Hari Bathini
2016-07-27 21:27 ` [RFC PATCH v2 2/3] tracefs: add instances support for uprobe events Hari Bathini
2016-08-01 21:45   ` Steven Rostedt
2016-08-02 17:27     ` Hari Bathini
2016-08-02 17:32       ` Hari Bathini
2016-08-02 17:49       ` Steven Rostedt
2016-08-03 19:30         ` Aravinda Prasad
2016-08-03 20:10           ` Steven Rostedt
2016-08-03 20:16             ` Aravinda Prasad
2016-08-04  1:04               ` Steven Rostedt
2016-08-04 13:46                 ` Aravinda Prasad
2016-08-04 14:08                   ` Steven Rostedt
2016-08-04 14:34                     ` Aravinda Prasad
2016-07-27 21:27 ` [RFC PATCH v2 3/3] tracefs: add 'newinstance' mount option Hari Bathini
2016-08-04  2:54   ` Eric W. Biederman
2016-08-04 12:26     ` Hari Bathini
2016-08-04 14:12       ` Eric W. Biederman
2016-08-04  2:59 ` [RFC PATCH v2 0/3] perf/tracefs: Container-aware tracing support Eric W. Biederman
2016-08-04 14:48   ` Aravinda Prasad
2016-08-04 18:27     ` Eric W. Biederman
2016-08-04 19:11       ` Aravinda Prasad [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=57A39373.5070803@linux.vnet.ibm.com \
    --to=aravinda@linux.vnet.ibm.com \
    --cc=acme@kernel.org \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=ananth@in.ibm.com \
    --cc=containers@lists.linux-foundation.org \
    --cc=daniel@iogearbox.net \
    --cc=ebiederm@xmission.com \
    --cc=hbathini@linux.vnet.ibm.com \
    --cc=kernel@kyup.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=paulus@samba.org \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=viro@zeniv.linux.org.uk \
    /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