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: <6599ad830804031122y3f6946fbp97dc18073bf02609@mail.gmail.com>
Date:	Thu, 3 Apr 2008 11:22:36 -0700
From:	"Paul Menage" <menage@...gle.com>
To:	balbir@...ux.vnet.ibm.com
Cc:	"Pavel Emelianov" <xemul@...nvz.org>,
	"Hugh Dickins" <hugh@...itas.com>,
	"Sudhir Kumar" <skumar@...ux.vnet.ibm.com>,
	"YAMAMOTO Takashi" <yamamoto@...inux.co.jp>, lizf@...fujitsu.com,
	linux-kernel@...r.kernel.org, taka@...inux.co.jp,
	linux-mm@...ck.org, "David Rientjes" <rientjes@...gle.com>,
	"Andrew Morton" <akpm@...ux-foundation.org>,
	"KAMEZAWA Hiroyuki" <kamezawa.hiroyu@...fujitsu.com>
Subject: Re: [-mm] Add an owner to the mm_struct (v7)

On Thu, Apr 3, 2008 at 11:11 AM, Balbir Singh <balbir@...ux.vnet.ibm.com> wrote:
>  >
>  > Hmm, is this new check for delay_group_leader() safe? Won't we have
>  > called exit_cgroup() by this point, and hence be reassigned to the
>  > root cgroup? And so mm->owner->cgroups won't point to the right place?
>  >
>
>  cgroup_exit() comes in much later after exit_mm(). Moreover delay_group_leader()
>  is a function that checks to see if

Sorry, I was unclear.

Yes, the call to cgroup_exit() comes much later than exit_mm() - but
it probably does come before the other users of the mm have finished
using the mm. So can't we end up with a situation like this?

A (group leader) exits; at this point, A->mm->owner == A
A calls exit_mm(), sees delay_group_leader(), doesn't change A->mm->owner
A calls cgroup_exit(), A->cgroups is set to init_css_set.
B (another thread) does something with B->mm->owner->cgroups (e.g. VM
accounting) and accesses the wrong group

Paul
--
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