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]
Date:	Thu, 15 Sep 2011 13:40:11 +0100
From:	David Vrabel <david.vrabel@...rix.com>
To:	xen-devel@...ts.xensource.com
CC:	Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>,
	linux-kernel@...r.kernel.org,
	"Andrew Morton" <akpm@...ux-foundation.org>,
	David Vrabel <david.vrabel@...rix.com>
Subject: [PATCH 6/6] mm: remove vmalloc_sync_all() from alloc_vm_area()

From: David Vrabel <david.vrabel@...rix.com>

The address space allocated by the remaining user of alloc_vm_area()
is not accessed during a hypercall.  Therefore, the normal mechanism
of populating the vmalloc page tables during a fault works so the
vmalloc_sync_all() is not required and it can be removed.

Signed-off-by: David Vrabel <david.vrabel@...rix.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>
---
 mm/vmalloc.c |   12 +-----------
 1 files changed, 1 insertions(+), 11 deletions(-)

diff --git a/mm/vmalloc.c b/mm/vmalloc.c
index 5016f19..b0b4550 100644
--- a/mm/vmalloc.c
+++ b/mm/vmalloc.c
@@ -2117,9 +2117,7 @@ static int f(pte_t *pte, pgtable_t table, unsigned long addr, void *data)
  *
  *	This function reserves a range of kernel address space, and
  *	allocates pagetables to map that range.  No actual mappings
- *	are created.  If the kernel address space is not shared
- *	between processes, it syncs the pagetable across all
- *	processes.
+ *	are created.
  */
 struct vm_struct *alloc_vm_area(size_t size)
 {
@@ -2140,14 +2138,6 @@ struct vm_struct *alloc_vm_area(size_t size)
 		return NULL;
 	}
 
-	/*
-	 * If the allocated address space is passed to a hypercall
-	 * before being used then we cannot rely on a page fault to
-	 * trigger an update of the page tables.  So sync all the page
-	 * tables here.
-	 */
-	vmalloc_sync_all();
-
 	return area;
 }
 EXPORT_SYMBOL_GPL(alloc_vm_area);
-- 
1.7.2.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ