From 8692514befdd492aa010caf7d59e1a2a410a68f9edbf2d60a169b342142419e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Mon, 12 Oct 2015 14:39:21 +0000 Subject: [PATCH] Accepting request 337299 from home:a_faerber:branches:Virtualization Fix endianness issues in DictZip block driver (bsc#937572, bsc#945778) OBS-URL: https://build.opensuse.org/request/show/337299 OBS-URL: https://build.opensuse.org/package/show/Virtualization/qemu?expand=0&rev=273 --- ...-block-Add-support-for-DictZip-enabl.patch | 40 ++--- 0028-block-Add-tar-container-format.patch | 40 ++--- ...-Legacy-Patch-kvm-qemu-preXX-dictzip.patch | 10 +- ...-console-add-question-mark-escape-op.patch | 2 +- ...-Make-char-muxer-more-robust-wrt-sma.patch | 2 +- ...-linux-user-lseek-explicitly-cast-no.patch | 2 +- ...-virtfs-proxy-helper-Provide-__u64-f.patch | 2 +- ...-configure-Enable-PIE-for-ppc-and-pp.patch | 2 +- 0035-qtest-Increase-socket-timeout.patch | 2 +- ...-AIO-Reduce-number-of-threads-for-32.patch | 2 +- ...-Revert-Revert-seccomp-tests-that-al.patch | 2 +- ...-tcg-aarch64-Fix-tcg_out_qemu_-ld-st.patch | 2 +- ...-tests-Unique-test-path-for-string-v.patch | 2 +- 0040-dictzip-Fix-on-big-endian-systems.patch | 142 ++++++++++++++++++ libcacard.changes | 7 + libcacard.spec | 2 + qemu-linux-user.changes | 7 + qemu-linux-user.spec | 2 + qemu-testsuite.changes | 9 ++ qemu-testsuite.spec | 2 + qemu.changes | 9 ++ qemu.spec | 2 + 22 files changed, 225 insertions(+), 67 deletions(-) create mode 100644 0040-dictzip-Fix-on-big-endian-systems.patch diff --git a/0027-block-Add-support-for-DictZip-enabl.patch b/0027-block-Add-support-for-DictZip-enabl.patch index f575536a..b6f56c6b 100644 --- a/0027-block-Add-support-for-DictZip-enabl.patch +++ b/0027-block-Add-support-for-DictZip-enabl.patch @@ -1,4 +1,4 @@ -From 22e3f94ab2885d9618711a9eac9d751fb2543028 Mon Sep 17 00:00:00 2001 +From 3058cb28a3852a02ef20cb5fa6e17f89880bd2cb Mon Sep 17 00:00:00 2001 From: Alexander Graf Date: Wed, 5 Aug 2009 09:49:37 +0200 Subject: [PATCH] block: Add support for DictZip enabled gzip files @@ -33,31 +33,32 @@ Signed-off-by: Tim Hardeck BlockDriverCompletionFunc -> BlockCompletionFunc, qemu_aio_release() -> qemu_aio_unref(), drop dictzip_aio_cancel()] +[AF: common-obj-y -> block-obj-y, drop probe hook (bsc#945778)] Signed-off-by: Andreas Färber --- block/Makefile.objs | 1 + - block/dictzip.c | 591 ++++++++++++++++++++++++++++++++++++++++++++++++++++ - 2 files changed, 592 insertions(+) + block/dictzip.c | 578 ++++++++++++++++++++++++++++++++++++++++++++++++++++ + 2 files changed, 579 insertions(+) create mode 100644 block/dictzip.c diff --git a/block/Makefile.objs b/block/Makefile.objs -index 58ef2ef..246f167 100644 +index 58ef2ef..c7b9294 100644 --- a/block/Makefile.objs +++ b/block/Makefile.objs -@@ -26,6 +26,7 @@ block-obj-y += write-threshold.o - common-obj-y += stream.o - common-obj-y += commit.o - common-obj-y += backup.o -+common-obj-y += dictzip.o +@@ -20,6 +20,7 @@ block-obj-$(CONFIG_RBD) += rbd.o + block-obj-$(CONFIG_GLUSTERFS) += gluster.o + block-obj-$(CONFIG_ARCHIPELAGO) += archipelago.o + block-obj-$(CONFIG_LIBSSH2) += ssh.o ++block-obj-y += dictzip.o + block-obj-y += accounting.o + block-obj-y += write-threshold.o - iscsi.o-cflags := $(LIBISCSI_CFLAGS) - iscsi.o-libs := $(LIBISCSI_LIBS) diff --git a/block/dictzip.c b/block/dictzip.c new file mode 100644 -index 0000000..8e6855a +index 0000000..1824971 --- /dev/null +++ b/block/dictzip.c -@@ -0,0 +1,591 @@ +@@ -0,0 +1,578 @@ +/* + * DictZip Block driver for dictzip enabled gzip files + * @@ -179,18 +180,6 @@ index 0000000..8e6855a + int64_t file_len; +} BDRVDictZipState; + -+static int dictzip_probe(const uint8_t *buf, int buf_size, const char *filename) -+{ -+ if (buf_size < 2) -+ return 0; -+ -+ /* We match on every gzip file */ -+ if ((buf[0] == GZ_MAGIC1) && (buf[1] == GZ_MAGIC2)) -+ return 100; -+ -+ return 0; -+} -+ +static int start_zStream(z_stream *zStream) +{ + zStream->zalloc = NULL; @@ -638,7 +627,6 @@ index 0000000..8e6855a + .bdrv_file_open = dictzip_open, + .bdrv_close = dictzip_close, + .bdrv_getlength = dictzip_getlength, -+ .bdrv_probe = dictzip_probe, + + .bdrv_aio_readv = dictzip_aio_readv, +}; diff --git a/0028-block-Add-tar-container-format.patch b/0028-block-Add-tar-container-format.patch index 1271eb6b..0980ad42 100644 --- a/0028-block-Add-tar-container-format.patch +++ b/0028-block-Add-tar-container-format.patch @@ -1,4 +1,4 @@ -From be6c4a9c1ee466c5b6d6f0e7e78eab322f722232 Mon Sep 17 00:00:00 2001 +From 6492e67a4633bac8d339a8dd171a4560d9b0db6d Mon Sep 17 00:00:00 2001 From: Alexander Graf Date: Wed, 5 Aug 2009 17:28:38 +0200 Subject: [PATCH] block: Add tar container format @@ -34,31 +34,32 @@ Signed-off-by: Tim Hardeck BlockDriverCompletionFunc -> BlockCompletionFunc, qemu_aio_release() -> qemu_aio_unref(), drop tar_aio_cancel()] +[AF: common-obj-y -> block-obj-y, drop probe hook (bsc#945778)] Signed-off-by: Andreas Färber --- block/Makefile.objs | 1 + - block/tar.c | 381 ++++++++++++++++++++++++++++++++++++++++++++++++++++ - 2 files changed, 382 insertions(+) + block/tar.c | 368 ++++++++++++++++++++++++++++++++++++++++++++++++++++ + 2 files changed, 369 insertions(+) create mode 100644 block/tar.c diff --git a/block/Makefile.objs b/block/Makefile.objs -index 246f167..a757960 100644 +index c7b9294..0a4b697 100644 --- a/block/Makefile.objs +++ b/block/Makefile.objs -@@ -27,6 +27,7 @@ common-obj-y += stream.o - common-obj-y += commit.o - common-obj-y += backup.o - common-obj-y += dictzip.o -+common-obj-y += tar.o +@@ -21,6 +21,7 @@ block-obj-$(CONFIG_GLUSTERFS) += gluster.o + block-obj-$(CONFIG_ARCHIPELAGO) += archipelago.o + block-obj-$(CONFIG_LIBSSH2) += ssh.o + block-obj-y += dictzip.o ++block-obj-y += tar.o + block-obj-y += accounting.o + block-obj-y += write-threshold.o - iscsi.o-cflags := $(LIBISCSI_CFLAGS) - iscsi.o-libs := $(LIBISCSI_LIBS) diff --git a/block/tar.c b/block/tar.c new file mode 100644 -index 0000000..d8218a3 +index 0000000..e612db3 --- /dev/null +++ b/block/tar.c -@@ -0,0 +1,381 @@ +@@ -0,0 +1,368 @@ +/* + * Tar block driver + * @@ -121,18 +122,6 @@ index 0000000..d8218a3 + char longfile[2048]; +} BDRVTarState; + -+static int tar_probe(const uint8_t *buf, int buf_size, const char *filename) -+{ -+ if (buf_size < OFFS_MAGIC + 5) -+ return 0; -+ -+ /* we only support newer tar */ -+ if (!strncmp((char*)buf + OFFS_MAGIC, POSIX_TAR_MAGIC, 5)) -+ return 100; -+ -+ return 0; -+} -+ +static int str_ends(char *str, const char *end) +{ + int end_len = strlen(end); @@ -429,7 +418,6 @@ index 0000000..d8218a3 + .bdrv_file_open = tar_open, + .bdrv_close = tar_close, + .bdrv_getlength = tar_getlength, -+ .bdrv_probe = tar_probe, + + .bdrv_aio_readv = tar_aio_readv, +}; diff --git a/0029-Legacy-Patch-kvm-qemu-preXX-dictzip.patch b/0029-Legacy-Patch-kvm-qemu-preXX-dictzip.patch index 6266510a..ee024a38 100644 --- a/0029-Legacy-Patch-kvm-qemu-preXX-dictzip.patch +++ b/0029-Legacy-Patch-kvm-qemu-preXX-dictzip.patch @@ -1,4 +1,4 @@ -From 1d5befaff3c2b4dfdc3b23589f2f92f2d288dcf1 Mon Sep 17 00:00:00 2001 +From d893ae81b781a53bac6ee988bed2f32453dec3a7 Mon Sep 17 00:00:00 2001 From: Alexander Graf Date: Wed, 12 Dec 2012 19:11:30 +0100 Subject: [PATCH] Legacy Patch kvm-qemu-preXX-dictzip3.patch @@ -8,10 +8,10 @@ Subject: [PATCH] Legacy Patch kvm-qemu-preXX-dictzip3.patch 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/block/tar.c b/block/tar.c -index d8218a3..522ddd3 100644 +index e612db3..654fcf7 100644 --- a/block/tar.c +++ b/block/tar.c -@@ -83,7 +83,8 @@ static int str_ends(char *str, const char *end) +@@ -71,7 +71,8 @@ static int str_ends(char *str, const char *end) return !strncmp(str + str_len - end_len, end, end_len); } @@ -21,7 +21,7 @@ index d8218a3..522ddd3 100644 { int retval = 0; -@@ -99,10 +100,17 @@ static int is_target_file(BlockDriverState *bs, char *filename) +@@ -87,10 +88,17 @@ static int is_target_file(BlockDriverState *bs, char *filename) if (str_ends(filename, ".vmdk")) retval = 1; @@ -39,7 +39,7 @@ index d8218a3..522ddd3 100644 return retval; } -@@ -229,12 +237,13 @@ static int tar_open(BlockDriverState *bs, QDict *options, int flags, Error **err +@@ -217,12 +225,13 @@ static int tar_open(BlockDriverState *bs, QDict *options, int flags, Error **err bdrv_pread(s->hd, header_offs - s->file_len, s->longfile, sizeof(s->longfile)); s->longfile[sizeof(s->longfile)-1] = '\0'; diff --git a/0030-console-add-question-mark-escape-op.patch b/0030-console-add-question-mark-escape-op.patch index 9d04e0bb..348f7f9b 100644 --- a/0030-console-add-question-mark-escape-op.patch +++ b/0030-console-add-question-mark-escape-op.patch @@ -1,4 +1,4 @@ -From 602e012b10d06c4d25212a452d3066f087350289 Mon Sep 17 00:00:00 2001 +From 9ff792a6d58e3966c94dc22167d956df1756aa14 Mon Sep 17 00:00:00 2001 From: Alexander Graf Date: Mon, 6 Jun 2011 06:53:52 +0200 Subject: [PATCH] console: add question-mark escape operator diff --git a/0031-Make-char-muxer-more-robust-wrt-sma.patch b/0031-Make-char-muxer-more-robust-wrt-sma.patch index 3b6e511b..48faef9b 100644 --- a/0031-Make-char-muxer-more-robust-wrt-sma.patch +++ b/0031-Make-char-muxer-more-robust-wrt-sma.patch @@ -1,4 +1,4 @@ -From 8035717a00918d5c84c7c1fa326c6409431ece9e Mon Sep 17 00:00:00 2001 +From 3de38631531f91c85e910e961978a77bd1ef842f Mon Sep 17 00:00:00 2001 From: Alexander Graf Date: Thu, 1 Apr 2010 17:36:23 +0200 Subject: [PATCH] Make char muxer more robust wrt small FIFOs diff --git a/0032-linux-user-lseek-explicitly-cast-no.patch b/0032-linux-user-lseek-explicitly-cast-no.patch index ea7574cc..49ed6dce 100644 --- a/0032-linux-user-lseek-explicitly-cast-no.patch +++ b/0032-linux-user-lseek-explicitly-cast-no.patch @@ -1,4 +1,4 @@ -From fee765c70a2e52b093a529fc78c7d2838c95fab5 Mon Sep 17 00:00:00 2001 +From c42944366a1ce036e7baab2ee14b71e2d38754d1 Mon Sep 17 00:00:00 2001 From: Alexander Graf Date: Thu, 13 Dec 2012 14:29:22 +0100 Subject: [PATCH] linux-user: lseek: explicitly cast non-set offsets to signed diff --git a/0033-virtfs-proxy-helper-Provide-__u64-f.patch b/0033-virtfs-proxy-helper-Provide-__u64-f.patch index 78ee931f..307b5c12 100644 --- a/0033-virtfs-proxy-helper-Provide-__u64-f.patch +++ b/0033-virtfs-proxy-helper-Provide-__u64-f.patch @@ -1,4 +1,4 @@ -From 059de120405eea44ff389bed7a94aca9f32f4591 Mon Sep 17 00:00:00 2001 +From cd1a94f80e21ef2b5fa584514c032b34c0f85aeb Mon Sep 17 00:00:00 2001 From: Bruce Rogers Date: Thu, 16 May 2013 12:39:10 +0200 Subject: [PATCH] virtfs-proxy-helper: Provide __u64 for broken diff --git a/0034-configure-Enable-PIE-for-ppc-and-pp.patch b/0034-configure-Enable-PIE-for-ppc-and-pp.patch index 3d42e603..bea9e3aa 100644 --- a/0034-configure-Enable-PIE-for-ppc-and-pp.patch +++ b/0034-configure-Enable-PIE-for-ppc-and-pp.patch @@ -1,4 +1,4 @@ -From 691fc4414be4b35aca29dbebca08192f91c69bf5 Mon Sep 17 00:00:00 2001 +From c9fbb5972a05e94bbe28bc75441344830a247fe5 Mon Sep 17 00:00:00 2001 From: Dinar Valeev Date: Wed, 2 Oct 2013 17:56:03 +0200 Subject: [PATCH] configure: Enable PIE for ppc and ppc64 hosts diff --git a/0035-qtest-Increase-socket-timeout.patch b/0035-qtest-Increase-socket-timeout.patch index 3c13059b..9b53b67d 100644 --- a/0035-qtest-Increase-socket-timeout.patch +++ b/0035-qtest-Increase-socket-timeout.patch @@ -1,4 +1,4 @@ -From c4bd3ee614365b7343fd570907901bdd11141f49 Mon Sep 17 00:00:00 2001 +From 39b6d2beaf481c85e836a77dede84456c25622ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Thu, 17 Apr 2014 18:39:10 +0200 Subject: [PATCH] qtest: Increase socket timeout diff --git a/0036-AIO-Reduce-number-of-threads-for-32.patch b/0036-AIO-Reduce-number-of-threads-for-32.patch index a6b7406e..96024bbb 100644 --- a/0036-AIO-Reduce-number-of-threads-for-32.patch +++ b/0036-AIO-Reduce-number-of-threads-for-32.patch @@ -1,4 +1,4 @@ -From 849aa878fa4bc283531d005bc2d6a5496af4cde1 Mon Sep 17 00:00:00 2001 +From 458ee6dac3863bf420d70cd218f88b60c4de7565 Mon Sep 17 00:00:00 2001 From: Alexander Graf Date: Wed, 14 Jan 2015 01:32:11 +0100 Subject: [PATCH] AIO: Reduce number of threads for 32bit hosts diff --git a/0037-Revert-Revert-seccomp-tests-that-al.patch b/0037-Revert-Revert-seccomp-tests-that-al.patch index 2a0ab379..06963507 100644 --- a/0037-Revert-Revert-seccomp-tests-that-al.patch +++ b/0037-Revert-Revert-seccomp-tests-that-al.patch @@ -1,4 +1,4 @@ -From 5d4f5c0bb2304239ef1bc47cf5eb211c576d2342 Mon Sep 17 00:00:00 2001 +From 1c97919295ef36ddaaca131cc412aafe9a078151 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Tue, 14 Apr 2015 18:42:06 +0200 Subject: [PATCH] Revert "Revert seccomp tests that allow it to be used on diff --git a/0038-tcg-aarch64-Fix-tcg_out_qemu_-ld-st.patch b/0038-tcg-aarch64-Fix-tcg_out_qemu_-ld-st.patch index 41ed727c..b79597fd 100644 --- a/0038-tcg-aarch64-Fix-tcg_out_qemu_-ld-st.patch +++ b/0038-tcg-aarch64-Fix-tcg_out_qemu_-ld-st.patch @@ -1,4 +1,4 @@ -From df632501e0417ab9814f2a69d7e2859c22b74010 Mon Sep 17 00:00:00 2001 +From cf25e5be2ef07247d563a0aec6edc719a1f6a5aa Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Tue, 1 Sep 2015 15:58:02 -0400 Subject: [PATCH] tcg/aarch64: Fix tcg_out_qemu_{ld, st} for guest_base == 0 diff --git a/0039-tests-Unique-test-path-for-string-v.patch b/0039-tests-Unique-test-path-for-string-v.patch index 272ca26f..afc12dd4 100644 --- a/0039-tests-Unique-test-path-for-string-v.patch +++ b/0039-tests-Unique-test-path-for-string-v.patch @@ -1,4 +1,4 @@ -From e803dc8085b04f0d78ae3443324a5e2f4650d759 Mon Sep 17 00:00:00 2001 +From b3d605bbbebdfff36843fb785f4db3e633f96892 Mon Sep 17 00:00:00 2001 From: "Dr. David Alan Gilbert" Date: Mon, 5 Oct 2015 12:04:20 +0100 Subject: [PATCH] tests: Unique test path for /string-visitor/output diff --git a/0040-dictzip-Fix-on-big-endian-systems.patch b/0040-dictzip-Fix-on-big-endian-systems.patch new file mode 100644 index 00000000..28b290be --- /dev/null +++ b/0040-dictzip-Fix-on-big-endian-systems.patch @@ -0,0 +1,142 @@ +From 6daa5dc051e04f528bbe15cb7231a05cf92a072c Mon Sep 17 00:00:00 2001 +From: Alexander Graf +Date: Mon, 15 Jun 2015 17:36:32 +0200 +Subject: [PATCH] dictzip: Fix on big endian systems +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +The dictzip code in SLE11 received some treatment over time to support +running on big endian hosts. Somewhere in the transition to SLE12 this +support got lost. Add it back in again from the SLE11 code base. + +Furthermore while at it, fix up the debug prints to not emit warnings. + +[AG: BSC#937572] +Signed-off-by: Alexander Graf +Signed-off-by: Andreas Färber +--- + block/dictzip.c | 50 ++++++++++++++++++++++++++++---------------------- + 1 file changed, 28 insertions(+), 22 deletions(-) + +diff --git a/block/dictzip.c b/block/dictzip.c +index 1824971..71ffe7b 100644 +--- a/block/dictzip.c ++++ b/block/dictzip.c +@@ -154,6 +154,7 @@ static int dictzip_open(BlockDriverState *bs, QDict *options, int flags, Error * + uint8_t header_flags; + uint16_t chunk_len16; + uint16_t chunk_cnt16; ++ uint32_t chunk_len32; + uint16_t header_ver; + uint16_t tmp_short; + uint64_t offset; +@@ -253,11 +254,11 @@ static int dictzip_open(BlockDriverState *bs, QDict *options, int flags, Error * + break; + case 99: /* Special Alex pigz version */ + /* number of chunks */ +- if (bdrv_pread(s->hd, GZ_99_CHUNKSIZE, &s->chunk_len, 4) != 4) ++ if (bdrv_pread(s->hd, GZ_99_CHUNKSIZE, &chunk_len32, 4) != 4) + goto fail; + +- dprintf("chunk len [%#x] = %d\n", GZ_99_CHUNKSIZE, s->chunk_len); +- s->chunk_len = le32_to_cpu(s->chunk_len); ++ dprintf("chunk len [%#x] = %d\n", GZ_99_CHUNKSIZE, chunk_len32); ++ s->chunk_len = le32_to_cpu(chunk_len32); + + /* chunk count */ + if (bdrv_pread(s->hd, GZ_99_CHUNKCNT, &s->chunk_cnt, 4) != 4) +@@ -265,7 +266,7 @@ static int dictzip_open(BlockDriverState *bs, QDict *options, int flags, Error * + + s->chunk_cnt = le32_to_cpu(s->chunk_cnt); + +- dprintf("chunk len | count = %d | %d\n", s->chunk_len, s->chunk_cnt); ++ dprintf("chunk len | count = %"PRId64" | %d\n", s->chunk_len, s->chunk_cnt); + + /* file size */ + if (bdrv_pread(s->hd, GZ_99_FILESIZE, &s->file_len, 8) != 8) +@@ -336,14 +337,14 @@ static int dictzip_open(BlockDriverState *bs, QDict *options, int flags, Error * + s->offsets[i] = offset; + switch (header_ver) { + case 1: +- offset += s->chunks[i]; ++ offset += le16_to_cpu(s->chunks[i]); + break; + case 99: +- offset += s->chunks32[i]; ++ offset += le32_to_cpu(s->chunks32[i]); + break; + } + +- dprintf("chunk %#x - %#x = offset %#x -> %#x\n", i * s->chunk_len, (i+1) * s->chunk_len, s->offsets[i], offset); ++ dprintf("chunk %#"PRIx64" - %#"PRIx64" = offset %#"PRIx64" -> %#"PRIx64"\n", i * s->chunk_len, (i+1) * s->chunk_len, s->offsets[i], offset); + } + qemu_opts_del(opts); + +@@ -377,10 +378,26 @@ static void dictzip_read_cb(void *opaque, int ret) + struct BDRVDictZipState *s = acb->s; + uint8_t *buf; + DictCache *cache; +- int r; ++ int r, i; + + buf = g_malloc(acb->chunks_len); + ++ /* try to find zlib stream for decoding */ ++ do { ++ for (i = 0; i < Z_STREAM_COUNT; i++) { ++ if (!(s->stream_in_use & (1 << i))) { ++ s->stream_in_use |= (1 << i); ++ acb->zStream_id = i; ++ acb->zStream = &s->zStream[i]; ++ break; ++ } ++ } ++ } while(!acb->zStream); ++ ++ /* sure, we could handle more streams, but this callback should be single ++ threaded and when it's not, we really want to know! */ ++ assert(i == 0); ++ + /* uncompress the chunk */ + acb->zStream->next_in = acb->gzipped; + acb->zStream->avail_in = acb->gz_len; +@@ -466,17 +483,6 @@ static BlockAIOCB *dictzip_aio_readv(BlockDriverState *bs, + } + + /* No cache, so let's decode */ +- do { +- for (i = 0; i < Z_STREAM_COUNT; i++) { +- if (!(s->stream_in_use & (1 << i))) { +- s->stream_in_use |= (1 << i); +- acb->zStream_id = i; +- acb->zStream = &s->zStream[i]; +- break; +- } +- } +- } while(!acb->zStream); +- + /* We need to read these chunks */ + first_chunk = start / s->chunk_len; + first_offset = start - first_chunk * s->chunk_len; +@@ -486,9 +492,9 @@ static BlockAIOCB *dictzip_aio_readv(BlockDriverState *bs, + gz_len = 0; + for (i = first_chunk; i <= last_chunk; i++) { + if (s->chunks32) +- gz_len += s->chunks32[i]; ++ gz_len += le32_to_cpu(s->chunks32[i]); + else +- gz_len += s->chunks[i]; ++ gz_len += le16_to_cpu(s->chunks[i]); + } + + gz_sector_num = gz_start / SECTOR_SIZE; +@@ -509,7 +515,7 @@ static BlockAIOCB *dictzip_aio_readv(BlockDriverState *bs, + iov->iov_len = gz_nb_sectors * 512; + qemu_iovec_init_external(qiov_gz, iov, 1); + +- dprintf("read %d - %d => %d - %d\n", start, end, gz_start, gz_start + gz_len); ++ dprintf("read %zd - %zd => %zd - %zd\n", start, end, gz_start, gz_start + gz_len); + + acb->s = s; + acb->qiov = qiov; diff --git a/libcacard.changes b/libcacard.changes index a5471116..ea406a03 100644 --- a/libcacard.changes +++ b/libcacard.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Thu Oct 8 16:29:36 UTC 2015 - afaerber@suse.de + +- Patch queue updated from git://github.com/openSUSE/qemu.git opensuse-2.4 +* Patches added: + 0040-dictzip-Fix-on-big-endian-systems.patch + ------------------------------------------------------------------- Thu Oct 8 14:35:11 UTC 2015 - afaerber@suse.de diff --git a/libcacard.spec b/libcacard.spec index bdfc3009..4e431fcc 100644 --- a/libcacard.spec +++ b/libcacard.spec @@ -64,6 +64,7 @@ Patch0036: 0036-AIO-Reduce-number-of-threads-for-32.patch Patch0037: 0037-Revert-Revert-seccomp-tests-that-al.patch Patch0038: 0038-tcg-aarch64-Fix-tcg_out_qemu_-ld-st.patch Patch0039: 0039-tests-Unique-test-path-for-string-v.patch +Patch0040: 0040-dictzip-Fix-on-big-endian-systems.patch # Please do not add patches manually here, run update_git.sh. # this is to make lint happy Source300: qemu-rpmlintrc @@ -162,6 +163,7 @@ This sub-package contains development files for the Smartcard library. %patch0037 -p1 %patch0038 -p1 %patch0039 -p1 +%patch0040 -p1 %build ./configure --prefix=%_prefix --sysconfdir=%_sysconfdir \ diff --git a/qemu-linux-user.changes b/qemu-linux-user.changes index 1285ada8..10995846 100644 --- a/qemu-linux-user.changes +++ b/qemu-linux-user.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Thu Oct 8 16:29:32 UTC 2015 - afaerber@suse.de + +- Patch queue updated from git://github.com/openSUSE/qemu.git opensuse-2.4 +* Patches added: + 0040-dictzip-Fix-on-big-endian-systems.patch + ------------------------------------------------------------------- Thu Oct 8 14:35:07 UTC 2015 - afaerber@suse.de diff --git a/qemu-linux-user.spec b/qemu-linux-user.spec index 2b32a90d..93992bc3 100644 --- a/qemu-linux-user.spec +++ b/qemu-linux-user.spec @@ -64,6 +64,7 @@ Patch0036: 0036-AIO-Reduce-number-of-threads-for-32.patch Patch0037: 0037-Revert-Revert-seccomp-tests-that-al.patch Patch0038: 0038-tcg-aarch64-Fix-tcg_out_qemu_-ld-st.patch Patch0039: 0039-tests-Unique-test-path-for-string-v.patch +Patch0040: 0040-dictzip-Fix-on-big-endian-systems.patch # Please do not add patches manually here, run update_git.sh. # this is to make lint happy Source300: qemu-rpmlintrc @@ -156,6 +157,7 @@ run cross-architecture builds. %patch0037 -p1 %patch0038 -p1 %patch0039 -p1 +%patch0040 -p1 %build ./configure --prefix=%_prefix --sysconfdir=%_sysconfdir \ diff --git a/qemu-testsuite.changes b/qemu-testsuite.changes index ebed49a4..b2e81222 100644 --- a/qemu-testsuite.changes +++ b/qemu-testsuite.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Thu Oct 8 16:29:28 UTC 2015 - afaerber@suse.de + +- Patch queue updated from git://github.com/openSUSE/qemu.git opensuse-2.4 +* Fix endianness issues in DictZip block driver (bsc#937572, bsc#945778) + 0027-block-Add-support-for-DictZip-enabl.patch + 0028-block-Add-tar-container-format.patch + 0040-dictzip-Fix-on-big-endian-systems.patch + ------------------------------------------------------------------- Thu Oct 8 14:35:03 UTC 2015 - afaerber@suse.de diff --git a/qemu-testsuite.spec b/qemu-testsuite.spec index f46cae28..b724bc19 100644 --- a/qemu-testsuite.spec +++ b/qemu-testsuite.spec @@ -97,6 +97,7 @@ Patch0036: 0036-AIO-Reduce-number-of-threads-for-32.patch Patch0037: 0037-Revert-Revert-seccomp-tests-that-al.patch Patch0038: 0038-tcg-aarch64-Fix-tcg_out_qemu_-ld-st.patch Patch0039: 0039-tests-Unique-test-path-for-string-v.patch +Patch0040: 0040-dictzip-Fix-on-big-endian-systems.patch # Please do not add QEMU patches manually here. # Run update_git.sh to regenerate this queue. @@ -614,6 +615,7 @@ This package provides a service file for starting and stopping KSM. %patch0037 -p1 %patch0038 -p1 %patch0039 -p1 +%patch0040 -p1 %if %{build_x86_fw_from_source} pushd roms/seabios diff --git a/qemu.changes b/qemu.changes index ebed49a4..b2e81222 100644 --- a/qemu.changes +++ b/qemu.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Thu Oct 8 16:29:28 UTC 2015 - afaerber@suse.de + +- Patch queue updated from git://github.com/openSUSE/qemu.git opensuse-2.4 +* Fix endianness issues in DictZip block driver (bsc#937572, bsc#945778) + 0027-block-Add-support-for-DictZip-enabl.patch + 0028-block-Add-tar-container-format.patch + 0040-dictzip-Fix-on-big-endian-systems.patch + ------------------------------------------------------------------- Thu Oct 8 14:35:03 UTC 2015 - afaerber@suse.de diff --git a/qemu.spec b/qemu.spec index 6c9f6c43..1a7f5281 100644 --- a/qemu.spec +++ b/qemu.spec @@ -97,6 +97,7 @@ Patch0036: 0036-AIO-Reduce-number-of-threads-for-32.patch Patch0037: 0037-Revert-Revert-seccomp-tests-that-al.patch Patch0038: 0038-tcg-aarch64-Fix-tcg_out_qemu_-ld-st.patch Patch0039: 0039-tests-Unique-test-path-for-string-v.patch +Patch0040: 0040-dictzip-Fix-on-big-endian-systems.patch # Please do not add QEMU patches manually here. # Run update_git.sh to regenerate this queue. @@ -614,6 +615,7 @@ This package provides a service file for starting and stopping KSM. %patch0037 -p1 %patch0038 -p1 %patch0039 -p1 +%patch0040 -p1 %if %{build_x86_fw_from_source} pushd roms/seabios