[oe] [PATCH] sanity.bbclass: Reading /proc/sys/vm/mmap_min_addr is not permitted with 2.6.33+ on host
Phil Blundell
philb at gnu.org
Sat Jan 2 18:10:05 UTC 2010
On Sat, 2010-01-02 at 18:10 +0100, Martin Jansa wrote:
> * 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 prints notice about need to check that value yourself (as
> root) instead of failing with "ERROR: IO Error: [Errno 1] Operation
> not permitted"
>
> * Its not optimal, because this notice is shown every time you run
> bitbake (even after checking/setting 0 to mmap_min_addr if you have
> kernel not allowing to read it
>
That does sound fairly unsatisfactory. Printing a diagnostic on every
build, with no way for the user to suppress it, surely can't be the way
of the future.
If you can't tell whether mmap_min_addr is set correctly or not then it
would probably be better to not show the diagnostic at all. Perhaps you
could investigate patching qemu to print a more meaningful message if it
actually encounters a mmap() failure of this kind.
p.
More information about the Openembedded-devel
mailing list