All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [Bug 1625295] Re: qemu-arm dies with libarmmem inside ld.so.preload
Date: Tue, 20 Sep 2016 13:47:58 -0000	[thread overview]
Message-ID: <20160920134758.6513.7111.malone@gac.canonical.com> (raw)
In-Reply-To: 20160919174005.12059.42887.malonedeb@gac.canonical.com

This turns out to be nothing to do with setend. We're doing something wrong emulating the following nasty hack:
https://github.com/bavison/arm-mem/blob/master/architecture.S

.arm
architecture:
        sub     pc, pc, #1  @ is an interworking branch on ARMv7, not ARMv6
        and     a1, a4, a1  @ second word interpreted as 'B .+0xA' if Thumb
        mov     a1, #6
        bx      lr
.thumb
        mov     a1, #7
        bx      lr

so after the 'sub pc, pc, #1' (which in my debug trace is at address
0xb6f086dc) QEMU next tries to execute from 0xb6f086e2 in ARM mode,
which is neither of the two expected outcomes. As it happens we hit an
undefined instruction pretty much immediately afterwards:

0xb6f086e2:  0006e003      andeq        lr, r6, r3
0xb6f086e6:  ff1ee3a0      undefined instruction 0xff1ee3a0

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1625295

Title:
  qemu-arm dies with libarmmem inside ld.so.preload

Status in QEMU:
  New

Bug description:
  When running raspbian inside qemu,the user has to first comment out
  the following line from /etc/ld.so.conf:

  /usr/lib/arm-linux-gnueabihf/libarmmem.so

  
  Will future qemus will be able to work without changine /etc/ld.so.conf ?

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1625295/+subscriptions

  parent reply	other threads:[~2016-09-20 13:55 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-19 17:40 [Qemu-devel] [Bug 1625295] [NEW] qemu-arm dies with libarmmem inside ld.so.preload Stu
2016-09-19 20:27 ` [Qemu-devel] [Bug 1625295] " Peter Maydell
2016-09-19 23:02   ` Stu
2016-09-20  9:26     ` Peter Maydell
2016-09-20  9:53       ` Stu
2016-09-20 10:22 ` Peter Maydell
2016-09-20 12:50   ` Stu
2016-09-20 13:29 ` Peter Maydell
2016-09-20 13:41   ` Stu
2016-09-20 13:47 ` Peter Maydell [this message]
2016-09-20 14:27 ` Peter Maydell
2016-10-04 14:55 ` Peter Maydell
2016-10-05 10:11   ` Stu
2016-10-19 23:52 ` Stu
2016-10-20  7:41 ` Peter Maydell
2016-10-20 10:18   ` Stu
2017-01-11  6:54 ` Thomas Huth

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=20160920134758.6513.7111.malone@gac.canonical.com \
    --to=peter.maydell@linaro.org \
    --cc=1625295@bugs.launchpad.net \
    --cc=qemu-devel@nongnu.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.