Re: [PATCH] virtio_mem: prevent overflow with subblock size

2020-06-08 Thread kernel test robot
Hi "Michael, I love your patch! Perhaps something to improve: [auto build test WARNING on vhost/vhost] [also build test WARNING on next-20200608] [cannot apply to linus/master linux/master v5.7] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system.

Re: [PATCH] virtio_mem: prevent overflow with subblock size

2020-06-08 Thread Michael S. Tsirkin
On Mon, Jun 08, 2020 at 09:17:45AM +0200, David Hildenbrand wrote: > On 08.06.20 09:08, Michael S. Tsirkin wrote: > > On Mon, Jun 08, 2020 at 08:58:31AM +0200, David Hildenbrand wrote: > >> On 08.06.20 08:14, Michael S. Tsirkin wrote: > >>> If subblock size is large (e.g. 1G) 32 bit math involving

Re: [PATCH] virtio_mem: prevent overflow with subblock size

2020-06-08 Thread David Hildenbrand
On 08.06.20 09:12, teawater wrote: > > >> 2020年6月8日 14:58,David Hildenbrand 写道: >> >> On 08.06.20 08:14, Michael S. Tsirkin wrote: >>> If subblock size is large (e.g. 1G) 32 bit math involving it >>> can overflow. Rather than try to catch all instances of that, >>> let's tweak block size to 64

Re: [PATCH] virtio_mem: prevent overflow with subblock size

2020-06-08 Thread David Hildenbrand
On 08.06.20 09:08, Michael S. Tsirkin wrote: > On Mon, Jun 08, 2020 at 08:58:31AM +0200, David Hildenbrand wrote: >> On 08.06.20 08:14, Michael S. Tsirkin wrote: >>> If subblock size is large (e.g. 1G) 32 bit math involving it >>> can overflow. Rather than try to catch all instances of that, >>>

Re: [PATCH] virtio_mem: prevent overflow with subblock size

2020-06-08 Thread Michael S. Tsirkin
On Mon, Jun 08, 2020 at 08:58:31AM +0200, David Hildenbrand wrote: > On 08.06.20 08:14, Michael S. Tsirkin wrote: > > If subblock size is large (e.g. 1G) 32 bit math involving it > > can overflow. Rather than try to catch all instances of that, > > let's tweak block size to 64 bit. > > I fail to

Re: [PATCH] virtio_mem: prevent overflow with subblock size

2020-06-08 Thread David Hildenbrand
On 08.06.20 08:14, Michael S. Tsirkin wrote: > If subblock size is large (e.g. 1G) 32 bit math involving it > can overflow. Rather than try to catch all instances of that, > let's tweak block size to 64 bit. I fail to see where we could actually trigger an overflow. The reported warning looked

[PATCH] virtio_mem: prevent overflow with subblock size

2020-06-08 Thread Michael S. Tsirkin
If subblock size is large (e.g. 1G) 32 bit math involving it can overflow. Rather than try to catch all instances of that, let's tweak block size to 64 bit. It ripples through UAPI which is an ABI change, but it's not too late to make it, and it will allow supporting >4Gbyte blocks while might