Re: [PATCH v2] Stop vhost-user sending uninitialized mmap_offsets

2020-06-23 Thread Stefan Hajnoczi
On Mon, Jun 22, 2020 at 11:50:44PM +, Raphael Norwitz wrote: > Prior to this change, the vhost_user_fill_msg_region function filled out > all elements of the VhostUserMemoryRegion struct except the mmap_offset. > > This function is often called on uninitialized structs, which are then >

Re: [PATCH v2] Stop vhost-user sending uninitialized mmap_offsets

2020-06-23 Thread Michael S. Tsirkin
On Tue, Jun 23, 2020 at 09:58:23AM +0100, Peter Maydell wrote: > On Tue, 23 Jun 2020 at 00:50, Raphael Norwitz > wrote: > > > > Prior to this change, the vhost_user_fill_msg_region function filled out > > all elements of the VhostUserMemoryRegion struct except the mmap_offset. > > > > This

Re: [PATCH v2] Stop vhost-user sending uninitialized mmap_offsets

2020-06-23 Thread Peter Maydell
On Tue, 23 Jun 2020 at 00:50, Raphael Norwitz wrote: > > Prior to this change, the vhost_user_fill_msg_region function filled out > all elements of the VhostUserMemoryRegion struct except the mmap_offset. > > This function is often called on uninitialized structs, which are then > copied into

[PATCH v2] Stop vhost-user sending uninitialized mmap_offsets

2020-06-22 Thread Raphael Norwitz
Prior to this change, the vhost_user_fill_msg_region function filled out all elements of the VhostUserMemoryRegion struct except the mmap_offset. This function is often called on uninitialized structs, which are then copied into VHOST_USER_SET_MEM_TABLE and VHOST_USER_ADD/REM_MEM_REG messages. In