[OE-core] [PATCHv3 4/6] sanity.bbclass: Check for /proc/sys/vm/mmap_min_addr to be >= 65536

Martin Jansa martin.jansa at gmail.com
Thu Mar 3 07:15:06 UTC 2011


On Wed, Mar 02, 2011 at 10:52:45PM -0800, Khem Raj wrote:
> * Now qemu can handle lower values we can chnage this sanity test
>   to check of values if less than 65536
> 
> Signed-off-by: Khem Raj <raj.khem at gmail.com>
> ---
>  meta/classes/sanity.bbclass |   10 ++++++----
>  1 files changed, 6 insertions(+), 4 deletions(-)
> 
> diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
> index 13940f8..aae5028 100644
> --- a/meta/classes/sanity.bbclass
> +++ b/meta/classes/sanity.bbclass
> @@ -170,10 +170,12 @@ def check_sanity(e):
>          # This path is no longer user-readable in modern (very recent) Linux
>          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()
> +                f = open("/proc/sys/vm/mmap_min_addr", "r")
> +                try:
> +                    if (int(f.read().strip()) < 65536):
> +                        messages = messages + "/proc/sys/vm/mmap_min_addr is not >= 65536. 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 = 65536 in /etc/sysctl.conf.\n"
> +                finally:
> +                    f.close()
>          except:
>              pass
>  

corner cases when it cannot be read are with kernel between

http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=0e1a6ef2dea88101b056b6d9984f3325c5efced3
2.6.33-rc2-0e1a6ef2dea88101b056b6d9984f3325c5efced3

and

http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=822cceec7248013821d655545ea45d1c6a9d15b3
2.6.34-rc3-822cceec7248013821d655545ea45d1c6a9d15b3

see:
http://www.mail-archive.com/openembedded-devel@lists.openembedded.org/msg02340.html

Don't know if any large distribution is using 2.6.34 without that 2nd
patch backported.

Regards,

-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa at gmail.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20110303/a842e157/attachment-0002.sig>


More information about the Openembedded-core mailing list