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] [day] [month] [year] [list]
Date:   Tue, 25 May 2021 20:04:31 -0700
From:   Andrew Morton <akpm@...ux-foundation.org>
To:     Peter Xu <peterx@...hat.com>
Cc:     linux-mm@...ck.org, linux-kernel@...r.kernel.org,
        Mike Kravetz <mike.kravetz@...cle.com>,
        Mike Rapoport <rppt@...ux.vnet.ibm.com>,
        Axel Rasmussen <axelrasmussen@...gle.com>,
        Andrea Arcangeli <aarcange@...hat.com>,
        Hugh Dickins <hughd@...gle.com>,
        "Kirill A . Shutemov" <kirill@...temov.name>,
        Jerome Glisse <jglisse@...hat.com>
Subject: Re: [PATCH 2/6] mm/userfaultfd: Fix uffd-wp special cases for
 fork()

On Tue, 25 May 2021 20:36:18 -0400 Peter Xu <peterx@...hat.com> wrote:

> On Tue, May 25, 2021 at 05:15:58PM -0700, Andrew Morton wrote:
> > This run afoul of Alistair's "mm: Device exclusive memory access",
> > https://lkml.kernel.org/r/20210524132725.12697-8-apopple@nvidia.com
> > 
> > `vma' is now undeclared.  I think this?
> > 
> > --- a/mm/memory.c~mm-userfaultfd-fix-uffd-wp-special-cases-for-fork-fix
> > +++ a/mm/memory.c
> > @@ -850,8 +850,8 @@ copy_nonpresent_pte(struct mm_struct *ds
> >  		 * exclusive entries currently only support private writable
> >  		 * (ie. COW) mappings.
> >  		 */
> > -		VM_BUG_ON(!is_cow_mapping(vma->vm_flags));
> > -		if (try_restore_exclusive_pte(src_mm, src_pte, vma, addr))
> > +		VM_BUG_ON(!is_cow_mapping(dst_vma->vm_flags));
> 
> This one looks good, as both src_vma/dst_vma should have the same flags related
> to is_cow.
> 
> > +		if (try_restore_exclusive_pte(src_mm, src_pte, dst_vma, addr))
> 
> Should this be s/dst_vma/src_vma/ perhaps?  Alistairs please correct me
> otherwise, as it tries to restore the pte for src mm not dst (the child).
> 
> I haven't yet got time to look at the new series, planning to do it tomorrow
> maybe.. but I see that it's already queued in -mm.  Andrew, we do have chance
> to go back if necessary, right?

Sure.

> I haven't looked at the rest, but I think try_restore_exclusive_pte() can at
> least drop the *mm pointer as it's never used (even if we need, we've got
> vma->vm_mm too)..

OK, thanks.  I just released a tree into linux-next (hopefully this
blooper won't cause too much damage).  Please send a suitable fixup.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ