On 02/06/2018 05:13 AM, Viktor Mihajlovski wrote:
On 06.02.2018 10:23, Thomas Huth wrote:
On 05.02.2018 21:57, Collin L. Walling wrote:
[...]
diff --git a/hw/s390x/ipl.c b/hw/s390x/ipl.c
index 0d06fc1..3e3c3b8 100644
--- a/hw/s390x/ipl.c
+++ b/hw/s390x/ipl.c
@@ -399,6 +399,20 @@ void s390_reipl_request(void)
      qemu_system_reset_request(SHUTDOWN_CAUSE_GUEST_RESET);
  }
+static void s390_ipl_prepare_qipl(S390CPU *cpu)
+{
+    S390IPLState *ipl = get_ipl_device();
+    uint8_t *addr;
+    uint64_t len = 4096;
+
+    addr = cpu_physical_memory_map(cpu->env.psa, &len, 1);
+    if (!addr || len < 204 + sizeof(QemuIplParameters)) {
+        error_report("Cannot set QEMU IPL parameters");
I think you should return or exit() here. Otherwise the memcpy below
accesses an illegal memory range.Right, I have noticed and fixed that on my 
private branch, but forgot to
update the patch. Collin, could you squash in a
             return;

Can do.

[...]


--
- Collin L Walling


Reply via email to