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: <20090803105252.GA29252@hawkmoon.kerlabs.com>
Date:	Mon, 3 Aug 2009 12:52:52 +0200
From:	Louis Rilling <Louis.Rilling@...labs.com>
To:	Paul Menage <menage@...gle.com>
Cc:	Benjamin Blum <bblum@...gle.com>,
	containers@...ts.linux-foundation.org,
	linux-kernel@...r.kernel.org, akpm@...ux-foundation.org
Subject: Re: [PATCH 5/6] Makes procs file writable to move all threads by
	tgid at once

On 24/07/09 14:57 -0700, Paul Menage wrote:
> On Fri, Jul 24, 2009 at 2:52 PM, Benjamin Blum<bblum@...gle.com> wrote:
> >> I don't see how css_sets are guaranteed while cgroup_fork_mutex is not held and
> >> thus does not prevent new threads from being created right now. Could you
> >> elaborate on that?
> >
> > Prefetching the css sets is independent of the fork lock/race issue.
> > The idea is that we build a list, kept locally, that has references on
> > all the css_sets we'll need to migrate each thread to the new cgroup.
> > Since ordinarily we might need to malloc a new css_set for a thread
> > before moving it, and it's possible that that could fail, we need to
> > do allocations for all threads to be moved before committing any of
> > them. As long as we have the list of prefetched css_sets, they'll stay
> > there, and at the end, we drop the extra references we took on them to
> > make that guarantee when tearing down the list.
> 
> And more specifically, since only the holder of cgroup_mutex can move
> a thread to a new cgroup (and hence a potentially new unique css_set),
> we know that once we've run through all the threads in the
> thread_group and verified that we have the appropriate pre-fetched
> css_set objects for all of them, it doesn't matter if any new threads
> are created - they'll share one of the pre-fetched css_sets.

css_set sharing is the bit I was missing. Thanks!

Louis

-- 
Dr Louis Rilling			Kerlabs
Skype: louis.rilling			Batiment Germanium
Phone: (+33|0) 6 80 89 08 23		80 avenue des Buttes de Coesmes
http://www.kerlabs.com/			35700 Rennes

Download attachment "signature.asc" of type "application/pgp-signature" (198 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ