73fd9f3c19
53356c1e-x86-HVM-correct-CPUID-leaf-80000008-handling.patch 533ad1ee-VMX-fix-PAT-value-seen-by-guest.patch 533d413b-x86-mm-fix-checks-against-max_mapped_pfn.patch - bnc#862608 - SLES 11 SP3 vm-install should get RHEL 7 support when released 53206661-pygrub-support-linux16-and-initrd16.patch - Upstream bug fixes 53299d8f-xenconsole-reset-tty-on-failure.patch 53299d8f-xenconsole-tolerate-tty-errors.patch - fix build for armv7l and aarch64 - Remove compiletime strings from qemu-upstream qemu-xen-upstream-megasas-buildtime.patch - bnc#871546 - KMPs are not signed in SUSE:SLE-12:GA? xen.spec - Upstream patches from Jan 532fff53-x86-fix-determination-of-bit-count-for-struct-domain-allocations.patch 5331917d-x86-enforce-preemption-in-HVM_set_mem_access-p2m_set_mem_access.patch - Drop xsa89.patch for upstream version (see bnc#867910, 5331917d-x86-enforce...) OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=309
50 lines
2.0 KiB
Diff
50 lines
2.0 KiB
Diff
Subject: tools/console: xenconsole tolerate tty errors
|
|
From: Ian Jackson ian.jackson@eu.citrix.com Thu Feb 27 17:46:49 2014 +0000
|
|
Date: Wed Mar 19 13:37:19 2014 +0000:
|
|
Git: 39ba2989b10b6a1852e253b204eb010f8e7026f1
|
|
|
|
Since 28d386fc4341 (XSA-57), libxl writes an empty value for the
|
|
console tty node, with read-only permission for the guest, when
|
|
setting up pv console "frontends". (The actual tty value is later set
|
|
by xenconsoled.) Writing an empty node is not strictly necessary to
|
|
stop the frontend from writing dangerous values here, but it is a good
|
|
belt-and-braces approach.
|
|
|
|
Unfortunately this confuses xenconsole. It reads the empty value, and
|
|
tries to open it as the tty. xenconsole then exits.
|
|
|
|
Fix this by having xenconsole treat an empty value the same way as no
|
|
value at all.
|
|
|
|
Also, make the error opening the tty be nonfatal: we just print a
|
|
warning, but do not exit. I think this is helpful in theoretical
|
|
situations where xenconsole is racing with libxl and/or xenconsoled.
|
|
|
|
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
|
|
Acked-by: Ian Campbell <Ian.Campbell@citrix.com>
|
|
CC: George Dunlap <george.dunlap@eu.citrix.com>
|
|
|
|
---
|
|
v2: Combine two conditions and move the free
|
|
|
|
Index: xen-4.4.0-testing/tools/console/client/main.c
|
|
===================================================================
|
|
--- xen-4.4.0-testing.orig/tools/console/client/main.c
|
|
+++ xen-4.4.0-testing/tools/console/client/main.c
|
|
@@ -115,12 +115,12 @@ static int get_pty_fd(struct xs_handle *
|
|
/* We only watch for one thing, so no need to
|
|
* disambiguate: just read the pty path */
|
|
pty_path = xs_read(xs, XBT_NULL, path, &len);
|
|
- if (pty_path != NULL) {
|
|
+ if (pty_path != NULL && pty_path[0] != '\0') {
|
|
pty_fd = open(pty_path, O_RDWR | O_NOCTTY);
|
|
if (pty_fd == -1)
|
|
- err(errno, "Could not open tty `%s'", pty_path);
|
|
- free(pty_path);
|
|
+ warn("Could not open tty `%s'", pty_path);
|
|
}
|
|
+ free(pty_path);
|
|
}
|
|
} while (pty_fd == -1 && (now = time(NULL)) < start + seconds);
|
|
|