]> git.karo-electronics.de Git - linux-beck.git/commitdiff
s390/compat: convert system call wrappers to C part 05
authorHeiko Carstens <heiko.carstens@de.ibm.com>
Thu, 27 Feb 2014 14:16:04 +0000 (15:16 +0100)
committerHeiko Carstens <heiko.carstens@de.ibm.com>
Tue, 4 Mar 2014 08:05:40 +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/entry.h
arch/s390/kernel/syscalls.S

index f2b85401a998799ff5b77e370acaa16cb48cee85..558a1d485aa98e8d99d9253055157fe89f1ece57 100644 (file)
@@ -1,5 +1,6 @@
 #include <linux/syscalls.h>
 #include <linux/compat.h>
+#include "entry.h"
 
 #define COMPAT_SYSCALL_WRAP1(name, ...) \
        COMPAT_SYSCALL_WRAPx(1, _##name, __VA_ARGS__)
@@ -63,3 +64,13 @@ COMPAT_SYSCALL_WRAP1(swapoff, const char __user *, specialfile);
 COMPAT_SYSCALL_WRAP1(fsync, unsigned int, fd);
 COMPAT_SYSCALL_WRAP2(setdomainname, char __user *, name, int, len);
 COMPAT_SYSCALL_WRAP1(newuname, struct new_utsname __user *, name);
+COMPAT_SYSCALL_WRAP3(mprotect, compat_ulong_t, start, compat_size_t, len, compat_ulong_t, prot);
+COMPAT_SYSCALL_WRAP3(init_module, void __user *, umod, compat_ulong_t, len, const char __user *, uargs);
+COMPAT_SYSCALL_WRAP2(delete_module, const char __user *, name_user, unsigned int, flags);
+COMPAT_SYSCALL_WRAP4(quotactl, unsigned int, cmd, const char __user *, special, qid_t, id, void __user *, addr);
+COMPAT_SYSCALL_WRAP1(getpgid, compat_pid_t, pid);
+COMPAT_SYSCALL_WRAP1(fchdir, unsigned int, fd);
+COMPAT_SYSCALL_WRAP2(bdflush, int, func, compat_long_t, data);
+COMPAT_SYSCALL_WRAP3(sysfs, int, option, compat_ulong_t, arg1, compat_ulong_t, arg2);
+COMPAT_SYSCALL_WRAP1(s390_personality, unsigned int, personality);
+COMPAT_SYSCALL_WRAP5(llseek, unsigned int, fd, u32, high, u32, low, loff_t __user *, result, unsigned int, whence);
index 3ea908f563f6afcf1081022680a714fa01182493..78b78991257b4c5397b1f335b52d1207040b1497 100644 (file)
@@ -128,61 +128,6 @@ ENTRY(compat_sys_adjtimex_wrapper)
        llgtr   %r2,%r2                 # struct compat_timex *
        jg      compat_sys_adjtimex     # branch to system call
 
-ENTRY(sys32_mprotect_wrapper)
-       llgtr   %r2,%r2                 # unsigned long (actually pointer
-       llgfr   %r3,%r3                 # size_t
-       llgfr   %r4,%r4                 # unsigned long
-       jg      sys_mprotect            # branch to system call
-
-ENTRY(sys_init_module_wrapper)
-       llgtr   %r2,%r2                 # void *
-       llgfr   %r3,%r3                 # unsigned long
-       llgtr   %r4,%r4                 # char *
-       jg      sys_init_module         # branch to system call
-
-ENTRY(sys_delete_module_wrapper)
-       llgtr   %r2,%r2                 # const char *
-       llgfr   %r3,%r3                 # unsigned int
-       jg      sys_delete_module       # branch to system call
-
-ENTRY(sys32_quotactl_wrapper)
-       llgfr   %r2,%r2                 # unsigned int
-       llgtr   %r3,%r3                 # const char *
-       llgfr   %r4,%r4                 # qid_t
-       llgtr   %r5,%r5                 # caddr_t
-       jg      sys_quotactl            # branch to system call
-
-ENTRY(sys32_getpgid_wrapper)
-       lgfr    %r2,%r2                 # pid_t
-       jg      sys_getpgid             # branch to system call
-
-ENTRY(sys32_fchdir_wrapper)
-       llgfr   %r2,%r2                 # unsigned int
-       jg      sys_fchdir              # branch to system call
-
-ENTRY(sys32_bdflush_wrapper)
-       lgfr    %r2,%r2                 # int
-       lgfr    %r3,%r3                 # long
-       jg      sys_bdflush             # branch to system call
-
-ENTRY(sys32_sysfs_wrapper)
-       lgfr    %r2,%r2                 # int
-       llgfr   %r3,%r3                 # unsigned long
-       llgfr   %r4,%r4                 # unsigned long
-       jg      sys_sysfs               # branch to system call
-
-ENTRY(sys32_personality_wrapper)
-       llgfr   %r2,%r2                 # unsigned int
-       jg      sys_s390_personality    # branch to system call
-
-ENTRY(sys32_llseek_wrapper)
-       llgfr   %r2,%r2                 # unsigned int
-       llgfr   %r3,%r3                 # unsigned long
-       llgfr   %r4,%r4                 # unsigned long
-       llgtr   %r5,%r5                 # loff_t *
-       llgfr   %r6,%r6                 # unsigned int
-       jg      sys_llseek              # branch to system call
-
 ENTRY(sys32_getdents_wrapper)
        llgfr   %r2,%r2                 # unsigned int
        llgtr   %r3,%r3                 # void *
index cb533f78c09ed5795ee365eec00374c5db662a9c..8c6c022aeb71bba057b1624dff5c23b51b97e030 100644 (file)
@@ -72,4 +72,6 @@ long sys_rt_sigreturn(void);
 long sys32_sigreturn(void);
 long sys32_rt_sigreturn(void);
 
+long sys_s390_personality(unsigned int personality);
+
 #endif /* _ENTRY_H */
index 4cf5a52de2ba3670a8df78df23a887d93c3c2319..88c85e4300aa352f1ad2b183047ead60096733fd 100644 (file)
@@ -133,22 +133,22 @@ SYSCALL(sys_setdomainname,sys_setdomainname,compat_sys_setdomainname)
 SYSCALL(sys_newuname,sys_newuname,compat_sys_newuname)
 NI_SYSCALL                                                     /* modify_ldt for i386 */
 SYSCALL(sys_adjtimex,sys_adjtimex,compat_sys_adjtimex_wrapper)
-SYSCALL(sys_mprotect,sys_mprotect,sys32_mprotect_wrapper)      /* 125 */
+SYSCALL(sys_mprotect,sys_mprotect,compat_sys_mprotect)         /* 125 */
 SYSCALL(sys_sigprocmask,sys_sigprocmask,compat_sys_sigprocmask)
 NI_SYSCALL                                                     /* old "create module" */
-SYSCALL(sys_init_module,sys_init_module,sys_init_module_wrapper)
-SYSCALL(sys_delete_module,sys_delete_module,sys_delete_module_wrapper)
+SYSCALL(sys_init_module,sys_init_module,compat_sys_init_module)
+SYSCALL(sys_delete_module,sys_delete_module,compat_sys_delete_module)
 NI_SYSCALL                                                     /* 130: old get_kernel_syms */
-SYSCALL(sys_quotactl,sys_quotactl,sys32_quotactl_wrapper)
-SYSCALL(sys_getpgid,sys_getpgid,sys32_getpgid_wrapper)
-SYSCALL(sys_fchdir,sys_fchdir,sys32_fchdir_wrapper)
-SYSCALL(sys_bdflush,sys_bdflush,sys32_bdflush_wrapper)
-SYSCALL(sys_sysfs,sys_sysfs,sys32_sysfs_wrapper)               /* 135 */
-SYSCALL(sys_personality,sys_s390_personality,sys32_personality_wrapper)
+SYSCALL(sys_quotactl,sys_quotactl,compat_sys_quotactl)
+SYSCALL(sys_getpgid,sys_getpgid,compat_sys_getpgid)
+SYSCALL(sys_fchdir,sys_fchdir,compat_sys_fchdir)
+SYSCALL(sys_bdflush,sys_bdflush,compat_sys_bdflush)
+SYSCALL(sys_sysfs,sys_sysfs,compat_sys_sysfs)          /* 135 */
+SYSCALL(sys_personality,sys_s390_personality,compat_sys_s390_personality)
 NI_SYSCALL                                                     /* for afs_syscall */
 SYSCALL(sys_setfsuid16,sys_ni_syscall,compat_sys_s390_setfsuid16)      /* old setfsuid16 syscall */
 SYSCALL(sys_setfsgid16,sys_ni_syscall,compat_sys_s390_setfsgid16)      /* old setfsgid16 syscall */
-SYSCALL(sys_llseek,sys_llseek,sys32_llseek_wrapper)            /* 140 */
+SYSCALL(sys_llseek,sys_llseek,compat_sys_llseek)               /* 140 */
 SYSCALL(sys_getdents,sys_getdents,sys32_getdents_wrapper)
 SYSCALL(sys_select,sys_select,compat_sys_select_wrapper)
 SYSCALL(sys_flock,sys_flock,sys32_flock_wrapper)