lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <578518A4.80301@linux.vnet.ibm.com>
Date:	Tue, 12 Jul 2016 21:49:48 +0530
From:	Aravinda Prasad <aravinda@...ux.vnet.ibm.com>
To:	Peter Zijlstra <peterz@...radead.org>,
	Nikolay Borisov <kernel@...p.com>
Cc:	linux-kernel@...r.kernel.org, rostedt@...dmis.org,
	mingo@...hat.com, paulus@...ba.org, acme@...nel.org,
	ebiederm@...ssion.com, hbathini@...ux.vnet.ibm.com,
	ananth@...ibm.com
Subject: Re: [RFC PATCH 2/2] perf: Filter events based on perf-namespace



On Tuesday 12 July 2016 06:34 PM, Peter Zijlstra wrote:
> On Tue, Jul 12, 2016 at 03:41:42PM +0300, Nikolay Borisov wrote:
> 
>> Namespaces and cgroups are completely orthogonal to one another. 
> 
> Then how do you specify what your new 'root' is? Surely you must first
> create a cgroup and then confine yourself to that?

No need to create cgroup and confine processes to that cgroup. The below
check during event filtering will take care:

+	if (cpuctx->perf_ns != event->perf_ns)
+		return false;

event->perf_ns is set during perf_event_alloc():

+	if (current->nsproxy->perf_ns != &init_perf_ns) {
+		/*
+		 * If we are called from our own perf namespace, set
+		 * event->perf_ns
+		 */
+		event->perf_ns = current->nsproxy->perf_ns;
+		[...]
+	}

> 
>> Also in the v1 of cgroups it's possible to have a process member of
>> more than 1 cgroup.
> 
> Yeah, so? We only care about the perf controller obviously.
> 

-- 
Regards,
Aravinda

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ