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]
Message-ID: <4945BCED.9010904@cn.fujitsu.com>
Date:	Mon, 15 Dec 2008 10:11:57 +0800
From:	Li Zefan <lizf@...fujitsu.com>
To:	KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
CC:	Paul Menage <menage@...gle.com>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	LKML <linux-kernel@...r.kernel.org>, Ingo Molnar <mingo@...e.hu>,
	Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH] sched: fix another race when reading /proc/sched_debug

KAMEZAWA Hiroyuki wrote:
> On Mon, 15 Dec 2008 09:39:18 +0800
> Li Zefan <lizf@...fujitsu.com> wrote:
> 
>> Paul Menage wrote:
>>> I sent out some patches last week (search for hierarchy_mutex) that would
>>> mean that you'd only need to take a subsystem-local lock to keep a cgroup
>>> alive. People seemed to like them so I'll tweak them based on feedback and
>>> send them on to Andrew.
>>>
>> Unfortunately, AFAICS the proposed hierarchy_mutex can't solve this bug. :(
>>
> Hmm ? how about this way if cgroup->dentry is problem ?
> 

Sounds feasable, though the resulting code might a bit tricky.

> at creation:
>   - cpu_cgroup_populate() should record "tg" that "this cgroup has valid dentry"

This avoids /proc/sched_debug accessing invalid cgrp dentry while a cgroup is
being created.

> at deletion
>   - css_tryget() will be useful to avoid the race.

And this avoids accessing a dead task_group.

Since css_tryget() is a 2.6.29 material, I think we can have this bug fixed for
2.6.28 by holding cgroup_lock, and try to remove the global lock for 2.6.29 ?
--
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