diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2014-02-27 09:16:04 -0500 |
---|---|---|
committer | Heiko Carstens <heiko.carstens@de.ibm.com> | 2014-03-04 03:05:40 -0500 |
commit | 86d295e1cc59b42d0d2f9fb5f7ff9b1894f90e0c (patch) | |
tree | 01001adad3fc7fc758c3657f940b9f982afb448f /arch | |
parent | c355ce182a2e3f88d6382a9720be61369c38c5c7 (diff) |
s390/compat: convert system call wrappers to C part 05
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/s390/kernel/compat_wrap.c | 11 | ||||
-rw-r--r-- | arch/s390/kernel/compat_wrapper.S | 55 | ||||
-rw-r--r-- | arch/s390/kernel/entry.h | 2 | ||||
-rw-r--r-- | arch/s390/kernel/syscalls.S | 20 |
4 files changed, 23 insertions, 65 deletions
diff --git a/arch/s390/kernel/compat_wrap.c b/arch/s390/kernel/compat_wrap.c index f2b85401a998..558a1d485aa9 100644 --- a/arch/s390/kernel/compat_wrap.c +++ b/arch/s390/kernel/compat_wrap.c | |||
@@ -1,5 +1,6 @@ | |||
1 | #include <linux/syscalls.h> | 1 | #include <linux/syscalls.h> |
2 | #include <linux/compat.h> | 2 | #include <linux/compat.h> |
3 | #include "entry.h" | ||
3 | 4 | ||
4 | #define COMPAT_SYSCALL_WRAP1(name, ...) \ | 5 | #define COMPAT_SYSCALL_WRAP1(name, ...) \ |
5 | COMPAT_SYSCALL_WRAPx(1, _##name, __VA_ARGS__) | 6 | COMPAT_SYSCALL_WRAPx(1, _##name, __VA_ARGS__) |
@@ -63,3 +64,13 @@ COMPAT_SYSCALL_WRAP1(swapoff, const char __user *, specialfile); | |||
63 | COMPAT_SYSCALL_WRAP1(fsync, unsigned int, fd); | 64 | COMPAT_SYSCALL_WRAP1(fsync, unsigned int, fd); |
64 | COMPAT_SYSCALL_WRAP2(setdomainname, char __user *, name, int, len); | 65 | COMPAT_SYSCALL_WRAP2(setdomainname, char __user *, name, int, len); |
65 | COMPAT_SYSCALL_WRAP1(newuname, struct new_utsname __user *, name); | 66 | COMPAT_SYSCALL_WRAP1(newuname, struct new_utsname __user *, name); |
67 | COMPAT_SYSCALL_WRAP3(mprotect, compat_ulong_t, start, compat_size_t, len, compat_ulong_t, prot); | ||
68 | COMPAT_SYSCALL_WRAP3(init_module, void __user *, umod, compat_ulong_t, len, const char __user *, uargs); | ||
69 | COMPAT_SYSCALL_WRAP2(delete_module, const char __user *, name_user, unsigned int, flags); | ||
70 | COMPAT_SYSCALL_WRAP4(quotactl, unsigned int, cmd, const char __user *, special, qid_t, id, void __user *, addr); | ||
71 | COMPAT_SYSCALL_WRAP1(getpgid, compat_pid_t, pid); | ||
72 | COMPAT_SYSCALL_WRAP1(fchdir, unsigned int, fd); | ||
73 | COMPAT_SYSCALL_WRAP2(bdflush, int, func, compat_long_t, data); | ||
74 | COMPAT_SYSCALL_WRAP3(sysfs, int, option, compat_ulong_t, arg1, compat_ulong_t, arg2); | ||
75 | COMPAT_SYSCALL_WRAP1(s390_personality, unsigned int, personality); | ||
76 | COMPAT_SYSCALL_WRAP5(llseek, unsigned int, fd, u32, high, u32, low, loff_t __user *, result, unsigned int, whence); | ||
diff --git a/arch/s390/kernel/compat_wrapper.S b/arch/s390/kernel/compat_wrapper.S index 3ea908f563f6..78b78991257b 100644 --- a/arch/s390/kernel/compat_wrapper.S +++ b/arch/s390/kernel/compat_wrapper.S | |||
@@ -128,61 +128,6 @@ ENTRY(compat_sys_adjtimex_wrapper) | |||
128 | llgtr %r2,%r2 # struct compat_timex * | 128 | llgtr %r2,%r2 # struct compat_timex * |
129 | jg compat_sys_adjtimex # branch to system call | 129 | jg compat_sys_adjtimex # branch to system call |
130 | 130 | ||
131 | ENTRY(sys32_mprotect_wrapper) | ||
132 | llgtr %r2,%r2 # unsigned long (actually pointer | ||
133 | llgfr %r3,%r3 # size_t | ||
134 | llgfr %r4,%r4 # unsigned long | ||
135 | jg sys_mprotect # branch to system call | ||
136 | |||
137 | ENTRY(sys_init_module_wrapper) | ||
138 | llgtr %r2,%r2 # void * | ||
139 | llgfr %r3,%r3 # unsigned long | ||
140 | llgtr %r4,%r4 # char * | ||
141 | jg sys_init_module # branch to system call | ||
142 | |||
143 | ENTRY(sys_delete_module_wrapper) | ||
144 | llgtr %r2,%r2 # const char * | ||
145 | llgfr %r3,%r3 # unsigned int | ||
146 | jg sys_delete_module # branch to system call | ||
147 | |||
148 | ENTRY(sys32_quotactl_wrapper) | ||
149 | llgfr %r2,%r2 # unsigned int | ||
150 | llgtr %r3,%r3 # const char * | ||
151 | llgfr %r4,%r4 # qid_t | ||
152 | llgtr %r5,%r5 # caddr_t | ||
153 | jg sys_quotactl # branch to system call | ||
154 | |||
155 | ENTRY(sys32_getpgid_wrapper) | ||
156 | lgfr %r2,%r2 # pid_t | ||
157 | jg sys_getpgid # branch to system call | ||
158 | |||
159 | ENTRY(sys32_fchdir_wrapper) | ||
160 | llgfr %r2,%r2 # unsigned int | ||
161 | jg sys_fchdir # branch to system call | ||
162 | |||
163 | ENTRY(sys32_bdflush_wrapper) | ||
164 | lgfr %r2,%r2 # int | ||
165 | lgfr %r3,%r3 # long | ||
166 | jg sys_bdflush # branch to system call | ||
167 | |||
168 | ENTRY(sys32_sysfs_wrapper) | ||
169 | lgfr %r2,%r2 # int | ||
170 | llgfr %r3,%r3 # unsigned long | ||
171 | llgfr %r4,%r4 # unsigned long | ||
172 | jg sys_sysfs # branch to system call | ||
173 | |||
174 | ENTRY(sys32_personality_wrapper) | ||
175 | llgfr %r2,%r2 # unsigned int | ||
176 | jg sys_s390_personality # branch to system call | ||
177 | |||
178 | ENTRY(sys32_llseek_wrapper) | ||
179 | llgfr %r2,%r2 # unsigned int | ||
180 | llgfr %r3,%r3 # unsigned long | ||
181 | llgfr %r4,%r4 # unsigned long | ||
182 | llgtr %r5,%r5 # loff_t * | ||
183 | llgfr %r6,%r6 # unsigned int | ||
184 | jg sys_llseek # branch to system call | ||
185 | |||
186 | ENTRY(sys32_getdents_wrapper) | 131 | ENTRY(sys32_getdents_wrapper) |
187 | llgfr %r2,%r2 # unsigned int | 132 | llgfr %r2,%r2 # unsigned int |
188 | llgtr %r3,%r3 # void * | 133 | llgtr %r3,%r3 # void * |
diff --git a/arch/s390/kernel/entry.h b/arch/s390/kernel/entry.h index cb533f78c09e..8c6c022aeb71 100644 --- a/arch/s390/kernel/entry.h +++ b/arch/s390/kernel/entry.h | |||
@@ -72,4 +72,6 @@ long sys_rt_sigreturn(void); | |||
72 | long sys32_sigreturn(void); | 72 | long sys32_sigreturn(void); |
73 | long sys32_rt_sigreturn(void); | 73 | long sys32_rt_sigreturn(void); |
74 | 74 | ||
75 | long sys_s390_personality(unsigned int personality); | ||
76 | |||
75 | #endif /* _ENTRY_H */ | 77 | #endif /* _ENTRY_H */ |
diff --git a/arch/s390/kernel/syscalls.S b/arch/s390/kernel/syscalls.S index 4cf5a52de2ba..88c85e4300aa 100644 --- a/arch/s390/kernel/syscalls.S +++ b/arch/s390/kernel/syscalls.S | |||
@@ -133,22 +133,22 @@ SYSCALL(sys_setdomainname,sys_setdomainname,compat_sys_setdomainname) | |||
133 | SYSCALL(sys_newuname,sys_newuname,compat_sys_newuname) | 133 | SYSCALL(sys_newuname,sys_newuname,compat_sys_newuname) |
134 | NI_SYSCALL /* modify_ldt for i386 */ | 134 | NI_SYSCALL /* modify_ldt for i386 */ |
135 | SYSCALL(sys_adjtimex,sys_adjtimex,compat_sys_adjtimex_wrapper) | 135 | SYSCALL(sys_adjtimex,sys_adjtimex,compat_sys_adjtimex_wrapper) |
136 | SYSCALL(sys_mprotect,sys_mprotect,sys32_mprotect_wrapper) /* 125 */ | 136 | SYSCALL(sys_mprotect,sys_mprotect,compat_sys_mprotect) /* 125 */ |
137 | SYSCALL(sys_sigprocmask,sys_sigprocmask,compat_sys_sigprocmask) | 137 | SYSCALL(sys_sigprocmask,sys_sigprocmask,compat_sys_sigprocmask) |
138 | NI_SYSCALL /* old "create module" */ | 138 | NI_SYSCALL /* old "create module" */ |
139 | SYSCALL(sys_init_module,sys_init_module,sys_init_module_wrapper) | 139 | SYSCALL(sys_init_module,sys_init_module,compat_sys_init_module) |
140 | SYSCALL(sys_delete_module,sys_delete_module,sys_delete_module_wrapper) | 140 | SYSCALL(sys_delete_module,sys_delete_module,compat_sys_delete_module) |
141 | NI_SYSCALL /* 130: old get_kernel_syms */ | 141 | NI_SYSCALL /* 130: old get_kernel_syms */ |
142 | SYSCALL(sys_quotactl,sys_quotactl,sys32_quotactl_wrapper) | 142 | SYSCALL(sys_quotactl,sys_quotactl,compat_sys_quotactl) |
143 | SYSCALL(sys_getpgid,sys_getpgid,sys32_getpgid_wrapper) | 143 | SYSCALL(sys_getpgid,sys_getpgid,compat_sys_getpgid) |
144 | SYSCALL(sys_fchdir,sys_fchdir,sys32_fchdir_wrapper) | 144 | SYSCALL(sys_fchdir,sys_fchdir,compat_sys_fchdir) |
145 | SYSCALL(sys_bdflush,sys_bdflush,sys32_bdflush_wrapper) | 145 | SYSCALL(sys_bdflush,sys_bdflush,compat_sys_bdflush) |
146 | SYSCALL(sys_sysfs,sys_sysfs,sys32_sysfs_wrapper) /* 135 */ | 146 | SYSCALL(sys_sysfs,sys_sysfs,compat_sys_sysfs) /* 135 */ |
147 | SYSCALL(sys_personality,sys_s390_personality,sys32_personality_wrapper) | 147 | SYSCALL(sys_personality,sys_s390_personality,compat_sys_s390_personality) |
148 | NI_SYSCALL /* for afs_syscall */ | 148 | NI_SYSCALL /* for afs_syscall */ |
149 | SYSCALL(sys_setfsuid16,sys_ni_syscall,compat_sys_s390_setfsuid16) /* old setfsuid16 syscall */ | 149 | SYSCALL(sys_setfsuid16,sys_ni_syscall,compat_sys_s390_setfsuid16) /* old setfsuid16 syscall */ |
150 | SYSCALL(sys_setfsgid16,sys_ni_syscall,compat_sys_s390_setfsgid16) /* old setfsgid16 syscall */ | 150 | SYSCALL(sys_setfsgid16,sys_ni_syscall,compat_sys_s390_setfsgid16) /* old setfsgid16 syscall */ |
151 | SYSCALL(sys_llseek,sys_llseek,sys32_llseek_wrapper) /* 140 */ | 151 | SYSCALL(sys_llseek,sys_llseek,compat_sys_llseek) /* 140 */ |
152 | SYSCALL(sys_getdents,sys_getdents,sys32_getdents_wrapper) | 152 | SYSCALL(sys_getdents,sys_getdents,sys32_getdents_wrapper) |
153 | SYSCALL(sys_select,sys_select,compat_sys_select_wrapper) | 153 | SYSCALL(sys_select,sys_select,compat_sys_select_wrapper) |
154 | SYSCALL(sys_flock,sys_flock,sys32_flock_wrapper) | 154 | SYSCALL(sys_flock,sys_flock,sys32_flock_wrapper) |