Commit b49e452f authored by Peter Maydell's avatar Peter Maydell
Browse files

Merge remote-tracking branch 'remotes/riku/tags/pull-linux-user-20160921' into staging



Linux-user changes, mostly bugfixes and adding support for some
new syscalls and some obscure syscalls as well. Includes some
missed patches from earlier rounds, and dropping unicore32 target.

v2: fix the syslog patch and test build with clang-3.8
v3: drop ustat patch

# gpg: Signature made Fri 21 Oct 2016 13:38:06 BST
# gpg:                using RSA key 0xB44890DEDE3C9BC0
# gpg: Good signature from "Riku Voipio <riku.voipio@iki.fi>"
# gpg:                 aka "Riku Voipio <riku.voipio@linaro.org>"
# Primary key fingerprint: FF82 03C8 C391 98AE 0581  41EF B448 90DE DE3C 9BC0

* remotes/riku/tags/pull-linux-user-20160921: (21 commits)
  linux-user: disable unicore32 linux-user build
  linux-user: added support for pwritev() system call.
  linux-user: added support for preadv() system call.
  linux-user: Fix fadvise64() syscall support for Mips32
  linux-user: Redirect termbits.h for Mips64 to termbits.h for Mips32
  linux-user: Update ioctls definitions for Mips32
  linux-user: Update mips_syscall_args[] array in main.c
  linux-user: Add support for syncfs() syscall
  linux-user: Add support for clock_adjtime() syscall
  linux-user: Fix definition of target_sigevent for 32-bit guests
  linux-user: use libc wrapper instead of direct mremap syscall
  linux-user: Don't use alloca() for epoll_wait's epoll event array
  linux-user: add RTA_PRIORITY in netlink
  linux-user: add kcmp() syscall
  linux-user: sparc64: Use correct target SHMLBA in shmat()
  linux-user: Remove a duplicate item from strace.list
  linux-user: Fix syslog() syscall support
  linux-user: Fix socketcall() syscall support
  linux-user: Fix msgrcv() and msgsnd() syscalls support
  linux-user: Fix mq_open() syscall support
  ...

Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
parents da158a86 5e2b40f7
Loading
Loading
Loading
Loading
+36 −0
Original line number Diff line number Diff line
@@ -3911,6 +3911,36 @@ if compile_prog "" "" ; then
  setns=yes
fi

# clock_adjtime probe
clock_adjtime=no
cat > $TMPC <<EOF
#include <time.h>

int main(void)
{
    return clock_adjtime(0, 0);
}
EOF
clock_adjtime=no
if compile_prog "" "" ; then
  clock_adjtime=yes
fi

# syncfs probe
syncfs=no
cat > $TMPC <<EOF
#include <unistd.h>

int main(void)
{
    return syncfs(0);
}
EOF
syncfs=no
if compile_prog "" "" ; then
  syncfs=yes
fi

# Check if tools are available to build documentation.
if test "$docs" != "no" ; then
  if has makeinfo && has pod2man; then
@@ -5196,6 +5226,12 @@ fi
if test "$setns" = "yes" ; then
  echo "CONFIG_SETNS=y" >> $config_host_mak
fi
if test "$clock_adjtime" = "yes" ; then
  echo "CONFIG_CLOCK_ADJTIME=y" >> $config_host_mak
fi
if test "$syncfs" = "yes" ; then
  echo "CONFIG_SYNCFS=y" >> $config_host_mak
fi
if test "$inotify" = "yes" ; then
  echo "CONFIG_INOTIFY=y" >> $config_host_mak
fi
+0 −1
Original line number Diff line number Diff line
# Default configuration for unicore32-linux-user
+22 −2
Original line number Diff line number Diff line
@@ -2295,8 +2295,8 @@ static const uint8_t mips_syscall_args[] = {
        MIPS_SYS(sys_dup3, 3)
        MIPS_SYS(sys_pipe2, 2)
        MIPS_SYS(sys_inotify_init1, 1)
        MIPS_SYS(sys_preadv, 6)         /* 4330 */
        MIPS_SYS(sys_pwritev, 6)
        MIPS_SYS(sys_preadv, 5)         /* 4330 */
        MIPS_SYS(sys_pwritev, 5)
        MIPS_SYS(sys_rt_tgsigqueueinfo, 4)
        MIPS_SYS(sys_perf_event_open, 5)
        MIPS_SYS(sys_accept4, 4)
@@ -2308,6 +2308,26 @@ static const uint8_t mips_syscall_args[] = {
        MIPS_SYS(sys_open_by_handle_at, 3) /* 4340 */
        MIPS_SYS(sys_clock_adjtime, 2)
        MIPS_SYS(sys_syncfs, 1)
        MIPS_SYS(sys_sendmmsg, 4)
        MIPS_SYS(sys_setns, 2)
        MIPS_SYS(sys_process_vm_readv, 6) /* 345 */
        MIPS_SYS(sys_process_vm_writev, 6)
        MIPS_SYS(sys_kcmp, 5)
        MIPS_SYS(sys_finit_module, 3)
        MIPS_SYS(sys_sched_setattr, 2)
        MIPS_SYS(sys_sched_getattr, 3)  /* 350 */
        MIPS_SYS(sys_renameat2, 5)
        MIPS_SYS(sys_seccomp, 3)
        MIPS_SYS(sys_getrandom, 3)
        MIPS_SYS(sys_memfd_create, 2)
        MIPS_SYS(sys_bpf, 3)            /* 355 */
        MIPS_SYS(sys_execveat, 5)
        MIPS_SYS(sys_userfaultfd, 1)
        MIPS_SYS(sys_membarrier, 2)
        MIPS_SYS(sys_mlock2, 3)
        MIPS_SYS(sys_copy_file_range, 6) /* 360 */
        MIPS_SYS(sys_preadv2, 6)
        MIPS_SYS(sys_pwritev2, 6)
};
#  undef MIPS_SYS
# endif /* O32 */
+1 −1
Original line number Diff line number Diff line
@@ -256,7 +256,7 @@
#define TARGET_NR_remap_file_pages	(TARGET_NR_Linux + 251)
#define TARGET_NR_set_tid_address	(TARGET_NR_Linux + 252)
#define TARGET_NR_restart_syscall	(TARGET_NR_Linux + 253)
#define TARGET_NR_fadvise64		(TARGET_NR_Linux + 254)
#define TARGET_NR_fadvise64_64          (TARGET_NR_Linux + 254)
#define TARGET_NR_statfs64		(TARGET_NR_Linux + 255)
#define TARGET_NR_fstatfs64		(TARGET_NR_Linux + 256)
#define TARGET_NR_timer_create		(TARGET_NR_Linux + 257)
+12 −0
Original line number Diff line number Diff line
@@ -219,8 +219,20 @@ struct target_termios {
#define TARGET_TIOCSBRK	0x5427  /* BSD compatibility */
#define TARGET_TIOCCBRK	0x5428  /* BSD compatibility */
#define TARGET_TIOCGSID	0x7416  /* Return the session ID of FD */
#define TARGET_TCGETS2          TARGET_IOR('T', 0x2A, struct termios2)
#define TARGET_TCSETS2          TARGET_IOW('T', 0x2B, struct termios2)
#define TARGET_TCSETSW2         TARGET_IOW('T', 0x2C, struct termios2)
#define TARGET_TCSETSF2         TARGET_IOW('T', 0x2D, struct termios2)
#define TARGET_TIOCGRS485       TARGET_IOR('T', 0x2E, struct serial_rs485)
#define TARGET_TIOCSRS485       TARGET_IOWR('T', 0x2F, struct serial_rs485)
#define TARGET_TIOCGPTN	TARGET_IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */
#define TARGET_TIOCSPTLCK	TARGET_IOW('T',0x31, int)  /* Lock/unlock Pty */
#define TARGET_TIOCGDEV         TARGET_IOR('T', 0x32, unsigned int)
#define TARGET_TIOCSIG          TARGET_IOW('T', 0x36, int)
#define TARGET_TIOCVHANGUP      0x5437
#define TARGET_TIOCGPKT         TARGET_IOR('T', 0x38, int)
#define TARGET_TIOCGPTLCK       TARGET_IOR('T', 0x39, int)
#define TARGET_TIOCGEXCL        TARGET_IOR('T', 0x40, int)

/* I hope the range from 0x5480 on is free ... */
#define TARGET_TIOCSCTTY	0x5480		/* become controlling tty */
Loading