All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Weil <sw@weilnetz.de>
To: Michael Tokarev <mjt@tls.msk.ru>
Cc: Riku Voipio <riku.voipio@linaro.org>,
	qemu-devel <qemu-devel@nongnu.org>,
	Aurelien Jarno <aurelien@aurel32.net>,
	Alexander Graf <agraf@suse.de>
Subject: Re: [Qemu-devel] (bisected): Is mips-user broken on 64bit host since v1.1?
Date: Tue, 18 Dec 2012 22:30:51 +0100	[thread overview]
Message-ID: <50D0E08B.7090606@weilnetz.de> (raw)
In-Reply-To: <50D0BE65.4@msgid.tls.msk.ru>

Am 18.12.2012 20:05, schrieb Michael Tokarev:
> On 18.12.2012 20:10, Michael Tokarev wrote:
>> Since at least 1.1 version of qemu, I can't run any
>> mips binary using statically linked qemu-mips on x86_64
>> host.  It immediately fails with SIGSEGV:
>>
>> # chroot mipsroot /bin/bash
>> qemu: uncaught target signal 11 (Segmentation fault) - core dumped
>>
>> mipsroot/bin/bash: ELF 32-bit MSB executable, MIPS, MIPS-II version 1 (SYSV),
>>   dynamically linked (uses shared libs), for GNU/Linux 2.6.26,
>>   BuildID[sha1]=0xeb1a3595d733e28f4f081beabb1f135bc5bf7527,
>>   with unknown capability 0x41000000 = 0xf676e75,
>>   with unknown capability 0x10000 = 0x70401,
>>   stripped
>>
>> (this is current Debian install of mips architecture).
>>
>> At the same time, 32bit qemu-mips works just fine:
>>
>>
>> # cp -p /usr/bin/qemu-mips-static-32 mipsroot/usr/bin/
>> # chroot mipsroot /bin/bash
>> I have no name!@gandalf:/# ls
>> bin   dev  home  lib64	proc  run   selinux  tmp  var
>> boot  etc  lib	 mnt	root  sbin  sys      usr
>> I have no name!@gandalf:/# uname -a
>> Linux gandalf 3.2.0-amd64 #3.2.30 SMP Thu Sep 20 18:50:45 MSK 2012 mips GNU/Linux
>>
>> Current qemu git behaves the same - it also segfaults
>> when trying to run a 32bit mips binary from x86_64
>> host qemu-mips binary.
>>
>> There are numerous bugreports about this issue on Debian
>> as well.
>>
>> Is it just Debian, or is something really broken there?
>> I'd think that running 32bit mips code on x86_64 host
>> is quite common, no?
>
> This is broken (bisected to) since
>
> commit 288e65b9eea0c9b3cbe21be46f3e24e4e8b2a090
> Author: Alexander Graf<agraf@suse.de>
> Date:   Wed Dec 14 00:33:28 2011 +0100
>
>      linux-user: reserve 4GB of vmem for 32-on-64
>
>      When running 32-on-64 bit guests, we should always reserve as much
>      virtual memory as we possibly can for the guest process, so it can
>      never overlap with QEMU address space.
>
>      Fortunately we already have the infrastructure for that. All that's
>      missing is some sane default value to also make use of it!
>
>      Signed-off-by: Alexander Graf<agraf@suse.de>
>      Signed-off-by: Riku Voipio<riku.voipio@linaro.org>
>
> (Cc'ing).
>
> Reverting this commit on top of qemu-1.1, 1.2 or 1.3 makes
> it work again.
>
> This commit has been applied in the middle between 1.0 and 1.1
> versions of qemu.  It is interesting that no one noticed this
> before now, when 1.3 is out already.  Oh well.
>
> Thanks,
>
> /mjt

I'm afraid that the main focus of most testers is system emulation
and must admit that I run user emulation very rarely.

Nevertheless it should be possible to add some statically linked
binaries for each architecture to the buildbot machines and add
tests which run these binaries.

Regards,

Stefan Weil

  reply	other threads:[~2012-12-18 21:30 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-18 16:10 [Qemu-devel] Is mips-user broken on 64bit host? Michael Tokarev
2012-12-18 19:05 ` [Qemu-devel] (bisected): Is mips-user broken on 64bit host since v1.1? Michael Tokarev
2012-12-18 21:30   ` Stefan Weil [this message]
2012-12-18 21:33   ` Alexander Graf
2012-12-19  6:26     ` Michael Tokarev
2012-12-21  0:19 ` [Qemu-devel] Is mips-user broken on 64bit host? Richard Henderson

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=50D0E08B.7090606@weilnetz.de \
    --to=sw@weilnetz.de \
    --cc=agraf@suse.de \
    --cc=aurelien@aurel32.net \
    --cc=mjt@tls.msk.ru \
    --cc=qemu-devel@nongnu.org \
    --cc=riku.voipio@linaro.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.