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
This commit is contained in:
parent
9283b45508
commit
b9b02703c8
57
0038-linux-user-Fix-emulation-of-splice-.patch
Normal file
57
0038-linux-user-Fix-emulation-of-splice-.patch
Normal 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
|
@ -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
|
Wed Jan 14 00:38:44 UTC 2015 - agraf@suse.com
|
||||||
|
|
||||||
|
@ -62,6 +62,7 @@ Patch0034: 0034-virtfs-proxy-helper-Provide-__u64-f.patch
|
|||||||
Patch0035: 0035-configure-Enable-PIE-for-ppc-and-pp.patch
|
Patch0035: 0035-configure-Enable-PIE-for-ppc-and-pp.patch
|
||||||
Patch0036: 0036-qtest-Increase-socket-timeout.patch
|
Patch0036: 0036-qtest-Increase-socket-timeout.patch
|
||||||
Patch0037: 0037-AIO-Reduce-number-of-threads-for-32.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.
|
# Please do not add patches manually here, run update_git.sh.
|
||||||
# this is to make lint happy
|
# this is to make lint happy
|
||||||
Source300: qemu-rpmlintrc
|
Source300: qemu-rpmlintrc
|
||||||
@ -158,6 +159,7 @@ This sub-package contains development files for the Smartcard library.
|
|||||||
%patch0035 -p1
|
%patch0035 -p1
|
||||||
%patch0036 -p1
|
%patch0036 -p1
|
||||||
%patch0037 -p1
|
%patch0037 -p1
|
||||||
|
%patch0038 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
./configure --prefix=%_prefix --sysconfdir=%_sysconfdir \
|
./configure --prefix=%_prefix --sysconfdir=%_sysconfdir \
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package libcacard
|
# 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
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
|
@ -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
|
Wed Jan 14 00:38:41 UTC 2015 - agraf@suse.com
|
||||||
|
|
||||||
|
@ -62,6 +62,7 @@ Patch0034: 0034-virtfs-proxy-helper-Provide-__u64-f.patch
|
|||||||
Patch0035: 0035-configure-Enable-PIE-for-ppc-and-pp.patch
|
Patch0035: 0035-configure-Enable-PIE-for-ppc-and-pp.patch
|
||||||
Patch0036: 0036-qtest-Increase-socket-timeout.patch
|
Patch0036: 0036-qtest-Increase-socket-timeout.patch
|
||||||
Patch0037: 0037-AIO-Reduce-number-of-threads-for-32.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.
|
# Please do not add patches manually here, run update_git.sh.
|
||||||
# this is to make lint happy
|
# this is to make lint happy
|
||||||
Source300: qemu-rpmlintrc
|
Source300: qemu-rpmlintrc
|
||||||
@ -152,6 +153,7 @@ run cross-architecture builds.
|
|||||||
%patch0035 -p1
|
%patch0035 -p1
|
||||||
%patch0036 -p1
|
%patch0036 -p1
|
||||||
%patch0037 -p1
|
%patch0037 -p1
|
||||||
|
%patch0038 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
./configure --prefix=%_prefix --sysconfdir=%_sysconfdir \
|
./configure --prefix=%_prefix --sysconfdir=%_sysconfdir \
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package qemu-linux-user
|
# 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
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
|
@ -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
|
Sun Feb 22 15:59:23 UTC 2015 - mpluskal@suse.com
|
||||||
|
|
||||||
|
@ -92,6 +92,7 @@ Patch0034: 0034-virtfs-proxy-helper-Provide-__u64-f.patch
|
|||||||
Patch0035: 0035-configure-Enable-PIE-for-ppc-and-pp.patch
|
Patch0035: 0035-configure-Enable-PIE-for-ppc-and-pp.patch
|
||||||
Patch0036: 0036-qtest-Increase-socket-timeout.patch
|
Patch0036: 0036-qtest-Increase-socket-timeout.patch
|
||||||
Patch0037: 0037-AIO-Reduce-number-of-threads-for-32.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.
|
# Please do not add patches manually here, run update_git.sh.
|
||||||
|
|
||||||
# this is to make lint happy
|
# this is to make lint happy
|
||||||
@ -499,6 +500,7 @@ This package provides a service file for starting and stopping KSM.
|
|||||||
%patch0035 -p1
|
%patch0035 -p1
|
||||||
%patch0036 -p1
|
%patch0036 -p1
|
||||||
%patch0037 -p1
|
%patch0037 -p1
|
||||||
|
%patch0038 -p1
|
||||||
|
|
||||||
%if %{build_x86_fw_from_source}
|
%if %{build_x86_fw_from_source}
|
||||||
# as a safeguard, delete the firmware files that we intend to build
|
# as a safeguard, delete the firmware files that we intend to build
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package qemu
|
# 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
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
|
Loading…
Reference in New Issue
Block a user