Bug 207843 - Illegal instruction errors
Summary: Illegal instruction errors
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: qemu
Version: rawhide
Hardware: i686
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Hans de Goede
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-09-24 15:32 UTC by James Morris
Modified: 2007-11-30 22:11 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-11-14 20:58:13 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
Fix for FC6 guest illegal instructions from QEMU CVS (1.91 KB, patch)
2006-11-02 03:25 UTC, 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-02 03:26 UTC, Kevin Kofler
no flags Details | Diff

Description James Morris 2006-09-24 15:32:41 UTC
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-02 03:23:25 UTC
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-02 03:25:50 UTC
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-02 03:26:50 UTC
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-03 04:04:24 UTC
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 07:37:11 UTC
Unfortunately, I don't have CVS access (as I don't own any package yet).

Comment 6 David Woodhouse 2006-11-03 07:44:46 UTC
Want to own qemu? :)

Comment 7 Kevin Kofler 2006-11-12 09:02:44 UTC
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 13:11:34 UTC
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 14:56:15 UTC
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 22:39:07 UTC
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-14 01:15:48 UTC
(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-14 04:16:23 UTC
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 06:53:05 UTC
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 06:55:49 UTC
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 14:05:28 UTC
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 15:34:03 UTC
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 20:58:13 UTC
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 21:29:04 UTC
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 21:38:09 UTC
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.