This service will be undergoing maintenance at 00:00 UTC, 2016-09-28. It is expected to last about 1 hours
Bug 207843 - Illegal instruction errors
Illegal instruction errors
Status: CLOSED NEXTRELEASE
Product: Fedora
Classification: Fedora
Component: qemu (Show other bugs)
rawhide
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Hans de Goede
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-09-24 11:32 EDT by James Morris
Modified: 2007-11-30 17:11 EST (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-11-14 15:58:13 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
Fix for FC6 guest illegal instructions from QEMU CVS (1.91 KB, patch)
2006-11-01 22:25 EST, Kevin Kofler
no flags Details | Diff
Patch to the specfile to apply qemu-0.8.2-mb-nops.diff (1.00 KB, patch)
2006-11-01 22:26 EST, Kevin Kofler
no flags Details | Diff

  None (edit)
Description James Morris 2006-09-24 11:32:41 EDT
Some commands fail with illegal instruction errors running under qemu.

Host OS is fc6t2 base with some rawhide updates:

qemu-0.8.2-3.fc6
2.6.17-1.2174_FC5

Guest OS is a barebones install of fc6t2.

A couple of the init scripts fail with illegal instruction

"/etc/rc.d/rc.sysinit: line 299:   292 Illegal instruction"

and notably, the 'ps' command when logged in.

Otherwise, it seems pretty much ok, but I haven't tried doing much.

Also, this is a Pentium M laptop.
Comment 1 Kevin Kofler 2006-11-01 22:23:25 EST
And FC6 final won't even boot in QEMU due to the same issue. This affects both 
x86 and x86_64 guests.

There is a fix for this already in QEMU CVS, please apply! (Attaching.)
Comment 2 Kevin Kofler 2006-11-01 22:25:50 EST
Created attachment 140074 [details]
Fix for FC6 guest illegal instructions from QEMU CVS

This patch to target-i386/translate.c from QEMU CVS makes FC6 x86 and x86_64
guests work. It applies cleanly to the QEMU 0.8.2 Extras package.
Comment 3 Kevin Kofler 2006-11-01 22:26:50 EST
Created attachment 140075 [details]
Patch to the specfile to apply qemu-0.8.2-mb-nops.diff

This patch updates the QEMU specfile so the qemu-0.8.2-mb-nops.diff backported
from QEMU CVS is applied.
Comment 4 David Woodhouse 2006-11-02 23:04:24 EST
I am not one of the nutters who gets all protective about my Extras packages.
Please go ahead and commit and build it -- I'm not going to get round to this
any time soon because I'm insanely busy with OLPC stuff.
Comment 5 Kevin Kofler 2006-11-03 02:37:11 EST
Unfortunately, I don't have CVS access (as I don't own any package yet).
Comment 6 David Woodhouse 2006-11-03 02:44:46 EST
Want to own qemu? :)
Comment 7 Kevin Kofler 2006-11-12 04:02:44 EST
Uh, thanks for the offer, but:
* I'm so busy that I wasn't even able to answer in a timely manner,
* as a new contributor, I'd have to go through the sponsorship process, CLA 
signing, account requests and all that bureaucracy first,
* last I checked, the preferred way to get sponsored was still to provide some 
package of one's own rather than adopting an existing one.
Comment 8 Hans de Goede 2006-11-13 08:11:34 EST
I'm not a heavy user of qemu, but I wouldn't mind co-maintaining it and I could
push a fix for this, David, does that sound like a plan?
Comment 9 David Woodhouse 2006-11-13 09:56:15 EST
Works for me -- thanks.

I haven't actually got home since my last comment, and won't be getting home
before the end of this week either... :)
Comment 10 Hans de Goede 2006-11-13 17:39:07 EST
I've just finished building a qemu with the patches applied, but it won't run
unmodified on a default FC-6 system because of selinux troubles.

The problem is that it requires execmem which selinux disallows by default. The
fix for this is to add a "chcon -t unconfined_execmem_exec_t /usr/bin/qemu" to
%post + the necesarry magic to make this chcon permanent (which I do not know by
head, but have done before).

David, is it ok with you to add this special selinux %post? Otherwise qemu won't
work out of the box.
Comment 11 David Woodhouse 2006-11-13 20:15:48 EST
(In response to comment 10)

Fine by me if someone with a clue about SElinux says it's the correct fix.

Thanks again.
Comment 12 Daniel Walsh 2006-11-13 23:16:23 EST
I have added the fix in the file context, but it would be better to write a
policy for qemu, but for now I have labeled it unconfined_execmen_exec_t.

Fixed in selinux-policy-2.4.3-12
Comment 13 Hans de Goede 2006-11-14 01:53:05 EST
dwalsh, any chance on a selinux-policy update for FC-6 with this fix in soonish,
or would it be better to add the necessary %post magic as an intermediate
msolution for now?
Comment 14 Hans de Goede 2006-11-14 01:55:49 EST
p.s.

qemu installs multiple binaries which need execmem under /usr/bin, so the
context shpuld be applied for /usr/bin/qemu* not just /usr/bin/qemu
Comment 15 Daniel Walsh 2006-11-14 09:05:28 EST
I am trying to release once per week.  On Mondays I put out a test package and I
push it to release on Thursday/Friday.  

But next week is a short week because of Thanksgiving, in the US.

So I will push the current test release to final on Thursday and put this fix
out on Thursday to test.  With final being next Tuesday.

That soon enough?

Dan  
Comment 16 Hans de Goede 2006-11-14 10:34:03 EST
Yes, excellent, asked because I had no idea the policy got updated that often
for Core releases (I almost always use rawhide).
Comment 17 Hans de Goede 2006-11-14 15:58:13 EST
I've just completed building 0.8.2-4 for FC-5, 6 and devel, which should fix
this once they hit the repo. Note that FC-6 users with selinux enabled need to
disable enforcing (or do the chcon mentioned above) untill an updated policy
hits the FC-6 updates.
Comment 18 Till Maas 2006-11-14 16:29:04 EST
I am far away from beeing an selinux expert, but I read that semanage is the
tool to make changes permanent, but I do not know how well this works with
policy updates. The command would be something like:

semanage fcontext -a -t unconfined_execmem_exec_t /usr/bin/qemu*

Maybe the -a needs to be replaced by an -m.
Comment 19 Hans de Goede 2006-11-14 16:38:09 EST
yes, semanage is the %post magic I was talking about, but since the correct
context has been added to the policy there is no need for that anymore.

Note You need to log in before you can comment on or make changes to this bug.