Olaf Hering
7adb207e17
- Update to v2.6.0-rc0: See http://wiki.qemu-project.org/ChangeLog/2.6 * Patch queue updated from git://github.com/openSUSE/qemu.git opensuse-2.6 * Accept every size in DISCARD request from a guest (bsc#964427) 0039-block-split-large-discard-requests-.patch * Recognize libxl flag to disable flush in block device (bsc#879425) 0040-xen_disk-Add-suse-specific-flush-di.patch * Use correct flag for crypto tests 0041-tests-Use-correct-config-param-for-.patch * Fix build on powerpc: 0042-build-link-with-libatomic-on-powerp.patch * Patches dropped (upstreamed): seabios_checkrom_typo.patch seabios_avoid_smbios_signature_string.patch OBS-URL: https://build.opensuse.org/request/show/383004 OBS-URL: https://build.opensuse.org/package/show/Virtualization/qemu?expand=0&rev=289
57 lines
2.5 KiB
Diff
57 lines
2.5 KiB
Diff
From 90ede05e9c7502bf620bf027d660634636723407 Mon Sep 17 00:00:00 2001
|
|
From: Alexander Graf <agraf@suse.de>
|
|
Date: Tue, 9 Oct 2012 09:06:49 +0200
|
|
Subject: [PATCH] linux-user: use target_ulong
|
|
|
|
Linux syscalls pass pointers or data length or other information of that sort
|
|
to the kernel. This is all stuff you don't want to have sign extended.
|
|
Otherwise a host 64bit variable parameter with a size parameter will extend
|
|
it to a negative number, breaking lseek for example.
|
|
|
|
Pass syscall arguments as ulong always.
|
|
|
|
Signed-off-by: Alexander Graf <agraf@suse.de>
|
|
---
|
|
linux-user/qemu.h | 8 ++++----
|
|
linux-user/syscall.c | 8 ++++----
|
|
2 files changed, 8 insertions(+), 8 deletions(-)
|
|
|
|
diff --git a/linux-user/qemu.h b/linux-user/qemu.h
|
|
index b55a9d2..be9c21c 100644
|
|
--- a/linux-user/qemu.h
|
|
+++ b/linux-user/qemu.h
|
|
@@ -178,10 +178,10 @@ abi_long memcpy_to_target(abi_ulong dest, const void *src,
|
|
void target_set_brk(abi_ulong new_brk);
|
|
abi_long do_brk(abi_ulong new_brk);
|
|
void syscall_init(void);
|
|
-abi_long do_syscall(void *cpu_env, int num, abi_long arg1,
|
|
- abi_long arg2, abi_long arg3, abi_long arg4,
|
|
- abi_long arg5, abi_long arg6, abi_long arg7,
|
|
- abi_long arg8);
|
|
+abi_long do_syscall(void *cpu_env, int num, abi_ulong arg1,
|
|
+ abi_ulong arg2, abi_ulong arg3, abi_ulong arg4,
|
|
+ abi_ulong arg5, abi_ulong arg6, abi_ulong arg7,
|
|
+ abi_ulong arg8);
|
|
void gemu_log(const char *fmt, ...) GCC_FMT_ATTR(1, 2);
|
|
extern THREAD CPUState *thread_cpu;
|
|
void cpu_loop(CPUArchState *env);
|
|
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
|
|
index 90b1698..2048082 100644
|
|
--- a/linux-user/syscall.c
|
|
+++ b/linux-user/syscall.c
|
|
@@ -5983,10 +5983,10 @@ int syscall_restartable(int syscall_nr)
|
|
/* do_syscall() should always have a single exit point at the end so
|
|
that actions, such as logging of syscall results, can be performed.
|
|
All errnos that do_syscall() returns must be -TARGET_<errcode>. */
|
|
-abi_long do_syscall(void *cpu_env, int num, abi_long arg1,
|
|
- abi_long arg2, abi_long arg3, abi_long arg4,
|
|
- abi_long arg5, abi_long arg6, abi_long arg7,
|
|
- abi_long arg8)
|
|
+abi_long do_syscall(void *cpu_env, int num, abi_ulong arg1,
|
|
+ abi_ulong arg2, abi_ulong arg3, abi_ulong arg4,
|
|
+ abi_ulong arg5, abi_ulong arg6, abi_ulong arg7,
|
|
+ abi_ulong arg8)
|
|
{
|
|
CPUState *cpu = ENV_GET_CPU(cpu_env);
|
|
abi_long ret;
|