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: <20180424211231.GA25392@us.ibm.com>
Date:   Tue, 24 Apr 2018 14:12:32 -0700
From:   Sukadev Bhattiprolu <sukadev@...ux.ibm.com>
To:     Andrew Donnellan <andrew.donnellan@....ibm.com>
Cc:     "Alastair D'Silva" <alastair@....ibm.com>,
        linuxppc-dev@...ts.ozlabs.org, linux-kernel@...r.kernel.org,
        linux-doc@...r.kernel.org, mikey@...ling.org,
        vaibhav@...ux.vnet.ibm.com, aneesh.kumar@...ux.vnet.ibm.com,
        malat@...ian.org, felix@...ux.vnet.ibm.com, pombredanne@...b.com,
        sukadev@...ux.vnet.ibm.com, npiggin@...il.com,
        gregkh@...uxfoundation.org, arnd@...db.de,
        fbarrat@...ux.vnet.ibm.com, corbet@....net,
        "Alastair D'Silva" <alastair@...ilva.org>,
        Christophe Lombard <clombard@...ux.vnet.ibm.com>
Subject: Re: [PATCH v2 3/7] powerpc: use task_pid_nr() for TID allocation

Andrew Donnellan [andrew.donnellan@....ibm.com] wrote:
> [+ Sukadev, Christophe]
> 
> On 18/04/18 11:08, Alastair D'Silva wrote:
> > From: Alastair D'Silva <alastair@...ilva.org>
> > 
> > The current implementation of TID allocation, using a global IDR, may
> > result in an errant process starving the system of available TIDs.
> > Instead, use task_pid_nr(), as mentioned by the original author. The
> > scenario described which prevented it's use is not applicable, as
> > set_thread_tidr can only be called after the task struct has been
> > populated.
> > 
> > Signed-off-by: Alastair D'Silva <alastair@...ilva.org>
> 
> So it's too late in the evening for me to completely get my head around
> what's going on here enough to give my Reviewed-by:, but my current thinking
> is:
> 
> - In the first version of the patch to add TIDR support
> (https://patchwork.ozlabs.org/patch/799494/), it was originally proposed to
> call assign_thread_id() (as it was then called) from copy_thread()
> 
> - The comment block documents the reason why we can't use task_pid_nr() but
> assumes that we're trying to assign a TIDR from within copy_thread()
> 
> - The final patch that was accepted
> (https://patchwork.ozlabs.org/patch/835552/,
> ec233ede4c8654894610ea54f4dae7adc954ac62) instead sets the TIDR to 0 from
> copy_thread(), so the original reasoning regarding not using task_pid_nr()
> within copy_thread() is no longer applicable.
> 
> Sukadev: does this sound right?

Yes. Like with PIDR, was trying to assign TIDR initially to all threads.
But since only a subset of threads need/use TIDR, we can assign the
value later (when set_thread_tidr() is called). So we should be able to
use task_pid_nr() then.

Sukadev

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ