[Qemu-devel] [PATCH v5 6/6] linux-user: Add support for statx() syscall

2019-05-19 Thread Aleksandar Markovic
From: Aleksandar Rikalo Implement support for translation of system call statx(). The implementation includes invoking other (more mature) system calls (from the same 'stat' family) on the host side. This way, the problems of potential lack of statx() availability of on the host side are

[Qemu-devel] [PATCH v5 4/6] linux-user: Add support for setsockopt() options IPV6__MEMBERSHIP

2019-05-19 Thread Aleksandar Markovic
From: Neng Chen Add support for options IPV6_ADD_MEMBERSHIP and IPV6_DROP_MEMPEMBERSHIP of the syscall setsockopt(). These options control membership in multicast groups. Their argument is a pointer to a struct ipv6_mreq, which is in turn defined in IP v6 headers as: struct ipv6_mreq { /*

Re: [Qemu-devel] [PULL 00/10] MIPS queue for May 19th, 2019

2019-05-19 Thread Jakub Jermar
On 5/19/19 5:16 PM, Aleksandar Markovic wrote: >> From: Jakub Jermar >> >> On 5/19/19 2:00 PM, Aleksandar Markovic wrote: > > * A fix for HelenOS boot hang (related to the flag PAGE_EXEC) This was rather a problem with failing non-executable page tests in L4Re, not

[Qemu-devel] [PATCH v6 5/6] linux-user: Sanitize interp_info and, for mips only, init field fp_abi

2019-05-19 Thread Aleksandar Markovic
From: Daniel Santos Sanitize interp_info structure in load_elf_binary() and, for MIPS only, init its field fp_abi to MIPS_ABI_FP_UNKNOWN. This fixes appearances of "Unexpected FPU mode" message in some MIPS use cases. Currently, this bug is a complete stopper for some MIPS binaries. In

[Qemu-devel] [PATCH 10/13] scripts/qemu-binfmt-conf: Update for sparc64

2019-05-19 Thread Richard Henderson
Also note that we were missing the qemu_target_list entry for plain sparc; fix that at the same time. Signed-off-by: Richard Henderson --- scripts/qemu-binfmt-conf.sh | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/scripts/qemu-binfmt-conf.sh

[Qemu-devel] [PATCH 13/13] linux-user: Align mmap_find_vma to host page size

2019-05-19 Thread Richard Henderson
This can avoid stack allocation failures for i386 guest on ppc64 (64k page) host. Suggested-by: Laurent Vivier Signed-off-by: Richard Henderson --- linux-user/mmap.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/linux-user/mmap.c b/linux-user/mmap.c index 10796b37ac..af41339d57 100644

[Qemu-devel] [PATCH v7 04/74] linux-user: Tidy do_openat loop over fakes

2019-05-19 Thread Richard Henderson
Cleaner to use ARRAY_SIZE to loop over elements instead of using a sentinel within the data structure. Signed-off-by: Richard Henderson --- linux-user/syscall-file.inc.c | 16 +++- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/linux-user/syscall-file.inc.c

[Qemu-devel] [PATCH v7 05/74] linux-user: Split out readlink, readlinkat

2019-05-19 Thread Richard Henderson
Split out a shared implementation for both of these; unify the best parts of /proc/self/exe checking. Remove the temporary forward declaration for is_proc_self. Signed-off-by: Richard Henderson --- linux-user/syscall-defs.h | 6 linux-user/strace.c | 29 --

[Qemu-devel] [PATCH v7 14/74] linux-user: Split out memory syscalls

2019-05-19 Thread Richard Henderson
This includes mmap, mmap2, munmap, mlock, mlockall, munlock, munlockall, mprotect, mremap, msync. Signed-off-by: Richard Henderson --- linux-user/syscall-defs.h| 24 ++ linux-user/syscall.h | 2 + linux-user/strace.c | 55 ++--- linux-user/syscall-mem.inc.c

[Qemu-devel] [PATCH v7 08/74] linux-user: Reduce regpairs_aligned & target_offset64 ifdefs

2019-05-19 Thread Richard Henderson
Signed-off-by: Richard Henderson --- linux-user/syscall.c | 54 1 file changed, 25 insertions(+), 29 deletions(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index de80ddb330..61cd73db26 100644 --- a/linux-user/syscall.c +++

[Qemu-devel] [PATCH v7 11/74] linux-user: Split out preadv, pwritev

2019-05-19 Thread Richard Henderson
Signed-off-by: Richard Henderson --- linux-user/syscall-defs.h | 6 linux-user/syscall-file.inc.c | 64 +++ linux-user/syscall.c | 49 --- linux-user/strace.list| 6 4 files changed, 70 insertions(+), 55

[Qemu-devel] [PATCH v7 16/74] linux-user: Split out brk

2019-05-19 Thread Richard Henderson
Signed-off-by: Richard Henderson --- linux-user/syscall-defs.h| 3 ++ linux-user/strace.c | 35 -- linux-user/syscall-mem.inc.c | 90 ++ linux-user/syscall.c | 93 linux-user/strace.list

[Qemu-devel] [PATCH v7 38/74] linux-user: Split out sync, syncfs

2019-05-19 Thread Richard Henderson
Note that syncfs is universally available. If !CONFIG_SYNCFS, provide our own syscall replacement. Signed-off-by: Richard Henderson --- linux-user/syscall-defs.h | 2 ++ linux-user/syscall-file.inc.c | 11 +++ linux-user/syscall.c | 20

[Qemu-devel] [PATCH v7 31/74] linux-user: Split out mount

2019-05-19 Thread Richard Henderson
Signed-off-by: Richard Henderson --- linux-user/syscall-defs.h | 1 + linux-user/syscall.h | 1 + linux-user/strace.c | 21 +++-- linux-user/syscall-file.inc.c | 48 ++ linux-user/syscall.c | 55

[Qemu-devel] [PATCH v7 25/74] linux-user: Split out chdir

2019-05-19 Thread Richard Henderson
Note that chdir is universally provided. Signed-off-by: Richard Henderson --- linux-user/syscall-defs.h | 1 + linux-user/strace.c | 12 linux-user/syscall-file.inc.c | 14 ++ linux-user/syscall.c | 6 -- linux-user/strace.list| 3

[Qemu-devel] [PATCH v7 46/74] linux-user: Move syscall_init to the end

2019-05-19 Thread Richard Henderson
No functional change. This will aid moving everything related to ioctls to a separate file. Signed-off-by: Richard Henderson --- linux-user/syscall.c | 113 +++ 1 file changed, 61 insertions(+), 52 deletions(-) diff --git a/linux-user/syscall.c

[Qemu-devel] [PATCH v7 36/74] linux-user: Split out access, faccessat

2019-05-19 Thread Richard Henderson
Note that faccessat is unconditionally available. Signed-off-by: Richard Henderson --- linux-user/syscall-defs.h | 4 linux-user/syscall.h | 1 + linux-user/strace.c | 33 - linux-user/syscall-file.inc.c | 25

[Qemu-devel] [PATCH v7 69/74] linux-user: Split out pselect6

2019-05-19 Thread Richard Henderson
Signed-off-by: Richard Henderson --- linux-user/syscall-defs.h | 1 + linux-user/syscall-file.inc.c | 96 +++ linux-user/syscall.c | 103 -- linux-user/strace.list| 3 - 4 files changed, 97 insertions(+), 106

[Qemu-devel] [PATCH v7 68/74] linux-user: Split out select, _newselect

2019-05-19 Thread Richard Henderson
This removes the printing of the fdset outputs. It's hard to see how this could have been reliable in a multi-threaded program, saving syscall arguments to global variables. Signed-off-by: Richard Henderson --- linux-user/syscall-defs.h | 11 linux-user/strace.c | 80

[Qemu-devel] [PATCH v6 2/6] linux-user: Add support for SIOCSPGRP ioctl for all targets

2019-05-19 Thread Aleksandar Markovic
From: Aleksandar Markovic Add support for setting the process (or process group) to receive SIGIO or SIGURG signals when I/O becomes possible or urgent data is available, using SIOCSPGRP ioctl. The ioctl numeric values for SIOCSPGRP are platform-dependent and are determined by following files

[Qemu-devel] [PATCH v6 1/6] linux-user: Fix support for SIOCATMARK and SIOCGPGRP ioctls for xtensa

2019-05-19 Thread Aleksandar Markovic
From: Aleksandar Markovic Fix support for the SIOCATMARK and SIOCGPGRP ioctls for xtensa by correcting corresponding macro definition. Values for TARGET_SIOCATMARK and TARGET_SIOCGPGRP are determined by Linux kernel. Following relevant lines (obtained by grep) are from the kernel source tree:

[Qemu-devel] [PATCH v6 0/6] linux-user: A set of miscellaneous patches

2019-05-19 Thread Aleksandar Markovic
From: Aleksandar Markovic This is a collection of misc patches for Linux user that I recently accumulated from variuous sources. All of them originate from problems observed on mips target. However, these changes actually affect and fix problems on multiple targets. v5->v6: - fixed a mistake

[Qemu-devel] [PATCH 07/13] linux-user/sparc: Use WREG constants in sparc/signal.c

2019-05-19 Thread Richard Henderson
Remove the incorrectly defined UREG constants. Maddeningly, in some cases we used the correct constant getting the env register wrong, and in other cases we used the incorrect constant getting the env register right. In the case of getcontext/setcontext, we are aided by the fact that the "other"

[Qemu-devel] [PATCH 11/13] tests/tcg/multiarch/linux-test: Fix error check for shmat

2019-05-19 Thread Richard Henderson
The error indicator for this syscall is -1, not 0. Signed-off-by: Richard Henderson --- tests/tcg/multiarch/linux-test.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/tcg/multiarch/linux-test.c b/tests/tcg/multiarch/linux-test.c index fa4243fc04..673d7c8a1c 100644

[Qemu-devel] [PATCH v7 15/74] linux-user: Split out exit

2019-05-19 Thread Richard Henderson
Signed-off-by: Richard Henderson --- linux-user/syscall-defs.h | 1 + linux-user/syscall-proc.inc.c | 61 +++ linux-user/syscall.c | 38 +- 3 files changed, 63 insertions(+), 37 deletions(-) create mode 100644

[Qemu-devel] [PATCH v7 07/74] linux-user: Split out read, write

2019-05-19 Thread Richard Henderson
Signed-off-by: Richard Henderson --- linux-user/syscall-defs.h | 2 ++ linux-user/syscall-file.inc.c | 58 +++ linux-user/syscall.c | 34 linux-user/strace.list| 6 4 files changed, 60 insertions(+), 40 deletions(-)

[Qemu-devel] [PATCH v7 50/74] linux-user: Split out fcntl, fcntl64

2019-05-19 Thread Richard Henderson
Preserving strace functionality is tricky with this one. Rearrange to lookup structures that contain the data for both execution and strace for each command. Do not allow lookup of 64-bit fcntl commands from 32-bit fcntl. Signed-off-by: Richard Henderson --- linux-user/syscall-defs.h |

[Qemu-devel] [PATCH v7 52/74] linux-user: Split out umask

2019-05-19 Thread Richard Henderson
Signed-off-by: Richard Henderson --- linux-user/syscall-defs.h | 1 + linux-user/syscall-file.inc.c | 5 + linux-user/syscall.c | 2 -- linux-user/strace.list| 3 --- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/linux-user/syscall-defs.h

[Qemu-devel] [PATCH v7 45/74] linux-user: Split out acct

2019-05-19 Thread Richard Henderson
Signed-off-by: Richard Henderson --- linux-user/syscall-defs.h | 1 + linux-user/syscall-file.inc.c | 18 ++ linux-user/syscall.c | 11 --- linux-user/strace.list| 3 --- 4 files changed, 19 insertions(+), 14 deletions(-) diff --git

[Qemu-devel] [PATCH v7 29/74] linux-user: Split out lseek, llseek

2019-05-19 Thread Richard Henderson
Canonicalise the target syscall name on llseek (new kernels) instead of _llseek (old kernels). Always use host lseek(3) rather than attempting to use the host llseek(2). Signed-off-by: Richard Henderson --- linux-user/syscall-defs.h | 6 ++ linux-user/syscall.h | 1 +

[Qemu-devel] [PATCH v7 49/74] linux-user: Remove sentinel from ioctl_entries

2019-05-19 Thread Richard Henderson
Iterate based on the size of the array instead. Signed-off-by: Richard Henderson --- linux-user/syscall-ioctl.inc.c | 14 +++--- linux-user/syscall.c | 6 ++ 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/linux-user/syscall-ioctl.inc.c

[Qemu-devel] [PATCH v7 33/74] linux-user: Split out stime

2019-05-19 Thread Richard Henderson
Signed-off-by: Richard Henderson --- linux-user/syscall-defs.h | 3 +++ linux-user/syscall-time.inc.c | 12 linux-user/syscall.c | 9 - linux-user/strace.list| 3 --- 4 files changed, 15 insertions(+), 12 deletions(-) diff --git

[Qemu-devel] [PATCH v7 55/74] linux-user: Split out getsid, setsid

2019-05-19 Thread Richard Henderson
Signed-off-by: Richard Henderson --- linux-user/syscall-defs.h | 2 ++ linux-user/syscall-proc.inc.c | 10 ++ linux-user/syscall.c | 4 linux-user/strace.list| 6 -- 4 files changed, 12 insertions(+), 10 deletions(-) diff --git

[Qemu-devel] [PATCH v7 64/74] linux-user: Split out gethostname, sethostname

2019-05-19 Thread Richard Henderson
Signed-off-by: Richard Henderson --- linux-user/syscall-defs.h | 4 linux-user/syscall-proc.inc.c | 28 linux-user/syscall.c | 19 --- linux-user/strace.list| 6 -- 4 files changed, 32 insertions(+), 25 deletions(-)

[Qemu-devel] [PATCH v7 58/74] linux-user: Split out sigprocmask, rt_sigprocmask

2019-05-19 Thread Richard Henderson
Signed-off-by: Richard Henderson --- linux-user/syscall-defs.h| 6 ++ linux-user/syscall.h | 1 + linux-user/strace.c | 44 +++-- linux-user/syscall-sig.inc.c | 123 +++ linux-user/syscall.c | 109

[Qemu-devel] [PATCH v7 73/74] linux-user: Split out truncate, truncate64, ftruncate, ftruncate64

2019-05-19 Thread Richard Henderson
Signed-off-by: Richard Henderson --- linux-user/syscall-defs.h | 16 +++ linux-user/syscall-file.inc.c | 32 + linux-user/syscall.c | 38 --- linux-user/strace.list| 12 --- 4 files changed, 48

[Qemu-devel] [PATCH v7 63/74] linux-user: Split out sigreturn, rt_sigreturn

2019-05-19 Thread Richard Henderson
Signed-off-by: Richard Henderson --- linux-user/syscall-defs.h| 4 linux-user/syscall-sig.inc.c | 18 ++ linux-user/syscall.c | 12 linux-user/strace.list | 6 -- 4 files changed, 22 insertions(+), 18 deletions(-) diff --git

[Qemu-devel] [PATCH v7 51/74] linux-user: Split out setpgid

2019-05-19 Thread Richard Henderson
Signed-off-by: Richard Henderson --- linux-user/syscall-defs.h | 1 + linux-user/syscall-proc.inc.c | 5 + linux-user/syscall.c | 2 -- linux-user/strace.list| 3 --- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/linux-user/syscall-defs.h

[Qemu-devel] [PATCH v7 71/74] linux-user: Split out swapon, swapoff

2019-05-19 Thread Richard Henderson
Signed-off-by: Richard Henderson --- linux-user/syscall-defs.h | 2 ++ linux-user/syscall-file.inc.c | 26 ++ linux-user/syscall.c | 16 linux-user/strace.list| 6 -- 4 files changed, 28 insertions(+), 22 deletions(-) diff

[Qemu-devel] [Bug 1829576] Re: QEMU-SYSTEM-PPC64 Regression QEMU-4.0.0

2019-05-19 Thread Ivan Warren via Qemu-devel
Same thing here using https://github.com/dgibson/qemu/commits/ppc- for-4.1 ... It might be a completely different problem (athough it looks like a MMU problem). -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU.

[Qemu-devel] [PATCH 05/13] target/sparc: Define an enumeration for accessing env->regwptr

2019-05-19 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/sparc/cpu.h | 33 + 1 file changed, 33 insertions(+) diff --git a/target/sparc/cpu.h b/target/sparc/cpu.h index f31e8535df..f0ac3ac086 100644 --- a/target/sparc/cpu.h +++ b/target/sparc/cpu.h @@ -31,6 +31,39 @@

[Qemu-devel] [PATCH v7 35/74] linux-user: Split out utime, utimes, futimesat

2019-05-19 Thread Richard Henderson
Signed-off-by: Richard Henderson --- linux-user/syscall-defs.h | 9 linux-user/strace.c | 41 --- linux-user/syscall-file.inc.c | 95 +++ linux-user/syscall.c | 63 --- linux-user/strace.list| 9

[Qemu-devel] [PATCH v7 30/74] linux-user: Split out getpid, getppid, getxpid

2019-05-19 Thread Richard Henderson
Signed-off-by: Richard Henderson --- linux-user/syscall-defs.h | 9 + linux-user/syscall-proc.inc.c | 23 +++ linux-user/syscall.c | 14 -- linux-user/strace.list| 9 - 4 files changed, 32 insertions(+), 23 deletions(-) diff

[Qemu-devel] [PATCH v7 21/74] linux-user: Split out link, linkat

2019-05-19 Thread Richard Henderson
Note that linkat is universally provided. Signed-off-by: Richard Henderson --- linux-user/syscall-defs.h | 4 linux-user/strace.c | 29 - linux-user/syscall-file.inc.c | 28 linux-user/syscall.c | 32

[Qemu-devel] [PATCH v7 44/74] linux-user: Split out times

2019-05-19 Thread Richard Henderson
Signed-off-by: Richard Henderson --- linux-user/syscall-defs.h | 1 + linux-user/syscall-proc.inc.c | 25 + linux-user/syscall.c | 18 -- linux-user/strace.list| 3 --- 4 files changed, 26 insertions(+), 21 deletions(-) diff --git

[Qemu-devel] [PATCH v7 41/74] linux-user: Split out mkdir, mkdirat

2019-05-19 Thread Richard Henderson
Note that mkdirat is universally available. Signed-off-by: Richard Henderson --- linux-user/syscall-defs.h | 4 linux-user/strace.c | 27 --- linux-user/syscall-file.inc.c | 25 + linux-user/syscall.c | 16

[Qemu-devel] [PATCH v7 26/74] linux-user: Split out time

2019-05-19 Thread Richard Henderson
Signed-off-by: Richard Henderson --- linux-user/syscall-defs.h | 3 +++ linux-user/syscall-time.inc.c | 32 linux-user/syscall.c | 13 + linux-user/strace.list| 3 --- 4 files changed, 36 insertions(+), 15 deletions(-) create

[Qemu-devel] [PATCH v7 37/74] linux-user: Split out nice

2019-05-19 Thread Richard Henderson
Signed-off-by: Richard Henderson --- linux-user/syscall-defs.h | 3 +++ linux-user/syscall-proc.inc.c | 7 +++ linux-user/syscall.c | 4 linux-user/strace.list| 3 --- 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/linux-user/syscall-defs.h

[Qemu-devel] [PATCH v7 34/74] linux-user: Split out alarm, pause

2019-05-19 Thread Richard Henderson
Signed-off-by: Richard Henderson --- linux-user/syscall-defs.h| 6 ++ linux-user/syscall-sig.inc.c | 36 linux-user/syscall.c | 12 +--- linux-user/strace.list | 6 -- 4 files changed, 43 insertions(+), 17 deletions(-)

[Qemu-devel] [PATCH v7 48/74] linux-user: Fix types in ioctl logging

2019-05-19 Thread Richard Henderson
There is no need to cast "int" to "long"; just use the correct format in the first place. Signed-off-by: Richard Henderson --- linux-user/syscall-ioctl.inc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/linux-user/syscall-ioctl.inc.c b/linux-user/syscall-ioctl.inc.c

[Qemu-devel] [PATCH v7 67/74] linux-user: Split out gettimeofday, settimeofday

2019-05-19 Thread Richard Henderson
Signed-off-by: Richard Henderson --- linux-user/syscall-defs.h | 2 ++ linux-user/syscall-time.inc.c | 33 + linux-user/syscall.c | 31 --- linux-user/strace.list| 6 -- 4 files changed, 35 insertions(+), 37

[Qemu-devel] [PATCH v7 70/74] linux-user: Split out symlink, symlinkat

2019-05-19 Thread Richard Henderson
Signed-off-by: Richard Henderson --- linux-user/syscall-defs.h | 4 linux-user/strace.c | 27 --- linux-user/syscall-file.inc.c | 28 linux-user/syscall.c | 30 -- linux-user/strace.list

[Qemu-devel] [PATCH v7 62/74] linux-user: Split out rt_sigqueueinfo, rt_tgsigqueueinfo

2019-05-19 Thread Richard Henderson
This does drop the (questionable) siginfo_t printing. But since we already do not handle more important things in this area like sigset_t, this does not feel a loss. Signed-off-by: Richard Henderson --- linux-user/syscall-defs.h| 2 + linux-user/strace.c | 138

[Qemu-devel] [PATCH 02/13] linux-user: Rename cpu_clone_regs to cpu_clone_regs_child

2019-05-19 Thread Richard Henderson
We will need a target-specific hook for adjusting registers in the parent during clone. To avoid confusion, rename the one we have to make it clear it affects the child. Signed-off-by: Richard Henderson --- linux-user/aarch64/target_cpu.h| 2 +- linux-user/alpha/target_cpu.h | 2 +-

[Qemu-devel] [PATCH 09/13] linux-user/sparc: Flush register windows before clone/fork/vfork

2019-05-19 Thread Richard Henderson
As seen as the very first instruction of sys_clone in the kernel. Ideally this would be done in or before cpu_copy, and not with a separate explicit test vs the syscall number, but this is a more minimal solution. Signed-off-by: Richard Henderson --- linux-user/sparc/cpu_loop.c | 12

[Qemu-devel] [PATCH 12/13] linux-user: Fix shmat emulation by honoring host SHMLBA

2019-05-19 Thread Richard Henderson
For those hosts with SHMLBA > getpagesize, we don't automatically select a guest address that is compatible with the host. We can achieve this by boosting the alignment of guest_base and by adding an extra alignment argument to mmap_find_vma. Signed-off-by: Richard Henderson ---

[Qemu-devel] [PATCH v7 00/74] linux-user: Split do_syscall

2019-05-19 Thread Richard Henderson
Based-on: <20190519201953.20161-1-richard.hender...@linaro.org> Aka "linux-user: path, clone, sparc, shmat fixes" Version 6 was https://lists.gnu.org/archive/html/qemu-devel/2019-01/msg04794.html Since v5, I've fixed the ioctl failure that Laurent found, and have done a few more syscalls. I've

[Qemu-devel] [PATCH v7 17/74] linux-user: Split out clone, fork, vfork

2019-05-19 Thread Richard Henderson
Rename do_fork to do_clone, since that is what it does. Signed-off-by: Richard Henderson --- linux-user/syscall-defs.h | 8 ++ linux-user/syscall.h | 1 + linux-user/strace.c | 36 + linux-user/syscall-proc.inc.c | 259 ++

[Qemu-devel] [PATCH v7 09/74] linux-user: Split out readv, writev

2019-05-19 Thread Richard Henderson
Signed-off-by: Richard Henderson --- linux-user/syscall-defs.h | 2 ++ linux-user/syscall-file.inc.c | 34 ++ linux-user/syscall.c | 22 -- linux-user/strace.list| 6 -- 4 files changed, 36 insertions(+), 28

[Qemu-devel] [PATCH v7 13/74] linux-user: Split out ipc syscalls

2019-05-19 Thread Richard Henderson
Because of the ipc multiplex syscall, these must be done all at once. Signed-off-by: Richard Henderson --- linux-user/syscall-defs.h| 38 ++ linux-user/strace.c | 83 --- linux-user/syscall-ipc.inc.c | 1088 ++ linux-user/syscall.c | 973

[Qemu-devel] [PATCH v7 32/74] linux-user: Split out umount, umount2

2019-05-19 Thread Richard Henderson
Note that umount2 is unconditionally available. Signed-off-by: Richard Henderson --- linux-user/syscall-defs.h | 4 linux-user/syscall.h | 1 + linux-user/strace.c | 30 -- linux-user/syscall-file.inc.c | 25 +

[Qemu-devel] [PATCH v7 39/74] linux-user: Split out kill

2019-05-19 Thread Richard Henderson
Signed-off-by: Richard Henderson --- linux-user/syscall-defs.h| 1 + linux-user/syscall.h | 7 +++- linux-user/strace.c | 76 ++-- linux-user/syscall-sig.inc.c | 5 +++ linux-user/syscall.c | 2 - linux-user/strace.list | 3

[Qemu-devel] [PATCH v7 57/74] linux-user: Split out sgetmask, ssetmask

2019-05-19 Thread Richard Henderson
Signed-off-by: Richard Henderson --- linux-user/syscall-defs.h| 6 ++ linux-user/syscall-sig.inc.c | 32 linux-user/syscall.c | 27 --- linux-user/strace.list | 6 -- 4 files changed, 38 insertions(+), 33

[Qemu-devel] [PATCH v7 59/74] linux-user: Split out sigpending, rt_sigpending

2019-05-19 Thread Richard Henderson
Signed-off-by: Richard Henderson --- linux-user/syscall-defs.h| 4 linux-user/syscall-sig.inc.c | 45 linux-user/syscall.c | 36 - linux-user/strace.list | 6 - 4 files changed, 49 insertions(+), 42

[Qemu-devel] [PATCH v7 56/74] linux-user: Split out sigaction, rt_sigaction

2019-05-19 Thread Richard Henderson
Signed-off-by: Richard Henderson --- linux-user/syscall-defs.h| 10 ++ linux-user/strace.c | 14 --- linux-user/syscall-sig.inc.c | 172 +++ linux-user/syscall.c | 160 linux-user/strace.list | 6 --

[Qemu-devel] [PATCH v7 74/74] linux-user: Split out getpriority, setpriority

2019-05-19 Thread Richard Henderson
Signed-off-by: Richard Henderson --- linux-user/syscall-defs.h | 2 ++ linux-user/syscall-proc.inc.c | 28 linux-user/syscall.c | 18 -- linux-user/strace.list| 6 -- 4 files changed, 30 insertions(+), 24 deletions(-) diff

[Qemu-devel] [PATCH v6 6/6] linux-user: Add support for statx() syscall

2019-05-19 Thread Aleksandar Markovic
From: Aleksandar Rikalo Implement support for translation of system call statx(). The implementation includes invoking other (more mature) system calls (from the same 'stat' family) on the host side. This way, the problems of potential lack of statx() availability of on the host side are

[Qemu-devel] [PATCH 03/13] linux-user: Introduce cpu_clone_regs_parent

2019-05-19 Thread Richard Henderson
Add an empty inline function for each target, and invoke it from the proper places. Signed-off-by: Richard Henderson --- linux-user/aarch64/target_cpu.h| 4 linux-user/alpha/target_cpu.h | 4 linux-user/arm/target_cpu.h| 4 linux-user/cris/target_cpu.h | 4

[Qemu-devel] [PATCH 08/13] linux-user/sparc: Fix cpu_clone_regs

2019-05-19 Thread Richard Henderson
We failed to set the secondary return value in %o1 we failed to advance the PC past the syscall, we failed to adjust regwptr into the new structure, we stored the stack pointer into the wrong register. Signed-off-by: Richard Henderson --- linux-user/sparc/target_cpu.h | 29

[Qemu-devel] [PATCH 06/13] linux-user/sparc: Use WREG constants in sparc/target_cpu.h

2019-05-19 Thread Richard Henderson
This fixes a naming bug wherein we used "UREG_FP" to access the stack pointer. OTOH, the "UREG_FP" constant was also defined incorrectly such that it *did* reference the stack pointer. Note that the kernel legitimately uses the name "FP", because it utilizes the rolled stack window in processing

[Qemu-devel] [PATCH v7 10/74] linux-user: Split out pread64, pwrite64

2019-05-19 Thread Richard Henderson
Signed-off-by: Richard Henderson --- linux-user/syscall-defs.h | 6 linux-user/syscall-file.inc.c | 62 +++ linux-user/syscall.c | 36 linux-user/strace.list| 6 4 files changed, 68 insertions(+), 42

[Qemu-devel] [PATCH v7 02/74] linux-user: Split out open, open_at

2019-05-19 Thread Richard Henderson
For the moment, leave a forward declaration for is_proc_myself until the readlink syscalls are also moved to syscall-file.inc.c. Signed-off-by: Richard Henderson --- linux-user/syscall-defs.h | 5 + linux-user/strace.c | 35 linux-user/syscall-file.inc.c | 325

[Qemu-devel] [PATCH v7 03/74] linux-user: Share more code for open and openat

2019-05-19 Thread Richard Henderson
The do_openat helper can have all of the code that is not directly related to the argument ordering of these two syscalls. Signed-off-by: Richard Henderson --- linux-user/syscall-file.inc.c | 69 --- 1 file changed, 31 insertions(+), 38 deletions(-) diff --git

[Qemu-devel] [PATCH v7 19/74] linux-user: Implement rusage argument to waitid

2019-05-19 Thread Richard Henderson
The kernel interface, which we are supposed to be implementing, takes a fifth argument: an rusage pointer akin to wait4. Signed-off-by: Richard Henderson --- linux-user/syscall-defs.h | 2 +- linux-user/syscall-proc.inc.c | 27 +++ 2 files changed, 20 insertions(+),

[Qemu-devel] [PATCH v7 28/74] linux-user: Split out chmod, fchmod, fchmodat

2019-05-19 Thread Richard Henderson
Note that fchmodat is universally provided. Signed-off-by: Richard Henderson --- linux-user/syscall-defs.h | 5 + linux-user/strace.c | 28 linux-user/syscall-file.inc.c | 30 ++ linux-user/syscall.c | 18

[Qemu-devel] [PATCH v7 18/74] linux-user: Split out wait4, waitid, waitpid

2019-05-19 Thread Richard Henderson
Note that waitid is universally provided and need not be conditional. Signed-off-by: Richard Henderson --- linux-user/syscall-defs.h | 5 ++ linux-user/syscall-proc.inc.c | 88 +++ linux-user/syscall.c | 67 --

[Qemu-devel] [PATCH v7 12/74] linux-user: Split out name_to_handle_at, open_by_handle_at

2019-05-19 Thread Richard Henderson
All targets have these syscalls, so they need not be ifdefed. If we provide safe syscalls for the host, we can remove the configure test for this too. Signed-off-by: Richard Henderson --- linux-user/syscall-defs.h | 3 + linux-user/syscall.h | 1 + linux-user/strace.c

[Qemu-devel] [PATCH v7 20/74] linux-user: Split out creat

2019-05-19 Thread Richard Henderson
Signed-off-by: Richard Henderson --- linux-user/syscall-defs.h | 3 +++ linux-user/strace.c | 13 - linux-user/syscall-file.inc.c | 16 linux-user/syscall.c | 9 - linux-user/strace.list| 3 --- 5 files changed, 19

[Qemu-devel] [PATCH v7 22/74] linux-user: Split out unlink, unlinkat, rmdir

2019-05-19 Thread Richard Henderson
Note that unlinkat is universally provided. Implement rmdir in terms of unlinkat. Signed-off-by: Richard Henderson --- linux-user/syscall-defs.h | 7 ++ linux-user/syscall.h | 1 + linux-user/strace.c | 43 ---

[Qemu-devel] [PATCH v7 40/74] linux-user: Split out rename, renameat, renameat2

2019-05-19 Thread Richard Henderson
Note that renameat2 is universally available for guests. Merge sys_renameat2 into the new do_renameat2 helper. Signed-off-by: Richard Henderson --- linux-user/syscall-defs.h | 8 + linux-user/syscall.h | 1 + linux-user/strace.c | 39 ++---

[Qemu-devel] [PATCH v7 27/74] linux-user: Split out mknod, mknodat

2019-05-19 Thread Richard Henderson
Note that mknodat is universally provided. Signed-off-by: Richard Henderson --- linux-user/syscall-defs.h | 4 linux-user/strace.c | 39 --- linux-user/syscall-file.inc.c | 26 +++ linux-user/syscall.c | 16

[Qemu-devel] [PATCH v7 47/74] linux-user: Split out ioctl

2019-05-19 Thread Richard Henderson
Signed-off-by: Richard Henderson --- v7: Do not accidentally change type of "cmd". --- linux-user/syscall-defs.h | 1 + linux-user/syscall-ioctl.inc.c | 873 + linux-user/syscall.c | 852 +--- linux-user/strace.list

[Qemu-devel] [PATCH v7 53/74] linux-user: Split out chroot

2019-05-19 Thread Richard Henderson
Signed-off-by: Richard Henderson --- linux-user/syscall-defs.h | 1 + linux-user/strace.c | 12 linux-user/syscall-file.inc.c | 13 + linux-user/syscall.c | 6 -- linux-user/strace.list| 3 --- 5 files changed, 14 insertions(+), 21

[Qemu-devel] [PATCH v7 54/74] linux-user: Split out getpgid, getpgrp

2019-05-19 Thread Richard Henderson
Signed-off-by: Richard Henderson --- linux-user/syscall-defs.h | 4 linux-user/syscall-proc.inc.c | 12 linux-user/syscall.c | 6 -- linux-user/strace.list| 6 -- 4 files changed, 16 insertions(+), 12 deletions(-) diff --git

[Qemu-devel] [PATCH v7 42/74] linux-user: Split out dup, dup2, dup3

2019-05-19 Thread Richard Henderson
Note that dup3 is universally available for guests. Implement host support with syscall when !CONFIG_DUP3. Signed-off-by: Richard Henderson --- linux-user/syscall-defs.h | 5 + linux-user/syscall-file.inc.c | 42 +++ linux-user/syscall.c | 33

[Qemu-devel] [PATCH v7 72/74] linux-user: Split out reboot

2019-05-19 Thread Richard Henderson
Signed-off-by: Richard Henderson --- linux-user/syscall-defs.h | 1 + linux-user/syscall-proc.inc.c | 18 ++ linux-user/syscall.c | 13 - linux-user/strace.list| 3 --- 4 files changed, 19 insertions(+), 16 deletions(-) diff --git

[Qemu-devel] [PATCH v6 3/6] linux-user: Add support for SIOCIFPFLAGS ioctls for all targets

2019-05-19 Thread Aleksandar Markovic
From: Neng Chen Add support for getting and setting extended private flags of a network device via SIOCSIFPFLAGS and SIOCGIFPFLAGS ioctls. The ioctl numeric values are platform-independent and determined by the file include/uapi/linux/sockios.h in Linux kernel source code: #define

[Qemu-devel] [PATCH v6 4/6] linux-user: Add support for setsockopt() options IPV6__MEMBERSHIP

2019-05-19 Thread Aleksandar Markovic
From: Neng Chen Add support for options IPV6_ADD_MEMBERSHIP and IPV6_DROP_MEMPEMBERSHIP of the syscall setsockopt(). These options control membership in multicast groups. Their argument is a pointer to a struct ipv6_mreq, which is in turn defined in IP v6 header netinet/in.h as: struct

[Qemu-devel] [PATCH 01/13] util/path: Do not cache all filenames at startup

2019-05-19 Thread Richard Henderson
If one uses -L $PATH to point to a full chroot, the startup time is significant. In addition, the existing probing algorithm fails to handle symlink loops. Instead, probe individual paths on demand. Cache both positive and negative results within $PATH, so that any one filename is probed only

[Qemu-devel] [PATCH 00/13] linux-user: path, clone, sparc, shmat fixes

2019-05-19 Thread Richard Henderson
This is an omnibus patchset of: v2: util/path: Do not cache all filenames at startup https://lists.gnu.org/archive/html/qemu-devel/2019-04/msg04149.html v1: linux-user: Fix shmat emulation by honoring host SHMLBA https://lists.gnu.org/archive/html/qemu-devel/2018-10/msg03430.html And a

[Qemu-devel] [PATCH 04/13] linux-user/alpha: Set r20 secondary return value

2019-05-19 Thread Richard Henderson
This value is not, as far as I know, used by any linux software, but it is set by the kernel and is part of the ABI. Signed-off-by: Richard Henderson --- linux-user/alpha/target_cpu.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/linux-user/alpha/target_cpu.h

[Qemu-devel] [PATCH v7 01/74] linux-user: Setup split syscall infrastructure

2019-05-19 Thread Richard Henderson
Defines a unified structure for implementation and strace. Signed-off-by: Richard Henderson --- linux-user/syscall-defs.h | 17 ++ linux-user/syscall.h | 89 + linux-user/strace.c | 388 +++--- linux-user/syscall.c | 103 +- 4

[Qemu-devel] [PATCH v7 06/74] linux-user: Split out close

2019-05-19 Thread Richard Henderson
Signed-off-by: Richard Henderson --- linux-user/syscall-defs.h | 1 + linux-user/syscall-file.inc.c | 8 linux-user/syscall.c | 4 linux-user/strace.list| 3 --- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/linux-user/syscall-defs.h

[Qemu-devel] [PATCH v7 23/74] linux-user: Split out execve

2019-05-19 Thread Richard Henderson
Signed-off-by: Richard Henderson --- linux-user/syscall-defs.h | 1 + linux-user/strace.c | 32 -- linux-user/syscall-proc.inc.c | 110 ++ linux-user/syscall.c | 97 -- linux-user/strace.list|

[Qemu-devel] [PATCH v7 24/74] linux-user: Implement execveat

2019-05-19 Thread Richard Henderson
A trivial extension to our current execve implementation to support the new(ish) syscall. Signed-off-by: Richard Henderson --- linux-user/syscall-defs.h | 1 + linux-user/syscall-proc.inc.c | 19 ++- linux-user/syscall.c | 3 ++- linux-user/strace.list| 3

[Qemu-devel] [PATCH v7 61/74] linux-user: Split out rt_sigtimedwait

2019-05-19 Thread Richard Henderson
Signed-off-by: Richard Henderson --- linux-user/syscall-defs.h| 1 + linux-user/syscall-sig.inc.c | 37 linux-user/syscall.c | 36 --- linux-user/strace.list | 3 --- 4 files changed, 38 insertions(+), 39

[Qemu-devel] [PATCH v7 60/74] linux-user: Split out sigsuspend, rt_sigsuspend

2019-05-19 Thread Richard Henderson
Signed-off-by: Richard Henderson --- linux-user/syscall-defs.h| 6 + linux-user/syscall-sig.inc.c | 51 linux-user/syscall.c | 42 ++--- linux-user/strace.list | 6 - 4 files changed, 59 insertions(+), 46

[Qemu-devel] [PATCH v7 43/74] linux-user: Split out pipe, pipe2

2019-05-19 Thread Richard Henderson
Note that pipe2 is universally available for guests. Implement host support with syscall when !CONFIG_PIPE2. Signed-off-by: Richard Henderson --- linux-user/syscall-defs.h | 10 ++ linux-user/syscall-file.inc.c | 51 +++ linux-user/syscall.c | 65

[Qemu-devel] [PATCH v7 65/74] linux-user: Split out getrlimit, setrlimit

2019-05-19 Thread Richard Henderson
Signed-off-by: Richard Henderson --- linux-user/syscall-defs.h | 6 linux-user/syscall-proc.inc.c | 52 +++ linux-user/syscall.c | 46 --- linux-user/strace.list| 6 4 files changed, 58 insertions(+), 52

[Qemu-devel] [PATCH v7 66/74] linux-user: Split out getrusage

2019-05-19 Thread Richard Henderson
Signed-off-by: Richard Henderson --- linux-user/syscall-defs.h | 1 + linux-user/syscall-proc.inc.c | 12 linux-user/syscall.c | 9 - linux-user/strace.list| 3 --- 4 files changed, 13 insertions(+), 12 deletions(-) diff --git

  1   2   >