Re: [Qemu-devel] [PATCH] block: Fix qemu crash when using scsi-block

2017-12-01 Thread Deepa Srinivasan
Kevin, Paolo, Stefan, Are there any further comments on this patch? Can this patch be committed? Thanks Deepa > On Nov 23, 2017, at 8:55 AM, Deepa Srinivasan > wrote: > > Starting qemu with the following arguments causes qemu to segfault: > ... -device lsi,id=lsi0 -drive file=iscsi:<...>,form

Re: [Qemu-devel] [PATCH] block: Fix qemu crash when using scsi-block

2017-11-27 Thread Deepa Srinivasan
> On Nov 23, 2017, at 9:29 AM, Kevin Wolf wrote: > > Am 23.11.2017 um 18:05 hat Deepa Srinivasan geschrieben: >> blk_aio_prwv() now takes a void pointer and the coroutine functions >> have been modified to cast it into QEMUIOVector if needed. It does not >> use an union in BlkRwCo since this lea

Re: [Qemu-devel] [PATCH] block: Fix qemu crash when using scsi-block

2017-11-23 Thread Kevin Wolf
Am 23.11.2017 um 18:31 hat Paolo Bonzini geschrieben: > On 23/11/2017 18:29, Kevin Wolf wrote: > >> Note that a similar issue exists in > >> blk_ioctl()/blk_ioctl_entry()/blk_prw() where blk_prw() always creates > >> the QEMUIOVector even if blk_ioctl()/blk_ioctl_entry() does not need a > >> QEMUIO

Re: [Qemu-devel] [PATCH] block: Fix qemu crash when using scsi-block

2017-11-23 Thread Paolo Bonzini
On 23/11/2017 18:29, Kevin Wolf wrote: >> Note that a similar issue exists in >> blk_ioctl()/blk_ioctl_entry()/blk_prw() where blk_prw() always creates >> the QEMUIOVector even if blk_ioctl()/blk_ioctl_entry() does not need a >> QEMUIOVector. This will need to be fixed separately to keep it >> cons

Re: [Qemu-devel] [PATCH] block: Fix qemu crash when using scsi-block

2017-11-23 Thread Kevin Wolf
Am 23.11.2017 um 18:05 hat Deepa Srinivasan geschrieben: > blk_aio_prwv() now takes a void pointer and the coroutine functions > have been modified to cast it into QEMUIOVector if needed. It does not > use an union in BlkRwCo since this leads to code - blk_aio_prwv() > would have to write to the vo

Re: [Qemu-devel] [PATCH] block: Fix qemu crash when using scsi-block

2017-11-23 Thread Paolo Bonzini
On 23/11/2017 18:05, Deepa Srinivasan wrote: > blk_aio_prwv() now takes a void pointer and the coroutine functions > have been modified to cast it into QEMUIOVector if needed. It does > not use an union in BlkRwCo since this leads to code - blk_aio_prwv() > would have to write to the void pointer m

Re: [Qemu-devel] [PATCH] block: Fix qemu crash when using scsi-block

2017-11-23 Thread Deepa Srinivasan
blk_aio_prwv() now takes a void pointer and the coroutine functions have been modified to cast it into QEMUIOVector if needed. It does not use an union in BlkRwCo since this leads to code - blk_aio_prwv() would have to write to the void pointer member, but coroutines would sometimes read the QEM

[Qemu-devel] [PATCH] block: Fix qemu crash when using scsi-block

2017-11-23 Thread Deepa Srinivasan
Starting qemu with the following arguments causes qemu to segfault: ... -device lsi,id=lsi0 -drive file=iscsi:<...>,format=raw,if=none,node-name= iscsi1 -device scsi-block,bus=lsi0.0,id=<...>,drive=iscsi1 This patch fixes blk_aio_ioctl() so it does not pass stack addresses to blk_aio_ioctl_entry()

Re: [Qemu-devel] [PATCH] block: Fix qemu crash when using scsi-block

2017-11-23 Thread Paolo Bonzini
On 23/11/2017 11:23, Stefan Hajnoczi wrote: > You are right. I audited the blk_aio_preadv() callers and they all keep > qiov around until the request is complete. > > Actually this makes sense because even in the simple non-coroutine case > with aio=threads the qiov hasn't necessarily been read y

Re: [Qemu-devel] [PATCH] block: Fix qemu crash when using scsi-block

2017-11-23 Thread Stefan Hajnoczi
On Wed, Nov 22, 2017 at 07:04:26PM +0100, Kevin Wolf wrote: > Am 22.11.2017 um 18:06 hat Stefan Hajnoczi geschrieben: > > On Wed, Nov 22, 2017 at 07:33:28AM -0800, Deepa Srinivasan wrote: > > > Starting qemu with the following arguments causes qemu to segfault: > > > ... -device lsi,id=lsi0 -drive

Re: [Qemu-devel] [PATCH] block: Fix qemu crash when using scsi-block

2017-11-22 Thread Kevin Wolf
Am 22.11.2017 um 17:34 hat Paolo Bonzini geschrieben: > On 22/11/2017 16:33, Deepa Srinivasan wrote: > > Starting qemu with the following arguments causes qemu to segfault: > > ... -device lsi,id=lsi0 -drive > > file=iscsi:<...>,format=raw,if=none,node-name= > > iscsi1 -device scsi-block,bus=lsi0.

Re: [Qemu-devel] [PATCH] block: Fix qemu crash when using scsi-block

2017-11-22 Thread Kevin Wolf
Am 22.11.2017 um 18:06 hat Stefan Hajnoczi geschrieben: > On Wed, Nov 22, 2017 at 07:33:28AM -0800, Deepa Srinivasan wrote: > > Starting qemu with the following arguments causes qemu to segfault: > > ... -device lsi,id=lsi0 -drive > > file=iscsi:<...>,format=raw,if=none,node-name= > > iscsi1 -devi

Re: [Qemu-devel] [PATCH] block: Fix qemu crash when using scsi-block

2017-11-22 Thread Stefan Hajnoczi
On Wed, Nov 22, 2017 at 07:33:28AM -0800, Deepa Srinivasan wrote: > Starting qemu with the following arguments causes qemu to segfault: > ... -device lsi,id=lsi0 -drive file=iscsi:<...>,format=raw,if=none,node-name= > iscsi1 -device scsi-block,bus=lsi0.0,id=<...>,drive=iscsi1 > > This patch fixes

Re: [Qemu-devel] [PATCH] block: Fix qemu crash when using scsi-block

2017-11-22 Thread Paolo Bonzini
On 22/11/2017 16:33, Deepa Srinivasan wrote: > Starting qemu with the following arguments causes qemu to segfault: > ... -device lsi,id=lsi0 -drive file=iscsi:<...>,format=raw,if=none,node-name= > iscsi1 -device scsi-block,bus=lsi0.0,id=<...>,drive=iscsi1 > > This patch fixes blk_aio_ioctl() so it

[Qemu-devel] [PATCH] block: Fix qemu crash when using scsi-block

2017-11-22 Thread Deepa Srinivasan
Starting qemu with the following arguments causes qemu to segfault: ... -device lsi,id=lsi0 -drive file=iscsi:<...>,format=raw,if=none,node-name= iscsi1 -device scsi-block,bus=lsi0.0,id=<...>,drive=iscsi1 This patch fixes blk_aio_ioctl() so it does not pass stack addresses to blk_aio_ioctl_entry()