[oe] some possible fixes in the OE web pages

Robert P. J. Day rpjday at crashcourse.ca
Thu May 13 10:17:14 UTC 2010


On Thu, 13 May 2010, Martin Jansa wrote:

... my initially innocuous observation snipped ...

> On some systems (I have report from fedora and kubuntu) it still
> needs 0 in mmap_min_addr :/.
>
> Investigating why, but it's slow because it doesn't fail on my box.
>
> My guess is that this chunk from
> http://git.qemu.org/qemu.git/tree/linux-user/main.c cannot work on
> systems where normal user is not allowed to read
> /proc/sys/vm/mmap_min_addr and mmap_min_addr is not initialized with
> sane value.
>
>     /*
>      * Read in mmap_min_addr kernel parameter.  This value is used
>      * When loading the ELF image to determine whether guest_base
>      * is needed.  It is also used in mmap_find_vma.
>      */
>     {
>         FILE *fp;
>
>         if ((fp = fopen("/proc/sys/vm/mmap_min_addr", "r")) != NULL) {
>             unsigned long tmp;
>             if (fscanf(fp, "%lu", &tmp) == 1) {
>                 mmap_min_addr = tmp;
>                 qemu_log("host mmap_min_addr=0x%lx\n", mmap_min_addr);
>             }
>             fclose(fp);
>         }
>     }
>

  i'm confused ... unless my memory is failing, i've always been able
to at least *read* that file as a normal user since it was
world-readable, but this baffles me:

$ ls -l /proc/sys/vm/mmap_min_addr
-rw-r--r-- 1 root root 0 2010-05-12 20:42 /proc/sys/vm/mmap_min_addr
$ cat $_
cat: /proc/sys/vm/mmap_min_addr: Operation not permitted
$

  what am i misunderstanding?  the file perms state world-readable so
i'm assuming something in the actual kernel code is checking the
caller ID and rejecting the read request?

rday

-- 

========================================================================
Robert P. J. Day                               Waterloo, Ontario, CANADA

            Linux Consulting, Training and Kernel Pedantry.

Web page:                                          http://crashcourse.ca
Twitter:                                       http://twitter.com/rpjday
========================================================================




More information about the Openembedded-devel mailing list