diff --git a/0038-linux-user-Fix-emulation-of-splice-.patch b/0038-linux-user-Fix-emulation-of-splice-.patch new file mode 100644 index 00000000..f00bafd3 --- /dev/null +++ b/0038-linux-user-Fix-emulation-of-splice-.patch @@ -0,0 +1,57 @@ +From 1e915c4c11b3e2bf592f83ed9b7efed3b277cdd4 Mon Sep 17 00:00:00 2001 +From: Andreas Schwab +Date: Thu, 5 Feb 2015 12:31:16 +0100 +Subject: [PATCH] linux-user: Fix emulation of splice syscall +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +The second and fourth argument are in/out parameters, store them back +after the syscall. Also, the fourth argument was mishandled, and EFAULT +handling was missing. + +Signed-off-by: Andreas Schwab +Reviewed-by: Peter Maydell +Signed-off-by: Andreas Färber +--- + linux-user/syscall.c | 22 ++++++++++++++++++---- + 1 file changed, 18 insertions(+), 4 deletions(-) + +diff --git a/linux-user/syscall.c b/linux-user/syscall.c +index a41dd43..5f208df 100644 +--- a/linux-user/syscall.c ++++ b/linux-user/syscall.c +@@ -9480,15 +9480,29 @@ abi_long do_syscall(void *cpu_env, int num, abi_ulong arg1, + { + loff_t loff_in, loff_out; + loff_t *ploff_in = NULL, *ploff_out = NULL; +- if(arg2) { +- get_user_u64(loff_in, arg2); ++ if (arg2) { ++ if (get_user_u64(loff_in, arg2)) { ++ goto efault; ++ } + ploff_in = &loff_in; + } +- if(arg4) { +- get_user_u64(loff_out, arg2); ++ if (arg4) { ++ if (get_user_u64(loff_out, arg4)) { ++ goto efault; ++ } + ploff_out = &loff_out; + } + ret = get_errno(splice(arg1, ploff_in, arg3, ploff_out, arg5, arg6)); ++ if (arg2) { ++ if (put_user_u64(loff_in, arg2)) { ++ goto efault; ++ } ++ } ++ if (arg4) { ++ if (put_user_u64(loff_out, arg4)) { ++ goto efault; ++ } ++ } + } + break; + #endif diff --git a/libcacard.changes b/libcacard.changes index b2af417f..9e1eb6df 100644 --- a/libcacard.changes +++ b/libcacard.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Sun Mar 1 12:50:52 UTC 2015 - afaerber@suse.de + +- Update company name in spec file templates +- Patch queue updated from git://github.com/openSUSE/qemu.git opensuse-2.2 +* Patches added: + 0038-linux-user-Fix-emulation-of-splice-.patch + ------------------------------------------------------------------- Wed Jan 14 00:38:44 UTC 2015 - agraf@suse.com diff --git a/libcacard.spec b/libcacard.spec index 554cfaf9..e9bc792a 100644 --- a/libcacard.spec +++ b/libcacard.spec @@ -1,7 +1,7 @@ # # spec file for package libcacard # -# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -62,6 +62,7 @@ Patch0034: 0034-virtfs-proxy-helper-Provide-__u64-f.patch Patch0035: 0035-configure-Enable-PIE-for-ppc-and-pp.patch Patch0036: 0036-qtest-Increase-socket-timeout.patch Patch0037: 0037-AIO-Reduce-number-of-threads-for-32.patch +Patch0038: 0038-linux-user-Fix-emulation-of-splice-.patch # Please do not add patches manually here, run update_git.sh. # this is to make lint happy Source300: qemu-rpmlintrc @@ -158,6 +159,7 @@ This sub-package contains development files for the Smartcard library. %patch0035 -p1 %patch0036 -p1 %patch0037 -p1 +%patch0038 -p1 %build ./configure --prefix=%_prefix --sysconfdir=%_sysconfdir \ diff --git a/libcacard.spec.in b/libcacard.spec.in index 64bba878..103f4bd7 100644 --- a/libcacard.spec.in +++ b/libcacard.spec.in @@ -1,7 +1,7 @@ # # spec file for package libcacard # -# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed diff --git a/qemu-linux-user.changes b/qemu-linux-user.changes index 2a1b6b37..813eeed4 100644 --- a/qemu-linux-user.changes +++ b/qemu-linux-user.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Sun Mar 1 12:51:39 UTC 2015 - afaerber@suse.de + +- Update company name in spec file templates +- Fix splice syscall argument handling (by Andreas_Schwab) + 0038-linux-user-Fix-emulation-of-splice-.patch +* Patch queue updated from git://github.com/openSUSE/qemu.git opensuse-2.2 + ------------------------------------------------------------------- Wed Jan 14 00:38:41 UTC 2015 - agraf@suse.com diff --git a/qemu-linux-user.spec b/qemu-linux-user.spec index b9a7e533..5822d0eb 100644 --- a/qemu-linux-user.spec +++ b/qemu-linux-user.spec @@ -1,7 +1,7 @@ # # spec file for package qemu-linux-user # -# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -62,6 +62,7 @@ Patch0034: 0034-virtfs-proxy-helper-Provide-__u64-f.patch Patch0035: 0035-configure-Enable-PIE-for-ppc-and-pp.patch Patch0036: 0036-qtest-Increase-socket-timeout.patch Patch0037: 0037-AIO-Reduce-number-of-threads-for-32.patch +Patch0038: 0038-linux-user-Fix-emulation-of-splice-.patch # Please do not add patches manually here, run update_git.sh. # this is to make lint happy Source300: qemu-rpmlintrc @@ -152,6 +153,7 @@ run cross-architecture builds. %patch0035 -p1 %patch0036 -p1 %patch0037 -p1 +%patch0038 -p1 %build ./configure --prefix=%_prefix --sysconfdir=%_sysconfdir \ diff --git a/qemu-linux-user.spec.in b/qemu-linux-user.spec.in index b2b28038..6b23fc28 100644 --- a/qemu-linux-user.spec.in +++ b/qemu-linux-user.spec.in @@ -1,7 +1,7 @@ # # spec file for package qemu-linux-user # -# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed diff --git a/qemu.changes b/qemu.changes index 7c43f857..8b5d8da6 100644 --- a/qemu.changes +++ b/qemu.changes @@ -1,3 +1,17 @@ +------------------------------------------------------------------- +Sun Mar 1 12:50:44 UTC 2015 - afaerber@suse.de + +- Update company name in spec file templates +- Patch queue updated from git://github.com/openSUSE/qemu.git opensuse-2.2 +* Patches added: + 0038-linux-user-Fix-emulation-of-splice-.patch + +------------------------------------------------------------------- +Sun Feb 22 15:59:23 UTC 2015 - mpluskal@suse.com + +- Add user kvm when installing guest-agent. +- Use macro to update udev_rules when available + ------------------------------------------------------------------- Wed Feb 11 17:56:26 UTC 2015 - afaerber@suse.de diff --git a/qemu.spec b/qemu.spec index 782fbed4..cc4b50d1 100644 --- a/qemu.spec +++ b/qemu.spec @@ -1,7 +1,7 @@ # # spec file for package qemu # -# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -92,6 +92,7 @@ Patch0034: 0034-virtfs-proxy-helper-Provide-__u64-f.patch Patch0035: 0035-configure-Enable-PIE-for-ppc-and-pp.patch Patch0036: 0036-qtest-Increase-socket-timeout.patch Patch0037: 0037-AIO-Reduce-number-of-threads-for-32.patch +Patch0038: 0038-linux-user-Fix-emulation-of-splice-.patch # Please do not add patches manually here, run update_git.sh. # this is to make lint happy @@ -499,6 +500,7 @@ This package provides a service file for starting and stopping KSM. %patch0035 -p1 %patch0036 -p1 %patch0037 -p1 +%patch0038 -p1 %if %{build_x86_fw_from_source} # as a safeguard, delete the firmware files that we intend to build @@ -634,13 +636,20 @@ install -D -p -m 0644 %{SOURCE6} %{buildroot}%{_unitdir}/ksm.service %{_sbindir}/useradd -r -g qemu -G kvm -d / -s /sbin/nologin \ -c "qemu user" qemu +%pre guest-agent +%{_bindir}/getent group kvm >/dev/null || %{_sbindir}/groupadd -r kvm 2>/dev/null + %if %{kvm_available} %post +%if 0%{?with_systemd} +%udev_rules_update +%else if [ "$(readlink -f /proc/1/root)" = "/" ]; then /sbin/udevadm control --reload-rules || : /sbin/udevadm trigger || : fi %endif +%endif %if 0%{?suse_version} >= 1130 %post tools diff --git a/qemu.spec.in b/qemu.spec.in index adc98285..58bf7b75 100644 --- a/qemu.spec.in +++ b/qemu.spec.in @@ -1,7 +1,7 @@ # # spec file for package qemu # -# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -562,13 +562,20 @@ install -D -p -m 0644 %{SOURCE6} %{buildroot}%{_unitdir}/ksm.service %{_sbindir}/useradd -r -g qemu -G kvm -d / -s /sbin/nologin \ -c "qemu user" qemu +%pre guest-agent +%{_bindir}/getent group kvm >/dev/null || %{_sbindir}/groupadd -r kvm 2>/dev/null + %if %{kvm_available} %post +%if 0%{?with_systemd} +%udev_rules_update +%else if [ "$(readlink -f /proc/1/root)" = "/" ]; then /sbin/udevadm control --reload-rules || : /sbin/udevadm trigger || : fi %endif +%endif %if 0%{?suse_version} >= 1130 %post tools