Re: [Qemu-devel] AArch64 linux-user: SA_ONSTACK usage in get_sigframe

2014-06-24 Thread Riku Voipio
On Mon, Jun 23, 2014 at 06:15:03PM +0200, Laurent Desnogues wrote: Hello, in linux-user/signal.c the code for AArch64 get_sigframe reads like this: if ((ka-sa_flags SA_ONSTACK) !sas_ss_flags(sp)) { Shouldn't that be TARGET_SA_ONSTACK? The same question applies to Microblaze and

Re: [Qemu-devel] [Qemu-trivial] [PATCH v2] Add support for the arm breakpoint syscall

2014-06-24 Thread Riku Voipio
On Tue, Jun 24, 2014 at 07:58:36PM +0400, Michael Tokarev wrote: 20.06.2014 15:13, Hunter Laux wrote: OABI arm used a software interrupt(0xef9f0001) for breakpoints. Since 2005 gdb has used the break instruction(0xe7f001f0) for EABI. Apparently Steel Bank Common Lisp still uses the swi

Re: [Qemu-devel] [PULL v2 059/106] libqemustub: add stubs to be able to use qemu-char.c

2014-06-23 Thread Riku Voipio
Hi, On Wed, Jun 18, 2014 at 07:19:17PM +0300, Michael S. Tsirkin wrote: From: Nikolay Nikolaev n.nikol...@virtualopensystems.com chardev depends on lots of external symbols that are not necessarily needed to be able to use, for example, 'socket chardev'. So add stubs for these functions:

Re: [Qemu-devel] [PATCH] console: move chardev declarations to sysemu/char.h

2014-06-23 Thread Riku Voipio
error: pixman.h: No such file or directory #include pixman.h ^ compilation terminated. This fix works for me, thanks. Tested-by: Riku Voipio riku.voi...@iki.fi Reported-by: Riku Voipio riku.voi...@iki.fi Signed-off-by: Michael S. Tsirkin m...@redhat.com --- include

[Qemu-devel] [PULL 02/19] Add support for the arm breakpoint syscall

2014-06-23 Thread riku . voipio
-electrons.com/source/arch/arm/kernel/traps.c#L598 Signed-off-by: Hunter Laux hunterl...@gmail.com Reviewed-by: Peter Maydell peter.mayd...@linaro.org Signed-off-by: Riku Voipio riku.voi...@linaro.org --- linux-user/arm/syscall.h | 1 + linux-user/main.c| 4 2 files changed, 5 insertions

[Qemu-devel] [PULL 09/19] linux-user: support strace of epoll_create1

2014-06-23 Thread riku . voipio
-off-by: Riku Voipio riku.voi...@linaro.org --- linux-user/strace.list | 3 +++ 1 file changed, 3 insertions(+) diff --git a/linux-user/strace.list b/linux-user/strace.list index cf5841a..fcb258d 100644 --- a/linux-user/strace.list +++ b/linux-user/strace.list @@ -114,6 +114,9 @@ #ifdef

[Qemu-devel] [PULL 12/19] linux-user: allow NULL tv argument for settimeofday

2014-06-23 Thread riku . voipio
expected. Signed-off-by: Paul Burton p...@archlinuxmips.org Signed-off-by: Riku Voipio riku.voi...@linaro.org --- linux-user/syscall.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 0ce1a4e..8e2762b 100644 --- a/linux

[Qemu-devel] [PULL 00/19] linux-user changes for 2.1

2014-06-23 Thread riku . voipio
From: Riku Voipio riku.voi...@linaro.org The following changes since commit d9c1647d896d3192cba9dbf98fb7efab876edde5: Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' into staging (2014-06-23 12:55:22 +0100) are available in the git repository at: git

[Qemu-devel] [PULL 17/19] linux-user: support the unshare syscall

2014-06-23 Thread riku . voipio
From: Paul Burton p...@archlinuxmips.org Add support for the unshare syscall, trivially passed through to the host. Signed-off-by: Paul Burton p...@archlinuxmips.org Signed-off-by: Riku Voipio riku.voi...@linaro.org --- linux-user/syscall.c | 6 ++ 1 file changed, 6 insertions(+) diff

[Qemu-devel] [PULL 10/19] linux-user: fix struct target_epoll_event layout for MIPS

2014-06-23 Thread riku . voipio
From: Paul Burton p...@archlinuxmips.org MIPS requires the pad field to 64b-align the data field just as ARM does. Signed-off-by: Paul Burton p...@archlinuxmips.org Signed-off-by: Riku Voipio riku.voi...@linaro.org --- linux-user/syscall_defs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion

[Qemu-devel] [PULL 13/19] linux-user: support timerfd_{create, gettime, settime} syscalls

2014-06-23 Thread riku . voipio
From: Paul Burton p...@archlinuxmips.org Adds support for the timerfd_create, timerfd_gettime timerfd_settime syscalls, allowing use of timerfds by target programs. Signed-off-by: Paul Burton p...@archlinuxmips.org Signed-off-by: Riku Voipio riku.voi...@linaro.org --- linux-user/strace.list

[Qemu-devel] [PULL 06/19] linux-user: support SO_{SND, RCV}BUFFORCE setsockopt options

2014-06-23 Thread riku . voipio
From: Paul Burton p...@archlinuxmips.org Translate the SO_SNDBUFFORCE SO_RCVBUFFORCE options to setsockopt to the host values perform the syscall as expected, allowing use of those options by target programs. Signed-off-by: Paul Burton p...@archlinuxmips.org Signed-off-by: Riku Voipio riku.voi

[Qemu-devel] [PULL 18/19] linux-user: support the KDSIGACCEPT ioctl

2014-06-23 Thread riku . voipio
From: Paul Burton p...@archlinuxmips.org Add a definition of the KDSIGACCEPT ioctl allow its use by target programs. Signed-off-by: Paul Burton p...@archlinuxmips.org Signed-off-by: Riku Voipio riku.voi...@linaro.org --- linux-user/ioctls.h | 1 + linux-user/syscall.c | 7

[Qemu-devel] [PULL 05/19] linux-user: support SO_ACCEPTCONN getsockopt option

2014-06-23 Thread riku . voipio
From: Paul Burton p...@archlinuxmips.org Translate the SO_ACCEPTCONN option to the host value execute the syscall as expected. Signed-off-by: Paul Burton p...@archlinuxmips.org Signed-off-by: Riku Voipio riku.voi...@linaro.org --- linux-user/syscall.c | 3 +++ 1 file changed, 3 insertions

[Qemu-devel] [PULL 08/19] linux-user: allow NULL arguments to mount

2014-06-23 Thread riku . voipio
argument was non-NULL and already locked. Since the patch already touched most lines of the TARGET_NR_mount case, it fixes the indentation coding style for good measure. Signed-off-by: Paul Burton p...@archlinuxmips.org Signed-off-by: Riku Voipio riku.voi...@linaro.org --- linux-user/syscall.c | 75

[Qemu-devel] [PULL 15/19] linux-user: support {name_to, open_by}_handle_at syscalls

2014-06-23 Thread riku . voipio
From: Paul Burton p...@archlinuxmips.org Implement support for the name_to_handle_at and open_by_handle_at syscalls, allowing their use by the target program. Signed-off-by: Paul Burton p...@archlinuxmips.org Signed-off-by: Riku Voipio riku.voi...@linaro.org --- linux-user/strace.c| 30

[Qemu-devel] [PULL 07/19] linux-user: support SO_PASSSEC setsockopt option

2014-06-23 Thread riku . voipio
From: Paul Burton p...@archlinuxmips.org Translate the SO_PASSSEC option to setsockopt to the host value perform the syscall as expected, allowing use of the option by target programs. Signed-off-by: Paul Burton p...@archlinuxmips.org Signed-off-by: Riku Voipio riku.voi...@linaro.org --- linux

[Qemu-devel] [PULL 03/19] linux-user: added fake open() for /proc/self/cmdline

2014-06-23 Thread riku . voipio
From: Wim Vander Schelden w...@fixnum.org Signed-off-by: Wim Vander Schelden w...@fixnum.org Signed-off-by: Riku Voipio riku.voi...@linaro.org --- linux-user/syscall.c | 46 ++ 1 file changed, 46 insertions(+) diff --git a/linux-user/syscall.c b/linux

[Qemu-devel] [PULL 04/19] linux-user: translate the result of getsockopt SO_TYPE

2014-06-23 Thread riku . voipio
a host_to_target_sock_type helper function mirroring the existing target_to_host_sock_type, and call it to translate the value provided by getsockopt when called for the SO_TYPE option. Signed-off-by: Paul Burton p...@archlinuxmips.org Signed-off-by: Riku Voipio riku.voi...@linaro.org --- linux-user

[Qemu-devel] [PULL 19/19] linux-user: support the SIOCGIFINDEX ioctl

2014-06-23 Thread riku . voipio
From: Paul Burton p...@archlinuxmips.org Add a definition of the SIOCGIFINDEX ioctl, allowing its use by target programs. Signed-off-by: Paul Burton p...@archlinuxmips.org Signed-off-by: Riku Voipio riku.voi...@linaro.org --- linux-user/ioctls.h | 1 + linux-user/syscall_defs.h | 1 + 2

[Qemu-devel] [PULL 01/19] Add support for MAP_NORESERVE mmap flag.

2014-06-23 Thread riku . voipio
...@linaro.org Signed-off-by: Riku Voipio riku.voi...@linaro.org --- linux-user/syscall.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 7d74079..007d59d 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -3908,6 +3908,8 @@ static

[Qemu-devel] [PULL 14/19] linux-user: support ioprio_{get, set} syscalls

2014-06-23 Thread riku . voipio
From: Paul Burton p...@archlinuxmips.org Add support for the ioprio_get ioprio_set syscalls, allowing their use by target programs. Signed-off-by: Paul Burton p...@archlinuxmips.org Signed-off-by: Riku Voipio riku.voi...@linaro.org --- linux-user/syscall.c | 18 ++ 1 file

[Qemu-devel] [PULL 16/19] linux-user: support the setns syscall

2014-06-23 Thread riku . voipio
From: Paul Burton p...@archlinuxmips.org Add support for the setns syscall, trivially passed through to the host. Signed-off-by: Paul Burton p...@archlinuxmips.org Signed-off-by: Riku Voipio riku.voi...@linaro.org --- linux-user/strace.list | 3 +++ linux-user/syscall.c | 6 ++ 2 files

[Qemu-devel] [PULL 11/19] linux-user: respect timezone for settimeofday

2014-06-23 Thread riku . voipio
userland provided. Although this argument is described by the settimeofday man page as obsolete, it is used by systemd as of version 213. Signed-off-by: Paul Burton p...@archlinuxmips.org Signed-off-by: Riku Voipio riku.voi...@linaro.org --- linux-user/syscall.c | 29

Re: [Qemu-devel] [PATCH 01/16] linux-user: translate the result of getsockopt SO_TYPE

2014-06-21 Thread Riku Voipio
On Sun, Jun 15, 2014 at 05:18:18PM +0100, Paul Burton wrote: QEMU previously passed the result of the host syscall directly to the target program. This is a problem if the host target have different representations of socket types, as is the case when running a MIPS target program on an x86

Re: [Qemu-devel] [PATCH 04/16] linux-user: support SO_PASSSEC setsockopt option

2014-06-21 Thread Riku Voipio
On Sun, Jun 15, 2014 at 05:18:21PM +0100, Paul Burton wrote: Translate the SO_PASSSEC option to setsockopt to the host value perform the syscall as expected, allowing use of the option by target programs. Another file that is a total mess in linux-user tree.. This should be split out to arch

Re: [Qemu-devel] [PATCH 07/16] linux-user: fix struct target_epoll_event layout for MIPS

2014-06-21 Thread Riku Voipio
On Sun, Jun 15, 2014 at 05:18:24PM +0100, Paul Burton wrote: MIPS requires the pad field to 64b-align the data field just as ARM does. Is this true for the 64bit mips also? Signed-off-by: Paul Burton p...@archlinuxmips.org --- linux-user/syscall_defs.h | 2 +- 1 file changed, 1

Re: [Qemu-devel] [PATCH 00/16] linux-user fixes improvements

2014-06-21 Thread Riku Voipio
On Sun, Jun 15, 2014 at 05:18:17PM +0100, Paul Burton wrote: This series fixes a number of bugs in QEMUs linux-user support, some specific to targetting the MIPS architecture but mostly generic. It also adds support for some previously unsupported syscalls {g,s}etsockopt options. Apart from

Re: [Qemu-devel] [PATCH] linux-user: added fake open() for /proc/self/cmdline

2014-06-20 Thread Riku Voipio
On Wed, Jun 18, 2014 at 11:02:39AM +0200, li...@fixnum.org wrote: From: Wim Vander Schelden w...@fixnum.org Seems to work, applied to linux-user updates Signed-off-by: Wim Vander Schelden w...@fixnum.org --- linux-user/syscall.c | 46 ++ 1 file

Re: [Qemu-devel] [PATCH 11/16] linux-user: support ioprio_{get, set} syscalls

2014-06-20 Thread Riku Voipio
On Sun, Jun 15, 2014 at 05:18:28PM +0100, Paul Burton wrote: Add support for the ioprio_get ioprio_set syscalls, allowing their use by target programs. Signed-off-by: Paul Burton p...@archlinuxmips.org --- linux-user/syscall.c | 18 ++ 1 file changed, 18 insertions(+)

Re: [Qemu-devel] [PATCH 00/16] linux-user fixes improvements

2014-06-17 Thread Riku Voipio
Hi, On Sun, Jun 15, 2014 at 05:18:17PM +0100, Paul Burton wrote: This series fixes a number of bugs in QEMUs linux-user support, some specific to targetting the MIPS architecture but mostly generic. It also adds support for some previously unsupported syscalls {g,s}etsockopt options. This

[Qemu-devel] [PULL v2 10/17] signal/ppc/{save, restore}_user_regs remove __put/get error checks

2014-06-17 Thread riku . voipio
From: Riku Voipio riku.voi...@linaro.org As __get_user and __put_user do not return errors, remove the if checks from around them. This allows making the save/restore functions void. Signed-off-by: Riku Voipio riku.voi...@linaro.org Reviewed-by: Peter Maydell peter.mayd...@linaro.org Cc

[Qemu-devel] [PULL v2 02/17] signal/x86/setup_frame: __put_user cleanup

2014-06-17 Thread riku . voipio
From: Riku Voipio riku.voi...@linaro.org Remove the remaining check for __put_user return value, and all the checks for err variable which isn't set anywhere anymore. No we can only end up in give_sigsegv due to failed lock_user_struct - thus we remove the unlock_user_struct to avoid unlocking

[Qemu-devel] [PULL v2 00/17] linux-user updates

2014-06-17 Thread riku . voipio
From: Riku Voipio riku.voi...@linaro.org Changes from first pull req: rebase against head patch 01/17 signal/all: remove __get/__put_user return value reading remove err variable from target_rt_restore_ucontext The following changes since commit af44da87e926ff64260b95f4350d338c4fc113ca

[Qemu-devel] [PULL v2 12/17] signal/ppc/do_setcontext remove __get_user return check

2014-06-17 Thread riku . voipio
From: Riku Voipio riku.voi...@linaro.org The last remaining check for return value of __get_user. Signed-off-by: Riku Voipio riku.voi...@linaro.org Reviewed-by: Peter Maydell peter.mayd...@linaro.org Cc: Alexander Graf ag...@suse.de --- linux-user/signal.c | 3 +-- 1 file changed, 1 insertion

[Qemu-devel] [PULL v2 11/17] signal/sparc64_set_context: remove __get_user checks

2014-06-17 Thread riku . voipio
From: Riku Voipio riku.voi...@linaro.org Remove checks of __get_user and the err variable used to control flow with it. Signed-off-by: Riku Voipio riku.voi...@linaro.org Reviewed-by: Peter Maydell peter.mayd...@linaro.org --- linux-user/signal.c | 12 +++- 1 file changed, 3 insertions

[Qemu-devel] [PULL v2 04/17] signal/all: remove return value from setup_sigcontext

2014-06-17 Thread riku . voipio
From: Riku Voipio riku.voi...@linaro.org Make all implementations of setup_sigcontext void and remove checking it's return value from functions calling setup_sigcontext. Signed-off-by: Riku Voipio riku.voi...@linaro.org Reviewed-by: Peter Maydell peter.mayd...@linaro.org --- linux-user/signal.c

[Qemu-devel] [PULL v2 17/17] User mode support for Linux ELF files with no section header

2014-06-17 Thread riku . voipio
() allows ELF binaries with no section headers to be run properly in user mode: Signed-off-by: Craig Heffner cheff...@tacnetsol.com Signed-off-by: Riku Voipio riku.voi...@linaro.org --- linux-user/elfload.c | 1 - 1 file changed, 1 deletion(-) diff --git a/linux-user/elfload.c b/linux-user/elfload.c

[Qemu-devel] [PULL v2 01/17] signal/all: remove __get/__put_user return value reading

2014-06-17 Thread riku . voipio
From: Riku Voipio riku.voi...@linaro.org Remove all the simple cases of reading the return value of __get_user and __put_user. We set err = 0 in sparc versions of do_sigreturn and sparc64_set_context to avoid compile error, but else this patch is just general removal of err |= __get_user

[Qemu-devel] [PULL v2 03/17] signal/all: remove return value from copy_siginfo_to_user

2014-06-17 Thread riku . voipio
From: Riku Voipio riku.voi...@linaro.org Since copy_siginfo_to_user always returns 0, make it void and remove any checks for return value from calling functions. Signed-off-by: Riku Voipio riku.voi...@linaro.org Reviewed-by: Peter Maydell peter.mayd...@linaro.org --- linux-user/signal.c | 28

[Qemu-devel] [PULL v2 08/17] signal/all/do_sigreturn - remove __get_user checks

2014-06-17 Thread riku . voipio
From: Riku Voipio riku.voi...@linaro.org Remove if(__get_user checks and their related error paths for all architecture's do_sigreturn. Remove the unlock_user_struct when the only way to end up there is from failed lock_user_struct. v3: remove unneccesary sigsegv label as suggested by Peter

[Qemu-devel] [PULL v2 14/17] linux-user/uname: Return correct uname string for x86_64

2014-06-17 Thread riku . voipio
for only those architectures which need to vary the string based on runtime CPU features. Signed-off-by: Peter Maydell peter.mayd...@linaro.org Signed-off-by: Riku Voipio riku.voi...@linaro.org --- linux-user/uname.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/linux-user

[Qemu-devel] [PULL v2 09/17] signal/all/setup_frame remove __put_user checks

2014-06-17 Thread riku . voipio
From: Riku Voipio riku.voi...@linaro.org Remove if(__put_user checks and their related error paths for all architecture's setup_frame, setup_rt_frame and similar. Remove the unlock_user_struct when the only way to end up there is from failed lock_user_struct. Remove err variable

[Qemu-devel] [PULL v2 13/17] linux-user: fix gcc-4.9 compiler error on __{get, put]}_user

2014-06-17 Thread riku . voipio
From: Riku Voipio riku.voi...@linaro.org gcc-4.9 finds unused operand: linux-user/syscall.c: In function ‘host_to_target_stat64’: linux-user/qemu.h:301:19: error: right-hand operand of comma expression has no effect [-Werror=unused-value] ((hptr), (x)), 0) Just removing the rh operand

[Qemu-devel] [PULL v2 15/17] linux-user: Don't overrun guest buffer in sched_getaffinity

2014-06-17 Thread riku . voipio
a buffer whose size is a multiple of 8 regardless of guest architecture. Signed-off-by: Peter Maydell peter.mayd...@linaro.org Signed-off-by: Riku Voipio riku.voi...@linaro.org --- linux-user/syscall.c | 16 1 file changed, 16 insertions(+) diff --git a/linux-user/syscall.c b/linux

[Qemu-devel] [PULL v2 07/17] signal/all/do_sigaltstack remove __get_user value check

2014-06-17 Thread riku . voipio
From: Riku Voipio riku.voi...@linaro.org Access is already checked in the lock_user_struct call before. Signed-off-by: Riku Voipio riku.voi...@linaro.org Reviewed-by: Peter Maydell peter.mayd...@linaro.org --- linux-user/signal.c | 9 + 1 file changed, 5 insertions(+), 4 deletions

[Qemu-devel] [PULL v2 06/17] signal/sparc/restore_fpu_state: remove

2014-06-17 Thread riku . voipio
From: Riku Voipio riku.voi...@linaro.org A function never called from anywhere, obviously half-complete. Remove function and if someone wants to complete this, please check the old version out of git history. Signed-off-by: Riku Voipio riku.voi...@linaro.org Reviewed-by: Peter Maydell peter.mayd

[Qemu-devel] [PULL v2 05/17] signal/all: remove return value from restore_sigcontext

2014-06-17 Thread riku . voipio
From: Riku Voipio riku.voi...@linaro.org make most implementations of restore_sigcontext void and remove checking it's return value from functions calling restore_sigcontext. The exception is the X86 version of the function that is too different from others to deal in this way, and arm version

[Qemu-devel] [PULL v2 16/17] linux-user: Return correct errno for unsupported netlink socket

2014-06-17 Thread riku . voipio
From: Ed Swierk eswi...@skyportsystems.com This fixes Cannot open audit interface - aborting. when the EAFNOSUPPORT errno differs between the target and host architectures (e.g. mips target and x86_64 host). Signed-off-by: Ed Swierk eswi...@skyportsystems.com Signed-off-by: Riku Voipio riku.voi

[Qemu-devel] [PATCH v3 02/13] signal/x86/setup_frame: __put_user cleanup

2014-06-10 Thread riku . voipio
From: Riku Voipio riku.voi...@linaro.org Remove the remaining check for __put_user return value, and all the checks for err variable which isn't set anywhere anymore. No we can only end up in give_sigsegv due to failed lock_user_struct - thus we remove the unlock_user_struct to avoid unlocking

[Qemu-devel] [PATCH v3 03/13] signal/all: remove return value from copy_siginfo_to_user

2014-06-10 Thread riku . voipio
From: Riku Voipio riku.voi...@linaro.org Since copy_siginfo_to_user always returns 0, make it void and remove any checks for return value from calling functions. Signed-off-by: Riku Voipio riku.voi...@linaro.org Reviewed-by: Peter Maydell peter.mayd...@linaro.org --- linux-user/signal.c | 28

[Qemu-devel] [PATCH v3 13/13] linux-user: fix gcc-4.9 compiler error on __{get, put]}_user

2014-06-10 Thread riku . voipio
From: Riku Voipio riku.voi...@linaro.org gcc-4.9 finds unused operand: linux-user/syscall.c: In function ‘host_to_target_stat64’: linux-user/qemu.h:301:19: error: right-hand operand of comma expression has no effect [-Werror=unused-value] ((hptr), (x)), 0) Just removing the rh operand

[Qemu-devel] [PATCH v3 04/13] signal/all: remove return value from setup_sigcontext

2014-06-10 Thread riku . voipio
From: Riku Voipio riku.voi...@linaro.org Make all implementations of setup_sigcontext void and remove checking it's return value from functions calling setup_sigcontext. Signed-off-by: Riku Voipio riku.voi...@linaro.org Reviewed-by: Peter Maydell peter.mayd...@linaro.org --- linux-user/signal.c

[Qemu-devel] [PATCH v3 07/13] signal/all/do_sigaltstack remove __get_user value check

2014-06-10 Thread riku . voipio
From: Riku Voipio riku.voi...@linaro.org Access is already checked in the lock_user_struct call before. Signed-off-by: Riku Voipio riku.voi...@linaro.org Reviewed-by: Peter Maydell peter.mayd...@linaro.org --- linux-user/signal.c | 9 + 1 file changed, 5 insertions(+), 4 deletions

[Qemu-devel] [PATCH v3 12/13] signal/ppc/do_setcontext remove __get_user return check

2014-06-10 Thread riku . voipio
From: Riku Voipio riku.voi...@linaro.org The last remaining check for return value of __get_user. Signed-off-by: Riku Voipio riku.voi...@linaro.org Reviewed-by: Peter Maydell peter.mayd...@linaro.org Cc: Alexander Graf ag...@suse.de --- linux-user/signal.c | 3 +-- 1 file changed, 1 insertion

[Qemu-devel] [PATCH v3 08/13] signal/all/do_sigreturn - remove __get_user checks

2014-06-10 Thread riku . voipio
From: Riku Voipio riku.voi...@linaro.org Remove if(__get_user checks and their related error paths for all architecture's do_sigreturn. Remove the unlock_user_struct when the only way to end up there is from failed lock_user_struct. v3: remove unneccesary sigsegv label as suggested by Peter

[Qemu-devel] [PATCH v3 11/13] signal/sparc64_set_context: remove __get_user checks

2014-06-10 Thread riku . voipio
From: Riku Voipio riku.voi...@linaro.org Remove checks of __get_user and the err variable used to control flow with it. Signed-off-by: Riku Voipio riku.voi...@linaro.org Reviewed-by: Peter Maydell peter.mayd...@linaro.org --- linux-user/signal.c | 12 +++- 1 file changed, 3 insertions

[Qemu-devel] [PATCH v3 10/13] signal/ppc/{save, restore}_user_regs remove __put/get error checks

2014-06-10 Thread riku . voipio
From: Riku Voipio riku.voi...@linaro.org As __get_user and __put_user do not return errors, remove the if checks from around them. This allows making the save/restore functions void. Signed-off-by: Riku Voipio riku.voi...@linaro.org Reviewed-by: Peter Maydell peter.mayd...@linaro.org Cc

[Qemu-devel] [PATCH v3 05/13] signal/all: remove return value from restore_sigcontext

2014-06-10 Thread riku . voipio
From: Riku Voipio riku.voi...@linaro.org make most implementations of restore_sigcontext void and remove checking it's return value from functions calling restore_sigcontext. The exception is the X86 version of the function that is too different from others to deal in this way, and arm version

[Qemu-devel] [PATCH v3 09/13] signal/all/setup_frame remove __put_user checks

2014-06-10 Thread riku . voipio
From: Riku Voipio riku.voi...@linaro.org Remove if(__put_user checks and their related error paths for all architecture's setup_frame, setup_rt_frame and similar. Remove the unlock_user_struct when the only way to end up there is from failed lock_user_struct. Remove err variable

[Qemu-devel] [PATCH v3 06/13] signal/sparc/restore_fpu_state: remove

2014-06-10 Thread riku . voipio
From: Riku Voipio riku.voi...@linaro.org A function never called from anywhere, obviously half-complete. Remove function and if someone wants to complete this, please check the old version out of git history. Signed-off-by: Riku Voipio riku.voi...@linaro.org Reviewed-by: Peter Maydell peter.mayd

[Qemu-devel] [PATCH v3 01/13] signal/all: remove __get/__put_user return value reading

2014-06-10 Thread riku . voipio
From: Riku Voipio riku.voi...@linaro.org Remove all the simple cases of reading the return value of __get_user and __put_user. We set err = 0 in sparc versions of do_sigreturn and sparc64_set_context to avoid compile error, but else this patch is just general removal of err |= __get_user

[Qemu-devel] [PATCH v3 00/13] linux-user: __{get, put}_user return value cleanup

2014-06-10 Thread riku . voipio
From: Riku Voipio riku.voi...@linaro.org This series is a cleanup and gcc-4.9 buildfix: linux-user/syscall.c: In function ‘host_to_target_stat64’: linux-user/qemu.h:301:19: error: right-hand operand of comma expression has no effect [-Werror=unused-value] ((hptr), (x)), 0) removing

[Qemu-devel] [PATCH v3] signal/all: remove return value from restore_sigcontext

2014-06-09 Thread riku . voipio
From: Riku Voipio riku.voi...@linaro.org make most implementations of restore_sigcontext void and remove checking it's return value from functions calling restore_sigcontext. The exception is the X86 version of the function that is too different from others to deal in this way, and arm version

[Qemu-devel] [PATCH v3] signal/all/do_sigreturn - remove __get_user checks

2014-06-09 Thread riku . voipio
From: Riku Voipio riku.voi...@linaro.org Remove if(__get_user checks and their related error paths for all architecture's do_sigreturn. Remove the unlock_user_struct when the only way to end up there is from failed lock_user_struct. v3: remove unneccesary sigsegv label as suggested by Peter

Re: [Qemu-devel] [PATCH v2 00/13] linux-user: __{get, put}_user return value cleanup

2014-06-09 Thread Riku Voipio
On 8 June 2014 00:40, Peter Maydell peter.mayd...@linaro.org wrote: On 6 June 2014 10:46, riku.voi...@linaro.org wrote: From: Riku Voipio riku.voi...@linaro.org This series is a cleanup and gcc-4.9 buildfix: linux-user/syscall.c: In function ‘host_to_target_stat64’: linux-user/qemu.h:301

[Qemu-devel] [PULL 13/18] linux-user: fix gcc-4.9 compiler error on __{get, put]}_user

2014-06-09 Thread riku . voipio
From: Riku Voipio riku.voi...@linaro.org gcc-4.9 finds unused operand: linux-user/syscall.c: In function ‘host_to_target_stat64’: linux-user/qemu.h:301:19: error: right-hand operand of comma expression has no effect [-Werror=unused-value] ((hptr), (x)), 0) Just removing the rh operand

[Qemu-devel] [PULL 17/18] linux-user: Return correct errno for unsupported netlink socket

2014-06-09 Thread riku . voipio
From: Ed Swierk eswi...@skyportsystems.com This fixes Cannot open audit interface - aborting. when the EAFNOSUPPORT errno differs between the target and host architectures (e.g. mips target and x86_64 host). Signed-off-by: Ed Swierk eswi...@skyportsystems.com Signed-off-by: Riku Voipio riku.voi

[Qemu-devel] [PULL 02/18] signal/x86/setup_frame: __put_user cleanup

2014-06-09 Thread riku . voipio
From: Riku Voipio riku.voi...@linaro.org Remove the remaining check for __put_user return value, and all the checks for err variable which isn't set anywhere anymore. No we can only end up in give_sigsegv due to failed lock_user_struct - thus we remove the unlock_user_struct to avoid unlocking

[Qemu-devel] [PULL 10/18] signal/ppc/{save, restore}_user_regs remove __put/get error checks

2014-06-09 Thread riku . voipio
From: Riku Voipio riku.voi...@linaro.org As __get_user and __put_user do not return errors, remove the if checks from around them. This allows making the save/restore functions void. Signed-off-by: Riku Voipio riku.voi...@linaro.org Reviewed-by: Peter Maydell peter.mayd...@linaro.org Cc

[Qemu-devel] [PULL 00/18] linux-user fixes

2014-06-09 Thread riku . voipio
From: Riku Voipio riku.voi...@linaro.org Mostly fixes, but a bigger rework in signal.c to allow compiling with gcc-4.9 The following changes since commit 959e41473f2179850578482052fb73b913bc4e42: slirp/arp: do not special-case bogus IP addresses (2014-06-09 01:49:28 +0200) are available

[Qemu-devel] [PULL 18/18] User mode support for Linux ELF files with no section header

2014-06-09 Thread riku . voipio
() allows ELF binaries with no section headers to be run properly in user mode: Signed-off-by: Craig Heffner cheff...@tacnetsol.com Signed-off-by: Riku Voipio riku.voi...@linaro.org --- linux-user/elfload.c | 1 - 1 file changed, 1 deletion(-) diff --git a/linux-user/elfload.c b/linux-user/elfload.c

[Qemu-devel] [PULL 12/18] signal/ppc/do_setcontext remove __get_user return check

2014-06-09 Thread riku . voipio
From: Riku Voipio riku.voi...@linaro.org The last remaining check for return value of __get_user. Signed-off-by: Riku Voipio riku.voi...@linaro.org Reviewed-by: Peter Maydell peter.mayd...@linaro.org Cc: Alexander Graf ag...@suse.de --- linux-user/signal.c | 3 +-- 1 file changed, 1 insertion

[Qemu-devel] [PULL 05/18] signal/all: remove return value from restore_sigcontext

2014-06-09 Thread riku . voipio
From: Riku Voipio riku.voi...@linaro.org make most implementations of restore_sigcontext void and remove checking it's return value from functions calling restore_sigcontext. The exception is the X86 version of the function that is too different from others to deal in this way, and arm version

[Qemu-devel] [PULL 06/18] signal/sparc/restore_fpu_state: remove

2014-06-09 Thread riku . voipio
From: Riku Voipio riku.voi...@linaro.org A function never called from anywhere, obviously half-complete. Remove function and if someone wants to complete this, please check the old version out of git history. Signed-off-by: Riku Voipio riku.voi...@linaro.org Reviewed-by: Peter Maydell peter.mayd

[Qemu-devel] [PULL 08/18] signal/all/do_sigreturn - remove __get_user checks

2014-06-09 Thread riku . voipio
From: Riku Voipio riku.voi...@linaro.org Remove if(__get_user checks and their related error paths for all architecture's do_sigreturn. Remove the unlock_user_struct when the only way to end up there is from failed lock_user_struct. v3: remove unneccesary sigsegv label as suggested by Peter

[Qemu-devel] [PULL 15/18] linux-user: Don't overrun guest buffer in sched_getaffinity

2014-06-09 Thread riku . voipio
a buffer whose size is a multiple of 8 regardless of guest architecture. Signed-off-by: Peter Maydell peter.mayd...@linaro.org Signed-off-by: Riku Voipio riku.voi...@linaro.org --- linux-user/syscall.c | 16 1 file changed, 16 insertions(+) diff --git a/linux-user/syscall.c b/linux

[Qemu-devel] [PULL 03/18] signal/all: remove return value from copy_siginfo_to_user

2014-06-09 Thread riku . voipio
From: Riku Voipio riku.voi...@linaro.org Since copy_siginfo_to_user always returns 0, make it void and remove any checks for return value from calling functions. Signed-off-by: Riku Voipio riku.voi...@linaro.org Reviewed-by: Peter Maydell peter.mayd...@linaro.org --- linux-user/signal.c | 28

[Qemu-devel] [PULL 04/18] signal/all: remove return value from setup_sigcontext

2014-06-09 Thread riku . voipio
From: Riku Voipio riku.voi...@linaro.org Make all implementations of setup_sigcontext void and remove checking it's return value from functions calling setup_sigcontext. Signed-off-by: Riku Voipio riku.voi...@linaro.org Reviewed-by: Peter Maydell peter.mayd...@linaro.org --- linux-user/signal.c

[Qemu-devel] [PULL 14/18] linux-user/uname: Return correct uname string for x86_64

2014-06-09 Thread riku . voipio
for only those architectures which need to vary the string based on runtime CPU features. Signed-off-by: Peter Maydell peter.mayd...@linaro.org Signed-off-by: Riku Voipio riku.voi...@linaro.org --- linux-user/uname.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/linux-user

[Qemu-devel] [PULL 16/18] linux-user: Tell guest about big host page sizes

2014-06-09 Thread riku . voipio
...@suse.de Reviewed-by: Richard Henderson r...@twiddle.net Signed-off-by: Riku Voipio riku.voi...@linaro.org --- linux-user/elfload.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linux-user/elfload.c b/linux-user/elfload.c index 995f999..03a8719 100644 --- a/linux-user

[Qemu-devel] [PULL 09/18] signal/all/setup_frame remove __put_user checks

2014-06-09 Thread riku . voipio
From: Riku Voipio riku.voi...@linaro.org Remove if(__put_user checks and their related error paths for all architecture's setup_frame, setup_rt_frame and similar. Remove the unlock_user_struct when the only way to end up there is from failed lock_user_struct. Remove err variable

[Qemu-devel] [PULL 01/18] signal/all: remove __get/__put_user return value reading

2014-06-09 Thread riku . voipio
From: Riku Voipio riku.voi...@linaro.org Remove all the simple cases of reading the return value of __get_user and __put_user. We set err = 0 in sparc versions of do_sigreturn and sparc64_set_context to avoid compile error, but else this patch is just general removal of err |= __get_user

[Qemu-devel] [PULL 11/18] signal/sparc64_set_context: remove __get_user checks

2014-06-09 Thread riku . voipio
From: Riku Voipio riku.voi...@linaro.org Remove checks of __get_user and the err variable used to control flow with it. Signed-off-by: Riku Voipio riku.voi...@linaro.org Reviewed-by: Peter Maydell peter.mayd...@linaro.org --- linux-user/signal.c | 12 +++- 1 file changed, 3 insertions

[Qemu-devel] [PULL 07/18] signal/all/do_sigaltstack remove __get_user value check

2014-06-09 Thread riku . voipio
From: Riku Voipio riku.voi...@linaro.org Access is already checked in the lock_user_struct call before. Signed-off-by: Riku Voipio riku.voi...@linaro.org Reviewed-by: Peter Maydell peter.mayd...@linaro.org --- linux-user/signal.c | 9 + 1 file changed, 5 insertions(+), 4 deletions

Re: [Qemu-devel] [PULL 00/18] linux-user fixes

2014-06-09 Thread Riku Voipio
On 9 June 2014 16:37, Peter Maydell peter.mayd...@linaro.org wrote: On 9 June 2014 13:46, riku.voi...@linaro.org wrote: From: Riku Voipio riku.voi...@linaro.org Mostly fixes, but a bigger rework in signal.c to allow compiling with gcc-4.9 The following changes since commit

Re: [Qemu-devel] [PATCH v2] linux-user/signal.c: define __SIGRTMIN/MAX for non-GNU platforms

2014-06-06 Thread Riku Voipio
Hi, On Wed, Jun 04, 2014 at 09:49:00AM +0200, Natanael Copa wrote: The __SIGRTMIN and __SIGRTMAX are glibc internals and are not available on all platforms, so we define those if they are missing. We also check that those corresponds with the posix variables SIGRTMIN/SIGRTMAX which may only

Re: [Qemu-devel] [PATCH] linux-user/uname: Return correct uname string for x86_64

2014-06-06 Thread Riku Voipio
On Thu, Jun 05, 2014 at 02:21:42PM +0100, Peter Maydell wrote: On 5 June 2014 14:11, Riku Voipio riku.voi...@iki.fi wrote: Hi, On Tue, Jun 03, 2014 at 03:07:59PM +0100, Peter Maydell wrote: Ping! Looks good, I'll collect this and other linux-user patches and submit linux-user

[Qemu-devel] [PATCH v2 04/13] signal/all: remove return value from setup_sigcontext

2014-06-06 Thread riku . voipio
From: Riku Voipio riku.voi...@linaro.org Make all implementations of setup_sigcontext void and remove checking it's return value from functions calling setup_sigcontext. Signed-off-by: Riku Voipio riku.voi...@linaro.org --- linux-user/signal.c | 65

[Qemu-devel] [PATCH v2 10/13] signal/ppc/{save, restore}_user_regs remove __put/get error checks

2014-06-06 Thread riku . voipio
From: Riku Voipio riku.voi...@linaro.org As __get_user and __put_user do not return errors, remove the if checks from around them. This allows making the save/restore functions void. Signed-off-by: Riku Voipio riku.voi...@linaro.org Cc: Alexander Graf ag...@suse.de --- linux-user/signal.c | 126

[Qemu-devel] [PATCH v2 08/13] signal/all/do_sigreturn - remove __get_user checks

2014-06-06 Thread riku . voipio
From: Riku Voipio riku.voi...@linaro.org Remove if(__get_user checks and their related error paths for all architecture's do_sigreturn. Remove the unlock_user_struct when the only way to end up there is from failed lock_user_struct. Signed-off-by: Riku Voipio riku.voi...@linaro.org --- linux

[Qemu-devel] [PATCH v2 05/13] signal/all: remove return value from restore_sigcontext

2014-06-06 Thread riku . voipio
From: Riku Voipio riku.voi...@linaro.org make most implementations of restore_sigcontext void and remove checking it's return value from functions calling restore_sigcontext. The exception is the X86 version of the function that is too different from others to deal in this way. Signed-off

[Qemu-devel] [PATCH v2 01/13] signal/all: remove __get/__put_user return value reading

2014-06-06 Thread riku . voipio
From: Riku Voipio riku.voi...@linaro.org Remove all the simple cases of reading the return value of __get_user and __put_user. We set err = 0 in sparc versions of do_sigreturn and sparc64_set_context to avoid compile error, but else this patch is just general removal of err |= __get_user

[Qemu-devel] [PATCH v2 09/13] signal/all/setup_frame remove __put_user checks

2014-06-06 Thread riku . voipio
From: Riku Voipio riku.voi...@linaro.org Remove if(__put_user checks and their related error paths for all architecture's setup_frame, setup_rt_frame and similar. Remove the unlock_user_struct when the only way to end up there is from failed lock_user_struct. Remove err variable

[Qemu-devel] [PATCH v2 02/13] signal/x86/setup_frame: __put_user cleanup

2014-06-06 Thread riku . voipio
From: Riku Voipio riku.voi...@linaro.org Remove the remaining check for __put_user return value, and all the checks for err variable which isn't set anywhere anymore. No we can only end up in give_sigsegv due to failed lock_user_struct - thus we remove the unlock_user_struct to avoid unlocking

[Qemu-devel] [PATCH v2 13/13] linux-user: fix gcc-4.9 compiler error on __{get, put]}_user

2014-06-06 Thread riku . voipio
From: Riku Voipio riku.voi...@linaro.org gcc-4.9 finds unused operand: linux-user/syscall.c: In function ‘host_to_target_stat64’: linux-user/qemu.h:301:19: error: right-hand operand of comma expression has no effect [-Werror=unused-value] ((hptr), (x)), 0) Just removing the rh operand

[Qemu-devel] [PATCH v2 03/13] signal/all: remove return value from copy_siginfo_to_user

2014-06-06 Thread riku . voipio
From: Riku Voipio riku.voi...@linaro.org Since copy_siginfo_to_user always returns 0, make it void and remove any checks for return value from calling functions. Signed-off-by: Riku Voipio riku.voi...@linaro.org --- linux-user/signal.c | 28 +--- 1 file changed, 9

[Qemu-devel] [PATCH v2 06/13] signal/sparc/restore_fpu_state: remove

2014-06-06 Thread riku . voipio
From: Riku Voipio riku.voi...@linaro.org A function never called from anywhere, obviously half-complete. Remove function and if someone wants to complete this, please check the old version out of git history. Signed-off-by: Riku Voipio riku.voi...@linaro.org --- linux-user/signal.c | 37

[Qemu-devel] [PATCH v2 00/13] linux-user: __{get, put}_user return value cleanup

2014-06-06 Thread riku . voipio
From: Riku Voipio riku.voi...@linaro.org This series is a cleanup and gcc-4.9 buildfix: linux-user/syscall.c: In function ‘host_to_target_stat64’: linux-user/qemu.h:301:19: error: right-hand operand of comma expression has no effect [-Werror=unused-value] ((hptr), (x)), 0) removing

[Qemu-devel] [PATCH v2 07/13] signal/all/do_sigaltstack remove __get_user value check

2014-06-06 Thread riku . voipio
From: Riku Voipio riku.voi...@linaro.org Access is already checked in the lock_user_struct call before. Signed-off-by: Riku Voipio riku.voi...@linaro.org --- linux-user/signal.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/linux-user/signal.c b/linux-user

<    3   4   5   6   7   8   9   10   11   12   >