All of lore.kernel.org
 help / color / mirror / Atom feed
From: Philip Balister <philip@balister.org>
To: openembedded-devel@lists.openembedded.org
Subject: Re: [STABLE][PATCH] sanity.bbclass: handle lack of permission to	read /proc/sys/vm/mmap_min_addr
Date: Fri, 22 Jan 2010 10:43:23 -0500	[thread overview]
Message-ID: <4B59C79B.707@balister.org> (raw)
In-Reply-To: <1264174860-2130-1-git-send-email-marcin@juszkiewicz.com.pl>

On 01/22/2010 10:41 AM, Marcin Juszkiewicz wrote:
> From: Martin Jansa<martin.jansa@gmail.com>
>
> * With 2.6.33-rc2-00252-ge9e5521 on my host I noticed that
>    "cat /proc/sys/vm/mmap_min_addr" returns now
>    "cat: /proc/sys/vm/mmap_min_addr: Operation not permitted"
>    Its probably becuse of
>    http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=0e1a6ef2dea88101b056b6d9984f3325c5efced3
>    But I'm not sure if checking CAP_SYS_RAWIO even for reading this value
>    is intentional or just bug which should be fixed in kernel.
>
> This patch makes bitbake ignore reading error. Possible QEmu failure is not
> handled yet.
>
> Acked-by: Marcin Juszkiewicz<marcin@juszkiewicz.com.pl>

Acked-by: Philip Balister <philip@balister.org>

> ---
>   classes/sanity.bbclass |   13 ++++++++-----
>   1 files changed, 8 insertions(+), 5 deletions(-)
>
> diff --git a/classes/sanity.bbclass b/classes/sanity.bbclass
> index f65df61..f57d8e4 100644
> --- a/classes/sanity.bbclass
> +++ b/classes/sanity.bbclass
> @@ -96,11 +96,14 @@ def check_sanity(e):
>   			if not check_app_exists("qemu-arm", e.data):
>   				messages = messages + "qemu-native was in ASSUME_PROVIDED but the QEMU binaries (qemu-arm) can't be found in PATH"
>
> -		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()
> +		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 ):



      reply	other threads:[~2010-01-22 15:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-22 15:41 [STABLE][PATCH] sanity.bbclass: handle lack of permission to read /proc/sys/vm/mmap_min_addr Marcin Juszkiewicz
2010-01-22 15:43 ` Philip Balister [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4B59C79B.707@balister.org \
    --to=philip@balister.org \
    --cc=openembedded-devel@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.