75a96ee029
- Remove deprecated patch "work-around-SA_RESTART-race" (boo#982208) - Patch queue updated from git://github.com/openSUSE/qemu.git opensuse-2.6 * Patches dropped: 0002-XXX-work-around-SA_RESTART-race-wit.patch 0003-qemu-0.9.0.cvs-binfmt.patch 0004-qemu-cvs-alsa_bitfield.patch 0005-qemu-cvs-alsa_ioctl.patch 0006-qemu-cvs-alsa_mmap.patch 0007-qemu-cvs-gettimeofday.patch 0008-qemu-cvs-ioctl_debug.patch 0009-qemu-cvs-ioctl_nodirection.patch 0010-block-vmdk-Support-creation-of-SCSI.patch 0011-linux-user-add-binfmt-wrapper-for-a.patch 0012-PPC-KVM-Disable-mmu-notifier-check.patch 0013-linux-user-fix-segfault-deadlock.patch 0014-linux-user-binfmt-support-host-bina.patch 0015-linux-user-Ignore-broken-loop-ioctl.patch 0016-linux-user-lock-tcg.patch 0017-linux-user-Run-multi-threaded-code-.patch 0018-linux-user-lock-tb-flushing-too.patch 0019-linux-user-Fake-proc-cpuinfo.patch 0020-linux-user-implement-FS_IOC_GETFLAG.patch 0021-linux-user-implement-FS_IOC_SETFLAG.patch 0022-linux-user-XXX-disable-fiemap.patch 0023-slirp-nooutgoing.patch 0024-vnc-password-file-and-incoming-conn.patch 0025-linux-user-add-more-blk-ioctls.patch 0026-linux-user-use-target_ulong.patch 0027-block-Add-support-for-DictZip-enabl.patch 0028-block-Add-tar-container-format.patch OBS-URL: https://build.opensuse.org/request/show/408549 OBS-URL: https://build.opensuse.org/package/show/Virtualization/qemu?expand=0&rev=305
57 lines
2.5 KiB
Diff
57 lines
2.5 KiB
Diff
From 616807e473c21cdf231eed07b87ec287cfdfb528 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 26b0ba2..b9a7123 100644
|
|
--- a/linux-user/qemu.h
|
|
+++ b/linux-user/qemu.h
|
|
@@ -176,10 +176,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 7b72784..ebeab57 100644
|
|
--- a/linux-user/syscall.c
|
|
+++ b/linux-user/syscall.c
|
|
@@ -5902,10 +5902,10 @@ static target_timer_t get_timer_id(abi_long arg)
|
|
/* 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;
|