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: <87r2lmlj1p.fsf@xmission.com>
Date:   Mon, 04 Jun 2018 09:31:46 -0500
From:   ebiederm@...ssion.com (Eric W. Biederman)
To:     Michal Hocko <mhocko@...nel.org>
Cc:     Kirill Tkhai <ktkhai@...tuozzo.com>, akpm@...ux-foundation.org,
        peterz@...radead.org, oleg@...hat.com, viro@...iv.linux.org.uk,
        mingo@...nel.org, paulmck@...ux.vnet.ibm.com,
        keescook@...omium.org, riel@...hat.com, tglx@...utronix.de,
        kirill.shutemov@...ux.intel.com, marcos.souza.org@...il.com,
        hoeun.ryu@...il.com, pasha.tatashin@...cle.com, gs051095@...il.com,
        dhowells@...hat.com, rppt@...ux.vnet.ibm.com,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH 0/4] exit: Make unlikely case in mm_update_next_owner() more scalable

Michal Hocko <mhocko@...nel.org> writes:

> On Fri 01-06-18 10:25:59, Eric W. Biederman wrote:
>> Michal Hocko <mhocko@...nel.org> writes:
>> 
>> > On Fri 01-06-18 09:32:42, Eric W. Biederman wrote:
>> >> Michal Hocko <mhocko@...nel.org> writes:
>> > [...]
>> >> > Group leader exiting early without tearing down the whole thread
>> >> > group should be quite rare as well. No question that somebody might do
>> >> > that on purpose though...
>> >> 
>> >> The group leader exiting early is a completely legitimate and reasonable
>> >> thing to do, even if it is rare.
>> >
>> > I am not saying it isn't legitimate. But the most common case is the
>> > main thread waiting for its threads or calling exit which would tear the
>> > whole group down. Is there any easy way to achieve this other than tkill
>> > to group leader? Calling exit(3) from the leader performs group exit
>> > IIRC.
>> 
>> pthread_exit from the group leader.
>
> Right, forgot to mention this one but this would be quite exotic,
> right?

Not exotic.  It is easy to do and well defined.

It would be easy to do if you are running a thread pool and closing
unnecessary threads.  Or frankly anything where the application is not
assigning a special role to the initial thread.

It does seem rare enough that no one has noticed how attrocious
mm_update_next_owner is until now.

My key point is that it is easy to trigger which makes the current
mm_update_next_owner a fundamentally flawed design, and something that
needs to be fixed.

Eric

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ