s390/compat: convert system call wrappers to C part 07
authorHeiko Carstens <heiko.carstens@de.ibm.com>
Thu, 27 Feb 2014 15:49:10 +0000 (16:49 +0100)
committerHeiko Carstens <heiko.carstens@de.ibm.com>
Tue, 4 Mar 2014 08:05:42 +0000 (09:05 +0100)
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
arch/s390/kernel/compat_wrap.c
arch/s390/kernel/compat_wrapper.S
arch/s390/kernel/syscalls.S

index 60813d5..2e132f9 100644 (file)
@@ -84,3 +84,13 @@ COMPAT_SYSCALL_WRAP1(mlockall, int, flags);
 COMPAT_SYSCALL_WRAP2(sched_setparam, compat_pid_t, pid, struct sched_param __user *, param);
 COMPAT_SYSCALL_WRAP2(sched_getparam, compat_pid_t, pid, struct sched_param __user *, param);
 COMPAT_SYSCALL_WRAP3(sched_setscheduler, compat_pid_t, pid, int, policy, struct sched_param __user *, param);
+COMPAT_SYSCALL_WRAP1(sched_getscheduler, compat_pid_t, pid);
+COMPAT_SYSCALL_WRAP1(sched_get_priority_max, int, policy);
+COMPAT_SYSCALL_WRAP1(sched_get_priority_min, int, policy);
+COMPAT_SYSCALL_WRAP5(mremap, u32, addr, u32, old_len, u32, new_len, u32, flags, u32, new_addr);
+COMPAT_SYSCALL_WRAP3(poll, struct pollfd __user *, ufds, unsigned int, nfds, int, timeout);
+COMPAT_SYSCALL_WRAP5(prctl, int, option, u32, arg2, u32, arg3, u32, arg4, u32, arg5);
+COMPAT_SYSCALL_WRAP2(getcwd, char __user *, buf, u32, size);
+COMPAT_SYSCALL_WRAP2(capget, cap_user_header_t, header, cap_user_data_t, dataptr);
+COMPAT_SYSCALL_WRAP2(capset, cap_user_header_t, header, const cap_user_data_t, data);
+COMPAT_SYSCALL_WRAP3(lchown, const char __user *, filename, compat_uid_t, user, compat_gid_t, group);
index 707e375..ac12c0f 100644 (file)
@@ -154,77 +154,11 @@ ENTRY(compat_sys_writev_wrapper)
        llgfr   %r4,%r4                 # unsigned long
        jg      compat_sys_writev       # branch to system call
 
-ENTRY(sys32_sched_getscheduler_wrapper)
-       lgfr    %r2,%r2                 # pid_t
-       jg      sys_sched_getscheduler  # branch to system call
-
-#sys32_sched_yield_wrapper             # void
-
-ENTRY(sys32_sched_get_priority_max_wrapper)
-       lgfr    %r2,%r2                 # int
-       jg      sys_sched_get_priority_max      # branch to system call
-
-ENTRY(sys32_sched_get_priority_min_wrapper)
-       lgfr    %r2,%r2                 # int
-       jg      sys_sched_get_priority_min      # branch to system call
-
 ENTRY(compat_sys_nanosleep_wrapper)
        llgtr   %r2,%r2                 # struct compat_timespec *
        llgtr   %r3,%r3                 # struct compat_timespec *
        jg      compat_sys_nanosleep            # branch to system call
 
-ENTRY(sys32_mremap_wrapper)
-       llgfr   %r2,%r2                 # unsigned long
-       llgfr   %r3,%r3                 # unsigned long
-       llgfr   %r4,%r4                 # unsigned long
-       llgfr   %r5,%r5                 # unsigned long
-       llgfr   %r6,%r6                 # unsigned long
-       jg      sys_mremap              # branch to system call
-
-ENTRY(sys32_poll_wrapper)
-       llgtr   %r2,%r2                 # struct pollfd *
-       llgfr   %r3,%r3                 # unsigned int
-       lgfr    %r4,%r4                 # int
-       jg      sys_poll                # branch to system call
-
-ENTRY(sys32_prctl_wrapper)
-       lgfr    %r2,%r2                 # int
-       llgfr   %r3,%r3                 # unsigned long
-       llgfr   %r4,%r4                 # unsigned long
-       llgfr   %r5,%r5                 # unsigned long
-       llgfr   %r6,%r6                 # unsigned long
-       jg      sys_prctl               # branch to system call
-
-#sys32_rt_sigreturn_wrapper            # done in rt_sigreturn_glue
-
-ENTRY(sys32_getcwd_wrapper)
-       llgtr   %r2,%r2                 # char *
-       llgfr   %r3,%r3                 # unsigned long
-       jg      sys_getcwd              # branch to system call
-
-ENTRY(sys32_capget_wrapper)
-       llgtr   %r2,%r2                 # cap_user_header_t
-       llgtr   %r3,%r3                 # cap_user_data_t
-       jg      sys_capget              # branch to system call
-
-ENTRY(sys32_capset_wrapper)
-       llgtr   %r2,%r2                 # cap_user_header_t
-       llgtr   %r3,%r3                 # const cap_user_data_t
-       jg      sys_capset              # branch to system call
-
-#sys32_vfork_wrapper                   # done in vfork_glue
-
-ENTRY(sys32_lchown_wrapper)
-       llgtr   %r2,%r2                 # const char *
-       llgfr   %r3,%r3                 # uid_t
-       llgfr   %r4,%r4                 # gid_t
-       jg      sys_lchown              # branch to system call
-
-#sys32_getuid_wrapper                  # void
-#sys32_getgid_wrapper                  # void
-#sys32_geteuid_wrapper                 # void
-#sys32_getegid_wrapper                 # void
-
 ENTRY(sys32_setreuid_wrapper)
        llgfr   %r2,%r2                 # uid_t
        llgfr   %r3,%r3                 # uid_t
index c667bb1..775856a 100644 (file)
@@ -165,22 +165,22 @@ SYSCALL(sys_munlockall,sys_munlockall,sys_munlockall)
 SYSCALL(sys_sched_setparam,sys_sched_setparam,compat_sys_sched_setparam)
 SYSCALL(sys_sched_getparam,sys_sched_getparam,compat_sys_sched_getparam)       /* 155 */
 SYSCALL(sys_sched_setscheduler,sys_sched_setscheduler,compat_sys_sched_setscheduler)
-SYSCALL(sys_sched_getscheduler,sys_sched_getscheduler,sys32_sched_getscheduler_wrapper)
+SYSCALL(sys_sched_getscheduler,sys_sched_getscheduler,compat_sys_sched_getscheduler)
 SYSCALL(sys_sched_yield,sys_sched_yield,sys_sched_yield)
-SYSCALL(sys_sched_get_priority_max,sys_sched_get_priority_max,sys32_sched_get_priority_max_wrapper)
-SYSCALL(sys_sched_get_priority_min,sys_sched_get_priority_min,sys32_sched_get_priority_min_wrapper)    /* 160 */
+SYSCALL(sys_sched_get_priority_max,sys_sched_get_priority_max,compat_sys_sched_get_priority_max)
+SYSCALL(sys_sched_get_priority_min,sys_sched_get_priority_min,compat_sys_sched_get_priority_min)       /* 160 */
 SYSCALL(sys_sched_rr_get_interval,sys_sched_rr_get_interval,compat_sys_sched_rr_get_interval)
 SYSCALL(sys_nanosleep,sys_nanosleep,compat_sys_nanosleep_wrapper)
-SYSCALL(sys_mremap,sys_mremap,sys32_mremap_wrapper)
+SYSCALL(sys_mremap,sys_mremap,compat_sys_mremap)
 SYSCALL(sys_setresuid16,sys_ni_syscall,compat_sys_s390_setresuid16)    /* old setresuid16 syscall */
 SYSCALL(sys_getresuid16,sys_ni_syscall,compat_sys_s390_getresuid16)    /* 165 old getresuid16 syscall */
 NI_SYSCALL                                                     /* for vm86 */
 NI_SYSCALL                                                     /* old sys_query_module */
-SYSCALL(sys_poll,sys_poll,sys32_poll_wrapper)
+SYSCALL(sys_poll,sys_poll,compat_sys_poll)
 NI_SYSCALL                                                     /* old nfsservctl */
 SYSCALL(sys_setresgid16,sys_ni_syscall,compat_sys_s390_setresgid16)    /* 170 old setresgid16 syscall */
 SYSCALL(sys_getresgid16,sys_ni_syscall,compat_sys_s390_getresgid16)    /* old getresgid16 syscall */
-SYSCALL(sys_prctl,sys_prctl,sys32_prctl_wrapper)
+SYSCALL(sys_prctl,sys_prctl,compat_sys_prctl)
 SYSCALL(sys_rt_sigreturn,sys_rt_sigreturn,sys32_rt_sigreturn)
 SYSCALL(sys_rt_sigaction,sys_rt_sigaction,compat_sys_rt_sigaction)
 SYSCALL(sys_rt_sigprocmask,sys_rt_sigprocmask,compat_sys_rt_sigprocmask) /* 175 */
@@ -191,9 +191,9 @@ SYSCALL(sys_rt_sigsuspend,sys_rt_sigsuspend,compat_sys_rt_sigsuspend)
 SYSCALL(sys_pread64,sys_pread64,compat_sys_s390_pread64)               /* 180 */
 SYSCALL(sys_pwrite64,sys_pwrite64,compat_sys_s390_pwrite64)
 SYSCALL(sys_chown16,sys_ni_syscall,compat_sys_s390_chown16)    /* old chown16 syscall */
-SYSCALL(sys_getcwd,sys_getcwd,sys32_getcwd_wrapper)
-SYSCALL(sys_capget,sys_capget,sys32_capget_wrapper)
-SYSCALL(sys_capset,sys_capset,sys32_capset_wrapper)            /* 185 */
+SYSCALL(sys_getcwd,sys_getcwd,compat_sys_getcwd)
+SYSCALL(sys_capget,sys_capget,compat_sys_capget)
+SYSCALL(sys_capset,sys_capset,compat_sys_capset)               /* 185 */
 SYSCALL(sys_sigaltstack,sys_sigaltstack,compat_sys_sigaltstack)
 SYSCALL(sys_sendfile,sys_sendfile64,compat_sys_sendfile)
 NI_SYSCALL                                                     /* streams1 */
@@ -206,7 +206,7 @@ SYSCALL(sys_ftruncate64,sys_ni_syscall,compat_sys_s390_ftruncate64)
 SYSCALL(sys_stat64,sys_ni_syscall,compat_sys_s390_stat64)              /* 195 */
 SYSCALL(sys_lstat64,sys_ni_syscall,compat_sys_s390_lstat64)
 SYSCALL(sys_fstat64,sys_ni_syscall,compat_sys_s390_fstat64)
-SYSCALL(sys_lchown,sys_lchown,sys32_lchown_wrapper)
+SYSCALL(sys_lchown,sys_lchown,compat_sys_lchown)
 SYSCALL(sys_getuid,sys_getuid,sys_getuid)
 SYSCALL(sys_getgid,sys_getgid,sys_getgid)                      /* 200 */
 SYSCALL(sys_geteuid,sys_geteuid,sys_geteuid)