qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] iSCSI fix crash when using virtio and libiscsi V3
@ 2013-06-23 15:07 Ronnie Sahlberg
  2013-06-23 15:07 ` [Qemu-devel] [PATCH] Fix iSCSI crash on SG_IO with an iovector Ronnie Sahlberg
  0 siblings, 1 reply; 10+ messages in thread
From: Ronnie Sahlberg @ 2013-06-23 15:07 UTC (permalink / raw)
  To: qemu-devel; +Cc: stefanha, 1191606, lersek, pbonzini

List,

Please find a new version of the patch to fix the iSCSI crash when ioctl with iovector is sent.

Updated to fix the commit message as per lerseks suggestion.
Also added an explicit cast to suppress a compiler warning when we dont have iovector support available.

^ permalink raw reply	[flat|nested] 10+ messages in thread
* [Qemu-devel] [PATCH] iSCSI fix crash when using virtio and libiscsi V2
@ 2013-06-22  1:37 Ronnie Sahlberg
  2013-06-22  1:37 ` [Qemu-devel] [PATCH] Fix iSCSI crash on SG_IO with an iovector Ronnie Sahlberg
  0 siblings, 1 reply; 10+ messages in thread
From: Ronnie Sahlberg @ 2013-06-22  1:37 UTC (permalink / raw)
  To: qemu-devel; +Cc: stefanha, 1191606, lersek, pbonzini

List,

Version 2 of patch to fix the crashbug for virtio and libiscsi

Make block/iscsi.c aware that we might be called not with ioh containing a buffer
for the data but that it might contain an array of io vectors.



Updated to check LIBISCSI_FEATURE_IOVECTOR wether we can use iovectors or not.
If not we fall back to either lots of datain buffers or a serialization dataout buffer.

regards
ronnie sahlberg

^ permalink raw reply	[flat|nested] 10+ messages in thread
* [Qemu-devel] [PATCH] iSCSI fix crash when using virtio and libiscsi
@ 2013-06-21  2:32 Ronnie Sahlberg
  2013-06-21  2:32 ` [Qemu-devel] [PATCH] Fix iSCSI crash on SG_IO with an iovector Ronnie Sahlberg
  0 siblings, 1 reply; 10+ messages in thread
From: Ronnie Sahlberg @ 2013-06-21  2:32 UTC (permalink / raw)
  To: qemu-devel; +Cc: stefanha, 1191606, lersek

Stefan, List

Please find a patch that fixes the crashes for using virtio with libiscsi.
The problem was that block/iscsi.c always assumed we got a plain buffer to read data into, and when we got an iovector array instead we would overwrite pointers with garbage and crash.

Since we can get iovectors for the write case as well I have added a fix for when the guest is writing data to the target to handle the iovector case as well.


The new calls added are not protected with (LIBISCSI_FEATURE_IOVECTOR) checks
since anyone building a new/current version of qemu should probably also build
against a current libiscsi.
I will send patches later to remove the current (LIBISCSI_FEATURE_IOVECTOR) checks in the rest of the file.


regards
ronnie sahlberg

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2013-06-25 10:42 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-23 15:07 [Qemu-devel] [PATCH] iSCSI fix crash when using virtio and libiscsi V3 Ronnie Sahlberg
2013-06-23 15:07 ` [Qemu-devel] [PATCH] Fix iSCSI crash on SG_IO with an iovector Ronnie Sahlberg
2013-06-23 15:23   ` Laszlo Ersek
2013-06-24 14:40   ` Paolo Bonzini
2013-06-25  9:24     ` Stefan Hajnoczi
2013-06-25 10:42       ` Paolo Bonzini
  -- strict thread matches above, loose matches on Subject: below --
2013-06-22  1:37 [Qemu-devel] [PATCH] iSCSI fix crash when using virtio and libiscsi V2 Ronnie Sahlberg
2013-06-22  1:37 ` [Qemu-devel] [PATCH] Fix iSCSI crash on SG_IO with an iovector Ronnie Sahlberg
2013-06-23 10:01   ` Laszlo Ersek
2013-06-25  9:21   ` Stefan Hajnoczi
2013-06-21  2:32 [Qemu-devel] [PATCH] iSCSI fix crash when using virtio and libiscsi Ronnie Sahlberg
2013-06-21  2:32 ` [Qemu-devel] [PATCH] Fix iSCSI crash on SG_IO with an iovector Ronnie Sahlberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).