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

Re: [Xen-devel] [PATCH] Misaligned IO reads




On 31 Jul 2006, at 22:29, Ross Maxfield wrote:

This patch fixes a data corruption bug in hvm_pio_assist() of
xen/arch/x86/hvm/io.c.  When the OVERLAP flag is set and the guest is
running in real-mode regs->es is used in the generation of the
destination address passed to hvm_copy().  regs->es, however, has not
been initialized and bad happens.  Since __vmread() must be called to
obtain regs->es to remedy the bug, this patch instead calls __vmread to
obtain the GUEST_LINEAR_ADDRESS which removes the need to check if the
guest is in real-mode and hence also the need to adjust addr.  Since
this block of code is executed so rarely, there is no measurable
performance impact using this fix for real or protected mode guests.

This is not the right fix -- VMX-specific code in a generic HVM function, and it's too localised. I've made an alternative fix in c/s 10894 which will initialise those extra fields in the regs structure for all PIO requests. Please test when it reaches the public tree.

 Thanks,
 Keir


_______________________________________________
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®.