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: <CANN689F9YSG7US=daU7Gp2diEkeb2K6cHs0fsBuM9b3+Vo=n8Q@mail.gmail.com>
Date:   Mon, 6 Apr 2020 08:49:21 -0700
From:   Michel Lespinasse <walken@...gle.com>
To:     Peter Zijlstra <peterz@...radead.org>
Cc:     Andrew Morton <akpm@...ux-foundation.org>,
        linux-mm <linux-mm@...ck.org>,
        LKML <linux-kernel@...r.kernel.org>,
        Laurent Dufour <ldufour@...ux.ibm.com>,
        Vlastimil Babka <vbabka@...e.cz>,
        Matthew Wilcox <willy@...radead.org>,
        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>,
        Markus Elfring <Markus.Elfring@....de>
Subject: Re: [PATCH v3 10/10] mmap locking API: rename mmap_sem to mmap_lock

On Wed, Apr 1, 2020 at 6:48 AM Peter Zijlstra <peterz@...radead.org> wrote:
>
> On Fri, Mar 27, 2020 at 03:51:02PM -0700, Michel Lespinasse wrote:
> > Rename the mmap_sem field to mmap_lock. Any new uses of this lock
> > should now go through the new mmap locking api. The mmap_lock is
> > still implemented as a rwsem, though this could change in the future.
>
> > diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h
> > index c28911c3afa8..a168d13b5c44 100644
> > --- a/include/linux/mm_types.h
> > +++ b/include/linux/mm_types.h
> > @@ -431,7 +431,7 @@ struct mm_struct {
> >               spinlock_t page_table_lock; /* Protects page tables and some
> >                                            * counters
> >                                            */
> > -             struct rw_semaphore mmap_sem;
> > +             struct rw_semaphore mmap_lock;
>
> It would be best if you change the type too.

I suppose you mean wrapping the struct rw_semaphore within a new
struct ? I did not do that in this patchset because there remains some
calls to lockdep_assert_held() on that field, which imply that the
field must have a .dep_map field that's not tucked away behind an
additional struct.

I have another patchset that reimplements the mmap_lock as a different
type (for range locking), with its own dep_map handling, but it's not
ready for pushing to mainline yet...

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