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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 2 Oct 2019 16:18:19 +0300
From:   "Kirill A. Shutemov" <kirill@...temov.name>
To:     Thomas Hellström (VMware) 
        <thomas_os@...pmail.org>
Cc:     Linus Torvalds <torvalds@...ux-foundation.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        dri-devel <dri-devel@...ts.freedesktop.org>,
        Linux-MM <linux-mm@...ck.org>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Matthew Wilcox <willy@...radead.org>
Subject: Re: Ack to merge through DRM? WAS Re: [PATCH v2 1/5] mm: Add
 write-protect and clean utilities for address space ranges

On Wed, Oct 02, 2019 at 11:21:01AM +0200, Thomas Hellström (VMware) wrote:
> On 9/26/19 10:16 PM, Linus Torvalds wrote:
> > On Thu, Sep 26, 2019 at 1:09 PM Thomas Hellström (VMware)
> > <thomas_os@...pmail.org> wrote:
> > > That said, if people are OK with me modifying the assert in
> > > pud_trans_huge_lock() and make __walk_page_range non-static, it should
> > > probably be possible to make it work, yes.
> > I don't think you need to modify that assert at all.
> > 
> > That thing only exists when there's a "pud_entry" op in the walker,
> > and then you absolutely need to have that mmap_lock.
> > 
> > As far as I can tell, you fundamentally only ever work on a pte level
> > in your address space walker already and actually have a WARN_ON() on
> > the pud_huge thing, so no pud entry can possibly apply.
> > 
> > So no, the assert in pud_trans_huge_lock() does not seem to be a
> > reason not to just use the existing page table walkers.
> > 
> > And once you get rid of the walking, what is left? Just the "iterate
> > over the inode mappings" part. Which could just be done in
> > mm/pagewalk.c, and then you don't even need to remove the static.
> > 
> > So making it be just another walking in pagewalk.c would seem to be
> > the simplest model.
> > 
> > Call it "walk_page_mapping()". And talk extensively about how the
> > locking differs a lot from the usual "walk_page_vma()" things.
> > 
> > The then actual "apply" functions (what a horrid name) could be in the
> > users. They shouldn't be mixed in with the walking functions anyway.
> > They are callbacks, not walkers.
> > 
> >               Linus
> 
> Linus, Kirill
> 
> I've pushed a reworked version based on the pagewalk code here:
> 
> https://cgit.freedesktop.org/~thomash/linux/log/?h=pagewalk
> 
> (top three patched)
> 
> with users included here:
> 
> https://cgit.freedesktop.org/~thomash/linux/log/?h=coherent-rebased
> 
> Do you think this could work? The reason that the "mm: Add write-protect and
> clean.." code is still in mm as a set of helpers, is of course that much of
> the needed functionality is not exported, presumably since we want to keep
> page table manipulation in mm.

Could you post it to the mailing list? It's easier to review this way.

-- 
 Kirill A. Shutemov

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ