Re: [PATCH v2 4/5] vhost: check vring address before calling unmap

2020-05-14 Thread Jason Wang
On 2020/5/13 下午5:36, Dima Stepanov wrote: On Wed, May 13, 2020 at 11:00:38AM +0800, Jason Wang wrote: On 2020/5/12 下午5:08, Dima Stepanov wrote: On Tue, May 12, 2020 at 11:26:11AM +0800, Jason Wang wrote: On 2020/5/11 下午5:11, Dima Stepanov wrote: On Mon, May 11, 2020 at 11:05:58AM +0800, Jas

Re: [PATCH v2 4/5] vhost: check vring address before calling unmap

2020-05-13 Thread Dima Stepanov
On Wed, May 13, 2020 at 11:00:38AM +0800, Jason Wang wrote: > > On 2020/5/12 下午5:08, Dima Stepanov wrote: > >On Tue, May 12, 2020 at 11:26:11AM +0800, Jason Wang wrote: > >>On 2020/5/11 下午5:11, Dima Stepanov wrote: > >>>On Mon, May 11, 2020 at 11:05:58AM +0800, Jason Wang wrote: > On 2020/4/30

Re: [PATCH v2 4/5] vhost: check vring address before calling unmap

2020-05-12 Thread Jason Wang
On 2020/5/12 下午5:08, Dima Stepanov wrote: On Tue, May 12, 2020 at 11:26:11AM +0800, Jason Wang wrote: On 2020/5/11 下午5:11, Dima Stepanov wrote: On Mon, May 11, 2020 at 11:05:58AM +0800, Jason Wang wrote: On 2020/4/30 下午9:36, Dima Stepanov wrote: Since disconnect can happen at any time durin

Re: [PATCH v2 4/5] vhost: check vring address before calling unmap

2020-05-12 Thread Dima Stepanov
On Tue, May 12, 2020 at 11:26:11AM +0800, Jason Wang wrote: > > On 2020/5/11 下午5:11, Dima Stepanov wrote: > >On Mon, May 11, 2020 at 11:05:58AM +0800, Jason Wang wrote: > >>On 2020/4/30 下午9:36, Dima Stepanov wrote: > >>>Since disconnect can happen at any time during initialization not all > >>>vri

Re: [PATCH v2 4/5] vhost: check vring address before calling unmap

2020-05-11 Thread Jason Wang
On 2020/5/11 下午5:11, Dima Stepanov wrote: On Mon, May 11, 2020 at 11:05:58AM +0800, Jason Wang wrote: On 2020/4/30 下午9:36, Dima Stepanov wrote: Since disconnect can happen at any time during initialization not all vring buffers (for instance used vring) can be intialized successfully. If the

Re: [PATCH v2 4/5] vhost: check vring address before calling unmap

2020-05-11 Thread Dima Stepanov
On Mon, May 11, 2020 at 11:05:58AM +0800, Jason Wang wrote: > > On 2020/4/30 下午9:36, Dima Stepanov wrote: > >Since disconnect can happen at any time during initialization not all > >vring buffers (for instance used vring) can be intialized successfully. > >If the buffer was not initialized then vh

Re: [PATCH v2 4/5] vhost: check vring address before calling unmap

2020-05-10 Thread Jason Wang
On 2020/4/30 下午9:36, Dima Stepanov wrote: Since disconnect can happen at any time during initialization not all vring buffers (for instance used vring) can be intialized successfully. If the buffer was not initialized then vhost_memory_unmap call will lead to SIGSEGV. Add checks for the vring a

Re: [PATCH v2 4/5] vhost: check vring address before calling unmap

2020-05-03 Thread Raphael Norwitz
On Thu, Apr 30, 2020 at 9:50 AM Dima Stepanov wrote: > > Since disconnect can happen at any time during initialization not all > vring buffers (for instance used vring) can be intialized successfully. > If the buffer was not initialized then vhost_memory_unmap call will lead > to SIGSEGV. Add chec

[PATCH v2 4/5] vhost: check vring address before calling unmap

2020-04-30 Thread Dima Stepanov
Since disconnect can happen at any time during initialization not all vring buffers (for instance used vring) can be intialized successfully. If the buffer was not initialized then vhost_memory_unmap call will lead to SIGSEGV. Add checks for the vring address value before calling unmap. Also add as