1. 24 10月, 2016 30 次提交
  2. 23 10月, 2016 2 次提交
  3. 21 10月, 2016 8 次提交
    • P
      Merge remote-tracking branch 'remotes/riku/tags/pull-linux-user-20160921' into staging · b49e452f
      Peter Maydell 提交于
      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: NPeter Maydell <peter.maydell@linaro.org>
      b49e452f
    • R
      linux-user: disable unicore32 linux-user build · 5e2b40f7
      Riku Voipio 提交于
      In order to cleanup linux-user, we need support for most relatively
      modern syscalls. unicore32 lacks support for syscalls like
      epoll_pwait, preventing cleaning up the CONFIG_EPOLL mess.
      
      This patch can be reverted when unicore32 starts either supporting
      the syscalls as defined in mainline kernel, or the oldabi interface
      gains support for syscalls supported since at kernel 2.6.19 / glibc 2.6
      
      Cc: MPRC <zhangheng@mprc.pku.edu.cn>
      Cc: Xuetao Guan <gxt@mprc.pku.edu.cn>
      Signed-off-by: NRiku Voipio <riku.voipio@linaro.org>
      5e2b40f7
    • D
      linux-user: added support for pwritev() system call. · f8d00fba
      Dejan Jovicevic 提交于
      This system call performs the same task as the writev() system call,
      with the exception of having the fourth argument, offset, which
      specifes the file offset at which the input operation is to be performed.
      Because of this, the pwritev() implementation is based on the writev()
      implementation in linux-user mode.
      
      But, since pwritev() is implemented in the kernel as a 5-argument syscall,
      5 arguments are needed to be handled as input and passed to the host
      syscall.
      
      The pos_l and pos_h argument of the safe_pwritev() are of type unsigned
      long, which can be of different sizes on different platforms. The input
      arguments are converted to the appropriate host size when passed to
      safe_pwritev().
      Signed-off-by: NDejan Jovicevic <dejan.jovicevic@rt-rk.com>
      Signed-off-by: NRiku Voipio <riku.voipio@linaro.org>
      f8d00fba
    • D
      linux-user: added support for preadv() system call. · 0f26386c
      Dejan Jovicevic 提交于
      This system call performs the same task as the readv() system call,
      with the exception of having the fourth argument, offset, which
      specifes the file offset at which the input operation is to be performed.
      Because of this, the preadv() implementation is based on the readv()
      implementation in linux-user mode.
      
      But, since preadv() is implemented in the kernel as a 5-argument syscall,
      5 arguments are needed to be handled as input and passed to the host
      syscall.
      
      The pos_l and pos_h argument of the safe_preadv() are of type unsigned
      long, which can be of different sizes on different platforms. The input
      arguments are converted to the appropriate host size when passed to
      safe_preadv().
      Signed-off-by: NDejan Jovicevic <dejan.jovicevic@rt-rk.com>
      Signed-off-by: NRiku Voipio <riku.voipio@linaro.org>
      0f26386c
    • A
      linux-user: Fix fadvise64() syscall support for Mips32 · 2f2bd444
      Aleksandar Markovic 提交于
      By looking at the file arch/mips/kernel/scall32-o32.S in Linux
      kernel, it can be deduced that, for Mips32 platform, syscall
      corresponding to number _NR_fadvise64 as defined in kernel file
      arch/mips/include/uapi/asm/unistd.h translates to kernel function
      sys_fadvise64_64, and that argument layout for this system call is
      as follows:
      
                    0             32 0             32
                   +----------------+----------------+
            (arg1) |       fd       |     __pad      | (arg2)
                   +----------------+----------------+
            (arg3) |             buffer              | (arg4)
                   +----------------+----------------+
            (arg5) |               len               | (arg6)
                   +----------------+----------------+
            (arg7) |     advise     |    not used    | (arg8)
                   +----------------+----------------+
      
      The same argument layout can be deduced from glibc code, and
      relevant commit messages in linux kernel and glibc.
      
      The fix is to change TARGET_NR_fadvise64 to TARGET_NR_fadvise64_64
      in Mips32 syscall numbers table. Array mips_syscall_args[] in
      linux-user/main.c also already have "fadvise64_64" (and not
      "fadvise64") in corresponding place for the syscall number in
      question, so no change for linux-user/main.c.
      
      This patch also fixes the failure LTP test posix_fadvise03, if
      executed on Qemu-emulated Mips32 platform (user mode).
      Signed-off-by: NAleksandar Rikalo <aleksandar.rikalo@imgtec.com>
      Signed-off-by: NMiroslav Tisma <miroslav.tisma@imgtec.com>
      Signed-off-by: NAleksandar Markovic <aleksandar.markovic@imgtec.com>
      Signed-off-by: NRiku Voipio <riku.voipio@linaro.org>
      2f2bd444
    • A
      linux-user: Redirect termbits.h for Mips64 to termbits.h for Mips32 · 6e8b33d8
      Aleksandar Markovic 提交于
      linux-user/mips64/termbits.h and linux-user/mips/termbits.h
      originate from the same files in Linux kernel. There is no plan
      to split original headers in Linux kernel into Mips32 and Mips64
      versions any time soon. Therefore, it is better not to have
      separate Mips32 and Mips64 variants in Qemu.
      
      This patch makes these two files effectively the same, allowing the
      mainenance by changing only a single file. (This is already done in
      the same fashion for some other headers in same directories.)
      Signed-off-by: NAleksandar Markovic <aleksandar.markovic@imgtec.com>
      Signed-off-by: NRiku Voipio <riku.voipio@linaro.org>
      6e8b33d8
    • A
      linux-user: Update ioctls definitions for Mips32 · af83b52e
      Aleksandar Markovic 提交于
      Update linux-user/mips/termbits.h with ioctl definitions from kernel
      file arch/mips/include/uapi/asm/ioctls.h.
      Signed-off-by: NAleksandar Markovic <aleksandar.markovic@imgtec.com>
      Signed-off-by: NRiku Voipio <riku.voipio@linaro.org>
      af83b52e
    • A
      linux-user: Update mips_syscall_args[] array in main.c · 2e6eeb67
      Aleksandar Markovic 提交于
      Array mips_syscall_args[] determines number of arguments for each
      syscall on Mips32. It wasn't updated with newer syscalls. Also,
      preadv and pwritev have 5 arguments, not 6.
      Signed-off-by: NAleksandar Markovic <aleksandar.markovic@imgtec.com>
      Signed-off-by: NRiku Voipio <riku.voipio@linaro.org>
      2e6eeb67