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: <20220203172533.em5ejhfstja5lk33@revolver>
Date:   Thu, 3 Feb 2022 17:25:40 +0000
From:   Liam Howlett <liam.howlett@...cle.com>
To:     Mark Hemment <markhemm@...glemail.com>
CC:     "maple-tree@...ts.infradead.org" <maple-tree@...ts.infradead.org>,
        "linux-mm@...ck.org" <linux-mm@...ck.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH v5 68/70] mm: Remove the vma linked list

* Mark Hemment <markhemm@...glemail.com> [220203 07:08]:
> On Wed, 2 Feb 2022 at 02:43, Liam Howlett <liam.howlett@...cle.com> wrote:
> >
> > From: "Liam R. Howlett" <Liam.Howlett@...cle.com>
> >
> > Replace any vm_next use with vma_find().
> >
> > Update free_pgtables(), unmap_vmas(), and zap_page_range() to use the
> > maple tree.
> >
> > Use the new free_pgtables() and unmap_vmas() in do_mas_align_munmap().
> > At the same time, alter the loop to be more compact.
> >
> > Now that free_pgtables() and unmap_vmas() take a maple tree as an
> > argument, rearrange do_mas_align_munmap() to use the new tree to hold
> > the vmas to remove.
> >
> > Remove __vma_link_list() and __vma_unlink_list() as they are exclusively
> > used to update the linked list
> >
> > Drop linked list update from __insert_vm_struct().
> >
> > Rework validation of tree as it was depending on the linked list.
> >
> > Signed-off-by: Liam R. Howlett <Liam.Howlett@...cle.com>
> > ---
> >  include/linux/mm.h       |   5 +-
> >  include/linux/mm_types.h |   4 -
> >  kernel/fork.c            |  13 +-
> >  mm/debug.c               |  14 +-
> >  mm/gup.c                 |   2 +-
> >  mm/internal.h            |  10 +-
> >  mm/memory.c              |  33 ++-
> >  mm/mmap.c                | 518 +++++++++++++++++----------------------
> >  mm/nommu.c               |   2 -
> >  mm/util.c                |  40 ---
> >  10 files changed, 264 insertions(+), 377 deletions(-)
> ...
> > -static inline int
> > -unlock_range(struct vm_area_struct *start, struct vm_area_struct **tail,
> > -            unsigned long limit)
> > -{
> > -       struct mm_struct *mm = start->vm_mm;
> > -       struct vm_area_struct *tmp = start;
> > -       int count = 0;
> > -
> > -       while (tmp && tmp->vm_start < limit) {
> > -               *tail = tmp;
> > -               count++;
> > -               if (tmp->vm_flags & VM_LOCKED) {
> > -                       mm->locked_vm -= vma_pages(tmp);
> > -                       munlock_vma_pages_all(tmp);
> > -               }
> > -
> > -               tmp = tmp->vm_next;
> > -       }
> > -
> > -       return count;
> > -}
> 
> Trivial: Comment in exit_mmap(), for oom-victim case, has a reference
> to this removed function (unlock_range()).
> 

Thanks, I will update the comment too.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ