[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH V6 5/5] xen: Handle resumed instruction based on previous mem_event reply
My view of the mem event interface is that it should err on the side of informing the consumer. Now, if the consumer doesn't sign up for something, why bother (i.e. we don't inform of writes, if the access mode set for the gfn does not mask writes, etc). In an ideal world, the emulation of the instruction should raise all relevant new mem events. We don't know a priori what the consumer might learn throughout the execution of this specific instruction. Does it read from or write to new gfns which have mem access masks set? TTBOMK, because the emulation does not go through the EPT fault handler, no mem access events will be generated, even if they should. This is a long-standing shortcoming of mem event in security frameworks, in that mem access is only defined as raising events through EPT faults. One could conceivably craft an attack by having an instruction that through its emulation reads/writes a massive buffer going into other gfns. Conversely, "virtual DMA", i.e. qemu accesses via map_foreign_pages and grant accesses form backends don't raise mem access events. So there are many (conceptual) holes. A decent thing to do for now would be to add a flag ..._EMULATE_SILENT, which resolves to the current behavior, and lack of ..._EMULATE_SILENT in a brave future would raise all the mem access events resulting from the full emulation of this instruction. Fix the API at least, before it's set in stone. Thanks Andres Â
_______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |