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:   Tue, 7 Dec 2021 11:03:40 +0100
From:   Michal Hocko <mhocko@...e.com>
To:     Matthew Wilcox <willy@...radead.org>
Cc:     Suren Baghdasaryan <surenb@...gle.com>, akpm@...ux-foundation.org,
        rientjes@...gle.com, hannes@...xchg.org, guro@...com,
        riel@...riel.com, minchan@...nel.org, kirill@...temov.name,
        aarcange@...hat.com, christian@...uner.io, hch@...radead.org,
        oleg@...hat.com, david@...hat.com, jannh@...gle.com,
        shakeelb@...gle.com, luto@...nel.org, christian.brauner@...ntu.com,
        fweimer@...hat.com, jengelh@...i.de, timmurray@...gle.com,
        linux-mm@...ck.org, linux-kernel@...r.kernel.org,
        kernel-team@...roid.com
Subject: Re: [PATCH v2 1/2] mm: protect free_pgtables with mmap_lock write
 lock in exit_mmap

On Mon 06-12-21 18:52:28, Matthew Wilcox wrote:
> On Mon, Dec 06, 2021 at 10:35:03AM -0800, Suren Baghdasaryan wrote:
> > > Other than that looks OK to me. Maybe we want to add an explicit note
> > > that vm_ops::close cannot take mmap_sem in any form. The changelog
> > > should also mention that you have considered remove_vma and its previous
> > > no MM locking assumption. You can argue that fput is async and close
> > > callback shouldn't really need mmap_sem.
> > 
> > Should I post another version of this patch with the patch description
> > clarifying these points and additional comments as you suggested?
> 
> fyi, vm_ops->close() is already called with the mmap_sem held for write
> in __split_vma().  If that needs to be documented, it's a separate patch
> because it's absolutely not a consequence of this patch.

Agreed! We definitely want to document that.

-- 
Michal Hocko
SUSE Labs

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ