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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4EEA6288.1080405@parallels.com>
Date:	Fri, 16 Dec 2011 01:11:36 +0400
From:	Glauber Costa <glommer@...allels.com>
To:	David Miller <davem@...emloft.net>
CC:	<linux-kernel@...r.kernel.org>, <netdev@...r.kernel.org>,
	<cgroups@...r.kernel.org>, <kamezawa.hiroyu@...fujitsu.com>,
	<eric.dumazet@...il.com>, <sfr@...b.auug.org.au>
Subject: Re: [PATCH 2/2] Explicitly call tcp creation and init from memcontrol.c

On 12/15/2011 09:00 PM, David Miller wrote:
> From: Glauber Costa<glommer@...allels.com>
> Date: Thu, 15 Dec 2011 13:34:32 +0400
>
>> Walking the proto_list holds a read_lock, which prevents us from doing
>> allocations. Splitting the tcp create function into create + init is
>> good, but it is not enough since create_files will do allocations as well
>> (dentry ones, mostly).
>>
>> Since this does not involve any protocol state, I propose we call the tcp
>> functions explicitly from memcontrol.c
>>
>> With this, we lose by now the ability of doing cgroup memcontrol for
>> protocols that are loaded as modules. But at least the ones I have in mind
>> won't really need it (tcp_ipv6 being the only one, but it uses the same data
>> structures as tcp_ipv4). So I believe this to be the simpler solution to this
>> problem.
>>
>> Signed-off-by: Glauber Costa<glommer@...allels.com>
>
> This is an unnecessary limitation, please fix this properly otherwise
> DCCP, SCTP, etc. won't be supportable with this stuff.

How about the following patch then ? I am keeping protocols that has the 
cgroup stuff on in a separate list, that can be protected by a mutex. 
Therefore we can allocate without going into troubles.

Let me know if you still have objections, I'll be happy to address them.

View attachment "0001-fix-sleeping-while-atomic-problem-in-sock-mem_cgroup.patch" of type "text/plain" (6349 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ