From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54924) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UpvvQ-00028n-VQ for qemu-devel@nongnu.org; Fri, 21 Jun 2013 03:38:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UpvvP-00073R-RW for qemu-devel@nongnu.org; Fri, 21 Jun 2013 03:38:28 -0400 Received: from mail-ee0-x236.google.com ([2a00:1450:4013:c00::236]:50037) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UpvvP-00073J-LQ for qemu-devel@nongnu.org; Fri, 21 Jun 2013 03:38:27 -0400 Received: by mail-ee0-f54.google.com with SMTP id t10so4430335eei.41 for ; Fri, 21 Jun 2013 00:38:26 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <51C402EA.1020903@redhat.com> Date: Fri, 21 Jun 2013 09:38:18 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1371781955-2745-1-git-send-email-ronniesahlberg@gmail.com> In-Reply-To: <1371781955-2745-1-git-send-email-ronniesahlberg@gmail.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] iSCSI fix crash when using virtio and libiscsi List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Ronnie Sahlberg Cc: stefanha@gmail.com, 1191606@bugs.launchpad.net, lersek@redhat.com, qemu-devel@nongnu.org Il 21/06/2013 04:32, Ronnie Sahlberg ha scritto: > 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. Not necessarily, you may build against an older libiscsi from the distro. Can you resubmit with the checks intact? Paolo > I will send patches later to remove the current (LIBISCSI_FEATURE_IOVECTOR) checks in the rest of the file.