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

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



linux-user pull request for June 2016

# gpg: Signature made Wed 08 Jun 2016 14:27:14 BST
# gpg:                using RSA key 0xB44890DEDE3C9BC0
# gpg: Good signature from "Riku Voipio <riku.voipio@iki.fi>"
# gpg:                 aka "Riku Voipio <riku.voipio@linaro.org>"

* remotes/riku/tags/pull-linux-user-20160608: (44 commits)
  linux-user: In fork_end(), remove correct CPUs from CPU list
  linux-user: Special-case ERESTARTSYS in target_strerror()
  linux-user: Make target_strerror() return 'const char *'
  linux-user: Correct signedness of target_flock l_start and l_len fields
  linux-user: Use safe_syscall wrapper for ioctl
  linux-user: Use safe_syscall wrapper for accept and accept4 syscalls
  linux-user: Use safe_syscall wrapper for semop
  linux-user: Use safe_syscall wrapper for epoll_wait syscalls
  linux-user: Use safe_syscall wrapper for poll and ppoll syscalls
  linux-user: Use safe_syscall wrapper for sleep syscalls
  linux-user: Use safe_syscall wrapper for rt_sigtimedwait syscall
  linux-user: Use safe_syscall wrapper for flock
  linux-user: Use safe_syscall wrapper for mq_timedsend and mq_timedreceive
  linux-user: Use safe_syscall wrapper for msgsnd and msgrcv
  linux-user: Use safe_syscall wrapper for send* and recv* syscalls
  linux-user: Use safe_syscall wrapper for connect syscall
  linux-user: Use safe_syscall wrapper for readv and writev syscalls
  linux-user: Fix error conversion in 64-bit fadvise syscall
  linux-user: Fix NR_fadvise64 and NR_fadvise64_64 for 32-bit guests
  linux-user: Fix handling of arm_fadvise64_64 syscall
  ...

Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>

Conflicts:
	configure
	scripts/qemu-binfmt-conf.sh
parents 6f50f25c 014628a7
Loading
Loading
Loading
Loading
+19 −19
Original line number Diff line number Diff line
@@ -3800,8 +3800,8 @@ if compile_prog "" "" ; then
  epoll=yes
fi

# epoll_create1 and epoll_pwait are later additions
# so we must check separately for their presence
# epoll_create1 is a later addition
# so we must check separately for its presence
epoll_create1=no
cat > $TMPC << EOF
#include <sys/epoll.h>
@@ -3823,20 +3823,6 @@ if compile_prog "" "" ; then
  epoll_create1=yes
fi

epoll_pwait=no
cat > $TMPC << EOF
#include <sys/epoll.h>

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

# check for sendfile support
sendfile=no
cat > $TMPC << EOF
@@ -4528,6 +4514,19 @@ if compile_prog "" "" ; then
    have_fsxattr=yes
fi

##########################################
# check if rtnetlink.h exists and is useful
have_rtnetlink=no
cat > $TMPC << EOF
#include <linux/rtnetlink.h>
int main(void) {
  return IFLA_PROTO_DOWN;
}
EOF
if compile_prog "" "" ; then
    have_rtnetlink=yes
fi

#################################################
# Sparc implicitly links with --relax, which is
# incompatible with -r, so --no-relax should be
@@ -5135,9 +5134,6 @@ fi
if test "$epoll_create1" = "yes" ; then
  echo "CONFIG_EPOLL_CREATE1=y" >> $config_host_mak
fi
if test "$epoll_pwait" = "yes" ; then
  echo "CONFIG_EPOLL_PWAIT=y" >> $config_host_mak
fi
if test "$sendfile" = "yes" ; then
  echo "CONFIG_SENDFILE=y" >> $config_host_mak
fi
@@ -5482,6 +5478,10 @@ if test "$rdma" = "yes" ; then
  echo "CONFIG_RDMA=y" >> $config_host_mak
fi

if test "$have_rtnetlink" = "yes" ; then
  echo "CONFIG_RTNETLINK=y" >> $config_host_mak
fi

# Hold two types of flag:
#   CONFIG_THREAD_SETNAME_BYTHREAD  - we've got a way of setting the name on
#                                     a thread we have a handle to
+0 −13
Original line number Diff line number Diff line
@@ -1493,19 +1493,6 @@ void gdb_exit(CPUArchState *env, int code)
}

#ifdef CONFIG_USER_ONLY
int
gdb_queuesig (void)
{
    GDBState *s;

    s = gdbserver_state;

    if (gdbserver_fd < 0 || s->fd < 0)
        return 0;
    else
        return 1;
}

int
gdb_handlesig(CPUState *cpu, int sig)
{
+0 −1
Original line number Diff line number Diff line
@@ -48,7 +48,6 @@ int use_gdb_syscalls(void);
void gdb_set_stop_cpu(CPUState *cpu);
void gdb_exit(CPUArchState *, int);
#ifdef CONFIG_USER_ONLY
int gdb_queuesig (void);
int gdb_handlesig(CPUState *, int);
void gdb_signalled(CPUArchState *, int);
void gdbserver_fork(CPUState *);
+10 −0
Original line number Diff line number Diff line
@@ -24,6 +24,7 @@
         * -1-and-errno-set convention is done by the calling wrapper.
         */
safe_syscall_base:
        .cfi_startproc
        /* This saves a frame pointer and aligns the stack for the syscall.
         * (It's unclear if the syscall ABI has the same stack alignment
         * requirements as the userspace function call ABI, but better safe than
@@ -31,6 +32,8 @@ safe_syscall_base:
         * does not list any ABI differences regarding stack alignment.)
         */
        push    %rbp
        .cfi_adjust_cfa_offset 8
        .cfi_rel_offset rbp, 0

        /* The syscall calling convention isn't the same as the
         * C one:
@@ -70,12 +73,19 @@ safe_syscall_start:
safe_syscall_end:
        /* code path for having successfully executed the syscall */
        pop     %rbp
        .cfi_remember_state
        .cfi_def_cfa_offset 8
        .cfi_restore rbp
        ret

return_ERESTARTSYS:
        /* code path when we didn't execute the syscall */
        .cfi_restore_state
        mov     $-TARGET_ERESTARTSYS, %rax
        pop     %rbp
        .cfi_def_cfa_offset 8
        .cfi_restore rbp
        ret
        .cfi_endproc

        .size   safe_syscall_base, .-safe_syscall_base
+1 −8
Original line number Diff line number Diff line
@@ -131,7 +131,7 @@ void fork_end(int child)
           Discard information about the parent threads.  */
        CPU_FOREACH_SAFE(cpu, next_cpu) {
            if (cpu != thread_cpu) {
                QTAILQ_REMOVE(&cpus, thread_cpu, node);
                QTAILQ_REMOVE(&cpus, cpu, node);
            }
        }
        pending_cpus = 0;
@@ -3795,14 +3795,7 @@ void stop_all_tasks(void)
/* Assumes contents are already zeroed.  */
void init_task_state(TaskState *ts)
{
    int i;
 
    ts->used = 1;
    ts->first_free = ts->sigqueue_table;
    for (i = 0; i < MAX_SIGQUEUE_SIZE - 1; i++) {
        ts->sigqueue_table[i].next = &ts->sigqueue_table[i + 1];
    }
    ts->sigqueue_table[i].next = NULL;
}

CPUArchState *cpu_copy(CPUArchState *env)
Loading