[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH][HVM] Inject #GP for un-emulated instructions rather than crash guest


  • To: "Keir Fraser" <Keir.Fraser@xxxxxxxxxxxx>, "xen-devel" <xen-devel@xxxxxxxxxxxxxxxxxxx>
  • From: "Cui, Dexuan" <dexuan.cui@xxxxxxxxx>
  • Date: Tue, 27 Nov 2007 12:37:23 +0800
  • Delivery-date: Mon, 26 Nov 2007 20:39:49 -0800
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>
  • Thread-index: AcgwqGajcxL9lyZSSkG/2aFRcODxtwABFqOQ
  • Thread-topic: [PATCH][HVM] Inject #GP for un-emulated instructions rather than crash guest

The CrashMe stress test (a process repeatedly forks child processes, and
the child processes initialize a buffer with random numbers, then treat
the buffer as code, and execute it) can crash 32-bit HVM RHEL5.1 guest
easily; this is because we haven't emulated all the instructions in
handle_mmio() yet.

The CrashMe process runs with root rights, and can access MMIO space in
an unknown way ("strace -f" shows the random codes running at CPL=3
don't call mmap(), and don't open any special files in /dev/ "); the gpa
may look like 0xa**** or  0xb****, or 0xfee0****.  
After running CrashMe for several hours, I have found 24 un-emulated
instructions may be hit...

This patch may serve as a workaround.

Signed-off-by: Dexuan Cui <dexuan.cui@xxxxxxxxx>

Attachment: inject_#GP_for_unemulated_instruction.patch
Description: inject_#GP_for_unemulated_instruction.patch

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.