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] [thread-next>] [day] [month] [year] [list]
Date:	Sun, 4 May 2014 14:02:23 +0800
From:	Li Zefan <lizefan@...wei.com>
To:	Tejun Heo <tj@...nel.org>
CC:	<cgroups@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
	<hannes@...xchg.org>, <mhocko@...e.cz>, <nasa4836@...il.com>
Subject: Re: [PATCH 6/6] cgroup, memcg: implement css->id and convert css_from_id()
 to use it

(Just came back from a short vacation)

On 2014/5/1 23:46, Tejun Heo wrote:
> On Mon, Apr 28, 2014 at 11:33:16AM +0800, Li Zefan wrote:
>> On 2014/4/25 5:02, Tejun Heo wrote:
>>> Until now, cgroup->id has been used to identify all the associated
>>> csses and css_from_id() takes cgroup ID and returns the matching css
>>> by looking up the cgroup and then dereferencing the css associated
>>> with it; however, now that the lifetimes of cgroup and css are
>>> separate, this is incorrect and breaks on the unified hierarchy when a
>>> controller is disabled and enabled back again before the previous
>>> instance is released.
>>>
>>> This patch adds css->id which is a subsystem-unique ID and converts
>>> css_from_id() to look up by the new css->id instead.  memcg is the
>>> only user of css_from_id() and also converted to use css->id instead.
>>>
>>
>> netprio_cgroup also needs to be updated.
> 
> Why?  Wouldn't it be more natural to tie that to the associated
> cgroup's ID rather than the specific css instance.  It's different for
> memcg as it involves css refcnts but netprio_cgroup, AFAICS, only uses
> it for cgroup identification anyway.
> 

You're right. I thought it won't work correctly in unified hierarchy
where controllers can be disabled/enabled.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ