Openembedded Devel Discussions
 help / color / mirror / Atom feed
From: Martin Jansa <martin.jansa@gmail.com>
To: openembedded-devel@lists.openembedded.org
Subject: Re: some possible fixes in the OE web pages
Date: Thu, 13 May 2010 11:23:20 +0200	[thread overview]
Message-ID: <20100513092320.GE3370@jama> (raw)
In-Reply-To: <201005131259.13508.khimov@altell.ru>

On Thu, May 13, 2010 at 12:59:13PM +0400, Roman I Khimov wrote:
> В сообщении от Четверг 13 мая 2010 12:46:33 автор Martin Jansa написал:
> > On Thu, May 13, 2010 at 12:23:22PM +0400, Roman I Khimov wrote:
> > > Well, as the problem is in the kernel really, I think everyone having
> > > this problem should push distro maintainers to update kernels with the
> > > tiny fix mentioned above. But as a workaround, yep, "0" setting might
> > > work (beware that it might also not work as in here:
> > > https://bugs.launchpad.net/ubuntu/+source/linux/+bug/423513
> > > ).
> > 
> > Another not tested workaround:
> > 
> > as qemu can work with (hopefully any) non-zero mmap_min_addr, maybe add
> > patch to linux-user/main.c that if it cannot read
> > /proc/sys/vm/mmap_min_addr then assume 65536 (ubuntu default)?
> 
> Fedora has the same default, so this should work.

Can we compare this simple test between working and non-working systems?

This is from working gentoo 2.6.34-rc7:

bitbake@jama ~/mmap-test $ wget http://build.shr-project.org/tests/jama/mmap-test.c
bitbake@jama ~/mmap-test $ gcc mmap-test.c -o mmap-test
bitbake@jama ~/mmap-test $ ./mmap-test
cannot read value from /proc/sys/vm/mmap_min_addr
bitbake@jama ~/mmap-test $ strace ./mmap-test
execve("./mmap-test", ["./mmap-test"], [/* 26 vars */]) = 0
brk(0)                                  = 0xded000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f7647150000
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=22777, ...}) = 0
mmap(NULL, 22777, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f764714a000
close(3)                                = 0
open("/lib/libc.so.6", O_RDONLY)        = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\200\354\1\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=1424560, ...}) = 0
mmap(NULL, 3533704, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f7646bd5000
mprotect(0x7f7646d2a000, 2097152, PROT_NONE) = 0
mmap(0x7f7646f2a000, 20480, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x155000) = 0x7f7646f2a000
mmap(0x7f7646f2f000, 19336, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f7646f2f000
close(3)                                = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f7647149000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f7647148000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f7647147000
arch_prctl(ARCH_SET_FS, 0x7f7647148700) = 0
mprotect(0x7f7646f2a000, 16384, PROT_READ) = 0
mprotect(0x600000, 4096, PROT_READ)     = 0
mprotect(0x7f7647151000, 4096, PROT_READ) = 0
munmap(0x7f764714a000, 22777)           = 0
brk(0)                                  = 0xded000
brk(0xe0e000)                           = 0xe0e000
open("/proc/sys/vm/mmap_min_addr", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f764714f000
read(3, 0x7f764714f000, 1024)           = -1 EPERM (Operation not permitted)
fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 16), ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f764714e000
write(1, "cannot read value from /proc/sys"..., 50cannot read value from /proc/sys/vm/mmap_min_addr
) = 50
close(3)                                = 0
munmap(0x7f764714f000, 4096)            = 0
exit_group(0)                           = ?

Regards,

-- 
uin:136542059                jid:Martin.Jansa@gmail.com
Jansa Martin                 sip:jamasip@voip.wengo.fr 
JaMa                         



  reply	other threads:[~2010-05-13  9:27 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-12 21:30 some possible fixes in the OE web pages Robert P. J. Day
2010-05-13  5:53 ` Roman I Khimov
2010-05-13  6:40   ` Martin Jansa
2010-05-13  8:23     ` Roman I Khimov
2010-05-13  8:46       ` Martin Jansa
2010-05-13  8:59         ` Roman I Khimov
2010-05-13  9:23           ` Martin Jansa [this message]
2010-05-13  9:38             ` QEMU mmap_min_addr issue Was: " Martin Jansa
2010-05-13 10:11               ` Martin Jansa
2010-05-13 12:20       ` Robert P. J. Day
2010-05-13 12:32         ` Martin Jansa
2010-05-13 12:53           ` Robert P. J. Day
2010-05-13 10:17     ` Robert P. J. Day
2010-05-13 10:18       ` Robert P. J. Day
2010-05-13  9:57   ` Robert P. J. Day

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=20100513092320.GE3370@jama \
    --to=martin.jansa@gmail.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox