Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1441415
| Path | csiph.com!news.mixmin.net!aioe.org!bofh.it!news.nic.it!robomod |
|---|---|
| From | Peter Zijlstra <peterz@infradead.org> |
| Newsgroups | linux.kernel |
| Subject | Re: [RFC PATCH 2/2] perf: Filter events based on perf-namespace |
| Date | Tue, 12 Jul 2016 16:30:03 +0200 |
| Message-ID | <rU6Rd-66R-47@gated-at.bofh.it> (permalink) |
| References | <rJZHk-7nr-19@gated-at.bofh.it> <rJZQZ-7rp-1@gated-at.bofh.it> <rOH73-2eF-9@gated-at.bofh.it> <rU2aS-2Zl-31@gated-at.bofh.it> <rU4mm-4l8-21@gated-at.bofh.it> <rU5iq-4W1-21@gated-at.bofh.it> <rU5BM-5k0-43@gated-at.bofh.it> <rU6xQ-5Z5-25@gated-at.bofh.it> |
| X-Original-To | "Eric W. Biederman" <ebiederm@xmission.com> |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset=us-ascii |
| Content-Disposition | inline |
| User-Agent | Mutt/1.5.23.1 (2014-03-12) |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 26 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | Nikolay Borisov <kernel@kyup.com>, Aravinda Prasad <aravinda@linux.vnet.ibm.com>, linux-kernel@vger.kernel.org, rostedt@goodmis.org, mingo@redhat.com, paulus@samba.org, acme@kernel.org, hbathini@linux.vnet.ibm.com, ananth@in.ibm.com |
| X-Original-Date | Tue, 12 Jul 2016 16:27:53 +0200 |
| X-Original-Message-ID | <20160712142753.GT30909@twins.programming.kicks-ass.net> |
| X-Original-References | <20160614164530.4192.79560.stgit@aravindap> <20160614164951.4192.66724.stgit@aravindap> <20160627155002.GD30909@twins.programming.kicks-ass.net> <5784B7B9.5020901@linux.vnet.ibm.com> <20160712114734.GL30154@twins.programming.kicks-ass.net> <5784E586.5090904@kyup.com> <20160712130430.GQ30909@twins.programming.kicks-ass.net> <8737nf55bu.fsf@x220.int.ebiederm.org> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1441415 |
Show key headers only | View raw
On Tue, Jul 12, 2016 at 08:55:17AM -0500, Eric W. Biederman wrote:
> I completely misread the description of this, or I would have something
> earlier. For some reason I thought he was talking about the perf
> controller.
>
> As I recall the tricky part of this was to have tracing that was safe
> and usable inside of a container. If you can align a per cgroup with
> your container that is probably sufficient for the select of processes.
>
> At the same time there is a real desire to have identifiers like pids
> translated into the appropriate form for inside of the container.
> Without that translation they are meaningless inside a container.
> Further it is necessary to be certain the trancing that is used is is
> safe for unprivileged users.
>
> I don't think I ever suggested or approved of the concept of a perf
> namespace and that sounds a bit dubious to me.
So perf uses the pid-namespace of the event-creator to report PID/TID
numbers in.
So sys_perf_event_open() -> perf_event_alloc() does
get_pid_ns(task_active_pid_ns(current)) to set event->ns and then we do:
task_{tgid,pid}_nr_ns(p, event->ns) to report the PID/TID resp., see
perf_event_{pid,tid}().
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: [RFC PATCH 2/2] perf: Filter events based on perf-namespace Aravinda Prasad <aravinda@linux.vnet.ibm.com> - 2016-07-12 11:30 +0200
Re: [RFC PATCH 2/2] perf: Filter events based on perf-namespace Peter Zijlstra <peterz@infradead.org> - 2016-07-12 13:50 +0200
Re: [RFC PATCH 2/2] perf: Filter events based on perf-namespace Nikolay Borisov <kernel@kyup.com> - 2016-07-12 14:50 +0200
Re: [RFC PATCH 2/2] perf: Filter events based on perf-namespace Peter Zijlstra <peterz@infradead.org> - 2016-07-12 15:10 +0200
Re: [RFC PATCH 2/2] perf: Filter events based on perf-namespace ebiederm@xmission.com (Eric W. Biederman) - 2016-07-12 16:10 +0200
Re: [RFC PATCH 2/2] perf: Filter events based on perf-namespace Peter Zijlstra <peterz@infradead.org> - 2016-07-12 16:30 +0200
Re: [RFC PATCH 2/2] perf: Filter events based on perf-namespace Aravinda Prasad <aravinda@linux.vnet.ibm.com> - 2016-07-12 18:10 +0200
Re: [RFC PATCH 2/2] perf: Filter events based on perf-namespace Aravinda Prasad <aravinda@linux.vnet.ibm.com> - 2016-07-12 18:30 +0200
csiph-web