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 12:48:13 -0700
From:   Davidlohr Bueso <dave@...olabs.net>
To:     Michel Lespinasse <walken@...gle.com>
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>,
        Matthew Wilcox <willy@...radead.org>,
        Liam Howlett <Liam.Howlett@...cle.com>,
        Jerome Glisse <jglisse@...hat.com>,
        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 01/10] mmap locking API: initial implementation as
 rwsem wrappers

On Tue, 14 Apr 2020, Michel Lespinasse wrote:

>This change wraps the existing mmap_sem related rwsem calls into a new
>mmap locking API. There are two justifications for the new API:
>
>- At first, it provides an easy hooking point to instrument mmap_sem
>  locking latencies independently of any other rwsems.
>
>- In the future, it may be a starting point for replacing the rwsem
>  implementation with a different one, such as range locks.
>
>Signed-off-by: Michel Lespinasse <walken@...gle.com>
>Reviewed-by: Daniel Jordan <daniel.m.jordan@...cle.com>

Reviewed-by: Davidlohr Bueso <dbueso@...e.de>

With one observation below.

>+static inline void mmap_downgrade_write_lock(struct mm_struct *mm)
>+{
>+	downgrade_write(&mm->mmap_sem);
>+}

Shouldn't this really be just mmap_downgrade_write()? In locking
normally don't add the _lock at the end as it implies the operation
of acquiring the lock.

Thanks,
Davidlohr

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ