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:48:20 -0700
From:   Michel Lespinasse <walken@...gle.com>
To:     Michel Lespinasse <walken@...gle.com>,
        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 Mon, Apr 20, 2020 at 12:51 PM Davidlohr Bueso <dave@...olabs.net> wrote:
> 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.

Hmmm, I see your point. Actually here the operation is downgrade, so
arguably the name should be mmap_write_downgrade ? I'm not sure I like
the name though, as it does not make it entirely obvious that the
function is a locking primitive.

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