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: <20220823185145.gjvb3xmzebewi6os@offworld>
Date:   Tue, 23 Aug 2022 11:51:45 -0700
From:   Davidlohr Bueso <dave@...olabs.net>
To:     Liam Howlett <liam.howlett@...cle.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>,
        "Matthew Wilcox (Oracle)" <willy@...radead.org>,
        Michael Ellerman <mpe@...erman.id.au>,
        Benjamin Herrenschmidt <benh@...nel.crashing.org>,
        Paul Mackerras <paulus@...ba.org>,
        Christophe Leroy <christophe.leroy@...roup.eu>,
        Vlastimil Babka <vbabka@...e.cz>
Subject: Re: [PATCH v13 33/70] powerpc: remove mmap linked list walks

On Mon, 22 Aug 2022, Liam Howlett wrote:

>From: "Matthew Wilcox (Oracle)" <willy@...radead.org>
>
>Use the VMA iterator instead.
>
>Signed-off-by: Matthew Wilcox (Oracle) <willy@...radead.org>
>Signed-off-by: Liam R. Howlett <Liam.Howlett@...cle.com>
>Reviewed-by: Vlastimil Babka <vbabka@...e.cz>

Reviewed-by: Davidlohr Bueso <dave@...olabs.net>

>---
> arch/powerpc/kernel/vdso.c              |  6 +++---
> arch/powerpc/mm/book3s32/tlb.c          | 11 ++++++-----
> arch/powerpc/mm/book3s64/subpage_prot.c | 13 ++-----------
> 3 files changed, 11 insertions(+), 19 deletions(-)
>
>diff --git a/arch/powerpc/kernel/vdso.c b/arch/powerpc/kernel/vdso.c
>index 0da287544054..94a8fa5017c3 100644
>--- a/arch/powerpc/kernel/vdso.c
>+++ b/arch/powerpc/kernel/vdso.c
>@@ -113,18 +113,18 @@ struct vdso_data *arch_get_vdso_data(void *vvar_page)
> int vdso_join_timens(struct task_struct *task, struct time_namespace *ns)
> {
>	struct mm_struct *mm = task->mm;
>+	VMA_ITERATOR(vmi, mm, 0);
>	struct vm_area_struct *vma;
>
>	mmap_read_lock(mm);
>-
>-	for (vma = mm->mmap; vma; vma = vma->vm_next) {
>+	for_each_vma(vmi, vma) {
>		unsigned long size = vma->vm_end - vma->vm_start;

Unrelated, but maybe worth abstracting?

$> grep "vma->vm_end - vma->vm_start" |wc -l
216

Thanks,
Davidlohr

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ