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]
Date:   Mon, 20 Apr 2020 17:51:47 -0700
From:   Michel Lespinasse <walken@...gle.com>
To:     Matthew Wilcox <willy@...radead.org>
Cc:     Andrew Morton <akpm@...ux-foundation.org>,
        linux-mm <linux-mm@...ck.org>,
        LKML <linux-kernel@...r.kernel.org>,
        Peter Zijlstra <peterz@...radead.org>,
        Laurent Dufour <ldufour@...ux.ibm.com>,
        Vlastimil Babka <vbabka@...e.cz>,
        Liam Howlett <Liam.Howlett@...cle.com>,
        Jerome Glisse <jglisse@...hat.com>,
        Davidlohr Bueso <dave@...olabs.net>,
        David Rientjes <rientjes@...gle.com>,
        Hugh Dickins <hughd@...gle.com>, Ying Han <yinghan@...gle.com>,
        Jason Gunthorpe <jgg@...pe.ca>,
        Daniel Jordan <daniel.m.jordan@...cle.com>
Subject: Re: [PATCH v4 06/10] mmap locking API: convert nested write lock sites

On Mon, Apr 20, 2020 at 12:33 PM Matthew Wilcox <willy@...radead.org> wrote:
>
> On Tue, Apr 14, 2020 at 05:43:49PM -0700, Michel Lespinasse wrote:
> > @@ -47,7 +48,7 @@ static inline void activate_mm(struct mm_struct *old, struct mm_struct *new)
> >        * when the new ->mm is used for the first time.
> >        */
> >       __switch_mm(&new->context.id);
> > -     down_write_nested(&new->mmap_sem, 1);
> > +     mmap_write_lock_nested(new, 1);
>
> This should have already been using SINGLE_DEPTH_NESTING.  1 is
> uninformative.

Sure, I can change that.
Note, all mmap_write_lock_nested call sites use single depth nesting,
so I'm not entirely sure if the argument should be passed to
mmap_write_lock_nested in the first place ?

-- 
Michel "Walken" Lespinasse
A program is never fully debugged until the last user dies.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ