[Qemu-devel] [PULL 01/38] linux-user: Check array bounds in errno conversion

2016-05-24 Thread riku . voipio
-off-by: Peter Maydell Signed-off-by: Riku Voipio Reviewed-by: Laurent Vivier --- linux-user/syscall.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 032d338..5246f36 100644 --- a/linux-user/syscall.c +++ b/linux-user

[Qemu-devel] [PULL 07/38] linux-user: Support for restarting system calls for ARM targets

2016-05-24 Thread riku . voipio
-off-by: Riku Voipio --- linux-user/arm/target_signal.h | 1 + linux-user/main.c | 48 ++ linux-user/signal.c| 10 - 3 files changed, 36 insertions(+), 23 deletions(-) diff --git a/linux-user/arm/target_signal.h b/linux

[Qemu-devel] [PULL 05/38] linux-user: Renumber TARGET_QEMU_ESIGRETURN, make it not arch-specific

2016-05-24 Thread riku . voipio
: Peter Maydell Reviewed-by: Laurent Vivier Signed-off-by: Peter Maydell Signed-off-by: Riku Voipio --- linux-user/errno_defs.h| 9 + linux-user/mips/target_syscall.h | 4 linux-user/mips64/target_syscall.h | 4 linux-user/ppc/target_syscall.h| 2 -- 4 files

[Qemu-devel] [PULL 02/38] linux-user: Consistently return host errnos from do_openat()

2016-05-24 Thread riku . voipio
Signed-off-by: Riku Voipio Reviewed-by: Laurent Vivier --- linux-user/syscall.c | 14 ++ 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 5246f36..f4c2e19 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -5559,7

[Qemu-devel] [PULL 03/38] linux-user: Reindent signal handling

2016-05-24 Thread riku . voipio
Maydell Signed-off-by: Riku Voipio --- linux-user/signal.c | 1543 ++- 1 file changed, 791 insertions(+), 752 deletions(-) diff --git a/linux-user/signal.c b/linux-user/signal.c index 96e86c0..04c21d0 100644 --- a/linux-user/signal.c +++ b/linux

[Qemu-devel] [PULL v2 1/8] linux-user: fix realloc size of target_fd_trans.

2016-05-24 Thread riku . voipio
From: Laurent Vivier target_fd_trans is an array of "TargetFdTrans *": compute size accordingly. Use g_renew() as proposed by Paolo. Reported-by: Paolo Bonzini Signed-off-by: Laurent Vivier Signed-off-by: Riku Voipio --- linux-user/syscall.c | 4 ++-- 1 file changed, 2 insert

Re: [Qemu-devel] [PULL v2 3/8] linux-user: set ppc64/ppc64le default CPU to POWER8

2016-05-24 Thread Riku Voipio
; Signed-off-by: Laurent Vivier > Reviewed-by: Alexander Graf > Reviewed-by: Michael Tokarev > Signed-off-by: Riku Voipio > --- > linux-user/main.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/linux-user/main.c b/linux-user/main.c > index e7

[Qemu-devel] [PULL 04/38] linux-user: Define TARGET_ERESTART* errno values

2016-05-24 Thread riku . voipio
TARGET_QEMU_ESIGRETURN, add comment on usage] Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell Signed-off-by: Riku Voipio --- linux-user/errno_defs.h | 8 1 file changed, 8 insertions(+) diff --git a/linux-user/errno_defs.h b/linux-user/errno_defs.h index 8a1cf76..b7a8c9f 100644

[Qemu-devel] [PULL v2 4/8] linux-user: Don't assert if guest tries shmdt(0)

2016-05-24 Thread riku . voipio
et_flags() with both start and end addresses zero, which causes an assertion failure. Use an explicit in_use flag to manage the shm_regions[] array, so that we avoid this problem. Signed-off-by: Peter Maydell Reported-by: Pavel Shamis Reviewed-by: Laurent Vivier Signed-off-by: Riku Voipio ---

[Qemu-devel] [PULL 06/38] linux-user: Support for restarting system calls for x86 targets

2016-05-24 Thread riku . voipio
ne] Signed-off-by: Peter Maydell Signed-off-by: Riku Voipio --- linux-user/main.c| 47 +-- linux-user/signal.c | 15 +++ linux-user/syscall.c | 2 -- 3 files changed, 36 insertions(+), 28 deletions(-) diff --git a/linux-user/main.c b/

[Qemu-devel] [PULL v2 6/8] linux-user: remove unavailable syscalls from aarch64

2016-05-24 Thread riku . voipio
From: Riku Voipio QEMU lists deprecated system call numbers in for Aarch64. These are never enabled for Linux kernel, so don't define them in Qemu either. Remove the ifdef around host_to_target_stat64 since all architectures need it now. Reviewed-by: Peter Maydell Signed-off-by: Riku V

[Qemu-devel] [PULL 12/38] linux-user: Support for restarting system calls for Alpha targets

2016-05-25 Thread riku . voipio
Edward Baldwin Message-id: 1441497448-32489-13-git-send-email-t.e.baldwi...@members.leeds.ac.uk Reviewed-by: Peter Maydell [PMM: tweak commit message; drop TARGET_USE_ERESTARTSYS define; PC is env->pc, not env->ir[IR_PV]] Signed-off-by: Peter Maydell Signed-off-by: Riku Voipio --- linu

[Qemu-devel] [PULL 08/38] linux-user: Support for restarting system calls for MIPS targets

2016-05-25 Thread riku . voipio
Reviewed-by: Peter Maydell [PMM: tweak commit message; drop TARGET_USE_ERESTARTSYS define] Signed-off-by: Peter Maydell Signed-off-by: Riku Voipio --- linux-user/main.c | 4 linux-user/mips/target_signal.h | 1 + linux-user/mips64/target_signal.h | 1 + 3 files changed, 6

[Qemu-devel] [PULL 13/38] linux-user: Support for restarting system calls for UniCore32 targets

2016-05-25 Thread riku . voipio
igned-off-by: Riku Voipio --- linux-user/main.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/linux-user/main.c b/linux-user/main.c index eeea8f5..2d7e700 100644 --- a/linux-user/main.c +++ b/linux-user/main.c @@ -1171,7 +1171,7 @@ void cpu_loop(CPUUniCore32State

[Qemu-devel] [PULL 14/38] linux-user: Support for restarting system calls for OpenRISC targets

2016-05-25 Thread riku . voipio
igned-off-by: Riku Voipio --- linux-user/main.c | 22 ++ linux-user/openrisc/target_signal.h | 1 + 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/linux-user/main.c b/linux-user/main.c index 2d7e700..14a7826 100644 --- a/linux-user/main.c +++ b/

[Qemu-devel] [PULL 17/38] linux-user: Support for restarting system calls for CRIS targets

2016-05-25 Thread riku . voipio
Maydell Signed-off-by: Riku Voipio --- linux-user/cris/target_signal.h | 1 + linux-user/main.c | 6 +- linux-user/signal.c | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/linux-user/cris/target_signal.h b/linux-user/cris/target_signal.h index

[Qemu-devel] [PULL 11/38] linux-user: Support for restarting system calls for SH4 targets

2016-05-25 Thread riku . voipio
should not touch any guest CPU state Signed-off-by: Timothy Edward Baldwin Message-id: 1441497448-32489-12-git-send-email-t.e.baldwi...@members.leeds.ac.uk Reviewed-by: Peter Maydell [PMM: tweak commit message; drop TARGET_USE_ERESTARTSYS define] Signed-off-by: Peter Maydell Signed-off-by: Riku

[Qemu-devel] [PULL 15/38] linux-user: Support for restarting system calls for M68K targets

2016-05-25 Thread riku . voipio
should not touch any guest CPU state Signed-off-by: Timothy Edward Baldwin Message-id: 1441497448-32489-32-git-send-email-t.e.baldwi...@members.leeds.ac.uk Reviewed-by: Peter Maydell [PMM: tweak commit message; drop TARGET_USE_ERESTARTSYS define] Signed-off-by: Peter Maydell Signed-off-by: Riku

[Qemu-devel] [PULL 16/38] linux-user: Support for restarting system calls for S390 targets

2016-05-25 Thread riku . voipio
Maydell Signed-off-by: Riku Voipio --- linux-user/main.c| 12 +--- linux-user/s390x/target_signal.h | 1 + linux-user/signal.c | 4 ++-- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/linux-user/main.c b/linux-user/main.c index 05a44ea

[Qemu-devel] [PULL 23/38] linux-user: Use safe_syscall for read and write system calls

2016-05-25 Thread riku . voipio
-by: Peter Maydell Signed-off-by: Peter Maydell Signed-off-by: Riku Voipio --- linux-user/syscall.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index b6a8ed6..bee1360 100644 --- a/linux-user/syscall.c +++ b/linux-user

[Qemu-devel] [PULL 19/38] linux-user: Set r14 on exit from microblaze syscall

2016-05-25 Thread riku . voipio
t happen on syscall entry. Signed-off-by: Peter Maydell Signed-off-by: Riku Voipio --- linux-user/main.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/linux-user/main.c b/linux-user/main.c index 1f604a7..aa6b414 100644 --- a/linux-user/main.c +++ b/linux-user/main.c @@ -2983,6

[Qemu-devel] [PULL 10/38] linux-user: Support for restarting system calls for SPARC targets

2016-05-25 Thread riku . voipio
should not touch any guest CPU state Signed-off-by: Timothy Edward Baldwin Message-id: 1441497448-32489-9-git-send-email-t.e.baldwi...@members.leeds.ac.uk [PMM: Commit message tweaks; drop TARGET_USE_ERESTARTSYS define] Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell Signed-off-by: Riku

[Qemu-devel] [PULL 21/38] linux-user: Add debug code to exercise restarting system calls

2016-05-25 Thread riku . voipio
...@members.leeds.ac.uk [PMM: Add comment and a commented-out #define next to the commented-out generic DEBUG #define; remove the check on TARGET_USE_ERESTARTSYS; tweak comment message] Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell Signed-off-by: Riku Voipio --- linux-user/syscall.c | 19

[Qemu-devel] [PULL 33/38] linux-user: Use direct syscalls for setuid(), etc

2016-05-25 Thread riku . voipio
, rather than calling the host libc function. Signed-off-by: Peter Maydell Signed-off-by: Riku Voipio --- linux-user/syscall.c | 58 +--- 1 file changed, 46 insertions(+), 12 deletions(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c

[Qemu-devel] [PULL 18/38] linux-user: Support for restarting system calls for tilegx targets

2016-05-25 Thread riku . voipio
main loop should not touch any guest CPU state Note that this fixes a bug where a sigreturn which happened to have an errno value in TILEGX_R_RE would incorrectly cause TILEGX_R_ERR to get set. Signed-off-by: Peter Maydell Signed-off-by: Riku Voipio --- linux-user/main.c | 21

[Qemu-devel] [PULL 09/38] linux-user: Support for restarting system calls for PPC targets

2016-05-25 Thread riku . voipio
Reviewed-by: Peter Maydell [PMM: tweak commit message; drop TARGET_USE_ERESTARTSYS define] Signed-off-by: Peter Maydell Signed-off-by: Riku Voipio --- linux-user/main.c | 4 linux-user/ppc/target_signal.h | 1 + 2 files changed, 5 insertions(+) diff --git a/linux-user/main.c b

[Qemu-devel] [PULL 28/38] linux-user: Use safe_syscall for futex syscall

2016-05-25 Thread riku . voipio
s the FIXME comment there notes that should be handled by disabling signals, since we can't easily back out if the futex were to return ERESTARTSYS.) Signed-off-by: Peter Maydell Signed-off-by: Riku Voipio --- linux-user/syscall.c | 18 ++ 1 file changed, 10 insertions(+), 8

[Qemu-devel] [PULL 30/38] linux-user: Handle msgrcv error case correctly

2016-05-25 Thread riku . voipio
and, so we correctly fail in this corner case. This fixes the msgrcv03 Linux Test Project test case, which otherwise hangs. Signed-off-by: Peter Maydell Signed-off-by: Riku Voipio --- linux-user/syscall.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/linux-user/syscall

[Qemu-devel] [PULL 20/38] linux-user: Support for restarting system calls for Microblaze targets

2016-05-25 Thread riku . voipio
othy Edward Baldwin Message-id: 1441497448-32489-11-git-send-email-t.e.baldwi...@members.leeds.ac.uk Reviewed-by: Edgar E. Iglesias Reviewed-by: Peter Maydell [PMM: Commit message tweaks; drop TARGET_USE_ERESTARTSYS define; drop whitespace changes] Signed-off-by: Peter Maydell Signed-off-by:

[Qemu-devel] [PULL 25/38] linux-user: Use safe_syscall for wait system calls

2016-05-25 Thread riku . voipio
ge-id: 1441497448-32489-18-git-send-email-t.e.baldwi...@members.leeds.ac.uk [PMM: Adjust to new safe_syscall convention. Add fifth waitid syscall argument (which isn't present in the libc interface but is in the syscall ABI)] Signed-off-by: Peter Maydell Signed-off-by: Riku Voipio --- linux-user

[Qemu-devel] [PULL 26/38] linux-user: Use safe_syscall for execve syscall

2016-05-25 Thread riku . voipio
cess. Signed-off-by: Timothy Edward Baldwin Message-id: 1441497448-32489-25-git-send-email-t.e.baldwi...@members.leeds.ac.uk [PMM: expanded commit message to explain in more detail why this is needed, and add comment about it too] Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell Signed

[Qemu-devel] [PULL 38/38] linux-user, target-ppc: fix use of MSR_LE

2016-05-25 Thread riku . voipio
Laurent Vivier Signed-off-by: Riku Voipio --- linux-user/signal.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/linux-user/signal.c b/linux-user/signal.c index 28ce921..8090b4d 100644 --- a/linux-user/signal.c +++ b/linux-user/signal.c @@ -4632,7 +4632,7 @@ static

[Qemu-devel] [PULL 31/38] linux-user: Use g_try_malloc() in do_msgrcv()

2016-05-25 Thread riku . voipio
From: Peter Maydell In do_msgrcv() we want to allocate a message buffer, whose size is passed to us by the guest. That means we could legitimately fail, so use g_try_malloc() and handle the error case, in the same way that do_msgsnd() does. Signed-off-by: Peter Maydell Signed-off-by: Riku

[Qemu-devel] [PULL 22/38] linux-user: Provide safe_syscall for fixing races between signals and syscalls

2016-05-25 Thread riku . voipio
From: Timothy E Baldwin If a signal is delivered immediately before a blocking system call the handler will only be called after the system call returns, which may be a long time later or never. This is fixed by using a function (safe_syscall) that checks if a guest signal is pending prior to ma

[Qemu-devel] [PULL 34/38] linux-user: arm: Remove ARM_cpsr and similar #defines

2016-05-25 Thread riku . voipio
: Christopher Covington Signed-off-by: Peter Maydell Signed-off-by: Riku Voipio --- linux-user/arm/target_syscall.h | 20 +--- linux-user/elfload.c| 19 ++- 2 files changed, 11 insertions(+), 28 deletions(-) diff --git a/linux-user/arm/target_syscall.h b/l

[Qemu-devel] [PULL 24/38] linux-user: Use safe_syscall for open and openat system calls

2016-05-25 Thread riku . voipio
] Signed-off-by: Peter Maydell Signed-off-by: Riku Voipio --- linux-user/syscall.c | 18 -- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index bee1360..0037ee7 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c

[Qemu-devel] [PULL 35/38] linux-user/signal.c: Generate opcode data for restorer in setup_rt_frame

2016-05-25 Thread riku . voipio
Signed-off-by: Chen Gang Signed-off-by: Riku Voipio --- linux-user/signal.c | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/linux-user/signal.c b/linux-user/signal.c index ff4de4f..a072fa6 100644 --- a/linux-user/signal.c +++ b/linux-user/signal.c @@ -5599,8

[Qemu-devel] [PULL 37/38] linux-user/signal.c: Use s390 target space address instead of host space

2016-05-25 Thread riku . voipio
From: Chen Gang The return address is in target space, so the restorer address needs to be target space, too. Signed-off-by: Chen Gang Reviewed-by: Peter Maydell Reviewed-by: Laurent Vivier --- linux-user/signal.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/linux-

[Qemu-devel] [PULL 36/38] linux-user/signal.c: Use target address instead of host address for microblaze restorer

2016-05-25 Thread riku . voipio
From: Chen Gang The return address is in target space, so the restorer address needs to be target space, too. Signed-off-by: Chen Gang Reviewed-by: Peter Maydell Reviewed-by: Laurent Vivier Signed-off-by: Riku Voipio --- linux-user/signal.c | 3 ++- 1 file changed, 2 insertions(+), 1

[Qemu-devel] [PULL 27/38] linux-user: Use safe_syscall for pselect, select syscalls

2016-05-25 Thread riku . voipio
added pselect support to QEMU and a decade after pselect6 went into the kernel, it seems safe to not try to support hosts with header files which don't define __NR_pselect6.) Signed-off-by: Peter Maydell Signed-off-by: Riku Voipio --- linux-user/syscall.c | 36 +++--

[Qemu-devel] [PULL 29/38] linux-user: Handle negative values in timespec conversion

2016-05-25 Thread riku . voipio
ure, but we were setting a very long timeout instead. Signed-off-by: Peter Maydell Signed-off-by: Riku Voipio --- linux-user/syscall.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 4e419fb..6c4f5c6 100644 --- a/linu

[Qemu-devel] [PULL 32/38] linux-user: x86_64: Don't use 16-bit UIDs

2016-05-25 Thread riku . voipio
From: Peter Maydell The 64-bit x86 syscall ABI uses 32-bit UIDs; only define USE_UID16 for 32-bit x86. Signed-off-by: Peter Maydell Signed-off-by: Riku Voipio --- linux-user/syscall_defs.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/linux-user/syscall_defs.h b/linux

Re: [Qemu-devel] [PATCH v2 0/3] linux-user: netlink support

2016-05-25 Thread Riku Voipio
On Tue, May 24, 2016 at 02:08:14PM +0100, Peter Maydell wrote: > On 24 May 2016 at 13:54, Riku Voipio wrote: > > On tiistaina 24. toukokuuta 2016 15.05.08 EEST, Riku Voipio wrote: > >> > >> Ok, fair enough, applied. > > > > > > dropped since the build

[Qemu-devel] [PULL v2 04/38] linux-user: Define TARGET_ERESTART* errno values

2016-05-27 Thread riku . voipio
TARGET_QEMU_ESIGRETURN, add comment on usage] Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell Signed-off-by: Riku Voipio --- linux-user/errno_defs.h | 8 1 file changed, 8 insertions(+) diff --git a/linux-user/errno_defs.h b/linux-user/errno_defs.h index 8a1cf76..b7a8c9f 100644

[Qemu-devel] [PULL v2 01/38] linux-user: Check array bounds in errno conversion

2016-05-27 Thread riku . voipio
-off-by: Peter Maydell Signed-off-by: Riku Voipio Reviewed-by: Laurent Vivier --- linux-user/syscall.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 032d338..5246f36 100644 --- a/linux-user/syscall.c +++ b/linux-user

[Qemu-devel] [PULL v2 00/38] linux-user pull request

2016-05-27 Thread riku . voipio
From: Riku Voipio The following changes since commit 287db79df8af8e31f18e262feb5e05103a09e4d4: Merge remote-tracking branch 'remotes/ehabkost/tags/x86-pull-request' into staging (2016-05-24 13:06:33 +0100) are available in the git repository at: git://git.linaro.org/people/r

[Qemu-devel] [PULL v2 06/38] linux-user: Support for restarting system calls for x86 targets

2016-05-27 Thread riku . voipio
ne] Signed-off-by: Peter Maydell Signed-off-by: Riku Voipio --- linux-user/main.c| 47 +-- linux-user/signal.c | 15 +++ linux-user/syscall.c | 2 -- 3 files changed, 36 insertions(+), 28 deletions(-) diff --git a/linux-user/main.c b/

[Qemu-devel] [PULL v2 08/38] linux-user: Support for restarting system calls for MIPS targets

2016-05-27 Thread riku . voipio
Reviewed-by: Peter Maydell [PMM: tweak commit message; drop TARGET_USE_ERESTARTSYS define] Signed-off-by: Peter Maydell Signed-off-by: Riku Voipio --- linux-user/main.c | 4 linux-user/mips/target_signal.h | 1 + linux-user/mips64/target_signal.h | 1 + 3 files changed, 6

[Qemu-devel] [PULL v2 02/38] linux-user: Consistently return host errnos from do_openat()

2016-05-27 Thread riku . voipio
Signed-off-by: Riku Voipio Reviewed-by: Laurent Vivier --- linux-user/syscall.c | 14 ++ 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 5246f36..f4c2e19 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -5559,7

[Qemu-devel] [PULL v2 07/38] linux-user: Support for restarting system calls for ARM targets

2016-05-27 Thread riku . voipio
-off-by: Riku Voipio --- linux-user/arm/target_signal.h | 1 + linux-user/main.c | 48 ++ linux-user/signal.c| 10 - 3 files changed, 36 insertions(+), 23 deletions(-) diff --git a/linux-user/arm/target_signal.h b/linux

[Qemu-devel] [PULL v2 12/38] linux-user: Support for restarting system calls for Alpha targets

2016-05-27 Thread riku . voipio
Edward Baldwin Message-id: 1441497448-32489-13-git-send-email-t.e.baldwi...@members.leeds.ac.uk Reviewed-by: Peter Maydell [PMM: tweak commit message; drop TARGET_USE_ERESTARTSYS define; PC is env->pc, not env->ir[IR_PV]] Signed-off-by: Peter Maydell Signed-off-by: Riku Voipio --- linu

[Qemu-devel] [PULL v2 16/38] linux-user: Support for restarting system calls for S390 targets

2016-05-27 Thread riku . voipio
Maydell Signed-off-by: Riku Voipio --- linux-user/main.c| 12 +--- linux-user/s390x/target_signal.h | 1 + linux-user/signal.c | 4 ++-- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/linux-user/main.c b/linux-user/main.c index 58dc91c

[Qemu-devel] [PULL v2 09/38] linux-user: Support for restarting system calls for PPC targets

2016-05-27 Thread riku . voipio
Reviewed-by: Peter Maydell [PMM: tweak commit message; drop TARGET_USE_ERESTARTSYS define] Signed-off-by: Peter Maydell Signed-off-by: Riku Voipio --- linux-user/main.c | 4 linux-user/ppc/target_signal.h | 1 + 2 files changed, 5 insertions(+) diff --git a/linux-user/main.c b

[Qemu-devel] [PULL v2 05/38] linux-user: Renumber TARGET_QEMU_ESIGRETURN, make it not arch-specific

2016-05-27 Thread riku . voipio
: Peter Maydell Reviewed-by: Laurent Vivier Signed-off-by: Peter Maydell Signed-off-by: Riku Voipio --- linux-user/errno_defs.h| 9 + linux-user/mips/target_syscall.h | 4 linux-user/mips64/target_syscall.h | 4 linux-user/ppc/target_syscall.h| 2 -- 4 files

[Qemu-devel] [PULL v2 10/38] linux-user: Support for restarting system calls for SPARC targets

2016-05-27 Thread riku . voipio
should not touch any guest CPU state Signed-off-by: Timothy Edward Baldwin Message-id: 1441497448-32489-9-git-send-email-t.e.baldwi...@members.leeds.ac.uk [PMM: Commit message tweaks; drop TARGET_USE_ERESTARTSYS define] Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell Signed-off-by: Riku

[Qemu-devel] [PULL v2 18/38] linux-user: Support for restarting system calls for tilegx targets

2016-05-27 Thread riku . voipio
main loop should not touch any guest CPU state Note that this fixes a bug where a sigreturn which happened to have an errno value in TILEGX_R_RE would incorrectly cause TILEGX_R_ERR to get set. Signed-off-by: Peter Maydell Signed-off-by: Riku Voipio --- linux-user/main.c | 21

[Qemu-devel] [PULL v2 14/38] linux-user: Support for restarting system calls for OpenRISC targets

2016-05-27 Thread riku . voipio
igned-off-by: Riku Voipio --- linux-user/main.c | 22 ++ linux-user/openrisc/target_signal.h | 1 + 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/linux-user/main.c b/linux-user/main.c index 9e6448a..6a0be7d 100644 --- a/linux-user/main.c +++ b/

[Qemu-devel] [PULL v2 13/38] linux-user: Support for restarting system calls for UniCore32 targets

2016-05-27 Thread riku . voipio
igned-off-by: Riku Voipio --- linux-user/main.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/linux-user/main.c b/linux-user/main.c index cc7f2aa..9e6448a 100644 --- a/linux-user/main.c +++ b/linux-user/main.c @@ -1171,7 +1171,7 @@ void cpu_loop(CPUUniCore32State

[Qemu-devel] [PULL v2 20/38] linux-user: Support for restarting system calls for Microblaze targets

2016-05-27 Thread riku . voipio
othy Edward Baldwin Message-id: 1441497448-32489-11-git-send-email-t.e.baldwi...@members.leeds.ac.uk Reviewed-by: Edgar E. Iglesias Reviewed-by: Peter Maydell [PMM: Commit message tweaks; drop TARGET_USE_ERESTARTSYS define; drop whitespace changes] Signed-off-by: Peter Maydell Signed-off-by:

[Qemu-devel] [PULL v2 03/38] linux-user: Reindent signal handling

2016-05-27 Thread riku . voipio
Maydell Signed-off-by: Riku Voipio --- linux-user/signal.c | 1543 ++- 1 file changed, 791 insertions(+), 752 deletions(-) diff --git a/linux-user/signal.c b/linux-user/signal.c index 96e86c0..04c21d0 100644 --- a/linux-user/signal.c +++ b/linux

[Qemu-devel] [PULL v2 11/38] linux-user: Support for restarting system calls for SH4 targets

2016-05-27 Thread riku . voipio
should not touch any guest CPU state Signed-off-by: Timothy Edward Baldwin Message-id: 1441497448-32489-12-git-send-email-t.e.baldwi...@members.leeds.ac.uk Reviewed-by: Peter Maydell [PMM: tweak commit message; drop TARGET_USE_ERESTARTSYS define] Signed-off-by: Peter Maydell Signed-off-by: Riku

[Qemu-devel] [PULL v2 22/38] linux-user: Provide safe_syscall for fixing races between signals and syscalls

2016-05-27 Thread riku . voipio
From: Timothy E Baldwin If a signal is delivered immediately before a blocking system call the handler will only be called after the system call returns, which may be a long time later or never. This is fixed by using a function (safe_syscall) that checks if a guest signal is pending prior to ma

[Qemu-devel] [PULL v2 17/38] linux-user: Support for restarting system calls for CRIS targets

2016-05-27 Thread riku . voipio
Maydell Signed-off-by: Riku Voipio --- linux-user/cris/target_signal.h | 1 + linux-user/main.c | 6 +- linux-user/signal.c | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/linux-user/cris/target_signal.h b/linux-user/cris/target_signal.h index

[Qemu-devel] [PULL v2 21/38] linux-user: Add debug code to exercise restarting system calls

2016-05-27 Thread riku . voipio
...@members.leeds.ac.uk [PMM: Add comment and a commented-out #define next to the commented-out generic DEBUG #define; remove the check on TARGET_USE_ERESTARTSYS; tweak comment message] Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell Signed-off-by: Riku Voipio --- linux-user/syscall.c | 19

[Qemu-devel] [PULL v2 15/38] linux-user: Support for restarting system calls for M68K targets

2016-05-27 Thread riku . voipio
should not touch any guest CPU state Signed-off-by: Timothy Edward Baldwin Message-id: 1441497448-32489-32-git-send-email-t.e.baldwi...@members.leeds.ac.uk Reviewed-by: Peter Maydell [PMM: tweak commit message; drop TARGET_USE_ERESTARTSYS define] Signed-off-by: Peter Maydell Signed-off-by: Riku

[Qemu-devel] [PULL v2 19/38] linux-user: Set r14 on exit from microblaze syscall

2016-05-27 Thread riku . voipio
t happen on syscall entry. Signed-off-by: Peter Maydell Signed-off-by: Riku Voipio --- linux-user/main.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/linux-user/main.c b/linux-user/main.c index 4607e48..c5da418 100644 --- a/linux-user/main.c +++ b/linux-user/main.c @@ -2983,6

[Qemu-devel] [PULL v2 23/38] linux-user: Use safe_syscall for read and write system calls

2016-05-27 Thread riku . voipio
-by: Peter Maydell Signed-off-by: Peter Maydell Signed-off-by: Riku Voipio --- linux-user/syscall.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index b6a8ed6..bee1360 100644 --- a/linux-user/syscall.c +++ b/linux-user

[Qemu-devel] [PULL v2 27/38] linux-user: Use safe_syscall for pselect, select syscalls

2016-05-27 Thread riku . voipio
added pselect support to QEMU and a decade after pselect6 went into the kernel, it seems safe to not try to support hosts with header files which don't define __NR_pselect6.) Signed-off-by: Peter Maydell Signed-off-by: Riku Voipio --- linux-user/syscall.c | 36 +++--

[Qemu-devel] [PULL v2 26/38] linux-user: Use safe_syscall for execve syscall

2016-05-27 Thread riku . voipio
cess. Signed-off-by: Timothy Edward Baldwin Message-id: 1441497448-32489-25-git-send-email-t.e.baldwi...@members.leeds.ac.uk [PMM: expanded commit message to explain in more detail why this is needed, and add comment about it too] Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell Signed

[Qemu-devel] [PULL v2 25/38] linux-user: Use safe_syscall for wait system calls

2016-05-27 Thread riku . voipio
ge-id: 1441497448-32489-18-git-send-email-t.e.baldwi...@members.leeds.ac.uk [PMM: Adjust to new safe_syscall convention. Add fifth waitid syscall argument (which isn't present in the libc interface but is in the syscall ABI)] Signed-off-by: Peter Maydell Signed-off-by: Riku Voipio --- linux-user

[Qemu-devel] [PULL v2 24/38] linux-user: Use safe_syscall for open and openat system calls

2016-05-27 Thread riku . voipio
] Signed-off-by: Peter Maydell Signed-off-by: Riku Voipio --- linux-user/syscall.c | 18 -- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index bee1360..0037ee7 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c

[Qemu-devel] [PULL v2 28/38] linux-user: Use safe_syscall for futex syscall

2016-05-27 Thread riku . voipio
s the FIXME comment there notes that should be handled by disabling signals, since we can't easily back out if the futex were to return ERESTARTSYS.) Signed-off-by: Peter Maydell Signed-off-by: Riku Voipio --- linux-user/syscall.c | 18 ++ 1 file changed, 10 insertions(+), 8

[Qemu-devel] [PULL v2 34/38] linux-user: arm: Remove ARM_cpsr and similar #defines

2016-05-27 Thread riku . voipio
: Christopher Covington Signed-off-by: Peter Maydell Signed-off-by: Riku Voipio --- linux-user/arm/target_syscall.h | 20 +--- linux-user/elfload.c| 19 ++- 2 files changed, 11 insertions(+), 28 deletions(-) diff --git a/linux-user/arm/target_syscall.h b/l

[Qemu-devel] [PULL v2 31/38] linux-user: Use g_try_malloc() in do_msgrcv()

2016-05-27 Thread riku . voipio
From: Peter Maydell In do_msgrcv() we want to allocate a message buffer, whose size is passed to us by the guest. That means we could legitimately fail, so use g_try_malloc() and handle the error case, in the same way that do_msgsnd() does. Signed-off-by: Peter Maydell Signed-off-by: Riku

[Qemu-devel] [PULL v2 29/38] linux-user: Handle negative values in timespec conversion

2016-05-27 Thread riku . voipio
ure, but we were setting a very long timeout instead. Signed-off-by: Peter Maydell Signed-off-by: Riku Voipio --- linux-user/syscall.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 4e419fb..6c4f5c6 100644 --- a/linu

[Qemu-devel] [PULL v2 32/38] linux-user: x86_64: Don't use 16-bit UIDs

2016-05-27 Thread riku . voipio
From: Peter Maydell The 64-bit x86 syscall ABI uses 32-bit UIDs; only define USE_UID16 for 32-bit x86. Signed-off-by: Peter Maydell Signed-off-by: Riku Voipio --- linux-user/syscall_defs.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/linux-user/syscall_defs.h b/linux

[Qemu-devel] [PULL v2 37/38] linux-user/signal.c: Use s390 target space address instead of host space

2016-05-27 Thread riku . voipio
From: Chen Gang The return address is in target space, so the restorer address needs to be target space, too. Signed-off-by: Chen Gang Reviewed-by: Peter Maydell Reviewed-by: Laurent Vivier --- linux-user/signal.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/linux-

[Qemu-devel] [PULL v2 30/38] linux-user: Handle msgrcv error case correctly

2016-05-27 Thread riku . voipio
and, so we correctly fail in this corner case. This fixes the msgrcv03 Linux Test Project test case, which otherwise hangs. Signed-off-by: Peter Maydell Signed-off-by: Riku Voipio --- linux-user/syscall.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/linux-user/syscall

[Qemu-devel] [PULL v2 33/38] linux-user: Use direct syscalls for setuid(), etc

2016-05-27 Thread riku . voipio
, rather than calling the host libc function. Signed-off-by: Peter Maydell Signed-off-by: Riku Voipio --- linux-user/syscall.c | 58 +--- 1 file changed, 46 insertions(+), 12 deletions(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c

[Qemu-devel] [PULL v2 36/38] linux-user/signal.c: Use target address instead of host address for microblaze restorer

2016-05-27 Thread riku . voipio
From: Chen Gang The return address is in target space, so the restorer address needs to be target space, too. Signed-off-by: Chen Gang Reviewed-by: Peter Maydell Reviewed-by: Laurent Vivier Signed-off-by: Riku Voipio --- linux-user/signal.c | 3 ++- 1 file changed, 2 insertions(+), 1

[Qemu-devel] [PULL v2 35/38] linux-user/signal.c: Generate opcode data for restorer in setup_rt_frame

2016-05-27 Thread riku . voipio
Signed-off-by: Chen Gang Signed-off-by: Riku Voipio --- linux-user/signal.c | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/linux-user/signal.c b/linux-user/signal.c index ff4de4f..a072fa6 100644 --- a/linux-user/signal.c +++ b/linux-user/signal.c @@ -5599,8

[Qemu-devel] [PULL v2 38/38] linux-user, target-ppc: fix use of MSR_LE

2016-05-27 Thread riku . voipio
Laurent Vivier Signed-off-by: Riku Voipio --- linux-user/signal.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/linux-user/signal.c b/linux-user/signal.c index 28ce921..8090b4d 100644 --- a/linux-user/signal.c +++ b/linux-user/signal.c @@ -4632,7 +4632,7 @@ static

Re: [Qemu-devel] linux-user: add option to intercept execve() syscalls

2016-05-30 Thread Riku Voipio
On Wed, May 25, 2016 at 05:07:48PM +0100, Joel Holdsworth wrote: > This patch-set includes Peter Angelatos's previous patch-set [1] and > adds code to pass arguments for setting the environment variables, > passing the interpeter prefix, and passing the strace option. Considering the messiness thi

Re: [Qemu-devel] [PATCH v3] linux-user: Fix qemu-binfmt-conf.h to store config across reboot

2016-05-30 Thread Riku Voipio
On 27 May 2016 at 16:56, Alexander Graf wrote: > On 05/25/2016 05:51 PM, Laurent Vivier wrote: >> >> >> Le 25/02/2016 à 17:28, Laurent Vivier a écrit : >>> >>> Please, Alex, Michael: >>> >>> We need your ack/review. >> >> Someone? :) > It's definitely an improvement over today's situation. > Rev

Re: [Qemu-devel] [PATCH] linux-user: check if NETLINK_ROUTE is available

2016-06-03 Thread Riku Voipio
On Thu, Jun 02, 2016 at 10:14:15PM +0200, Laurent Vivier wrote: > Some IFLA_* symbols can be missing in the host linux/if_link.h, > but as they are enums and not "#defines", check in "configure" if > last known (IFLA_PROTO_DOWN) is available and if not, disable > management of NETLINK_ROUTE protoc

Re: [Qemu-devel] [PATCH v2 0/6] user-exec: cpu_resume_from_signal() cleanups

2016-06-07 Thread Riku Voipio
master sometime later this week. Feel free to apply these yourself, Acked-by: Riku Voipio > thanks > -- PMM > > > On 17 May 2016 at 15:18, Peter Maydell wrote: > >> I was trying to reason about user-mode's handling of signal masks, > >> and I found our current

Re: [Qemu-devel] [PATCH] linux-user: check if NETLINK_ROUTE is available

2016-06-07 Thread Riku Voipio
On Thu, Jun 02, 2016 at 10:14:15PM +0200, Laurent Vivier wrote: > Some IFLA_* symbols can be missing in the host linux/if_link.h, > but as they are enums and not "#defines", check in "configure" if > last known (IFLA_PROTO_DOWN) is available and if not, disable > management of NETLINK_ROUTE protoc

Re: [Qemu-devel] [PATCH v2 17/19] linux-user: Use both si_code and si_signo when converting siginfo_t

2016-06-07 Thread Riku Voipio
On Fri, May 27, 2016 at 03:51:59PM +0100, Peter Maydell wrote: > The siginfo_t struct includes a union. The correct way to identify > which fields of the union are relevant is complicated, because we > have to use a combination of the si_code and si_signo to figure out > which of the union's member

Re: [Qemu-devel] [PATCH v2 17/19] linux-user: Use both si_code and si_signo when converting siginfo_t

2016-06-08 Thread Riku Voipio
On Wed, Jun 08, 2016 at 09:30:35AM +0300, Riku Voipio wrote: > On Fri, May 27, 2016 at 03:51:59PM +0100, Peter Maydell wrote: > > The siginfo_t struct includes a union. The correct way to identify > > which fields of the union are relevant is complicated, because we > > have

Re: [Qemu-devel] [PATCH 00/18] linux-user: Extend safe_syscall wrapper use

2016-06-08 Thread Riku Voipio
On Mon, Jun 06, 2016 at 07:58:01PM +0100, Peter Maydell wrote: > This set of pretty dull patches extends the use of the safe_syscall > wrapper to every syscall listed in the signal(7) manpage as being > interruptible. > > Most of the patches are just straightforward "use the wrapper" changes. > For

[Qemu-devel] [PULL 00/44] linux-user update

2016-06-08 Thread riku . voipio
From: Riku Voipio The following changes since commit 76462405809d29bab65a3699686998ba124ab942: Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20160606-1' into staging (2016-06-06 17:02:42 +0100) are available in the git repository at: git://git.linaro.

[Qemu-devel] [PULL 01/44] linux-user: Fix qemu-binfmt-conf.sh to store config across reboot

2016-06-08 Thread riku . voipio
ure than the current one. Signed-off-by: Laurent Vivier Reviewed-by: Alexander Graf Signed-off-by: Riku Voipio --- scripts/qemu-binfmt-conf.sh | 389 1 file changed, 320 insertions(+), 69 deletions(-) mode change 100644 => 100755 scripts/qemu-binfm

[Qemu-devel] [PULL 04/44] linux-user: add netlink audit

2016-06-08 Thread riku . voipio
From: Laurent Vivier This is, for instance, needed to log in a container. Without this, the user cannot be identified and the console login fails with "Login incorrect". Signed-off-by: Laurent Vivier Signed-off-by: Riku Voipio --- linux-user/sysc

[Qemu-devel] [PULL 20/44] linux-user: Use safe_syscall for kill, tkill and tgkill syscalls

2016-06-08 Thread riku . voipio
ifdeffery for tkill and tgkill, because every guest architecture we support implements them, and they've been in Linux since 2003 so we can assume the host headers define the __NR_tkill and __NR_tgkill constants. Signed-off-by: Peter Maydell Reviewed-by: Laurent Vivier Signed-off-by: Riku V

[Qemu-devel] [PULL 09/44] linux-user: Factor out uses of do_sigprocmask() from sigreturn code

2016-06-08 Thread riku . voipio
code which is not run when setting the signal mask via do_sigreturn, and this change allows us to separate the two cases. Signed-off-by: Peter Maydell Reviewed-by: Laurent Vivier Signed-off-by: Riku Voipio --- linux-user/signal.c | 55 +++-- 1

[Qemu-devel] [PULL 03/44] linux-user: support netlink protocol NETLINK_KOBJECT_UEVENT

2016-06-08 Thread riku . voipio
From: Laurent Vivier This is the protocol used by udevd to manage kernel events. Signed-off-by: Laurent Vivier Signed-off-by: Riku Voipio --- linux-user/syscall.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index

[Qemu-devel] [PULL 05/44] linux-user: check if NETLINK_ROUTE is available

2016-06-08 Thread riku . voipio
t Vivier Signed-off-by: Riku Voipio --- configure| 15 +++ linux-user/syscall.c | 18 ++ 2 files changed, 29 insertions(+), 4 deletions(-) diff --git a/configure b/configure index 6d01d96..d1dbc4b 100755 --- a/configure +++ b/configure @@ -4526,6 +4526,1

[Qemu-devel] [PULL 08/44] linux-user: Fix stray tab-indent

2016-06-08 Thread riku . voipio
From: Peter Maydell Fix a stray tab-indented linux in linux-user/signal.c. Signed-off-by: Peter Maydell Reviewed-by: Laurent Vivier Signed-off-by: Riku Voipio --- linux-user/signal.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/linux-user/signal.c b/linux-user

[Qemu-devel] [PULL 10/44] linux-user: Define macro for size of host kernel sigset_t

2016-06-08 Thread riku . voipio
d-off-by: Peter Maydell Reviewed-by: Laurent Vivier Signed-off-by: Riku Voipio --- linux-user/syscall.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 9cc9a35..d2749a6 100644 --- a/linux-user/syscall.c +++ b/linux

[Qemu-devel] [PULL 28/44] linux-user: Use safe_syscall wrapper for readv and writev syscalls

2016-06-08 Thread riku . voipio
From: Peter Maydell Use the safe_syscall wrapper for readv and writev syscalls. Signed-off-by: Peter Maydell Signed-off-by: Riku Voipio --- linux-user/syscall.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 8f8d9db

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