[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Stable-7.2.7 35/62] migration: Fix analyze-migration read operation sig
From: |
Michael Tokarev |
Subject: |
[Stable-7.2.7 35/62] migration: Fix analyze-migration read operation signedness |
Date: |
Thu, 9 Nov 2023 16:59:03 +0300 |
From: Fabiano Rosas <farosas@suse.de>
The migration code uses unsigned values for 16, 32 and 64-bit
operations. Fix the script to do the same.
This was causing an issue when parsing the migration stream generated
on the ppc64 target because one of instance_ids was larger than the
32bit signed maximum:
Traceback (most recent call last):
File "/home/fabiano/kvm/qemu/build/scripts/analyze-migration.py", line 658,
in <module>
dump.read(dump_memory = args.memory)
File "/home/fabiano/kvm/qemu/build/scripts/analyze-migration.py", line 592,
in read
classdesc = self.section_classes[section_key]
KeyError: ('spapr_iommu', -2147483648)
Signed-off-by: Fabiano Rosas <farosas@suse.de>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Message-ID: <20231009184326.15777-6-farosas@suse.de>
(cherry picked from commit caea03279e11dfcb0e5a567b81fe7f02ee80af02)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
diff --git a/scripts/analyze-migration.py b/scripts/analyze-migration.py
index b82a1b0c58..44d306aedc 100755
--- a/scripts/analyze-migration.py
+++ b/scripts/analyze-migration.py
@@ -38,13 +38,13 @@ def __init__(self, filename):
self.file = open(self.filename, "rb")
def read64(self):
- return int.from_bytes(self.file.read(8), byteorder='big', signed=True)
+ return int.from_bytes(self.file.read(8), byteorder='big', signed=False)
def read32(self):
- return int.from_bytes(self.file.read(4), byteorder='big', signed=True)
+ return int.from_bytes(self.file.read(4), byteorder='big', signed=False)
def read16(self):
- return int.from_bytes(self.file.read(2), byteorder='big', signed=True)
+ return int.from_bytes(self.file.read(2), byteorder='big', signed=False)
def read8(self):
return int.from_bytes(self.file.read(1), byteorder='big', signed=True)
--
2.39.2
- [Stable-7.2.7 18/62] esp: restrict non-DMA transfer length to that of available data, (continued)
- [Stable-7.2.7 18/62] esp: restrict non-DMA transfer length to that of available data, Michael Tokarev, 2023/11/09
- [Stable-7.2.7 27/62] hw/display/ramfb: plug slight guest-triggerable leak on mode setting, Michael Tokarev, 2023/11/09
- [Stable-7.2.7 22/62] target/i386: Fix and add some comments next to SSE/AVX instructions., Michael Tokarev, 2023/11/09
- [Stable-7.2.7 28/62] chardev/char-pty: Avoid losing bytes when the other side just (re-)connected, Michael Tokarev, 2023/11/09
- [Stable-7.2.7 29/62] linux-user/hppa: Fix struct target_sigcontext layout, Michael Tokarev, 2023/11/09
- [Stable-7.2.7 30/62] amd_iommu: Fix APIC address check, Michael Tokarev, 2023/11/09
- [Stable-7.2.7 31/62] migration/qmp: Fix crash on setting tls-authz with null, Michael Tokarev, 2023/11/09
- [Stable-7.2.7 32/62] hw/audio/es1370: reset current sample counter, Michael Tokarev, 2023/11/09
- [Stable-7.2.7 34/62] hw/pvrdma: Protect against buggy or malicious guest driver, Michael Tokarev, 2023/11/09
- [Stable-7.2.7 33/62] disas/riscv: Fix the typo of inverted order of pmpaddr13 and pmpaddr14, Michael Tokarev, 2023/11/09
- [Stable-7.2.7 35/62] migration: Fix analyze-migration read operation signedness,
Michael Tokarev <=
- [Stable-7.2.7 40/62] misc/led: LED state is set opposite of what is expected, Michael Tokarev, 2023/11/09
- [Stable-7.2.7 46/62] Revert "linux-user: fix compat with glibc >= 2.36 sys/mount.h", Michael Tokarev, 2023/11/09
- [Stable-7.2.7 37/62] linux-user/sh4: Fix crashes on signal delivery, Michael Tokarev, 2023/11/09
- [Stable-7.2.7 45/62] Revert "linux-user: add more compat ioctl definitions", Michael Tokarev, 2023/11/09
- [Stable-7.2.7 36/62] linux-user/mips: fix abort on integer overflow, Michael Tokarev, 2023/11/09
- [Stable-7.2.7 38/62] lasips2: LASI PS/2 devices are not user-createable, Michael Tokarev, 2023/11/09
- [Stable-7.2.7 41/62] tests/migration: Add -fno-stack-protector, Michael Tokarev, 2023/11/09
- [Stable-7.2.7 44/62] qemu-iotests: 024: add rebasing test case for overlay_size > backing_size, Michael Tokarev, 2023/11/09
- [Stable-7.2.7 39/62] hw/sd/sdhci: Block Size Register bits [14:12] is lost, Michael Tokarev, 2023/11/09
- [Stable-7.2.7 42/62] tests/tcg: Add -fno-stack-protector, Michael Tokarev, 2023/11/09