Statistics
| Branch: | Revision:

root / linux-user / syscall.c @ f66724c9

History | View | Annotate | Download (225.1 kB)

# Date Author Comment
38724253 09/18/2010 08:53 am Blue Swirl

linux-user: fix socklen_t comparisons

On many systems, socklen_t is defined as unsigned. This means that
checks for negative values are not meaningful.

Fix by explicitly casting to a signed integer.

This also avoids some warnings with GCC flag -Wtype-limits....

97374d38 06/16/2010 03:03 pm Paul Brook

Usermode exec-stack fix

When loading a shared library that requires an executable stack,
glibc uses the mprotext PROT_GROWSDOWN flag to achieve this.
We don't support PROT_GROWSDOWN.
Add a special case to handle changing the stack permissions in this way....

d35b261c 06/11/2010 07:15 pm Richard Henderson

s390x: Avoid _llseek.

There's no _llseek on s390x either. Replace the existing
test for x86_64 with a functional test for __NR_llseek.

Signed-off-by: Richard Henderson <>
Signed-off-by: Aurelien Jarno <>

9e42382f 05/21/2010 07:42 pm Riku Voipio

linux-user: do not warn for missing pselect6

Libc will fallback gracefully if pselect6 is not available. Thus put
pselect6 to nowarn until the atomicity issues of the original pselect6
patch are dealt with.

Signed-off-by: Riku Voipio <>...

9231733a 05/21/2010 07:22 pm Richard Henderson

alpha-linux-user: Fix getxpid.

Put ppid in the second return register.

Signed-off-by: Richard Henderson <>
Signed-off-by: Aurelien Jarno <>

f43ce12b 05/21/2010 07:22 pm Richard Henderson

alpha-linux-user: Fix sigsuspend parameters.

Alpha passes the signal set in a register, not by reference.

Signed-off-by: Richard Henderson <>
Signed-off-by: Aurelien Jarno <>

a5b3b13b 05/21/2010 07:22 pm Richard Henderson

alpha-linux-user: Fix sigprocmask.

Alpha passes oldset by value in a register, and returns the newset
as the return value; as compared to the standard implementation in
which both are passed by reference. This requires being able to
distinguish negative return values that are not errors. Do this in...

7dd46c02 05/21/2010 07:22 pm Richard Henderson

alpha-linux-user: Fix brk error return.

Signed-off-by: Richard Henderson <>
Signed-off-by: Aurelien Jarno <>

fb41a66e 05/21/2010 07:22 pm Richard Henderson

alpha-linux-user: Fix pipe return mechanism.

At the same time, tidy the code wrt MIPS and SH4 which have the
same two register return mechanism. Fix confusion between pipe
and pipe2 with an explicit flags=0, when the guest will not be
using the two register return mechanism....

81bbe906 05/18/2010 08:30 pm takasi-y@ops.dti.ne.jp

linux-user: rlimit conversion between host and target.

rlim_t conversion between host and target added.
Otherwise there are some incorrect case like
- RLIM_INFINITY on 32bit target > 64bit host.
RLIM_INFINITY on 64bit host > mips and sparc target ?
Big value(for 32bit target) on 64bit host -> 32bit target....

a4b388ff 04/27/2010 06:50 am Richard Henderson

target-alpha: Enable NPTL.

Signed-off-by: Richard Henderson <>
Signed-off-by: Aurelien Jarno <>

ed18c5ce 04/26/2010 08:30 pm Richard Henderson

linux-user: Fix sparc32plus stat64 syscalls.

Check TARGET_ABI_BITS, not TARGET_LONG_BITS, when deciding
whether or not the guest needs special 64-bit stat translation.

Signed-off-by: Richard Henderson <>
Signed-off-by: Blue Swirl <>

e00ac249 04/14/2010 01:19 am takasi-y@ops.dti.ne.jp

linux-user: do_shmdt(): Fix page_set_flags's 2nd arg.

2nd arg of page_set_flags() should be start+size, but size.

Signed-off-by: Takashi YOSHII <>
Acked-by: Richard Henderson <>
Signed-off-by: Aurelien Jarno <>

a1606b0b 04/01/2010 10:51 pm Stefan Weil

Fix compilation with missing inotify_init1

Commit c05c7a7306a23a4b01d1606172b142c45caffc92
breaks cross compilation for mips (and other
compilations without CONFIG_INOTIFY1):

make1: Entering directory `/qemu/bin/mips'
CC i386-linux-user/syscall.o...

60e99246 04/01/2010 10:51 pm Aurelien Jarno

linux-user/ia64: workaround ia64 strangenesses

ia64 has some strangenesses that need to be workaround:
- it has a __clone2() syscall instead of the using clone() one, with
different arguments, and which is not declared in the usual headers.
- ucontext.uc_sigmask is declared with type long int, while it is...

c05c7a73 03/26/2010 06:15 pm Riku Voipio

linux-user: add inotify_init1 syscall support

New syscall which gets actively used when you have a
fresh kernel.

Signed-off-by: Riku Voipio <>
Signed-off-by: Aurelien Jarno <>

597c0212 03/06/2010 08:35 pm takasi-y@ops.dti.ne.jp

linux-user: Fix syscall pipe2() retval on sh4

On linux/sh4
pipe() return values by r0:r1 as SH C calling convention.
pipe2() return values on memory as traditional unix way.

Signed-off-by: Takashi YOSHII <>
Signed-off-by: Aurelien Jarno <>

6049f4f8 02/28/2010 06:54 pm Richard Henderson

alpha-linux-user: Implement signals.

Move userland PALcode handling into linux-user main loop so that
we can send signals from there. This also makes alpha_palcode.c
system-level only, so don't build it for userland. Add defines
for GENTRAP PALcall mapping to signals....

da79030f 02/06/2010 06:19 pm Loïc Minier

linux-user: adapt uname machine to emulated CPU

This patch for linux-user adapts the output of the emulated uname()
syscall to match the configured CPU. Tested with x86, x86-64 and arm
emulation.

Signed-off-by: Riku Voipio <>
Signed-off-by: Loïc Minier <>

8b0ee8c5 01/14/2010 04:59 pm Vince Weaver

alpha: fix stat64 issue

The stat64/fstat64 syscalls are broken for alpha linux-user.

This is because Alpha, even though it is native 64-bits, has a stat64
syscall that is different than regular stat. This means that the
"TARGET_LONG_BITS==64" check in syscall.c isn't enough. Below is...

ba0e276d 12/13/2009 09:32 pm Richard Henderson

target-alpha: Fixes for alpha-linux syscalls.

1. Add correct definitions of error numbers.
2. Implement SYS_osf_sigprocmask
3. Implement SYS_osf_get/setsysinfo for IEEE_FP_CONTROL.

This last requires exposing the FPCR value to do_syscall.
Since this value is actually split up into the float_status,...

b4558d74 11/07/2009 06:34 pm Blue Swirl

(x86/Sparc/PPC)-user: fix cpu_copy

b55a37c981914aa8ecd21b9a2a2fb37f39b917c5 moved the call to cpu_reset
to user emulators. But cpu_copy also initializes a CPU structure, so add the
call also there.

Signed-off-by: Blue Swirl <>

dab46405 10/17/2009 09:52 pm Jan-Simon Möller

Re: linux-user/syscall.c - don't add GUEST_BASE to NULL pointer

This patch fixes the mount call. GUEST_BASE shouldn't be added to a NULL pointer on arg5 . failing call:
mount("rootfs", "/", 0x47a78, MS_MGC_VAL|MS_REMOUNT, 0x10000) = -1 EFAULT (Bad address)...

f7680a55 10/17/2009 11:38 am Ulrich Hecht

linux-user: KD/VT/FB ioctls

everything needed to run SDL on a framebuffer device in the userspace emulator

Signed-off-by: Ulrich Hecht <>
Signed-off-by: Riku Voipio <>

d0927938 10/15/2009 11:55 pm Ulrich Hecht

implementations of dup3 and fallocate that are good enough to fool LTP

updated fallocate check to new configure, added dup3 check as suggested
by Jan-Simon Möller.

Riku: updated to apply to current git.

Signed-off-by: Ulrich Hecht <>
Signed-off-by: Riku Voipio <>

69137206 10/15/2009 11:55 pm Ulrich Hecht

linux-user: getpriority errno fix

getpriority returned wrong errno; fixes LTP test getpriority02.

Signed-off-by: Ulrich Hecht <>
Signed-off-by: Riku Voipio <>

c227f099 10/02/2009 12:12 am Anthony Liguori

Revert "Get rid of _t suffix"

In the very least, a change like this requires discussion on the list.

The naming convention is goofy and it causes a massive merge problem. Something
like this must be presented on the list first so people can provide input...

99a0949b 10/01/2009 09:45 pm malc

Get rid of _t suffix

Some not so obvious bits, slirp and Xen were left alone for the time
being.

Signed-off-by: malc <>

e8bbe36c 09/30/2009 09:56 pm Michael S. Tsirkin

linux-user: fix coding style nit

Put space between = and & when taking a pointer,
to avoid confusion with old-style "&=".

Signed-off-by: Michael S. Tsirkin <>
Signed-off-by: Blue Swirl <>

fbd5de9b 09/10/2009 07:27 pm malc

F_DUPFD_CLOEXEC is not universally available

The same issue (and the same patch to the byte) was experienced/proposed
by Vince Weaver.

Signed-off-by: malc <>

e72d2cc7 08/25/2009 05:15 pm Ulrich Hecht

linux-user: fadvise64 implementation

good enough to pass all LTP fadvise64 tests

Signed-off-by: Ulrich Hecht <>
Signed-off-by: Riku Voipio <>

12727917 08/25/2009 05:15 pm Ulrich Hecht

linux-user: zero fstat buffer to initialize nsec fields

The fstat implementation does not initialize the nanosecond fields in the
stat buffer; this caused funny values to turn up there, preventing, for
instance, cp -p from preserving timestamps because utimensat rejected...

c761c154 08/25/2009 05:15 pm Laurent Vivier

m68k, linux-user: enable sigaltstack()

As setup_frame() and setup_rt_frame() are now implemented we can now
enable sigaltstack().

Signed-off-by: Laurent Vivier <>
Signed-off-by: Riku Voipio <>

8ec9cf89 08/25/2009 05:15 pm Nathan Froyd

linux-user: fix mq_* compilation problems

mqueue.h is only available if _NR_mq_open is defined. So don't include
it unconditionally. Similarly, the mq
* family of syscalls depend on
_NR_mq_open. Finally, the copy{from,to}_user_mq_attr functions should...

7e22e546 08/25/2009 05:15 pm Ulrich Hecht

linux-user: fcntl fixes for LTP

Fixes swaps on l_pid which were pretty much of random size. Implements
F_SETLEASE, F_GETLEASE. Now passes all LTP fcntl tests.

Signed-off-by: Ulrich Hecht <>
Signed-off-by: Riku Voipio <>

d83c8733 08/25/2009 05:15 pm Ulrich Hecht

linux-user: enable getdents for > 32-bit systems

works perfectly fine with the example from getdents(2) and passes the LTP
tests (tested with s390x on x86_64 emulation)

Signed-off-by: Ulrich Hecht <>
Signed-off-by: Riku Voipio <>

c2882b96 08/25/2009 05:15 pm Riku Voipio

linux-user: add eventfd support

Straightforward implementation. This syscall is rare enough that we
don't need to support the odder cases, just disable it if host glibc
is too old.

Signed-off-by: Riku Voipio <>

a16aae0c 08/03/2009 07:33 pm Nathan Froyd

linux-user: make FUTEX_* calls honor timeout parameter

Signed-off-by: Nathan Froyd <>
Signed-off-by: malc <>

2f7bb878 07/27/2009 10:10 pm Juan Quintela

rename USE_NPTL to CONFIG_USE_NPTL

Signed-off-by: Juan Quintela <>
Signed-off-by: Anthony Liguori <>

9788c9ca 07/27/2009 10:09 pm Juan Quintela

rename HAVE_GPROF to TARGET_GPROF

Use was not consistent, in Makefile was TARGET_GPROF and in *h HAVE_GPROF

Signed-off-by: Juan Quintela <>
Signed-off-by: Anthony Liguori <>

0bf9e31a 07/20/2009 08:19 pm Blue Swirl

Fix most warnings (errors with -Werror) when debugging is enabled

I used the following command to enable debugging:
perl -p -i -e 's/^\/\/#define DEBUG/#define DEBUG/g' * /* *//*

Signed-off-by: Blue Swirl <>

8167ee88 07/16/2009 11:47 pm Blue Swirl

Update to a hopefully more future proof FSF address

Signed-off-by: Blue Swirl <>

719f908e 07/08/2009 05:02 pm Ulrich Hecht

wrap path for access syscall

Signed-off-by: Ulrich Hecht <>
Signed-off-by: Riku Voipio <>

666bcd91 07/08/2009 05:02 pm Ulrich Hecht

getrlimit conversion mix-up

Fixes getrlimit implementation that overwrote the result of the syscall
instead of converting it

Signed-off-by: Ulrich Hecht <>
Signed-off-by: Riku Voipio <>

784ccfdb 07/08/2009 05:02 pm Ulrich Hecht

pipe argument should not be signed

pipedes is an address, it should not be signed (breaks for addresses

0x80000000)

Signed-off-by: Ulrich Hecht <>
Signed-off-by: Riku Voipio <>

98818189 07/08/2009 05:02 pm Ulrich Hecht

64-bit clean socketcall syscall

makes socketcall 64-bit clean so it works on 64-bit big-endian systems

Signed-off-by: Ulrich Hecht <>
Signed-off-by: Riku Voipio <>

917507b0 07/08/2009 05:01 pm Arnaud Patard

linux-user: check some parameters for some socket syscalls.

This patch is fixing following issues :

- commit 8fea36025b9d6d360ff3b78f88a84ccf221807e8 was applied to
do_getsockname instead of do_accept.
- Some syscalls were not checking properly the memory addresses passed...

7b8118e8 07/08/2009 05:01 pm vibi sreenivasan

linux-user/syscall.c: remove warning: ‘array’ may be used uninitialized in this function

Removes the following warning

CC i386-linux-user/syscall.o
cc1: warnings being treated as errors
/media/nfs/qemu/linux-user/syscall.c: In function ‘do_syscall’:
/media/nfs/qemu/linux-user/syscall.c:2219: warning: ‘array’ may be used uninitialized in this function...

03dfe9f8 06/19/2009 01:51 am Riku Voipio

linux-user: strace now handles guest stringscorrectly [v2]

On Tue, Jun 16, 2009 at 08:19:23PM -0500, Anthony Liguori wrote:

malc wrote:

On my system the above line causes gcc to emit:

In file included from /home/malc/x/rcs/git/qemu/linux-user/strace.c:12:...

5f106811 06/16/2009 04:58 pm Arnaud Patard (Rtp)

RFC: fix fcntl support in linux-user - new try

Hi,

This is a new try to fix the fcntl support in linux-user. I tried to
adress all comments but as the previous version is several weeks old,
it's possible that I've missed some.

This patch doesn't handle linux specific fcntl flags. My plan is to get...

d5b3a9b6 06/16/2009 04:58 pm Eduardo Habkost

linux-user/syscall.c: define _ATFILE_SOURCE

Needed to make sure the xxxat() functions are available.

Signed-off-by: Eduardo Habkost <>
Signed-off-by: Riku Voipio <>

3f9ac9b3 06/16/2009 04:58 pm Laurent Vivier

linux-user: remove duplicate tswap32() from do_getsockopt()

This issue has been detected with tests/linux-tests.c:

linux-test.c:330: getsockopt

327 len = sizeof(val);
328 chk_error(getsockopt(server_fd, SOL_SOCKET, SO_TYPE, &val, &len));
329 if (val != SOCK_STREAM)...

3ce34dfb 06/16/2009 04:58 pm vibisreenivasan

linux-user: add tee, splice and vmsplice

Add support for tee, splice and vmsplice.

Originally from: vibi sreenivasan <>

Riku: squashed patches together, added a test to configure
and removed compliler warning by picking up correct type for...

b975b83b 06/16/2009 04:56 pm Lionel Landwerlin

linux-user: Added IP_ADD_MEMBERSHIP/IP_DROP_MEMBERSHIP flags to setsockopt

linux-user: Added IP_ADD_MEMBERSHIP/IP_DROP_MEMBERSHIP flags to setsockopt

Signed-off-by: Lionel Landwerlin <>
Signed-off-by: Riku Voipio <>

6e3cb58f 06/16/2009 04:56 pm Lionel Landwerlin

linux-user: Added IP_(UN)BLOCK_SOURCE/IP_(ADD|DROP)_SOURCE_MEMBERSHIP flags to setsockopt

linux-user: Added IP_(UN)BLOCK_SOURCE/IP_(ADD|DROP)_SOURCE_MEMBERSHIP flags to setsockopt

Signed-off-by: Lionel Landwerlin <>
Signed-off-by: Riku Voipio <>

350d1779 06/16/2009 04:56 pm Martin Mohring

linux-user: include linux/fs.h

defines FIGETBSZ FIBMAP, allowing the respective ioctl's to
be implemented.

From: Martin Mohring <>
Signed-off-by: Riku Voipio <>

a29ccd63 06/16/2009 04:56 pm Martin Mohring

linux-user: support private futexes

Implemented the same way as in the kernel.

From: Martin Mohring <>
Signed-off-by: Riku Voipio <>

c4d2302e 06/16/2009 04:56 pm Riku Voipio

add futex wake op

Signed-off-by: Riku Voipio <>

099d6b0f 06/16/2009 04:56 pm Riku Voipio

linux-user: implement pipe2 [v3]

implement pipe2 syscall.

[v2] fix do_pipe on mips and sh4
[v3] use pipe2 to ensure atomicity, but only when it is available.

Signed-off-by: Riku Voipio <>

88a8c984 06/16/2009 04:56 pm Riku Voipio

Implement shm* syscalls and fix 64/32bit errors

No regressions were observed on either 64bit or 32bit
IA hosts.

Patch based on original patches by:
Kirill A. Shutemov <>
- Implement shm* syscalls
- Fix and cleanup IPCOP_shm* ipc calls handling...

edf8e2af 06/16/2009 04:56 pm Mika Westerberg

linux-user: implemented ELF coredump support for ARM target

When target process is killed with signal (such signal that
should dump core) a coredump file is created. This file is
similar than coredump generated by Linux (there are few exceptions
though)....

74d753ac 06/16/2009 04:56 pm Mika Westerberg

linux-user: strace now handles guest strings correctly [v2]

- to not to break strace with GUEST_BASE is set:
- Strace now can load and print guest strings correctly.
- Added printing support for commonly used flags in some syscalls
(e.g open, creat, mmap etc.)...

ebc996f3 06/16/2009 04:56 pm Riku Voipio

linux-user: fix utimensat

The glibc function for utimensat glibc returns -EINVAL when the path is null
which is a different behaviour with the syscall.

path can be null because internally the glibc is using utimensat with
path null when implmenting futimens. If path is null, call futimes...

44607123 06/16/2009 04:56 pm Arnaud Patard

Fix struct termios host - target translation

When converting the termios structure between host and target in
target_to_host_termios and host_to_target_termios, the c_cc[] array is
never initialised.
Calling memset() before using it allows to run successfully "stty echo /...

6f932f91 06/16/2009 04:56 pm Arnaud Patard

Return EOPNOTSUPP instead of ENOSYS for xattr syscalls

In current code, we're sending ENOSYS to target when a syscall for the
xattrs is done. This makes applications like ls complain loudly about
that and breaks scripts parsing the output. Moreover, iirc, implemented...

1e9fa730 06/04/2009 12:04 pm Nathan Froyd

fix gdbstub support for multiple threads in usermode, v3

When debugging multi-threaded programs, QEMU's gdb stub would report the
correct number of threads (the qfThreadInfo and qsThreadInfo packets).
However, the stub was unable to actually switch between threads (the T...

b779e29e 05/26/2009 10:10 pm Edgar E. Iglesias

microblaze: linux-user support.

Signed-off-by: Edgar E. Iglesias <>

909b69cf 05/19/2009 05:58 pm Paul Brook

Only define __llseek if it is going to be used

Signed-off-by: Paul Brook <>

001faf32 05/13/2009 08:53 pm Blue Swirl

Replace gcc variadic macro extension with C99 version

Signed-off-by: Blue Swirl <>

465c9f06 04/19/2009 11:52 am aurel32

linux-user: Linux kernel's fchmodat and faccessat have three args (no 4th arg)

In Linux kernel, fchmodat() and faccessat() take tree args.
4th value <int flags> is only processed by libc.

Signed-off-by: Takashi YOSHII <>
Signed-off-by: Aurelien Jarno <>...

e5289087 04/18/2009 07:16 pm aurel32

linux-user: fix IPCOP_sem* and implement sem*

Fix and cleanup IPCOP_sem* ipc calls handling and
implement sem* syscalls.

Riku:

1) Uglify whitespace so that diff gets smaller and easier
to review

2) use __get_user in target_to_host_sembuf

Signed-off-by: Kirill A. Shutemov <>...

8690e420 04/17/2009 04:50 pm aurel32

linux-user: fix inotify syscalls

Configure test was broken, so the breakage of the #ifdef'd
code was not noticed.

Signed-off-by: Riku Voipio <>
Signed-off-by: Aurelien Jarno <>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7134 c046a42c-6fe2-441c-8c8c-71466251a162

1d9d8b55 04/16/2009 06:17 pm pbrook

Translate signal values in exit status.

Signed-off-by: Paul Brook <>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7131 c046a42c-6fe2-441c-8c8c-71466251a162

aaf4ad39 04/16/2009 05:17 pm aurel32

linux-user: fix getcwd syscall

The patch called "prefer glibc over direct syscalls" (commit 7118) has
replaced the getcwd syscall with a call to the glibc. With this change,
the syscall is returning -1 in error case and 0 otherwise.
This is problematic as the sys_getcwd syscall should return the number...

fda33744 04/15/2009 08:12 pm aurel32

linux-user: fix warnings introduced by r7118

Signed-off-by: Aurelien Jarno <>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7120 c046a42c-6fe2-441c-8c8c-71466251a162

3b3f24ad 04/15/2009 07:12 pm aurel32

linux-user: prefer glibc over direct syscalls

The openat/*at syscalls are incredibly common with modern coreutils,
calling them directly via syscalls breaks for example fakeroot. Use
glibc stubs whenever directly available and provide old syscall
calling for people still using older libc....

be09ac41 04/15/2009 07:12 pm aurel32

linux-user: removed unnecessary MAX_SOCK_ADDR checks for socket syscalls

- This check is not needed because kernel will check whether given
buffer is too small and there is no upper limit for size of the buffer.

From: Mika Westerberg <>...

607175e0 04/15/2009 07:11 pm aurel32

linux-user: unix sockets - fix running dbus

dbus sends too short (according to man 7 unix) addrlen for it's
unix socket. I've been told that happens with other applications
as well. Linux kernel doesn't appear to mind, so I guess
we whould be tolerant as well. Expand sockaddr with +1 to fit...

24e1003a 04/15/2009 07:11 pm aurel32

linux-user: Added posix message queue syscalls except mq_notify

Signed-off-by: Lionel Landwerlin <>
Signed-off-by: Kirill A. Shutemov <>
Signed-off-by: Riku Voipio <>
Signed-off-by: Aurelien Jarno <>...

9d33b76b 04/09/2009 02:07 am aurel32

linux-user: fix fstatat64()/newfstatat() syscall implementation

There are two different syscall names for the same goal.

On systems with sizeof(long) 64 it calls newfstatat.
On systems with sizeof(long) 32 it calls fstatat64.

Signed-off-by: Kirill A. Shutemov <>...

dbfe4c36 04/09/2009 12:29 am aurel32

linux-user: fix problems with inotify syscalls

The sys_inotify* calls are defined if the target supports them and the
host supports the necessary syscalls. But the syscalls are handled if
the target supports them. This situation leads to compilation failures...

c2764719 03/07/2009 05:24 pm pbrook

The _exit syscall is used for both thread termination in NPTL applications,
and process termination in legacy applications. Try to guess which we want
based on the presence of multiple threads.

Also implement locking when modifying the CPU list.

Signed-off-by: Paul Brook <>...

bedf26e6 02/03/2009 09:55 pm aurel32

linux-user: Remove incorrect break;

Reported-By: Laurent Desnogues <>
Signed-off-by: Riku Voipio <>
Signed-off-by: Aurelien Jarno <>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6503 c046a42c-6fe2-441c-8c8c-71466251a162

d088d664 01/30/2009 10:09 pm aurel32

linux-user: identify running binary in /proc/self/exe

Some applications like to test /proc/self/exe to find
out who they are. Fake the result of readlink() for
them. Use realpath() to return full path to binary
(which the links /proc/self/exe are)

Signed-off-by: Riku Voipio <>...

38d840e6 01/30/2009 09:48 pm aurel32

linuw-user fix: read() and acct() on NULL arguments

Returning efault in these cases is not correct. Originally
proposed by Thayne Harbaugh in 2007:
http://www.mail-archive.com/qemu-devel@nongnu.org/msg14658.html

Signed-off-by: Riku Voipio <>...

8f7aeaf6 01/30/2009 09:47 pm aurel32

linux-user: return EINVAL on incorrect sockaddr

From: Lauro Ramos Venancio <>

Fixes ltp test accept01

Signed-off-by: Riku Voipio <>
Signed-off-by: Aurelien Jarno <>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6479 c046a42c-6fe2-441c-8c8c-71466251a162

8fea3602 01/30/2009 09:47 pm aurel32

linux-user: fix accept(2) with NULL peer

Based on scratchbox2 patch by Mika Westerberg

Signed-off-by: Riku Voipio <>
Signed-off-by: Aurelien Jarno <>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6478 c046a42c-6fe2-441c-8c8c-71466251a162

b15ad61c 01/07/2009 09:43 pm edgar_igl

CRIS: Clone flags are reversed on CRIS.

Signed-off-by: Edgar E. Iglesias <>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6222 c046a42c-6fe2-441c-8c8c-71466251a162

ef96779b 01/07/2009 04:19 pm edgar_igl

CRIS: Implement set_thread_area for CRIS.

Signed-off-by: Edgar E. Iglesias <>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6210 c046a42c-6fe2-441c-8c8c-71466251a162

530e7615 01/05/2009 08:11 pm blueswir1

Fix more FSF addresses

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6192 c046a42c-6fe2-441c-8c8c-71466251a162

2b1319c8 12/19/2008 12:44 am aurel32

User-mode GDB stub improvements - handle fork

Close gdbserver in child processes, so that only one stub tries to talk
to GDB at a time. Updated from an earlier patch by Paul Brook.

Signed-off-by: Daniel Jacobowitz <>
Signed-off-by: Aurelien Jarno <>...

3f911a51 12/13/2008 01:37 pm blueswir1

Fix warning about unused shm_regions

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6001 c046a42c-6fe2-441c-8c8c-71466251a162

64b4d28c 11/14/2008 07:20 pm aurel32

target-alpha: implement getxuid and getxgid syscalls

This patch implemented the setxuid and setxgid syscalls for Alpha.
These syscalls return two values, both uid/euid and gid/egid.
In addition to returning the first value in $v0, the additional
value is returned in the $a4 register....

e441570f 11/10/2008 04:55 am balrog

use target_mmap() to allocate idt, gdt and ldt (Kirill A. Shutemov).

env->*dt.base should fit target address space, so we should use
target_mmap to allocate them.

Signed-off-by: Kirill A. Shutemov <>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5666 c046a42c-6fe2-441c-8c8c-71466251a162

6d946cda 11/06/2008 06:15 pm aurel32

User qemu profiling

- Makefile.target: re-enable profiling for user qemu. It seems
profiling was (accidently?) removed by commit 3937

- syscall.c: * add an include to get _mcleanup prototype * add a call to _mcleanup for exit_group in a way
similar to what is done for exit...

6de645c7 10/28/2008 12:26 pm balrog

Recvmsg must return the number of bytes received (Lauro Ramos Venancio).

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5564 c046a42c-6fe2-441c-8c8c-71466251a162

d732dcb4 10/28/2008 12:21 pm balrog

Fix iovec for the case with invalid elements (Lauro Ramos Venancio).

We must call the writev even if an iovec element is invalid. For
example, if the second element is invalid, the linux process the first
one.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5562 c046a42c-6fe2-441c-8c8c-71466251a162

a2f86d8e 10/28/2008 12:18 pm balrog

Use the host exit syscall for exiting (Lauro Ramos Venancio).

We can't call the libc _exit function because it calls the exit_group
host syscall. We must call directly the exit host syscall.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5561 c046a42c-6fe2-441c-8c8c-71466251a162

b1d8e52e 10/26/2008 03:43 pm blueswir1

Fix undeclared symbol warnings from sparse

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5539 c046a42c-6fe2-441c-8c8c-71466251a162

be15b141 10/25/2008 02:21 pm blueswir1

Replace uses of strncpy (a GNU extension) with Qemu pstrcpy

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5531 c046a42c-6fe2-441c-8c8c-71466251a162