Commit bcd47878 authored by Edgar E. Iglesias's avatar Edgar E. Iglesias
Browse files

Merge branch 'linux-user-for-upstream' of git://gitorious.org/qemu-maemo/qemu

* 'linux-user-for-upstream' of git://gitorious.org/qemu-maemo/qemu:
  linux-user: fix mips and ppc to use UID16
  update binfmt conf
  linux-user: fix compiler error on nptl
  ARM: linux-user: Restore iWMMXT state from ucontext on sigreturn
  ARM: linux-user: Expose iWMMXT registers to signal handlers
  ARM: linux-user: Restore VFP state from ucontext on sigreturn
  ARM: linux-user: Expose VFP registers to signal handlers
  ARM: Expose vfp_get_fpscr() and vfp_set_fpscr() to C code
  ARM: linux-user: Correct size of padding in target_ucontext_v2
  target-sparc: remove unused functions cpu_lock(), cpu_unlock()
  ARM: enable XScale/iWMMXT in linux-user mode
  linux-user: Translate getsockopt level option
  linux-user: remove unnecessary local from __get_user(), __put_user()
  linux-user: fix memory leaks with NPTL emulation
  linux-user: mmap_reserve() not controlled by RESERVED_VA
  [PATCH] target-arm: remove unused functions cpu_lock(), cpu_unlock()
parents db1923de b2e7aab2
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -2711,7 +2711,7 @@ int main(int argc, char **argv, char **envp)
    struct target_pt_regs regs1, *regs = &regs1;
    struct image_info info1, *info = &info1;
    struct linux_binprm bprm;
    TaskState ts1, *ts = &ts1;
    TaskState *ts;
    CPUState *env;
    int optind;
    const char *r;
@@ -3038,7 +3038,7 @@ int main(int argc, char **argv, char **envp)
    }
    target_argv[target_argc] = NULL;

    memset(ts, 0, sizeof(TaskState));
    ts = qemu_mallocz (sizeof(TaskState));
    init_task_state(ts);
    /* build Task State */
    ts->info = info;
+19 −19
Original line number Diff line number Diff line
@@ -18,15 +18,15 @@
#define TARGET_NR_time			(TARGET_NR_Linux +  13)
#define TARGET_NR_mknod			(TARGET_NR_Linux +  14)
#define TARGET_NR_chmod			(TARGET_NR_Linux +  15)
#define TARGET_NR_lchown32		(TARGET_NR_Linux +  16)
#define TARGET_NR_lchown		(TARGET_NR_Linux +  16)
#define TARGET_NR_break			(TARGET_NR_Linux +  17)
#define TARGET_NR_unused18		(TARGET_NR_Linux +  18)
#define TARGET_NR_lseek			(TARGET_NR_Linux +  19)
#define TARGET_NR_getpid		(TARGET_NR_Linux +  20)
#define TARGET_NR_mount			(TARGET_NR_Linux +  21)
#define TARGET_NR_umount		(TARGET_NR_Linux +  22)
#define TARGET_NR_setuid32		(TARGET_NR_Linux +  23)
#define TARGET_NR_getuid32		(TARGET_NR_Linux +  24)
#define TARGET_NR_setuid		(TARGET_NR_Linux +  23)
#define TARGET_NR_getuid		(TARGET_NR_Linux +  24)
#define TARGET_NR_stime			(TARGET_NR_Linux +  25)
#define TARGET_NR_ptrace		(TARGET_NR_Linux +  26)
#define TARGET_NR_alarm			(TARGET_NR_Linux +  27)
@@ -48,11 +48,11 @@
#define TARGET_NR_times			(TARGET_NR_Linux +  43)
#define TARGET_NR_prof			(TARGET_NR_Linux +  44)
#define TARGET_NR_brk			(TARGET_NR_Linux +  45)
#define TARGET_NR_setgid32		(TARGET_NR_Linux +  46)
#define TARGET_NR_getgid32		(TARGET_NR_Linux +  47)
#define TARGET_NR_setgid		(TARGET_NR_Linux +  46)
#define TARGET_NR_getgid		(TARGET_NR_Linux +  47)
#define TARGET_NR_signal		(TARGET_NR_Linux +  48)
#define TARGET_NR_geteuid32		(TARGET_NR_Linux +  49)
#define TARGET_NR_getegid32		(TARGET_NR_Linux +  50)
#define TARGET_NR_geteuid		(TARGET_NR_Linux +  49)
#define TARGET_NR_getegid		(TARGET_NR_Linux +  50)
#define TARGET_NR_acct			(TARGET_NR_Linux +  51)
#define TARGET_NR_umount2		(TARGET_NR_Linux +  52)
#define TARGET_NR_lock			(TARGET_NR_Linux +  53)
@@ -72,8 +72,8 @@
#define TARGET_NR_sigaction		(TARGET_NR_Linux +  67)
#define TARGET_NR_sgetmask		(TARGET_NR_Linux +  68)
#define TARGET_NR_ssetmask		(TARGET_NR_Linux +  69)
#define TARGET_NR_setreuid32		(TARGET_NR_Linux +  70)
#define TARGET_NR_setregid32		(TARGET_NR_Linux +  71)
#define TARGET_NR_setreuid		(TARGET_NR_Linux +  70)
#define TARGET_NR_setregid		(TARGET_NR_Linux +  71)
#define TARGET_NR_sigsuspend		(TARGET_NR_Linux +  72)
#define TARGET_NR_sigpending		(TARGET_NR_Linux +  73)
#define TARGET_NR_sethostname		(TARGET_NR_Linux +  74)
@@ -82,8 +82,8 @@
#define TARGET_NR_getrusage		(TARGET_NR_Linux +  77)
#define TARGET_NR_gettimeofday		(TARGET_NR_Linux +  78)
#define TARGET_NR_settimeofday		(TARGET_NR_Linux +  79)
#define TARGET_NR_getgroups32		(TARGET_NR_Linux +  80)
#define TARGET_NR_setgroups32		(TARGET_NR_Linux +  81)
#define TARGET_NR_getgroups		(TARGET_NR_Linux +  80)
#define TARGET_NR_setgroups		(TARGET_NR_Linux +  81)
#define TARGET_NR_reserved82		(TARGET_NR_Linux +  82)
#define TARGET_NR_symlink		(TARGET_NR_Linux +  83)
#define TARGET_NR_unused84		(TARGET_NR_Linux +  84)
@@ -97,7 +97,7 @@
#define TARGET_NR_truncate		(TARGET_NR_Linux +  92)
#define TARGET_NR_ftruncate		(TARGET_NR_Linux +  93)
#define TARGET_NR_fchmod		(TARGET_NR_Linux +  94)
#define TARGET_NR_fchown32		(TARGET_NR_Linux +  95)
#define TARGET_NR_fchown		(TARGET_NR_Linux +  95)
#define TARGET_NR_getpriority		(TARGET_NR_Linux +  96)
#define TARGET_NR_setpriority		(TARGET_NR_Linux +  97)
#define TARGET_NR_profil		(TARGET_NR_Linux +  98)
@@ -140,8 +140,8 @@
#define TARGET_NR_sysfs			(TARGET_NR_Linux + 135)
#define TARGET_NR_personality		(TARGET_NR_Linux + 136)
#define TARGET_NR_afs_syscall		(TARGET_NR_Linux + 137) /* Syscall for Andrew File System */
#define TARGET_NR_setfsuid32		(TARGET_NR_Linux + 138)
#define TARGET_NR_setfsgid32		(TARGET_NR_Linux + 139)
#define TARGET_NR_setfsuid		(TARGET_NR_Linux + 138)
#define TARGET_NR_setfsgid		(TARGET_NR_Linux + 139)
#define TARGET_NR__llseek		(TARGET_NR_Linux + 140)
#define TARGET_NR_getdents		(TARGET_NR_Linux + 141)
#define TARGET_NR__newselect		(TARGET_NR_Linux + 142)
@@ -187,13 +187,13 @@
#define TARGET_NR_shutdown		(TARGET_NR_Linux + 182)
#define TARGET_NR_socket		(TARGET_NR_Linux + 183)
#define TARGET_NR_socketpair		(TARGET_NR_Linux + 184)
#define TARGET_NR_setresuid32		(TARGET_NR_Linux + 185)
#define TARGET_NR_getresuid32		(TARGET_NR_Linux + 186)
#define TARGET_NR_setresuid		(TARGET_NR_Linux + 185)
#define TARGET_NR_getresuid		(TARGET_NR_Linux + 186)
#define TARGET_NR_query_module		(TARGET_NR_Linux + 187)
#define TARGET_NR_poll			(TARGET_NR_Linux + 188)
#define TARGET_NR_nfsservctl		(TARGET_NR_Linux + 189)
#define TARGET_NR_setresgid32		(TARGET_NR_Linux + 190)
#define TARGET_NR_getresgid32		(TARGET_NR_Linux + 191)
#define TARGET_NR_setresgid		(TARGET_NR_Linux + 190)
#define TARGET_NR_getresgid		(TARGET_NR_Linux + 191)
#define TARGET_NR_prctl			(TARGET_NR_Linux + 192)
#define TARGET_NR_rt_sigreturn		(TARGET_NR_Linux + 193)
#define TARGET_NR_rt_sigaction		(TARGET_NR_Linux + 194)
@@ -204,7 +204,7 @@
#define TARGET_NR_rt_sigsuspend		(TARGET_NR_Linux + 199)
#define TARGET_NR_pread64		(TARGET_NR_Linux + 200)
#define TARGET_NR_pwrite64		(TARGET_NR_Linux + 201)
#define TARGET_NR_chown32		(TARGET_NR_Linux + 202)
#define TARGET_NR_chown 		(TARGET_NR_Linux + 202)
#define TARGET_NR_getcwd		(TARGET_NR_Linux + 203)
#define TARGET_NR_capget		(TARGET_NR_Linux + 204)
#define TARGET_NR_capset		(TARGET_NR_Linux + 205)
+3 −1
Original line number Diff line number Diff line
@@ -697,8 +697,10 @@ abi_long target_mremap(abi_ulong old_addr, abi_ulong old_size,
                                         old_size, new_size,
                                         flags | MREMAP_FIXED,
                                         g2h(mmap_start));
            if ( RESERVED_VA ) {
                mmap_reserve(old_addr, old_size);
            }
        }
    } else {
        int prot = 0;
        if (RESERVED_VA && old_size < new_size) {
+15 −15
Original line number Diff line number Diff line
@@ -17,15 +17,15 @@
#define TARGET_NR_time                    13
#define TARGET_NR_mknod                   14
#define TARGET_NR_chmod                   15
#define TARGET_NR_lchown32                16
#define TARGET_NR_lchown                  16
#define TARGET_NR_break                   17
#define TARGET_NR_oldstat                 18
#define TARGET_NR_lseek                   19
#define TARGET_NR_getpid                  20
#define TARGET_NR_mount                   21
#define TARGET_NR_umount                  22
#define TARGET_NR_setuid32                23
#define TARGET_NR_getuid32                24
#define TARGET_NR_setuid                  23
#define TARGET_NR_getuid                  24
#define TARGET_NR_stime                   25
#define TARGET_NR_ptrace                  26
#define TARGET_NR_alarm                   27
@@ -47,11 +47,11 @@
#define TARGET_NR_times                   43
#define TARGET_NR_prof                    44
#define TARGET_NR_brk                     45
#define TARGET_NR_setgid32                46
#define TARGET_NR_getgid32                47
#define TARGET_NR_setgid                  46
#define TARGET_NR_getgid                  47
#define TARGET_NR_signal                  48
#define TARGET_NR_geteuid32               49
#define TARGET_NR_getegid32               50
#define TARGET_NR_geteuid                 49
#define TARGET_NR_getegid                 50
#define TARGET_NR_acct                    51
#define TARGET_NR_umount2                 52
#define TARGET_NR_lock                    53
@@ -71,8 +71,8 @@
#define TARGET_NR_sigaction               67
#define TARGET_NR_sgetmask                68
#define TARGET_NR_ssetmask                69
#define TARGET_NR_setreuid32              70
#define TARGET_NR_setregid32              71
#define TARGET_NR_setreuid                70
#define TARGET_NR_setregid                71
#define TARGET_NR_sigsuspend              72
#define TARGET_NR_sigpending              73
#define TARGET_NR_sethostname             74
@@ -81,8 +81,8 @@
#define TARGET_NR_getrusage               77
#define TARGET_NR_gettimeofday            78
#define TARGET_NR_settimeofday            79
#define TARGET_NR_getgroups32             80
#define TARGET_NR_setgroups32             81
#define TARGET_NR_getgroups               80
#define TARGET_NR_setgroups               81
#define TARGET_NR_select                  82
#define TARGET_NR_symlink                 83
#define TARGET_NR_oldlstat                84
@@ -96,7 +96,7 @@
#define TARGET_NR_truncate                92
#define TARGET_NR_ftruncate               93
#define TARGET_NR_fchmod                  94
#define TARGET_NR_fchown32                95
#define TARGET_NR_fchown                  95
#define TARGET_NR_getpriority             96
#define TARGET_NR_setpriority             97
#define TARGET_NR_profil                  98
@@ -139,8 +139,8 @@
#define TARGET_NR_sysfs                  135
#define TARGET_NR_personality            136
#define TARGET_NR_afs_syscall            137 /* Syscall for Andrew File System */
#define TARGET_NR_setfsuid32             138
#define TARGET_NR_setfsgid32             139
#define TARGET_NR_setfsuid               138
#define TARGET_NR_setfsgid               139
#define TARGET_NR__llseek                140
#define TARGET_NR_getdents               141
#define TARGET_NR__newselect             142
@@ -182,7 +182,7 @@
#define TARGET_NR_rt_sigsuspend          178
#define TARGET_NR_pread64                179
#define TARGET_NR_pwrite64               180
#define TARGET_NR_chown32                181
#define TARGET_NR_chown                  181
#define TARGET_NR_getcwd                 182
#define TARGET_NR_capget                 183
#define TARGET_NR_capset                 184
+2 −6
Original line number Diff line number Diff line
@@ -126,8 +126,6 @@ typedef struct TaskState {
    struct sigqueue sigqueue_table[MAX_SIGQUEUE_SIZE]; /* siginfo queue */
    struct sigqueue *first_free; /* first free siginfo queue entry */
    int signal_pending; /* non zero if a signal may be pending */

    uint8_t stack[0];
} __attribute__((aligned(16))) TaskState;

extern char *exec_path;
@@ -266,8 +264,7 @@ static inline int access_ok(int type, abi_ulong addr, abi_ulong size)
 */
#define __put_user(x, hptr)\
({\
    int size = sizeof(*hptr);\
    switch(size) {\
    switch(sizeof(*hptr)) {\
    case 1:\
        *(uint8_t *)(hptr) = (uint8_t)(typeof(*hptr))(x);\
        break;\
@@ -288,8 +285,7 @@ static inline int access_ok(int type, abi_ulong addr, abi_ulong size)

#define __get_user(x, hptr) \
({\
    int size = sizeof(*hptr);\
    switch(size) {\
    switch(sizeof(*hptr)) {\
    case 1:\
        x = (typeof(*hptr))*(uint8_t *)(hptr);\
        break;\
Loading