Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1456663

Re: [RFC PATCH v2 0/3] perf/tracefs: Container-aware tracing support

From Aravinda Prasad <aravinda@linux.vnet.ibm.com>
Newsgroups linux.kernel
Subject Re: [RFC PATCH v2 0/3] perf/tracefs: Container-aware tracing support
Date 2016-08-04 21:20 +0200
Message-ID <s2wls-5gw-53@gated-at.bofh.it> (permalink)
References <rZEyR-4Oy-5@gated-at.bofh.it> <s2hmp-3er-3@gated-at.bofh.it> <s2s89-24U-1@gated-at.bofh.it> <s2vSq-4OE-21@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw



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

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[RFC PATCH v2 0/3] perf/tracefs: Container-aware tracing support Hari Bathini <hbathini@linux.vnet.ibm.com> - 2016-07-27 23:30 +0200
  [RFC PATCH v2 1/3] perf: filter container events based on cgroup  namespace Hari Bathini <hbathini@linux.vnet.ibm.com> - 2016-07-27 23:30 +0200
  Re: [RFC PATCH v2 0/3] perf/tracefs: Container-aware tracing support ebiederm@xmission.com (Eric W. Biederman) - 2016-08-04 05:20 +0200
    Re: [RFC PATCH v2 0/3] perf/tracefs: Container-aware tracing support Aravinda Prasad <aravinda@linux.vnet.ibm.com> - 2016-08-04 16:50 +0200
      Re: [RFC PATCH v2 0/3] perf/tracefs: Container-aware tracing support ebiederm@xmission.com (Eric W. Biederman) - 2016-08-04 20:50 +0200
        Re: [RFC PATCH v2 0/3] perf/tracefs: Container-aware tracing support Aravinda Prasad <aravinda@linux.vnet.ibm.com> - 2016-08-04 21:20 +0200

csiph-web