Rebased to version 2.3.0-rc2

Don't install ksm services as executable (bz #1192720)
Skip hanging tests on s390 (bz #1206057)
CVE-2015-1779 vnc: insufficient resource limiting in VNC websockets decoder
(bz #1205051, bz #1199572)
This commit is contained in:
Cole Robinson 2015-03-31 17:44:56 -04:00
parent c2770435bf
commit c61e67e86b
4 changed files with 29 additions and 62 deletions

View File

@ -1,43 +0,0 @@
From: "Michael S. Tsirkin" <mst@redhat.com>
Date: Wed, 25 Mar 2015 12:41:26 +0100
Subject: [PATCH] virtio-serial: fix virtio config size
commit 9b70c1790acacae54d559d38ca69186a85040bb8
virtio-serial: switch to standard-headers
changes virtio_console_config size from 8 to 12 bytes:
it adds an optional 4 byte emerg_wr field.
As this crosses a power of two boundary, this changes the PCI BAR size,
which breaks migration compatibility with old qemu machine types.
It's probably a problem for other transports as well.
As a temporary fix, as we don't yet support this new field anyway,
simply make the config size smaller at init time.
Long terms we probably want something along the lines
of virtio_net_set_config_size.
Reported-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Message-Id: <1427283599-12789-1-git-send-email-mst@redhat.com>
---
hw/char/virtio-serial-bus.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/hw/char/virtio-serial-bus.c b/hw/char/virtio-serial-bus.c
index d14e872..e336bdb 100644
--- a/hw/char/virtio-serial-bus.c
+++ b/hw/char/virtio-serial-bus.c
@@ -980,8 +980,10 @@ static void virtio_serial_device_realize(DeviceState *dev, Error **errp)
return;
}
+ /* We don't support emergency write, skip it for now. */
+ /* TODO: cleaner fix, depending on host features. */
virtio_init(vdev, "virtio-serial", VIRTIO_ID_CONSOLE,
- sizeof(struct virtio_console_config));
+ offsetof(struct virtio_console_config, emerg_wr));
/* Spawn a new virtio-serial bus on which the ports will ride as devices */
qbus_create_inplace(&vser->bus, sizeof(vser->bus), TYPE_VIRTIO_SERIAL_BUS,

View File

@ -7,8 +7,8 @@ ConditionVirtualization=no
Type=oneshot
RemainAfterExit=yes
EnvironmentFile=-/etc/sysconfig/ksm
ExecStart=/lib/systemd/ksmctl start
ExecStop=/lib/systemd/ksmctl stop
ExecStart=/usr/libexecdir/ksmctl start
ExecStop=/usr/libexecdir/ksmctl stop
[Install]
WantedBy=multi-user.target

View File

@ -43,14 +43,14 @@
Summary: QEMU is a FAST! processor emulator
Name: qemu
Version: 2.3.0
Release: 0.2.rc1%{?dist}
Release: 0.3.rc2%{?dist}
Epoch: 2
License: GPLv2+ and LGPLv2+ and BSD
Group: Development/Tools
URL: http://www.qemu.org/
#Source0: http://wiki.qemu-project.org/download/%{name}-%{version}.tar.bz2
Source0: http://wiki.qemu-project.org/download/%{name}-%{version}-rc1.tar.bz2
Source0: http://wiki.qemu-project.org/download/%{name}-%{version}-rc2.tar.bz2
Source1: qemu.binfmt
@ -75,9 +75,6 @@ Source12: bridge.conf
# qemu-kvm back compat wrapper
Source13: qemu-kvm.sh
# Fix virtconsole migration
Patch0001: 0001-virtio-serial-fix-virtio-config-size.patch
BuildRequires: SDL2-devel
BuildRequires: zlib-devel
BuildRequires: which
@ -542,10 +539,8 @@ CAC emulation development files.
%prep
%setup -q -n qemu-%{version}-rc1
# Fix virtconsole migration
%patch0001 -p1
%setup -q -n qemu-%{version}-rc2
%autopatch
%build
@ -644,11 +639,11 @@ if [ -x "$b" ]; then "$b" -help; fi
mkdir -p %{buildroot}%{_udevdir}
mkdir -p %{buildroot}%{_unitdir}
install -D -p -m 0744 %{_sourcedir}/ksm.service %{buildroot}%{_unitdir}
install -D -p -m 0644 %{_sourcedir}/ksm.service %{buildroot}%{_unitdir}
install -D -p -m 0644 %{_sourcedir}/ksm.sysconfig %{buildroot}%{_sysconfdir}/sysconfig/ksm
install -D -p -m 0755 ksmctl %{buildroot}/lib/systemd/ksmctl
install -D -p -m 0755 ksmctl %{buildroot}%{_libexecdir}/ksmctl
install -D -p -m 0744 %{_sourcedir}/ksmtuned.service %{buildroot}%{_unitdir}
install -D -p -m 0644 %{_sourcedir}/ksmtuned.service %{buildroot}%{_unitdir}
install -D -p -m 0755 %{_sourcedir}/ksmtuned %{buildroot}%{_sbindir}/ksmtuned
install -D -p -m 0644 %{_sourcedir}/ksmtuned.conf %{buildroot}%{_sysconfdir}/ksmtuned.conf
@ -802,11 +797,19 @@ done
%check
# Run check on all arches, don't currently fail build on ARM and s390
%ifnarch %{arm} aarch64 s390
# 2.3.0-rc2 tests are hanging on s390:
# https://bugzilla.redhat.com/show_bug.cgi?id=1206057
%global archs_skip_tests s390
%global archs_ignore_test_failures 0
%ifnarch %{archs_skip_tests}
%ifarch %{archs_ignore_test_failures}
make check V=1
%else
make check V=1 ||:
make check V=1 || :
%endif
%endif
# Sanity-check current kernel can boot on this qemu.
@ -909,7 +912,7 @@ getent passwd qemu >/dev/null || \
%files -n ksm
/lib/systemd/ksmctl
%{_libexecdir}/ksmctl
%{_sbindir}/ksmtuned
%{_unitdir}/ksmtuned.service
%{_unitdir}/ksm.service
@ -1185,6 +1188,13 @@ getent passwd qemu >/dev/null || \
%changelog
* Tue Mar 24 2015 Cole Robinson <crobinso@redhat.com> - 2:2.3.0-0.1.rc2
- Rebased to version 2.3.0-rc2
- Don't install ksm services as executable (bz #1192720)
- Skip hanging tests on s390 (bz #1206057)
- CVE-2015-1779 vnc: insufficient resource limiting in VNC websockets decoder
(bz #1205051, bz #1199572)
* Tue Mar 24 2015 Cole Robinson <crobinso@redhat.com> - 2:2.3.0-0.1.rc1
- Rebased to version 2.3.0-rc1

View File

@ -1 +1 @@
3a7542676a8ad4f0190c111e3fbfcaa1 qemu-2.3.0-rc1.tar.bz2
e999b4d3e9cca3a4cc43c0c82399ed3c qemu-2.3.0-rc2.tar.bz2