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: <77fc73e7-f6c4-27ea-66ef-63f61e0929eb@suse.cz>
Date:   Wed, 12 Jan 2022 13:02:50 +0100
From:   Vlastimil Babka <vbabka@...e.cz>
To:     Liam Howlett <liam.howlett@...cle.com>,
        "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>
Cc:     Song Liu <songliubraving@...com>,
        Davidlohr Bueso <dave@...olabs.net>,
        "Paul E . McKenney" <paulmck@...nel.org>,
        Matthew Wilcox <willy@...radead.org>,
        Laurent Dufour <ldufour@...ux.ibm.com>,
        David Rientjes <rientjes@...gle.com>,
        Axel Rasmussen <axelrasmussen@...gle.com>,
        Suren Baghdasaryan <surenb@...gle.com>,
        Rik van Riel <riel@...riel.com>,
        Peter Zijlstra <peterz@...radead.org>,
        Michel Lespinasse <walken.cr@...il.com>,
        Jerome Glisse <jglisse@...hat.com>,
        Minchan Kim <minchan@...gle.com>,
        Joel Fernandes <joelaf@...gle.com>,
        Rom Lemarchand <romlem@...gle.com>
Subject: Re: [PATCH v4 16/66] mm: Remove rb tree.

On 12/1/21 15:29, Liam Howlett wrote:
> From: "Liam R. Howlett" <Liam.Howlett@...cle.com>
> 
> Remove the RB tree and start using the maple tree for vm_area_struct
> tracking.
> 
> Drop validate_mm() calls in expand_upwards() and expand_downwards() as
> the lock is not held.
> 
> Signed-off-by: Liam R. Howlett <Liam.Howlett@...cle.com>

Acked-by: Vlastimil Babka <vbabka@...e.cz>

> ---
>  arch/x86/kernel/tboot.c    |   1 -
>  drivers/firmware/efi/efi.c |   1 -
>  include/linux/mm.h         |   2 -
>  include/linux/mm_types.h   |  14 --
>  kernel/fork.c              |   8 -
>  mm/init-mm.c               |   2 -
>  mm/mmap.c                  | 496 ++++++++-----------------------------
>  mm/nommu.c                 |  88 ++-----
>  mm/util.c                  |   8 +
>  9 files changed, 136 insertions(+), 484 deletions(-)

Nice stats.

Wanted to suggest splitting out the swith to range_has_overlap() but I think
I see how it's not feasible.

> diff --git a/mm/util.c b/mm/util.c
> index e58151a61255..ab02382c2d57 100644
> --- a/mm/util.c
> +++ b/mm/util.c
> @@ -287,6 +287,8 @@ void __vma_link_list(struct mm_struct *mm, struct vm_area_struct *vma,
>  	vma->vm_next = next;
>  	if (next)
>  		next->vm_prev = vma;
> +	else
> +		mm->highest_vm_end = vm_end_gap(vma);
>  }
>  
>  void __vma_unlink_list(struct mm_struct *mm, struct vm_area_struct *vma)
> @@ -301,6 +303,12 @@ void __vma_unlink_list(struct mm_struct *mm, struct vm_area_struct *vma)
>  		mm->mmap = next;
>  	if (next)
>  		next->vm_prev = prev;
> +	else {

Nit: style suggests that once else is { } block then if block should be too,
even though it remains a single line.

> +		if (prev)
> +			mm->highest_vm_end = vm_end_gap(prev);
> +		else
> +			mm->highest_vm_end = 0;
> +	}
>  }
>  
>  /* Check if the vma is being used as a stack by this task */

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ