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: <20220204224133.GA1559@lespinasse.org>
Date:   Fri, 4 Feb 2022 14:41:33 -0800
From:   Michel Lespinasse <michel@...pinasse.org>
To:     Matthew Wilcox <willy@...radead.org>
Cc:     Michel Lespinasse <michel@...pinasse.org>,
        Linux-MM <linux-mm@...ck.org>, linux-kernel@...r.kernel.org,
        Andrew Morton <akpm@...ux-foundation.org>, kernel-team@...com,
        Laurent Dufour <ldufour@...ux.ibm.com>,
        Jerome Glisse <jglisse@...gle.com>,
        Peter Zijlstra <peterz@...radead.org>,
        Michal Hocko <mhocko@...e.com>,
        Vlastimil Babka <vbabka@...e.cz>,
        Davidlohr Bueso <dave@...olabs.net>,
        Liam Howlett <liam.howlett@...cle.com>,
        Rik van Riel <riel@...riel.com>,
        Paul McKenney <paulmck@...nel.org>,
        Song Liu <songliubraving@...com>,
        Suren Baghdasaryan <surenb@...gle.com>,
        Minchan Kim <minchan@...gle.com>,
        Joel Fernandes <joelaf@...gle.com>,
        David Rientjes <rientjes@...gle.com>,
        Axel Rasmussen <axelrasmussen@...gle.com>,
        Andy Lutomirski <luto@...nel.org>
Subject: Re: [PATCH v2 12/35] mm: separate mmap locked assertion from find_vma

On Mon, Jan 31, 2022 at 02:44:55PM +0000, Matthew Wilcox wrote:
> On Fri, Jan 28, 2022 at 05:09:43AM -0800, Michel Lespinasse wrote:
> > This adds a new __find_vma() function, which implements find_vma minus
> > the mmap_assert_locked() assertion.
> > 
> > find_vma() is then implemented as an inline wrapper around __find_vma().
> 
> You might like to take inspiration from the maple tree patches
> where we assert that either the RCU lock is held or the mmap_lock
> is held.

I've been considering it, but I'm not sure we want to go that way:
it's not sufficient for the caller to have an RCU read lock,
they also need to do the proper mmap_seq_read_check() after
dereferencing the vma... So I think having this different set of
expectations for the two cases warrants using a different name
to keep things more explicit.

--
Michel "walken" Lespinasse

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ