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: <CANN689EDVibi-EO9+S01qLW7gSpzj3i7g9g=GiH5vGGKgFz2Qg@mail.gmail.com>
Date:   Mon, 20 Apr 2020 17:57:16 -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 08/10] mmap locking API: add MMAP_LOCK_INITIALIZER

On Mon, Apr 20, 2020 at 12:28 PM Matthew Wilcox <willy@...radead.org> wrote:
>
> On Tue, Apr 14, 2020 at 05:43:51PM -0700, Michel Lespinasse wrote:
> > @@ -90,7 +90,7 @@ static struct mm_struct tboot_mm = {
>                                             ^^^^^^^^
> >       .pgd            = swapper_pg_dir,
> >       .mm_users       = ATOMIC_INIT(2),
> >       .mm_count       = ATOMIC_INIT(1),
> > -     .mmap_sem       = __RWSEM_INITIALIZER(init_mm.mmap_sem),
> > +     .mmap_sem       = MMAP_LOCK_INITIALIZER(init_mm.mmap_sem),
>                                                 ^^^^^^^
>
> Shome mishtake, shirley?
>
> I don't see that this particular patch buys us much.  The name 'mmap_sem'
> is still used, and I appreciate we abstract away the type of the lock,
> but wouldn't this be better?
>
> -       .mmap_sem       = __RWSEM_INITIALIZER(init_mm.mmap_sem),
> +       MMAP_LOCK_INITIALIZER(tboot_mm),

Hmmm, that's significantly different from other initializers we have,
which may be a downside ? But other than that, it does seem completely
workable to me. Do you have a strong preference ?

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