Re: [KVM PATCH v8 3/3] KVM: add iosignalfd support



Michael S. Tsirkin wrote:
On Mon, Jun 22, 2009 at 09:04:48AM -0400, Gregory Haskins wrote:

Sorry, Michael. I missed that you had other comments after the
grammatical one. Will answer inline

Michael S. Tsirkin wrote:

On Mon, Jun 22, 2009 at 08:13:48AM -0400, Gregory Haskins wrote:



If thats true, we are in trouble ;)


I think it works at least on x86:
http://en.wikipedia.org/wiki/Packed#x86_and_x86-64


Right, understood. What I meant specifically is that if the (void*)val
pointer is allowed to be misaligned we are in trouble ;). I haven't
studied the implementation in front of the MMIO callback recently, but I
generally doubt thats the case. More than likely this is some buffer
that was kmalloced and that should already be aligned to the machine word.

Kind Regards,
-Greg



Yes, from what I saw of the code I think it can be BUG_ON.
Avi?



The question to ask is whether a guest can influence that condition. If
they can, its an attack vector to crash the host. I suspect they can't,
however. Therefore, your recommendation is perhaps a good approach so
this condition cannot ever go unnoticed. Avi?

-Greg

Attachment: signature.asc
Description: OpenPGP digital signature



Relevant Pages