From b9b02703c8dd50daf27bf85f9f922c022175132b8ead06214d54777d7b688700 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Sun, 1 Mar 2015 13:38:32 +0000 Subject: [PATCH] Accepting request 288312 from home:a_faerber:branches:Virtualization Fix linux-user splice syscall OBS-URL: https://build.opensuse.org/request/show/288312 OBS-URL: https://build.opensuse.org/package/show/Virtualization/qemu?expand=0&rev=236 --- ...-linux-user-Fix-emulation-of-splice-.patch | 57 +++++++++++++++++++ libcacard.changes | 8 +++ libcacard.spec | 2 + libcacard.spec.in | 2 +- qemu-linux-user.changes | 8 +++ qemu-linux-user.spec | 2 + qemu-linux-user.spec.in | 2 +- qemu.changes | 8 +++ qemu.spec | 2 + qemu.spec.in | 2 +- 10 files changed, 90 insertions(+), 3 deletions(-) create mode 100644 0038-linux-user-Fix-emulation-of-splice-.patch 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 0000000..f00bafd --- /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 b2af417..9e1eb6d 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 a688d33..e9bc792 100644 --- a/libcacard.spec +++ b/libcacard.spec @@ -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 64bba87..103f4bd 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 2a1b6b3..813eeed 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 e8c2591..5822d0e 100644 --- a/qemu-linux-user.spec +++ b/qemu-linux-user.spec @@ -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 b2b2803..6b23fc2 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 95adeee..8b5d8da 100644 --- a/qemu.changes +++ b/qemu.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +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 diff --git a/qemu.spec b/qemu.spec index cf1cfbf..cc4b50d 100644 --- a/qemu.spec +++ b/qemu.spec @@ -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 diff --git a/qemu.spec.in b/qemu.spec.in index 416d331..58bf7b7 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