Re: [PATCH 1/3] Drivers: hv: vmbus: Add vmbus_requestor data structure for VMBus hardening

2020-06-29 Thread Andres Beltran
From: linux-hyperv-ow...@vger.kernel.org On Behalf Of Wei Liu. Sent: Friday, June 26, 2020 9:20 AM > > static int __vmbus_open(struct vmbus_channel *newchannel, > >void *userdata, u32 userdatalen, > >void (*onchannelcallback)(void *context), void

Re: [PATCH 1/3] Drivers: hv: vmbus: Add vmbus_requestor data structure for VMBus hardening

2020-06-29 Thread Wei Liu
On Mon, Jun 29, 2020 at 06:19:46PM +, Andres Beltran wrote: [...] > > > EXPORT_SYMBOL_GPL(vmbus_recvpacket_raw); > > > + > > > +/* > > > + * vmbus_next_request_id - Returns a new request id. It is also > > > + * the index at which the guest memory address is stored. > > > + * Uses a spin lock

Re: [PATCH 1/3] Drivers: hv: vmbus: Add vmbus_requestor data structure for VMBus hardening

2020-06-26 Thread Wei Liu
On Thu, Jun 25, 2020 at 11:37:21AM -0400, Andres Beltran wrote: > Currently, VMbus drivers use pointers into guest memory as request IDs > for interactions with Hyper-V. To be more robust in the face of errors > or malicious behavior from a compromised Hyper-V, avoid exposing > guest memory

[PATCH 1/3] Drivers: hv: vmbus: Add vmbus_requestor data structure for VMBus hardening

2020-06-25 Thread Andres Beltran
Currently, VMbus drivers use pointers into guest memory as request IDs for interactions with Hyper-V. To be more robust in the face of errors or malicious behavior from a compromised Hyper-V, avoid exposing guest memory addresses to Hyper-V. Also avoid Hyper-V giving back a bad request ID that is