[oe-commits] Roman I Khimov : sanity: remove /proc/sys/vm/mmap_min_addr check

git version control git at git.openembedded.org
Tue Mar 9 17:32:24 UTC 2010


Module: openembedded.git
Branch: org.openembedded.dev
Commit: 44ecf674747fef9f71f928660b394ca470a135fc
URL:    http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=44ecf674747fef9f71f928660b394ca470a135fc

Author: Roman I Khimov <khimov at altell.ru>
Date:   Mon Mar  8 17:00:58 2010 +0300

sanity: remove /proc/sys/vm/mmap_min_addr check

Binary locale generation fails on openSUSE 11.2 and probably would fail
on some other hosts with 2.6.31+ kernels since mmap-ing page zero may be
forbidden for security reasons even with /proc/sys/vm/mmap_min_addr set
to 0 (this also affects Ubuntu 9.10, although it's been fixed there:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/423513
).

This is not a problem for recently introduced qemu 0.12.3 since it can
relocate binaries now, which is tested on openSUSE 2.6.31 kernel with
mmap_min_addr=65536 and Debian lenny 2.6.26 with mmap_min_addr set to
0, 4096, 65536.

Given that, this check is just useless. Unfortunately, it also means
that for reliable builds we have to remove qemu 0.10 which can't work
with some kernels. Patch will follow to do that.

Signed-off-by: Roman I Khimov <khimov at altell.ru>
Acked-by: Tom Rini <tom_rini at mentor.com>
Acked-by: Koen Kooi <koen at openembedded.org>
Acked-by: Marcin Juszkiewicz <marcin at juszkiewicz.com.pl>

---

 classes/sanity.bbclass |    9 ---------
 1 files changed, 0 insertions(+), 9 deletions(-)

diff --git a/classes/sanity.bbclass b/classes/sanity.bbclass
index 5f0e724..19310cb 100644
--- a/classes/sanity.bbclass
+++ b/classes/sanity.bbclass
@@ -99,15 +99,6 @@ def check_sanity(e):
 		if "qemu-native" in assume_provided:
 			required_utilities += " %s" % (qemu_target_binary(e.data))
 
-		try:
-			if os.path.exists("/proc/sys/vm/mmap_min_addr"):
-				f = file("/proc/sys/vm/mmap_min_addr", "r")
-				if (f.read().strip() != "0"):
-					messages = messages + "/proc/sys/vm/mmap_min_addr is not 0. This will cause problems with qemu so please fix the value (as root).\n\nTo fix this in later reboots, set vm.mmap_min_addr = 0 in /etc/sysctl.conf.\n"
-				f.close()
-		except:
-			pass
-
 	for util in required_utilities.split():
 		if not check_app_exists( util, e.data ):
 			missing = missing + "%s," % util





More information about the Openembedded-commits mailing list