History | View | Annotate | Download (214.9 kB)
F_DUPFD_CLOEXEC is not universally available
The same issue (and the same patch to the byte) was experienced/proposedby Vince Weaver.
Signed-off-by: malc <av1474@comtv.ru>
linux-user: fadvise64 implementation
good enough to pass all LTP fadvise64 tests
Signed-off-by: Ulrich Hecht <uli@suse.de>Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
linux-user: zero fstat buffer to initialize nsec fields
The fstat implementation does not initialize the nanosecond fields in thestat buffer; this caused funny values to turn up there, preventing, forinstance, cp -p from preserving timestamps because utimensat rejected...
m68k, linux-user: enable sigaltstack()
As setup_frame() and setup_rt_frame() are now implemented we can nowenable sigaltstack().
Signed-off-by: Laurent Vivier <laurent@vivier.eu>Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
linux-user: fix mq_* compilation problems
mqueue.h is only available if _NR_mq_open is defined. So don't includeit unconditionally. Similarly, the mq* family of syscalls depend on_NR_mq_open. Finally, the copy{from,to}_user_mq_attr functions should...
linux-user: fcntl fixes for LTP
Fixes swaps on l_pid which were pretty much of random size. ImplementsF_SETLEASE, F_GETLEASE. Now passes all LTP fcntl tests.
linux-user: enable getdents for > 32-bit systems
works perfectly fine with the example from getdents(2) and passes the LTPtests (tested with s390x on x86_64 emulation)
linux-user: add eventfd support
Straightforward implementation. This syscall is rare enough that wedon't need to support the odder cases, just disable it if host glibcis too old.
Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
linux-user: make FUTEX_* calls honor timeout parameter
Signed-off-by: Nathan Froyd <froydnj@codesourcery.com>Signed-off-by: malc <av1474@comtv.ru>
rename USE_NPTL to CONFIG_USE_NPTL
Signed-off-by: Juan Quintela <quintela@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
rename HAVE_GPROF to TARGET_GPROF
Use was not consistent, in Makefile was TARGET_GPROF and in *h HAVE_GPROF
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 <blauwirbel@gmail.com>
Update to a hopefully more future proof FSF address
wrap path for access syscall
getrlimit conversion mix-up
Fixes getrlimit implementation that overwrote the result of the syscallinstead of converting it
pipe argument should not be signed
pipedes is an address, it should not be signed (breaks for addresses
0x80000000)
64-bit clean socketcall syscall
makes socketcall 64-bit clean so it works on 64-bit big-endian systems
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...
linux-user/syscall.c: remove warning: ‘array’ may be used uninitialized in this function
Removes the following warning
CC i386-linux-user/syscall.occ1: 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...
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:...
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:...
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:...
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 toadress 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...
linux-user/syscall.c: define _ATFILE_SOURCE
Needed to make sure the xxxat() functions are available.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
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)...
linux-user: add tee, splice and vmsplice
Add support for tee, splice and vmsplice.
Originally from: vibi sreenivasan <vibi_sreenivasan@cms.com>
Riku: squashed patches together, added a test to configureand removed compliler warning by picking up correct type for...
linux-user: Added IP_ADD_MEMBERSHIP/IP_DROP_MEMBERSHIP flags to setsockopt
Signed-off-by: Lionel Landwerlin <lionel.landwerlin@openwide.fr>Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
linux-user: Added IP_(UN)BLOCK_SOURCE/IP_(ADD|DROP)_SOURCE_MEMBERSHIP flags to setsockopt
linux-user: include linux/fs.h
defines FIGETBSZ FIBMAP, allowing the respective ioctl's tobe implemented.
From: Martin Mohring <martin.mohring@opensuse.org>Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
linux-user: support private futexes
Implemented the same way as in the kernel.
add futex wake op
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.
Implement shm* syscalls and fix 64/32bit errors
No regressions were observed on either 64bit or 32bitIA hosts.
Patch based on original patches by: Kirill A. Shutemov <kirill@shutemov.name> - Implement shm* syscalls - Fix and cleanup IPCOP_shm* ipc calls handling...
linux-user: implemented ELF coredump support for ARM target
When target process is killed with signal (such signal thatshould dump core) a coredump file is created. This file issimilar than coredump generated by Linux (there are few exceptionsthough)....
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.)...
linux-user: fix utimensat
The glibc function for utimensat glibc returns -EINVAL when the path is nullwhich is a different behaviour with the syscall.
path can be null because internally the glibc is using utimensat withpath null when implmenting futimens. If path is null, call futimes...
Fix struct termios host - target translation
When converting the termios structure between host and target intarget_to_host_termios and host_to_target_termios, the c_cc[] array isnever initialised.Calling memset() before using it allows to run successfully "stty echo /...
Return EOPNOTSUPP instead of ENOSYS for xattr syscalls
In current code, we're sending ENOSYS to target when a syscall for thexattrs is done. This makes applications like ls complain loudly aboutthat and breaks scripts parsing the output. Moreover, iirc, implemented...
fix gdbstub support for multiple threads in usermode, v3
When debugging multi-threaded programs, QEMU's gdb stub would report thecorrect number of threads (the qfThreadInfo and qsThreadInfo packets).However, the stub was unable to actually switch between threads (the T...
microblaze: linux-user support.
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
Only define __llseek if it is going to be used
Signed-off-by: Paul Brook <paul@codesourcery.com>
Replace gcc variadic macro extension with C99 version
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 <takasi-y@ops.dti.ne.jp>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>...
linux-user: fix IPCOP_sem* and implement sem*
Fix and cleanup IPCOP_sem* ipc calls handling andimplement sem* syscalls.
Riku:
1) Uglify whitespace so that diff gets smaller and easierto review
2) use __get_user in target_to_host_sembuf
Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>...
linux-user: fix inotify syscalls
Configure test was broken, so the breakage of the #ifdef'dcode was not noticed.
Signed-off-by: Riku Voipio <riku.voipio@iki.fi>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7134 c046a42c-6fe2-441c-8c8c-71466251a162
Translate signal values in exit status.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7131 c046a42c-6fe2-441c-8c8c-71466251a162
linux-user: fix getcwd syscall
The patch called "prefer glibc over direct syscalls" (commit 7118) hasreplaced 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...
linux-user: fix warnings introduced by r7118
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7120 c046a42c-6fe2-441c-8c8c-71466251a162
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. Useglibc stubs whenever directly available and provide old syscallcalling for people still using older libc....
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 <mika.westerberg@iki.fi>...
linux-user: unix sockets - fix running dbus
dbus sends too short (according to man 7 unix) addrlen for it'sunix socket. I've been told that happens with other applicationsas well. Linux kernel doesn't appear to mind, so I guesswe whould be tolerant as well. Expand sockaddr with +1 to fit...
linux-user: Added posix message queue syscalls except mq_notify
Signed-off-by: Lionel Landwerlin <lionel.landwerlin@openwide.fr>Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>Signed-off-by: Riku Voipio <riku.voipio@iki.fi>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>...
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.
linux-user: fix problems with inotify syscalls
The sys_inotify* calls are defined if the target supports them and thehost supports the necessary syscalls. But the syscalls are handled ifthe target supports them. This situation leads to compilation failures...
The _exit syscall is used for both thread termination in NPTL applications,and process termination in legacy applications. Try to guess which we wantbased on the presence of multiple threads.
Also implement locking when modifying the CPU list.
Signed-off-by: Paul Brook <paul@codesourcery.com>...
linux-user: Remove incorrect break;
Reported-By: Laurent Desnogues <laurent.desnogues@gmail.com>Signed-off-by: Riku Voipio <riku.voipio@iki.fi>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6503 c046a42c-6fe2-441c-8c8c-71466251a162
linux-user: identify running binary in /proc/self/exe
Some applications like to test /proc/self/exe to findout who they are. Fake the result of readlink() forthem. Use realpath() to return full path to binary(which the links /proc/self/exe are)
Signed-off-by: Riku Voipio <riku.voipio@iki.fi>...
linuw-user fix: read() and acct() on NULL arguments
Returning efault in these cases is not correct. Originallyproposed by Thayne Harbaugh in 2007:http://www.mail-archive.com/qemu-devel@nongnu.org/msg14658.html
linux-user: return EINVAL on incorrect sockaddr
From: Lauro Ramos Venancio <lauro.venancio@gmail.com>
Fixes ltp test accept01
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6479 c046a42c-6fe2-441c-8c8c-71466251a162
linux-user: fix accept(2) with NULL peer
Based on scratchbox2 patch by Mika Westerberg
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6478 c046a42c-6fe2-441c-8c8c-71466251a162
CRIS: Clone flags are reversed on CRIS.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6222 c046a42c-6fe2-441c-8c8c-71466251a162
CRIS: Implement set_thread_area for CRIS.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6210 c046a42c-6fe2-441c-8c8c-71466251a162
Fix more FSF addresses
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6192 c046a42c-6fe2-441c-8c8c-71466251a162
User-mode GDB stub improvements - handle fork
Close gdbserver in child processes, so that only one stub tries to talkto GDB at a time. Updated from an earlier patch by Paul Brook.
Signed-off-by: Daniel Jacobowitz <dan@codesourcery.com>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>...
Fix warning about unused shm_regions
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6001 c046a42c-6fe2-441c-8c8c-71466251a162
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 additionalvalue is returned in the $a4 register....
use target_mmap() to allocate idt, gdt and ldt (Kirill A. Shutemov).
env->*dt.base should fit target address space, so we should usetarget_mmap to allocate them.
Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5666 c046a42c-6fe2-441c-8c8c-71466251a162
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...
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
Fix iovec for the case with invalid elements (Lauro Ramos Venancio).
We must call the writev even if an iovec element is invalid. Forexample, if the second element is invalid, the linux process the firstone.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5562 c046a42c-6fe2-441c-8c8c-71466251a162
Use the host exit syscall for exiting (Lauro Ramos Venancio).
We can't call the libc _exit function because it calls the exit_grouphost 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
Fix undeclared symbol warnings from sparse
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5539 c046a42c-6fe2-441c-8c8c-71466251a162
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
Add missing return statement (fixes compiler warning).
Signed-off-by: Stefan Weil <weil@mail.berlios.de>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5523 c046a42c-6fe2-441c-8c8c-71466251a162
linux-user: implement msg* syscalls
Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5484 c046a42c-6fe2-441c-8c8c-71466251a162
linux-user: fix and cleanup IPCOP_msg* ipc calls handling
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5483 c046a42c-6fe2-441c-8c8c-71466251a162
linux-user: fix getdents* syscalls
glibc's structs dirent and dirent64 is different from in-kernel direntand dirent64. Kernel headers doesn't provide structs dirent(64) anymore. So we should add it to qemu headers.
To avoid conflict with glibc it called struct linux_dirent(64)....
linux-user: Add readahead syscall
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5479 c046a42c-6fe2-441c-8c8c-71466251a162
Make various generated structures static
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5429 c046a42c-6fe2-441c-8c8c-71466251a162
Make ioctl table static
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5426 c046a42c-6fe2-441c-8c8c-71466251a162
Make bitmask tables static const
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5425 c046a42c-6fe2-441c-8c8c-71466251a162
Make struct_termios_def const
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5424 c046a42c-6fe2-441c-8c8c-71466251a162
Add inotify syscall family
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5388 c046a42c-6fe2-441c-8c8c-71466251a162
Add mincore syscall
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5387 c046a42c-6fe2-441c-8c8c-71466251a162
Add fadvise64 stubs
Since these are only hints, we happily fake them for nowto make applications not barf on ENOSYS.
Signed-off-by: Riku Voipio <riku.voipio@iki.fi>Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>...
Band-aid vfork() emulation (Kirill Shutemov).
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5279 c046a42c-6fe2-441c-8c8c-71466251a162
Enable same-arch consistency check on x86-64, print syscall name on error.
Also disable testing instructions unsupported by 64-bit binutils intest-i386.c
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5277 c046a42c-6fe2-441c-8c8c-71466251a162
Suppress gcc 4.x -Wpointer-sign (included in -Wall) warnings
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5275 c046a42c-6fe2-441c-8c8c-71466251a162
Fix pread() and pwrite() syscall on ARM EABI (Kirill Shutemov).
pread() and pwrite() have differences in arguments between ARM EABI andOABI.
See arch/arm/kernel/entry-common.S in Linux kernel source foradditional information.
Add MTIOCTOP, MTIOCGET and MTIOCPOS ioctls (Kirill Shutemov).
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5271 c046a42c-6fe2-441c-8c8c-71466251a162
Fix building with 2.6.27 kernel headers (Kirill Shutemov).
<linux/dirent.h> unexported since 2.6.27
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5270 c046a42c-6fe2-441c-8c8c-71466251a162
Implement the futimesat() syscall (by Kirill Shutemov).
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5269 c046a42c-6fe2-441c-8c8c-71466251a162
Implement fstatat64() syscall (by Kirill Shutemov).
Move the transformation of struct stat64 into a separate function andimplement fstatat64() using it.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5268 c046a42c-6fe2-441c-8c8c-71466251a162
Swap only altered elements of the grouplist in getgroups() (Kirill Shutemov).
getgroups() returns the number of supplementary group IDs, so it'sunnessary to swap the entire array. It can dramatically speed upthe syscall: on recent Linux kernels NGROUPS_MAX=65536....
Fix getgroups() with zero size parameter (Kirill Shutemov).
According to man page getgroups(2):
If size is zero, list is not modified, but the total number ofsupplementary group IDs for the process is returned.
qemu sh4 nptl support
(Michael Trimarchi)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5223 c046a42c-6fe2-441c-8c8c-71466251a162
Fix some warnings that would be generated by gcc -Wredundant-decls
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5115 c046a42c-6fe2-441c-8c8c-71466251a162
To make syscall.c for 64 bit truly warning-free, we need some more #ifs.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5080 c046a42c-6fe2-441c-8c8c-71466251a162
Fix some warnings that would be generated by gcc -Wmissing-prototypes
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5022 c046a42c-6fe2-441c-8c8c-71466251a162
Fix a bunch of type mismatch-related warnings (Jan Kiszka).
Fix a typo in my previous comming (spotted by Laurent Desnouges).
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4877 c046a42c-6fe2-441c-8c8c-71466251a162
More efficient target register / TC accesses.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4794 c046a42c-6fe2-441c-8c8c-71466251a162
Fix typo, by Laurent Desnogues.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4726 c046a42c-6fe2-441c-8c8c-71466251a162