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: <20200619141654.598626581@linuxfoundation.org>
Date:   Fri, 19 Jun 2020 16:31:45 +0200
From:   Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To:     linux-kernel@...r.kernel.org
Cc:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        stable@...r.kernel.org, Christoph Hellwig <hch@....de>,
        Andrew Morton <akpm@...ux-foundation.org>,
        "Peter Zijlstra (Intel)" <peterz@...radead.org>,
        Christian Borntraeger <borntraeger@...ibm.com>,
        Christophe Leroy <christophe.leroy@....fr>,
        Daniel Vetter <daniel.vetter@...ll.ch>,
        David Airlie <airlied@...ux.ie>, Gao Xiang <xiang@...nel.org>,
        Haiyang Zhang <haiyangz@...rosoft.com>,
        Johannes Weiner <hannes@...xchg.org>,
        "K. Y. Srinivasan" <kys@...rosoft.com>,
        Laura Abbott <labbott@...hat.com>,
        Mark Rutland <mark.rutland@....com>,
        Michael Kelley <mikelley@...rosoft.com>,
        Minchan Kim <minchan@...nel.org>,
        Nitin Gupta <ngupta@...are.org>,
        Robin Murphy <robin.murphy@....com>,
        Sakari Ailus <sakari.ailus@...ux.intel.com>,
        Stephen Hemminger <sthemmin@...rosoft.com>,
        Sumit Semwal <sumit.semwal@...aro.org>,
        Wei Liu <wei.liu@...nel.org>,
        Benjamin Herrenschmidt <benh@...nel.crashing.org>,
        Catalin Marinas <catalin.marinas@....com>,
        Heiko Carstens <heiko.carstens@...ibm.com>,
        Paul Mackerras <paulus@...abs.org>,
        Vasily Gorbik <gor@...ux.ibm.com>,
        Will Deacon <will@...nel.org>,
        Linus Torvalds <torvalds@...ux-foundation.org>,
        Sasha Levin <sashal@...nel.org>
Subject: [PATCH 4.19 120/267] staging: android: ion: use vmap instead of vm_map_ram

From: Christoph Hellwig <hch@....de>

[ Upstream commit 5bf9917452112694b2c774465ee4dbe441c84b77 ]

vm_map_ram can keep mappings around after the vm_unmap_ram.  Using that
with non-PAGE_KERNEL mappings can lead to all kinds of aliasing issues.

Signed-off-by: Christoph Hellwig <hch@....de>
Signed-off-by: Andrew Morton <akpm@...ux-foundation.org>
Acked-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Acked-by: Peter Zijlstra (Intel) <peterz@...radead.org>
Cc: Christian Borntraeger <borntraeger@...ibm.com>
Cc: Christophe Leroy <christophe.leroy@....fr>
Cc: Daniel Vetter <daniel.vetter@...ll.ch>
Cc: David Airlie <airlied@...ux.ie>
Cc: Gao Xiang <xiang@...nel.org>
Cc: Haiyang Zhang <haiyangz@...rosoft.com>
Cc: Johannes Weiner <hannes@...xchg.org>
Cc: "K. Y. Srinivasan" <kys@...rosoft.com>
Cc: Laura Abbott <labbott@...hat.com>
Cc: Mark Rutland <mark.rutland@....com>
Cc: Michael Kelley <mikelley@...rosoft.com>
Cc: Minchan Kim <minchan@...nel.org>
Cc: Nitin Gupta <ngupta@...are.org>
Cc: Robin Murphy <robin.murphy@....com>
Cc: Sakari Ailus <sakari.ailus@...ux.intel.com>
Cc: Stephen Hemminger <sthemmin@...rosoft.com>
Cc: Sumit Semwal <sumit.semwal@...aro.org>
Cc: Wei Liu <wei.liu@...nel.org>
Cc: Benjamin Herrenschmidt <benh@...nel.crashing.org>
Cc: Catalin Marinas <catalin.marinas@....com>
Cc: Heiko Carstens <heiko.carstens@...ibm.com>
Cc: Paul Mackerras <paulus@...abs.org>
Cc: Vasily Gorbik <gor@...ux.ibm.com>
Cc: Will Deacon <will@...nel.org>
Link: http://lkml.kernel.org/r/20200414131348.444715-4-hch@lst.de
Signed-off-by: Linus Torvalds <torvalds@...ux-foundation.org>
Signed-off-by: Sasha Levin <sashal@...nel.org>
---
 drivers/staging/android/ion/ion_heap.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/android/ion/ion_heap.c b/drivers/staging/android/ion/ion_heap.c
index 31db510018a9..6babcdb4d7d2 100644
--- a/drivers/staging/android/ion/ion_heap.c
+++ b/drivers/staging/android/ion/ion_heap.c
@@ -97,12 +97,12 @@ int ion_heap_map_user(struct ion_heap *heap, struct ion_buffer *buffer,
 
 static int ion_heap_clear_pages(struct page **pages, int num, pgprot_t pgprot)
 {
-	void *addr = vm_map_ram(pages, num, -1, pgprot);
+	void *addr = vmap(pages, num, VM_MAP, pgprot);
 
 	if (!addr)
 		return -ENOMEM;
 	memset(addr, 0, PAGE_SIZE * num);
-	vm_unmap_ram(addr, num);
+	vunmap(addr);
 
 	return 0;
 }
-- 
2.25.1



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ