[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PULL 24/29] target-ppc: Check for error on address translati
From: |
Alexander Graf |
Subject: |
[Qemu-ppc] [PULL 24/29] target-ppc: Check for error on address translation in memsave command |
Date: |
Fri, 25 Oct 2013 23:27:49 +0200 |
From: "Aneesh Kumar K.V" <address@hidden>
When we translate the virtual address to physical check for error.
Signed-off-by: Aneesh Kumar K.V <address@hidden>
Signed-off-by: Alexander Graf <address@hidden>
---
cpus.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/cpus.c b/cpus.c
index 398229e..912938c 100644
--- a/cpus.c
+++ b/cpus.c
@@ -1403,7 +1403,10 @@ void qmp_memsave(int64_t addr, int64_t size, const char
*filename,
l = sizeof(buf);
if (l > size)
l = size;
- cpu_memory_rw_debug(cpu, addr, buf, l, 0);
+ if (cpu_memory_rw_debug(cpu, addr, buf, l, 0) != 0) {
+ error_setg(errp, "Invalid addr 0x%016" PRIx64 "specified", addr);
+ goto exit;
+ }
if (fwrite(buf, 1, l, f) != l) {
error_set(errp, QERR_IO_ERROR);
goto exit;
--
1.8.1.4
- [Qemu-ppc] [PULL 09/29] target-ppc: Add helper for KVM_PPC_RTAS_DEFINE_TOKEN, (continued)
- [Qemu-ppc] [PULL 09/29] target-ppc: Add helper for KVM_PPC_RTAS_DEFINE_TOKEN, Alexander Graf, 2013/10/25
- [Qemu-ppc] [PULL 13/29] xics: add pre_save/post_load dispatchers, Alexander Graf, 2013/10/25
- [Qemu-ppc] [PULL 14/29] xics: convert init() to realize(), Alexander Graf, 2013/10/25
- [Qemu-ppc] [PULL 18/29] xics-kvm: Support for in-kernel XICS interrupt controller, Alexander Graf, 2013/10/25
- [Qemu-ppc] [PULL 17/29] xics: add cpu_setup callback, Alexander Graf, 2013/10/25
- [Qemu-ppc] [PULL 16/29] xics: split to xics and xics-common, Alexander Graf, 2013/10/25
- [Qemu-ppc] [PULL 23/29] target-ppc: Update slb array with correct index values., Alexander Graf, 2013/10/25
- [Qemu-ppc] [PULL 06/29] spapr: increase temporary fdt buffer size, Alexander Graf, 2013/10/25
- [Qemu-ppc] [PULL 25/29] target-ppc: Use #define for max slb entries, Alexander Graf, 2013/10/25
- [Qemu-ppc] [PULL 26/29] dump-guest-memory: Check for the correct return value, Alexander Graf, 2013/10/25
- [Qemu-ppc] [PULL 24/29] target-ppc: Check for error on address translation in memsave command,
Alexander Graf <=
- [Qemu-ppc] [PULL 29/29] spapr: Use DeviceClass::fw_name for device tree CPU node, Alexander Graf, 2013/10/25
- [Qemu-ppc] [PULL 28/29] target-ppc: Fill in OpenFirmware names for some PowerPCCPU families, Alexander Graf, 2013/10/25
- [Qemu-ppc] [PULL 27/29] target-ppc: dump-guest-memory support, Alexander Graf, 2013/10/25
- Re: [Qemu-ppc] [PULL 00/29] ppc patch queue 2013-10-25, Mark Cave-Ayland, 2013/10/25
- [Qemu-ppc] [PULL 01/29] pseries: Update SLOF firmware image, Alexander Graf, 2013/10/25