Re: [Qemu-devel] [PATCH RFC for-2.2] virtio-blk: force 1st s/g to match header

2014-12-01 Thread Michael S. Tsirkin
On Mon, Dec 01, 2014 at 12:07:07PM +, Peter Maydell wrote: > On 30 November 2014 at 16:43, Michael S. Tsirkin wrote: > > The result of this is host mapping leak. > > What effect does this have? Can this DOS host? > > I don't think we can DOS the host here. > > If Xen, we crash (but you can't

Re: [Qemu-devel] [PATCH RFC for-2.2] virtio-blk: force 1st s/g to match header

2014-12-01 Thread Peter Maydell
On 30 November 2014 at 16:43, Michael S. Tsirkin wrote: > The result of this is host mapping leak. > What effect does this have? Can this DOS host? I don't think we can DOS the host here. If Xen, we crash (but you can't use virtio-blk with Xen anyway) Otherwise, if you managed to get address_spa

Re: [Qemu-devel] [PATCH RFC for-2.2] virtio-blk: force 1st s/g to match header

2014-11-30 Thread Michael S. Tsirkin
On Fri, Nov 28, 2014 at 04:14:35PM +, Peter Maydell wrote: > On 28 November 2014 at 11:43, Stefan Hajnoczi wrote: > > Right, the test case explicitly tests different descriptor layouts, > > even though virtio-blk-pci does not set the ANY_LAYOUT feature bit. > > > > Either the test case needs t

Re: [Qemu-devel] [PATCH RFC for-2.2] virtio-blk: force 1st s/g to match header

2014-11-28 Thread Peter Maydell
On 28 November 2014 at 11:43, Stefan Hajnoczi wrote: > Right, the test case explicitly tests different descriptor layouts, > even though virtio-blk-pci does not set the ANY_LAYOUT feature bit. > > Either the test case needs to check ANY_LAYOUT before using the > 2-descriptor layout or it needs to

Re: [Qemu-devel] [PATCH RFC for-2.2] virtio-blk: force 1st s/g to match header

2014-11-28 Thread Marc Marí
El Fri, 28 Nov 2014 11:43:59 + Stefan Hajnoczi escribió: > On Fri, Nov 28, 2014 at 7:05 AM, Jason Wang > wrote: > > > > > > On Fri, Nov 28, 2014 at 9:16 AM, Fam Zheng wrote: > >> > >> On Thu, 11/27 23:13, Michael S. Tsirkin wrote: > >>> > >>> On Thu, Nov 27, 2014 at 07:21:35PM +, Stefan

Re: [Qemu-devel] [PATCH RFC for-2.2] virtio-blk: force 1st s/g to match header

2014-11-28 Thread Stefan Hajnoczi
On Fri, Nov 28, 2014 at 7:05 AM, Jason Wang wrote: > > > On Fri, Nov 28, 2014 at 9:16 AM, Fam Zheng wrote: >> >> On Thu, 11/27 23:13, Michael S. Tsirkin wrote: >>> >>> On Thu, Nov 27, 2014 at 07:21:35PM +, Stefan Hajnoczi wrote: >>> > On Thu, Nov 27, 2014 at 4:33 PM, Michael S. Tsirkin >>>

Re: [Qemu-devel] [PATCH RFC for-2.2] virtio-blk: force 1st s/g to match header

2014-11-27 Thread Jason Wang
On Fri, Nov 28, 2014 at 9:16 AM, Fam Zheng wrote: On Thu, 11/27 23:13, Michael S. Tsirkin wrote: On Thu, Nov 27, 2014 at 07:21:35PM +, Stefan Hajnoczi wrote: > On Thu, Nov 27, 2014 at 4:33 PM, Michael S. Tsirkin wrote: > > We leak cpu mappings when 1st s/g is not exactly the > > he

Re: [Qemu-devel] [PATCH RFC for-2.2] virtio-blk: force 1st s/g to match header

2014-11-27 Thread Fam Zheng
On Thu, 11/27 23:13, Michael S. Tsirkin wrote: > On Thu, Nov 27, 2014 at 07:21:35PM +, Stefan Hajnoczi wrote: > > On Thu, Nov 27, 2014 at 4:33 PM, Michael S. Tsirkin wrote: > > > We leak cpu mappings when 1st s/g is not exactly the > > > header. As we don't set ANY_LAYOUT, we can at this point

Re: [Qemu-devel] [PATCH RFC for-2.2] virtio-blk: force 1st s/g to match header

2014-11-27 Thread Michael S. Tsirkin
On Thu, Nov 27, 2014 at 07:21:35PM +, Stefan Hajnoczi wrote: > On Thu, Nov 27, 2014 at 4:33 PM, Michael S. Tsirkin wrote: > > We leak cpu mappings when 1st s/g is not exactly the > > header. As we don't set ANY_LAYOUT, we can at this point > > simply assert the correct length. > > > > This wil

Re: [Qemu-devel] [PATCH RFC for-2.2] virtio-blk: force 1st s/g to match header

2014-11-27 Thread Stefan Hajnoczi
On Thu, Nov 27, 2014 at 4:33 PM, Michael S. Tsirkin wrote: > We leak cpu mappings when 1st s/g is not exactly the > header. As we don't set ANY_LAYOUT, we can at this point > simply assert the correct length. > > This will have to be fixed once ANY_LAYOUT is set. > > Signed-off-by: Michael S. Tsir

[Qemu-devel] [PATCH RFC for-2.2] virtio-blk: force 1st s/g to match header

2014-11-27 Thread Michael S. Tsirkin
We leak cpu mappings when 1st s/g is not exactly the header. As we don't set ANY_LAYOUT, we can at this point simply assert the correct length. This will have to be fixed once ANY_LAYOUT is set. Signed-off-by: Michael S. Tsirkin --- Untested: posting for early feedback. hw/block/virtio-blk.c