Re: [PATCH v2 1/3] Fixed assert in vhost_user_set_mem_table_postcopy

2020-02-10 Thread Raphael Norwitz
Yes - it's just a cleanup. On Thu, Feb 06, 2020 at 03:20:01AM -0500, Michael S. Tsirkin wrote: > > On Thu, Feb 06, 2020 at 03:17:04AM -0500, Michael S. Tsirkin wrote: > > On Wed, Jan 15, 2020 at 09:57:04PM -0500, Raphael Norwitz wrote: > > > The current vhost_user_set_mem_table_postcopy() impleme

Re: [PATCH v2 1/3] Fixed assert in vhost_user_set_mem_table_postcopy

2020-02-06 Thread Michael S. Tsirkin
On Thu, Feb 06, 2020 at 03:17:04AM -0500, Michael S. Tsirkin wrote: > On Wed, Jan 15, 2020 at 09:57:04PM -0500, Raphael Norwitz wrote: > > The current vhost_user_set_mem_table_postcopy() implementation > > populates each region of the VHOST_USER_SET_MEM_TABLE message without > > first checking if t

Re: [PATCH v2 1/3] Fixed assert in vhost_user_set_mem_table_postcopy

2020-02-06 Thread Michael S. Tsirkin
On Wed, Jan 15, 2020 at 09:57:04PM -0500, Raphael Norwitz wrote: > The current vhost_user_set_mem_table_postcopy() implementation > populates each region of the VHOST_USER_SET_MEM_TABLE message without > first checking if there are more than VHOST_MEMORY_MAX_NREGIONS already > populated. This can c

[PATCH v2 1/3] Fixed assert in vhost_user_set_mem_table_postcopy

2020-01-27 Thread Raphael Norwitz
The current vhost_user_set_mem_table_postcopy() implementation populates each region of the VHOST_USER_SET_MEM_TABLE message without first checking if there are more than VHOST_MEMORY_MAX_NREGIONS already populated. This can cause memory corruption if too many regions are added to the message durin