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: <20201210170402.3468568-28-Liam.Howlett@Oracle.com>
Date:   Thu, 10 Dec 2020 12:04:01 -0500
From:   "Liam R. Howlett" <Liam.Howlett@...cle.com>
To:     maple-tree@...ts.infradead.org, linux-mm@...ck.org,
        linux-kernel@...r.kernel.org
Cc:     Andrew Morton <akpm@...gle.com>, Song Liu <songliubraving@...com>,
        Davidlohr Bueso <dave@...olabs.net>,
        "Paul E . McKenney" <paulmck@...nel.org>,
        Matthew Wilcox <willy@...radead.org>,
        Jerome Glisse <jglisse@...hat.com>,
        David Rientjes <rientjes@...gle.com>,
        Axel Rasmussen <axelrasmussen@...gle.com>,
        Suren Baghdasaryan <surenb@...gle.com>,
        Vlastimil Babka <vbabka@...e.cz>
Subject: [PATCH 27/28] mmap: Update count_vma_pages_range() to only use one ma_state

Signed-off-by: Liam R. Howlett <Liam.Howlett@...cle.com>
---
 mm/mmap.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/mm/mmap.c b/mm/mmap.c
index 284c90504b44c..7a575e6f1e7df 100644
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -483,17 +483,15 @@ static unsigned long count_vma_pages_range(struct mm_struct *mm,
 	MA_STATE(mas, &mm->mm_mt, addr, addr);
 
 	/* Find first overlaping mapping */
-	vma = find_vma_intersection(mm, addr, end);
+	vma = mas_find(&mas, end - 1);
 	if (!vma)
 		return 0;
 
 	vm_start = vma->vm_start;
 	vm_end = vma->vm_end;
-
 	nr_pages = (min(end, vm_end) - max(addr, vm_start)) >> PAGE_SHIFT;
 
 	/* Iterate over the rest of the overlaps */
-	mas.index = mas.last = vm_end;
 	mas_for_each(&mas, vma, end) {
 		vm_start = vma->vm_start;
 		vm_end = vma->vm_end;
-- 
2.28.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ