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: <m1abvarrjq.fsf@ebiederm.dsl.xmission.com>
Date:	Fri, 08 Jun 2007 16:48:41 -0600
From:	ebiederm@...ssion.com (Eric W. Biederman)
To:	will_schmidt@...t.ibm.com
Cc:	Andrew Morton <akpm@...ux-foundation.org>, linuxppc-dev@...abs.org,
	Oleg Nesterov <oleg@...sign.ru>,
	Anton Blanchard <anton@...ba.org>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/3] [PATCH i386] during VM oom condition, kill all threads in process group

Will Schmidt <will_schmidt@...t.ibm.com> writes:

> On Fri, 2007-06-08 at 12:32 -0700, Andrew Morton wrote:
>> On Fri, 08 Jun 2007 14:19:18 -0500
>> Will Schmidt <will_schmidt@...t.ibm.com> wrote:
>> 
>> > > > > zap_other_threads() requires tasklist_lock.
>> > 
>
>> In fact, it's probably the case that rcu_read_lock() is now sufficient
>> locking coverage for zap_other_threads() (cc's people).
>> 
>> It had better be, because do_group_exit() forgot to take tasklist_lock.  It
>> is perhaps relying upon spin_lock()'s hidden rcu_read_lock() properties
>> without so much as a code comment, which would be somewhat nasty of it.
>
>> You could perhaps just call do_group_exit() from within the fault
>> handler,
>> btw.
>
> Yup, so looks like I can actually replace the existing do_exit() call
> with do_group_exit().   I'll sit on this for a bit to give other folks a
> chance to comment on which lock call is sufficient, read_lock() or
> rcu_read_lock(), etc;  and do_group_exit()'s issue with taking
> tasklist_lock. 

No.  The rcu_read_lock is not sufficient.
Yes.  sighand->siglock is enough, and we explicitly take it in
do_group_exit before calling zap_other_threads.

Unless I have completely miss-understood this thread.

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