Bug 207668

Summary: Running vm86old on an i686 RHEL4 PV guest causes it to stop
Product: Red Hat Enterprise Linux 4 Reporter: Chris Lalancette <clalance>
Component: kernelAssignee: Chris Lalancette <clalance>
Status: CLOSED ERRATA QA Contact: Brian Brock <bbrock>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.0CC: ddutile, jbaron, riel
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: RHBA-2007-0304 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-05-08 03:38:16 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 201622    
Attachments:
Description Flags
Fix i686 RHEL4 PV vm86old crash
none
Respin of the vm86old patch, to use load_esp0 instead of stack_switch none

Description Chris Lalancette 2006-09-22 13:33:24 UTC
Description of problem:

scrashme -f on an i686 RHEL4 PV stops working after it executes the "vm86old"
system call.  Executing this call by hand (scrashme -c 113 -f) also shows the
problem.  Hitting Ctrl-C will not kill the test, and the guest becomes
un-pingable.  On the other hand, executing "xm shutdown <domid>" from the dom0
seems to cleanly shutdown the domU, so it is not entirely dead, just unresponsive.  

In rawhide/fc6, executing this system command in a domU causes the calling
process to segmentation fault; RHEL4 domU's should probably do the same.

Comment 1 Chris Lalancette 2006-10-22 19:56:10 UTC
Created attachment 139086 [details]
Fix i686 RHEL4 PV vm86old crash

This patch fixes the crash when running vm86old (originally found by running
scrashme).  The problem was two-fold; basically a mis-merge of the code in
arch/i386/kernel/entry-xen.S, plus missing stack switches in
arch/i386/kernel/vm86.c.  The mis-merge was caused because RHEL-4 doesn't have
the "CONFIG_VM86" option, while 2.6.18 does; it basically means the code
necessary to return from vm86 mode wasn't being properly compiled into
entry-xen.S.  The missing HYPERVISOR_stack_switch in vm86.c was making it so
that we didn't use the kernel stack.  I don't completely understand this last
part, but it brings us in sync with 2.6.18, and seems to work.	Without this
patch, the RHEL-4 kernel goes into an endless loop (just consuming CPU time)
when vm86old was called; with this patch, that no longer happens, and it
SEGFAULTS when running scrashme (the same as the FC-6 xen kernel).

Comment 2 Chris Lalancette 2006-11-01 16:31:25 UTC
Created attachment 140003 [details]
Respin of the vm86old patch, to use load_esp0 instead of stack_switch

Comment 4 Jay Turner 2007-01-02 13:44:11 UTC
QE ack for RHEL4.5.

Comment 6 Jason Baron 2007-01-05 15:37:43 UTC
committed in stream U5 build 42.22. A test kernel with this patch is available
from http://people.redhat.com/~jbaron/rhel4/


Comment 9 Red Hat Bugzilla 2007-05-08 03:38:16 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2007-0304.html