qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PULL 0/2] Block patches for 2.5.0-rc3
@ 2015-12-02 16:20 Kevin Wolf
  2015-12-02 16:20 ` [Qemu-devel] [PULL 1/2] qcow2: Fix potential qemu-img check crash on 32 bit hosts Kevin Wolf
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Kevin Wolf @ 2015-12-02 16:20 UTC (permalink / raw)
  To: qemu-block; +Cc: kwolf, qemu-devel

The following changes since commit 9d7b969ea6d9663a94760c6c131481b366f4d38a:

  Merge remote-tracking branch 'remotes/rth/tags/pull-tcg-20151201' into staging (2015-12-02 10:16:53 +0000)

are available in the git repository at:


  git://repo.or.cz/qemu/kevin.git tags/for-upstream

for you to fetch changes up to ab7fe3a29ab1c6f5a1fff864e455d6d53dde62b5:

  Merge remote-tracking branch 'mreitz/tags/pull-block-for-kevin-2015-12-02' into queue-block (2015-12-02 16:38:03 +0100)

----------------------------------------------------------------

Block layer patches

----------------------------------------------------------------
Kevin Wolf (2):
      qcow2: Fix potential qemu-img check crash on 32 bit hosts
      Merge remote-tracking branch 'mreitz/tags/pull-block-for-kevin-2015-12-02' into queue-block

Michael S. Tsirkin (1):
      blkdebug: silence warning under qtest

 block/blkdebug.c       | 9 +++++++--
 block/qcow2-refcount.c | 2 +-
 2 files changed, 8 insertions(+), 3 deletions(-)

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

* [Qemu-devel] [PULL 1/2] qcow2: Fix potential qemu-img check crash on 32 bit hosts
  2015-12-02 16:20 [Qemu-devel] [PULL 0/2] Block patches for 2.5.0-rc3 Kevin Wolf
@ 2015-12-02 16:20 ` Kevin Wolf
  2015-12-02 16:21 ` [Qemu-devel] [PULL 2/2] blkdebug: silence warning under qtest Kevin Wolf
  2015-12-02 17:31 ` [Qemu-devel] [PULL 0/2] Block patches for 2.5.0-rc3 Peter Maydell
  2 siblings, 0 replies; 4+ messages in thread
From: Kevin Wolf @ 2015-12-02 16:20 UTC (permalink / raw)
  To: qemu-block; +Cc: kwolf, qemu-devel

This crash was caught with qemu-iotests test case 138.

Commit b6d36de already fixed a few 32 bit truncation bugs that could
cause qemu-img check to allocate too little memory and consequently
it would segfault. On 32 bit hosts, there is one more place that needs
to be fixed because size_t was involved in the calculation and is a
32 bit type there.

Cc: qemu-stable@nongnu.org
Reported-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Tested-by: Michael S. Tsirkin <mst@redhat.com>
---
 block/qcow2-refcount.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/block/qcow2-refcount.c b/block/qcow2-refcount.c
index 6e0e5bd..820f412 100644
--- a/block/qcow2-refcount.c
+++ b/block/qcow2-refcount.c
@@ -1244,7 +1244,7 @@ fail:
 /* refcount checking functions */
 
 
-static size_t refcount_array_byte_size(BDRVQcow2State *s, uint64_t entries)
+static uint64_t refcount_array_byte_size(BDRVQcow2State *s, uint64_t entries)
 {
     /* This assertion holds because there is no way we can address more than
      * 2^(64 - 9) clusters at once (with cluster size 512 = 2^9, and because
-- 
1.8.3.1

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

* [Qemu-devel] [PULL 2/2] blkdebug: silence warning under qtest
  2015-12-02 16:20 [Qemu-devel] [PULL 0/2] Block patches for 2.5.0-rc3 Kevin Wolf
  2015-12-02 16:20 ` [Qemu-devel] [PULL 1/2] qcow2: Fix potential qemu-img check crash on 32 bit hosts Kevin Wolf
@ 2015-12-02 16:21 ` Kevin Wolf
  2015-12-02 17:31 ` [Qemu-devel] [PULL 0/2] Block patches for 2.5.0-rc3 Peter Maydell
  2 siblings, 0 replies; 4+ messages in thread
From: Kevin Wolf @ 2015-12-02 16:21 UTC (permalink / raw)
  To: qemu-block; +Cc: kwolf, qemu-devel

From: "Michael S. Tsirkin" <mst@redhat.com>

make check always outputs warnings, this
is not nice.  Disable blkdebug warnings under qtest.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Message-id: 1448883874-17933-1-git-send-email-mst@redhat.com
Signed-off-by: Max Reitz <mreitz@redhat.com>
---
 block/blkdebug.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/block/blkdebug.c b/block/blkdebug.c
index 6860a2b..dee3a0e 100644
--- a/block/blkdebug.c
+++ b/block/blkdebug.c
@@ -30,6 +30,7 @@
 #include "qapi/qmp/qdict.h"
 #include "qapi/qmp/qint.h"
 #include "qapi/qmp/qstring.h"
+#include "sysemu/qtest.h"
 
 typedef struct BDRVBlkdebugState {
     int state;
@@ -583,9 +584,13 @@ static void suspend_request(BlockDriverState *bs, BlkdebugRule *rule)
     remove_rule(rule);
     QLIST_INSERT_HEAD(&s->suspended_reqs, &r, next);
 
-    printf("blkdebug: Suspended request '%s'\n", r.tag);
+    if (!qtest_enabled()) {
+        printf("blkdebug: Suspended request '%s'\n", r.tag);
+    }
     qemu_coroutine_yield();
-    printf("blkdebug: Resuming request '%s'\n", r.tag);
+    if (!qtest_enabled()) {
+        printf("blkdebug: Resuming request '%s'\n", r.tag);
+    }
 
     QLIST_REMOVE(&r, next);
     g_free(r.tag);
-- 
1.8.3.1

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

* Re: [Qemu-devel] [PULL 0/2] Block patches for 2.5.0-rc3
  2015-12-02 16:20 [Qemu-devel] [PULL 0/2] Block patches for 2.5.0-rc3 Kevin Wolf
  2015-12-02 16:20 ` [Qemu-devel] [PULL 1/2] qcow2: Fix potential qemu-img check crash on 32 bit hosts Kevin Wolf
  2015-12-02 16:21 ` [Qemu-devel] [PULL 2/2] blkdebug: silence warning under qtest Kevin Wolf
@ 2015-12-02 17:31 ` Peter Maydell
  2 siblings, 0 replies; 4+ messages in thread
From: Peter Maydell @ 2015-12-02 17:31 UTC (permalink / raw)
  To: Kevin Wolf; +Cc: QEMU Developers, Qemu-block

On 2 December 2015 at 16:20, Kevin Wolf <kwolf@redhat.com> wrote:
> The following changes since commit 9d7b969ea6d9663a94760c6c131481b366f4d38a:
>
>   Merge remote-tracking branch 'remotes/rth/tags/pull-tcg-20151201' into staging (2015-12-02 10:16:53 +0000)
>
> are available in the git repository at:
>
>
>   git://repo.or.cz/qemu/kevin.git tags/for-upstream
>
> for you to fetch changes up to ab7fe3a29ab1c6f5a1fff864e455d6d53dde62b5:
>
>   Merge remote-tracking branch 'mreitz/tags/pull-block-for-kevin-2015-12-02' into queue-block (2015-12-02 16:38:03 +0100)
>
> ----------------------------------------------------------------
>
> Block layer patches
>
> ----------------------------------------------------------------
> Kevin Wolf (2):
>       qcow2: Fix potential qemu-img check crash on 32 bit hosts
>       Merge remote-tracking branch 'mreitz/tags/pull-block-for-kevin-2015-12-02' into queue-block
>
> Michael S. Tsirkin (1):
>       blkdebug: silence warning under qtest
>
>  block/blkdebug.c       | 9 +++++++--
>  block/qcow2-refcount.c | 2 +-
>  2 files changed, 8 insertions(+), 3 deletions(-)

Applied, thanks.

-- PMM

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

end of thread, other threads:[~2015-12-02 17:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-02 16:20 [Qemu-devel] [PULL 0/2] Block patches for 2.5.0-rc3 Kevin Wolf
2015-12-02 16:20 ` [Qemu-devel] [PULL 1/2] qcow2: Fix potential qemu-img check crash on 32 bit hosts Kevin Wolf
2015-12-02 16:21 ` [Qemu-devel] [PULL 2/2] blkdebug: silence warning under qtest Kevin Wolf
2015-12-02 17:31 ` [Qemu-devel] [PULL 0/2] Block patches for 2.5.0-rc3 Peter Maydell

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).