Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package xen for openSUSE:Factory checked in 
at 2021-03-21 23:19:24
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/xen (Old)
 and      /work/SRC/openSUSE:Factory/.xen.new.2401 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "xen"

Sun Mar 21 23:19:24 2021 rev:300 rq:879873 version:4.14.1_14

Changes:
--------
--- /work/SRC/openSUSE:Factory/xen/xen.changes  2021-03-02 12:31:08.571610683 
+0100
+++ /work/SRC/openSUSE:Factory/.xen.new.2401/xen.changes        2021-03-21 
23:19:27.340720399 +0100
@@ -1,0 +2,29 @@
+Fri Mar 12 19:19:19 UTC 2021 - oher...@suse.de
+
+- bsc#1177112 - Fix libxc.sr.superpage.patch
+  The receiving side did detect holes in a to-be-allocated superpage,
+  but allocated a superpage anyway. This resulted to over-allocation.
+
+-------------------------------------------------------------------
+Mon Mar  8 16:16:16 UTC 2021 - oher...@suse.de
+
+- bsc#1167608 - adjust limit for max_event_channels
+  A previous change allowed an unbound number of event channels
+  to make sure even large domUs can start of of the box.
+  This may have a bad side effect in the light of XSA-344.
+  Adjust the built-in limit based on the number of vcpus.
+  In case this is not enough, max_event_channels=/maxEventChannels=
+  has to be used to set the limit as needed for large domUs
+  adjust libxl.max_event_channels.patch
+
+-------------------------------------------------------------------
+Fri Mar  5 08:49:56 MST 2021 - carn...@suse.com
+
+- bsc#1183072 - VUL-0: xen: HVM soft-reset crashes toolstack (XSA-368)
+  Also resolves,
+    bsc#1179148 - kdump of HVM fails, soft-reset not handled by libxl
+    bsc#1181989 - openQA job causes libvirtd to dump core when
+    running kdump inside domain
+  xsa368.patch
+
+-------------------------------------------------------------------

New:
----
  xsa368.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ xen.spec ++++++
--- /var/tmp/diff_new_pack.GSkM1v/_old  2021-03-21 23:19:28.812720904 +0100
+++ /var/tmp/diff_new_pack.GSkM1v/_new  2021-03-21 23:19:28.816720906 +0100
@@ -130,7 +130,7 @@
 %endif
 Provides:       installhint(reboot-needed)
 
-Version:        4.14.1_12
+Version:        4.14.1_14
 Release:        0
 Summary:        Xen Virtualization: Hypervisor (aka VMM aka Microkernel)
 License:        GPL-2.0-only
@@ -186,6 +186,7 @@
 Patch16:        602e5abb-gnttab-bypass-IOMMU-when-mapping-own-grant.patch
 Patch17:        602ffae9-tools-libs-light-fix-xl-save--c-handling.patch
 Patch18:        6037b02e-x86-EFI-suppress-ld-2-36-base-relocs.patch
+Patch200:       xsa368.patch
 # libxc
 Patch300:       libxc-sr-3cccdae45242dab27198b8e150be0c85acd5d3c9.patch
 Patch301:       libxc-sr-readv_exact.patch

++++++ libxc.sr.superpage.patch ++++++
--- /var/tmp/diff_new_pack.GSkM1v/_old  2021-03-21 23:19:29.116721009 +0100
+++ /var/tmp/diff_new_pack.GSkM1v/_new  2021-03-21 23:19:29.116721009 +0100
@@ -470,7 +470,7 @@
  
      free(ctx->x86.restore.cpuid.ptr);
      free(ctx->x86.restore.msr.ptr);
-@@ -249,6 +277,368 @@ static int x86_hvm_cleanup(struct xc_sr_
+@@ -249,6 +277,380 @@ static int x86_hvm_cleanup(struct xc_sr_
      return 0;
  }
  
@@ -707,6 +707,18 @@
 +        return -1;
 +    }
 +
++    pfn = gap_start >> SUPERPAGE_1GB_SHIFT;
++    do
++    {
++        xc_sr_set_bit(pfn, &ctx->x86.hvm.restore.attempted_1g);
++    } while (++pfn <= gap_end >> SUPERPAGE_1GB_SHIFT);
++
++    pfn = gap_start >> SUPERPAGE_2MB_SHIFT;
++    do
++    {
++        xc_sr_set_bit(pfn, &ctx->x86.hvm.restore.attempted_2m);
++    } while (++pfn <= gap_end >> SUPERPAGE_2MB_SHIFT);
++
 +    pfn = gap_start;
 +
 +    while ( pfn <= gap_end )
@@ -839,7 +851,7 @@
  struct xc_sr_restore_ops restore_ops_x86_hvm =
  {
      .pfn_is_valid    = x86_hvm_pfn_is_valid,
-@@ -257,6 +647,7 @@ struct xc_sr_restore_ops restore_ops_x86
+@@ -257,6 +659,7 @@ struct xc_sr_restore_ops restore_ops_x86
      .set_page_type   = x86_hvm_set_page_type,
      .localise_page   = x86_hvm_localise_page,
      .setup           = x86_hvm_setup,

++++++ libxl.LIBXL_HOTPLUG_TIMEOUT.patch ++++++
--- /var/tmp/diff_new_pack.GSkM1v/_old  2021-03-21 23:19:29.128721013 +0100
+++ /var/tmp/diff_new_pack.GSkM1v/_new  2021-03-21 23:19:29.128721013 +0100
@@ -294,7 +294,7 @@
      /* private */
      libxl__ev_time time;
      libxl__ev_child child;
-@@ -4845,6 +4848,9 @@ int libxl__is_domid_recent(libxl__gc *gc
+@@ -4847,6 +4850,9 @@ int libxl__is_domid_recent(libxl__gc *gc
  
  #endif
  

++++++ libxl.max_event_channels.patch ++++++
--- /var/tmp/diff_new_pack.GSkM1v/_old  2021-03-21 23:19:29.144721018 +0100
+++ /var/tmp/diff_new_pack.GSkM1v/_new  2021-03-21 23:19:29.148721020 +0100
@@ -3,6 +3,11 @@
 1023 is too low for a three digit value of vcpus
 it is difficult to make the value depend on the number of vcpus
 adding devices at runtime also needs event channels
+
+But, having an unbound value (of 128k) may have a negative effect on XSA-344.
+
+Therefore, just let the built-in default depend on the number of vcpus.
+
 Index: xen-4.14.0-testing/tools/libxl/libxl_create.c
 ===================================================================
 --- xen-4.14.0-testing.orig/tools/libxl/libxl_create.c
@@ -12,7 +17,7 @@
  
      if (!b_info->event_channels)
 -        b_info->event_channels = 1023;
-+        b_info->event_channels = -1U;
++        b_info->event_channels = min(1023, 8 * b_info->max_vcpus + 511);
  
      libxl__arch_domain_build_info_setdefault(gc, b_info);
      libxl_defbool_setdefault(&b_info->dm_restrict, false);

++++++ xsa368.patch ++++++
>From b1d5e033df1858edd6fa328abd126522947440aa Mon Sep 17 00:00:00 2001
From: Anthony PERARD <anthony.per...@citrix.com>
Date: Wed, 24 Feb 2021 18:39:20 +0000
Subject: [PATCH] libxl: Fix domain soft reset state handling

In do_domain_soft_reset(), a `libxl__domain_suspend_state' is used
without been properly initialised and disposed of. This lead do a
abort() in libxl due to the `dsps.qmp' state been used before been
initialised:
    libxl__ev_qmp_send: Assertion `ev->state == qmp_state_disconnected || 
ev->state == qmp_state_connected' failed.

Once initialised, `dsps' also needs to be disposed of as the `qmp'
state might still be in the `Connected' state in the callback for
libxl__domain_suspend_device_model(). So this patch adds
libxl__domain_suspend_dispose() which can be called from the two
places where we need to dispose of `dsps'.

Signed-off-by: Anthony PERARD <anthony.per...@citrix.com>
Reviewed-by: Ian Jackson <i...@xenproject.org>
Tested-by: Olaf Hering <o...@aepfle.de>
---
 tools/libxl/libxl_create.c      | 11 ++++++++---
 tools/libxl/libxl_dom_suspend.c | 15 +++++++++++----
 tools/libxl/libxl_internal.h    |  2 ++
 3 files changed, 21 insertions(+), 7 deletions(-)

diff --git a/tools/libxl/libxl_create.c b/tools/libxl/libxl_create.c
index 2814818e34..83b0eb00bf 100644
--- a/tools/libxl/libxl_create.c
+++ b/tools/libxl/libxl_create.c
@@ -2174,9 +2174,7 @@ static int do_domain_soft_reset(libxl_ctx *ctx,
     state->console_tty = libxl__strdup(gc, console_tty);
 
     dss->ao = ao;
-    dss->domid = dss->dsps.domid = domid;
-    dss->dsps.dm_savefile = GCSPRINTF(LIBXL_DEVICE_MODEL_SAVE_FILE".%d",
-                                      domid);
+    dss->domid = domid;
 
     rc = libxl__save_emulator_xenstore_data(dss, &srs->toolstack_buf,
                                             &srs->toolstack_len);
@@ -2186,6 +2184,11 @@ static int do_domain_soft_reset(libxl_ctx *ctx,
     }
 
     dss->dsps.ao = ao;
+    dss->dsps.domid = domid;
+    dss->dsps.live = false;
+    rc = libxl__domain_suspend_init(egc, &dss->dsps, d_config->b_info.type);
+    if (rc)
+        goto out;
     dss->dsps.callback_device_model_done = soft_reset_dm_suspended;
     libxl__domain_suspend_device_model(egc, &dss->dsps); /* must be last */
 
@@ -2204,6 +2207,8 @@ static void soft_reset_dm_suspended(libxl__egc *egc,
         CONTAINER_OF(dsps, *srs, dss.dsps);
     libxl__app_domain_create_state *cdcs = &srs->cdcs;
 
+    libxl__domain_suspend_dispose(gc, dsps);
+
     /*
      * Ask all backends to disconnect by removing the domain from
      * xenstore. On the creation path the domain will be introduced to
diff --git a/tools/libxl/libxl_dom_suspend.c b/tools/libxl/libxl_dom_suspend.c
index 25d1571895..2a280f69a1 100644
--- a/tools/libxl/libxl_dom_suspend.c
+++ b/tools/libxl/libxl_dom_suspend.c
@@ -67,6 +67,16 @@ out:
     return rc;
 }
 
+void libxl__domain_suspend_dispose(libxl__gc *gc,
+                                   libxl__domain_suspend_state  *dsps)
+{
+    libxl__xswait_stop(gc, &dsps->pvcontrol);
+    libxl__ev_evtchn_cancel(gc, &dsps->guest_evtchn);
+    libxl__ev_xswatch_deregister(gc, &dsps->guest_watch);
+    libxl__ev_time_deregister(gc, &dsps->guest_timeout);
+    libxl__ev_qmp_dispose(gc, &dsps->qmp);
+}
+
 /*----- callbacks, called by xc_domain_save -----*/
 
 void libxl__domain_suspend_device_model(libxl__egc *egc,
@@ -388,10 +398,7 @@ static void domain_suspend_common_done(libxl__egc *egc,
 {
     EGC_GC;
     assert(!libxl__xswait_inuse(&dsps->pvcontrol));
-    libxl__ev_evtchn_cancel(gc, &dsps->guest_evtchn);
-    libxl__ev_xswatch_deregister(gc, &dsps->guest_watch);
-    libxl__ev_time_deregister(gc, &dsps->guest_timeout);
-    libxl__ev_qmp_dispose(gc, &dsps->qmp);
+    libxl__domain_suspend_dispose(gc, dsps);
     dsps->callback_common_done(egc, dsps, rc);
 }
 
diff --git a/tools/libxl/libxl_internal.h b/tools/libxl/libxl_internal.h
index 94a23179d3..3bc3bbcf84 100644
--- a/tools/libxl/libxl_internal.h
+++ b/tools/libxl/libxl_internal.h
@@ -3615,6 +3615,8 @@ struct libxl__domain_suspend_state {
 int libxl__domain_suspend_init(libxl__egc *egc,
                                libxl__domain_suspend_state *dsps,
                                libxl_domain_type type);
+void libxl__domain_suspend_dispose(libxl__gc *gc,
+                                   libxl__domain_suspend_state  *dsps);
 
 /* calls dsps->callback_device_model_done when done
  * may synchronously calls this callback */
-- 
2.30.1

Reply via email to