Accepting request 289883 from Virtualization

Automatic submission by obs-autosubmit

OBS-URL: https://build.opensuse.org/request/show/289883
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/qemu?expand=0&rev=106
This commit is contained in:
Dominique Leuenberger 2015-03-16 05:56:08 +00:00 committed by Git OBS Bridge
commit 0cdb347634
10 changed files with 113 additions and 6 deletions

View File

@ -0,0 +1,57 @@
From 1e915c4c11b3e2bf592f83ed9b7efed3b277cdd4 Mon Sep 17 00:00:00 2001
From: Andreas Schwab <schwab@suse.de>
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 <schwab@suse.de>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Andreas Färber <afaerber@suse.de>
---
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

View File

@ -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

View File

@ -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 \

View File

@ -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

View File

@ -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

View File

@ -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 \

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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