|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [Qemu-devel] [PATCH v5 3/6] Qemu-Xen-vTPM: Xen frontend driver infrastructure
On 04/15/2015 10:44 AM, Stefan Berger wrote: On 04/10/2015 02:59 AM, Quan Xu wrote:This patch adds infrastructure for xen front drivers living in qemu, so drivers don't need to implement common stuff on their own. It's mostly xenbus management stuff: some functions to access XenStore, setting up XenStore watches, callbacks on device discovery and state changes, and handle event channel between the virtual machines. [...]
Yes.
No, this check needs to remain (on both send and recv), but buf_size should be replaced by PAGE_SIZE. This prevents an incorrectly large value for nr_extra_pages from causing the packet to be located outside of the shared page, resulting in TPM packets being written to some random heap address.
This check also needs to be against PAGE_SIZE.
Is *count even valid here? I would have assumed it was a purely out parameter, with buf_size as the maximum value it can be assigned. + + memcpy(buf, offset + (uint8_t *)shr, shr->length);use length rather than shr->length otherwise length goes unused. Agreed; the values from the shared page should not be read more than once, because an uncooperative peer could end up changing them. -- Daniel De Graaf National Security Agency _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |