xen/xencommons-proc-xen.patch
Charles Arnold 3f55414718 - Update to Xen 4.1.3 c/s 23336
- Upstream or pending upstream patches from Jan
  25587-fix-off-by-one-parsing-error.patch
  25616-x86-MCi_CTL-default.patch
  25617-vtd-qinval-addr.patch
  25688-x86-nr_irqs_gsi.patch
- bnc#773393 - VUL-0: CVE-2012-3433: xen: HVM guest destroy p2m
  teardown host DoS vulnerability
  CVE-2012-3433-xsa11.patch
- bnc#773401 - VUL-1: CVE-2012-3432: xen: HVM guest user mode MMIO
  emulation DoS
  25682-x86-inconsistent-io-state.patch

- bnc#762484 - VUL-1: CVE-2012-2625: xen: pv bootloader doesn't
  check the size of the bzip2 or lzma compressed kernel, leading to
  denial of service
  25589-pygrub-size-limits.patch

- Make it build with latest TeXLive 2012 with new package layout

OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=196
2012-08-10 21:38:41 +00:00

62 lines
1.9 KiB
Diff

# HG changeset patch
# Parent ea18090ab6e3cb3c69d232ec0865589688db3f81
hotplug: update xencommons script to run only when needed
Update the xencommons script to run only when needed:
- do not run if /proc/xen does not exist
- check if /proc/xen/capabilities exists before doing the grep for dom0
- use variable for /proc/xen/capabilities
- use grep -q instead of stdout redirection when looking for xenfs,
its already used later
Signed-off-by: Olaf Hering <olaf@aepfle.de>
---
tools/hotplug/Linux/init.d/xencommons | 20 ++++++++++++++++----
1 file changed, 16 insertions(+), 4 deletions(-)
Index: xen-4.1.3-testing/tools/hotplug/Linux/init.d/xencommons
===================================================================
--- xen-4.1.3-testing.orig/tools/hotplug/Linux/init.d/xencommons
+++ xen-4.1.3-testing/tools/hotplug/Linux/init.d/xencommons
@@ -27,27 +27,30 @@ fi
test -f $xencommons_config/xencommons && . $xencommons_config/xencommons
XENCONSOLED_PIDFILE=/var/run/xenconsoled.pid
+XEN_CAPABILITIES=/proc/xen/capabilities
shopt -s extglob
# not running in Xen dom0 or domU
if ! test -d /proc/xen ; then
- exit 0
+ exit 0
fi
# mount xenfs in dom0 or domU with a pv_ops kernel
if test "x$1" = xstart && \
- ! test -f /proc/xen/capabilities && \
- ! grep '^xenfs ' /proc/mounts >/dev/null;
+ ! test -f $XEN_CAPABILITIES && \
+ ! grep -q '^xenfs ' /proc/mounts ;
then
- mount -t xenfs xenfs /proc/xen
+ mount -t xenfs xenfs /proc/xen
fi
# run this script only in dom0:
-# no capabilities file in xenlinux domU kernel
-# empty capabilities file in pv_ops domU kernel
-if test -f /proc/xen/capabilities && \
- ! grep -q "control_d" /proc/xen/capabilities ; then
- exit 0
+# no capabilities file in xenlinux kernel
+if ! test -f $XEN_CAPABILITIES ; then
+ exit 0
+fi
+# empty capabilities file in pv_ops kernel
+if ! grep -q "control_d" $XEN_CAPABILITIES ; then
+ exit 0
fi
do_start () {