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]
Message-ID: <3bafad66-f0f3-4255-83d2-5e7846f69b18@lucifer.local>
Date: Wed, 2 Oct 2024 19:54:43 +0100
From: Lorenzo Stoakes <lorenzo.stoakes@...cle.com>
To: Bert Karwatzki <spasswolf@....de>
Cc: "Liam R . Howlett" <Liam.Howlett@...cle.com>,
        Andrew Morton <akpm@...ux-foundation.org>, linux-mm@...ck.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v8 14/21] mm/mmap: Avoid zeroing vma tree in mmap_region()

[snip]

Also, for fun, try this one out. I don't hold out much hope, but just in case
the VMA iterator range being overly extended here might be a problem, let's see
if this makes a difference.

This is on top of the previous patch but hopefully should apply to clean too.

Thanks!

----8<----
>From 01b0afe395664cdda313f87e2e9c6dd80fdf04e1 Mon Sep 17 00:00:00 2001
From: Lorenzo Stoakes <lorenzo.stoakes@...cle.com>
Date: Wed, 2 Oct 2024 19:52:08 +0100
Subject: [PATCH] hunch

---
 mm/vma.h | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/mm/vma.h b/mm/vma.h
index 819f994cf727..20cb4f91e371 100644
--- a/mm/vma.h
+++ b/mm/vma.h
@@ -141,7 +141,8 @@ static inline int vma_iter_store_gfp(struct vma_iterator *vmi,

 {
 	if (vmi->mas.status != ma_start &&
-	    ((vmi->mas.index > vma->vm_start) || (vmi->mas.last < vma->vm_start)))
+	    ((vmi->mas.index > vma->vm_start) || (vmi->mas.last < vma->vm_start) ||
+	     (vmi->mas.last > vma->vm_end)))
 		vma_iter_invalidate(vmi);

 	__mas_set_range(&vmi->mas, vma->vm_start, vma->vm_end - 1);
@@ -463,7 +464,8 @@ static inline void vma_iter_store(struct vma_iterator *vmi,
 #endif

 	if (vmi->mas.status != ma_start &&
-	    ((vmi->mas.index > vma->vm_start) || (vmi->mas.last < vma->vm_start)))
+	    ((vmi->mas.index > vma->vm_start) || (vmi->mas.last < vma->vm_start) ||
+	     (vmi->mas.last > vma->vm_end)))
 		vma_iter_invalidate(vmi);

 	__mas_set_range(&vmi->mas, vma->vm_start, vma->vm_end - 1);
--
2.46.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ