diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2014-02-27 08:20:53 -0500 |
---|---|---|
committer | Heiko Carstens <heiko.carstens@de.ibm.com> | 2014-03-04 03:05:40 -0500 |
commit | c355ce182a2e3f88d6382a9720be61369c38c5c7 (patch) | |
tree | 4cc1ef8a3e95a0c922a6297c1c5352e64b5ff5a0 /arch | |
parent | be06fbf816020a846991ef7f5489ac0027320ea3 (diff) |
s390/compat: convert system call wrappers to C part 04
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/s390/kernel/compat_wrap.c | 10 | ||||
-rw-r--r-- | arch/s390/kernel/compat_wrapper.S | 57 | ||||
-rw-r--r-- | arch/s390/kernel/syscalls.S | 20 |
3 files changed, 20 insertions, 67 deletions
diff --git a/arch/s390/kernel/compat_wrap.c b/arch/s390/kernel/compat_wrap.c index ac26ee715553..f2b85401a998 100644 --- a/arch/s390/kernel/compat_wrap.c +++ b/arch/s390/kernel/compat_wrap.c | |||
@@ -53,3 +53,13 @@ COMPAT_SYSCALL_WRAP2(symlink, const char __user *, old, const char __user *, new | |||
53 | COMPAT_SYSCALL_WRAP3(readlink, const char __user *, path, char __user *, buf, int, bufsiz); | 53 | COMPAT_SYSCALL_WRAP3(readlink, const char __user *, path, char __user *, buf, int, bufsiz); |
54 | COMPAT_SYSCALL_WRAP1(uselib, const char __user *, library); | 54 | COMPAT_SYSCALL_WRAP1(uselib, const char __user *, library); |
55 | COMPAT_SYSCALL_WRAP2(swapon, const char __user *, specialfile, int, swap_flags); | 55 | COMPAT_SYSCALL_WRAP2(swapon, const char __user *, specialfile, int, swap_flags); |
56 | COMPAT_SYSCALL_WRAP4(reboot, int, magic1, int, magic2, unsigned int, cmd, void __user *, arg); | ||
57 | COMPAT_SYSCALL_WRAP2(munmap, compat_ulong_t, addr, compat_size_t, len); | ||
58 | COMPAT_SYSCALL_WRAP2(fchmod, unsigned int, fd, umode_t, mode); | ||
59 | COMPAT_SYSCALL_WRAP2(getpriority, int, which, int, who); | ||
60 | COMPAT_SYSCALL_WRAP3(setpriority, int, which, int, who, int, niceval); | ||
61 | COMPAT_SYSCALL_WRAP3(syslog, int, type, char __user *, buf, int, len); | ||
62 | COMPAT_SYSCALL_WRAP1(swapoff, const char __user *, specialfile); | ||
63 | COMPAT_SYSCALL_WRAP1(fsync, unsigned int, fd); | ||
64 | COMPAT_SYSCALL_WRAP2(setdomainname, char __user *, name, int, len); | ||
65 | COMPAT_SYSCALL_WRAP1(newuname, struct new_utsname __user *, name); | ||
diff --git a/arch/s390/kernel/compat_wrapper.S b/arch/s390/kernel/compat_wrapper.S index 359751108b8b..3ea908f563f6 100644 --- a/arch/s390/kernel/compat_wrapper.S +++ b/arch/s390/kernel/compat_wrapper.S | |||
@@ -84,40 +84,12 @@ ENTRY(compat_sys_settimeofday_wrapper) | |||
84 | llgtr %r3,%r3 # struct timezone * | 84 | llgtr %r3,%r3 # struct timezone * |
85 | jg compat_sys_settimeofday # branch to system call | 85 | jg compat_sys_settimeofday # branch to system call |
86 | 86 | ||
87 | ENTRY(sys32_reboot_wrapper) | ||
88 | lgfr %r2,%r2 # int | ||
89 | lgfr %r3,%r3 # int | ||
90 | llgfr %r4,%r4 # unsigned int | ||
91 | llgtr %r5,%r5 # void * | ||
92 | jg sys_reboot # branch to system call | ||
93 | |||
94 | ENTRY(old32_readdir_wrapper) | 87 | ENTRY(old32_readdir_wrapper) |
95 | llgfr %r2,%r2 # unsigned int | 88 | llgfr %r2,%r2 # unsigned int |
96 | llgtr %r3,%r3 # void * | 89 | llgtr %r3,%r3 # void * |
97 | llgfr %r4,%r4 # unsigned int | 90 | llgfr %r4,%r4 # unsigned int |
98 | jg compat_sys_old_readdir # branch to system call | 91 | jg compat_sys_old_readdir # branch to system call |
99 | 92 | ||
100 | ENTRY(sys32_munmap_wrapper) | ||
101 | llgfr %r2,%r2 # unsigned long | ||
102 | llgfr %r3,%r3 # size_t | ||
103 | jg sys_munmap # branch to system call | ||
104 | |||
105 | ENTRY(sys32_fchmod_wrapper) | ||
106 | llgfr %r2,%r2 # unsigned int | ||
107 | llgfr %r3,%r3 # mode_t | ||
108 | jg sys_fchmod # branch to system call | ||
109 | |||
110 | ENTRY(sys32_getpriority_wrapper) | ||
111 | lgfr %r2,%r2 # int | ||
112 | lgfr %r3,%r3 # int | ||
113 | jg sys_getpriority # branch to system call | ||
114 | |||
115 | ENTRY(sys32_setpriority_wrapper) | ||
116 | lgfr %r2,%r2 # int | ||
117 | lgfr %r3,%r3 # int | ||
118 | lgfr %r4,%r4 # int | ||
119 | jg sys_setpriority # branch to system call | ||
120 | |||
121 | ENTRY(compat_sys_statfs_wrapper) | 93 | ENTRY(compat_sys_statfs_wrapper) |
122 | llgtr %r2,%r2 # char * | 94 | llgtr %r2,%r2 # char * |
123 | llgtr %r3,%r3 # struct compat_statfs * | 95 | llgtr %r3,%r3 # struct compat_statfs * |
@@ -133,12 +105,6 @@ ENTRY(compat_sys_socketcall_wrapper) | |||
133 | llgtr %r3,%r3 # u32 * | 105 | llgtr %r3,%r3 # u32 * |
134 | jg compat_sys_socketcall # branch to system call | 106 | jg compat_sys_socketcall # branch to system call |
135 | 107 | ||
136 | ENTRY(sys32_syslog_wrapper) | ||
137 | lgfr %r2,%r2 # int | ||
138 | llgtr %r3,%r3 # char * | ||
139 | lgfr %r4,%r4 # int | ||
140 | jg sys_syslog # branch to system call | ||
141 | |||
142 | ENTRY(compat_sys_newstat_wrapper) | 108 | ENTRY(compat_sys_newstat_wrapper) |
143 | llgtr %r2,%r2 # char * | 109 | llgtr %r2,%r2 # char * |
144 | llgtr %r3,%r3 # struct stat_emu31 * | 110 | llgtr %r3,%r3 # struct stat_emu31 * |
@@ -154,33 +120,10 @@ ENTRY(compat_sys_newfstat_wrapper) | |||
154 | llgtr %r3,%r3 # struct stat_emu31 * | 120 | llgtr %r3,%r3 # struct stat_emu31 * |
155 | jg compat_sys_newfstat # branch to system call | 121 | jg compat_sys_newfstat # branch to system call |
156 | 122 | ||
157 | #sys32_vhangup_wrapper # void | ||
158 | |||
159 | ENTRY(sys32_swapoff_wrapper) | ||
160 | llgtr %r2,%r2 # const char * | ||
161 | jg sys_swapoff # branch to system call | ||
162 | |||
163 | ENTRY(compat_sys_sysinfo_wrapper) | 123 | ENTRY(compat_sys_sysinfo_wrapper) |
164 | llgtr %r2,%r2 # struct sysinfo_emu31 * | 124 | llgtr %r2,%r2 # struct sysinfo_emu31 * |
165 | jg compat_sys_sysinfo # branch to system call | 125 | jg compat_sys_sysinfo # branch to system call |
166 | 126 | ||
167 | ENTRY(sys32_fsync_wrapper) | ||
168 | llgfr %r2,%r2 # unsigned int | ||
169 | jg sys_fsync # branch to system call | ||
170 | |||
171 | #sys32_sigreturn_wrapper # done in sigreturn_glue | ||
172 | |||
173 | #sys32_clone_wrapper # done in clone_glue | ||
174 | |||
175 | ENTRY(sys32_setdomainname_wrapper) | ||
176 | llgtr %r2,%r2 # char * | ||
177 | lgfr %r3,%r3 # int | ||
178 | jg sys_setdomainname # branch to system call | ||
179 | |||
180 | ENTRY(sys32_newuname_wrapper) | ||
181 | llgtr %r2,%r2 # struct new_utsname * | ||
182 | jg sys_newuname # branch to system call | ||
183 | |||
184 | ENTRY(compat_sys_adjtimex_wrapper) | 127 | ENTRY(compat_sys_adjtimex_wrapper) |
185 | llgtr %r2,%r2 # struct compat_timex * | 128 | llgtr %r2,%r2 # struct compat_timex * |
186 | jg compat_sys_adjtimex # branch to system call | 129 | jg compat_sys_adjtimex # branch to system call |
diff --git a/arch/s390/kernel/syscalls.S b/arch/s390/kernel/syscalls.S index 5bc24d9167dc..4cf5a52de2ba 100644 --- a/arch/s390/kernel/syscalls.S +++ b/arch/s390/kernel/syscalls.S | |||
@@ -96,22 +96,22 @@ NI_SYSCALL /* old lstat syscall */ | |||
96 | SYSCALL(sys_readlink,sys_readlink,compat_sys_readlink) /* 85 */ | 96 | SYSCALL(sys_readlink,sys_readlink,compat_sys_readlink) /* 85 */ |
97 | SYSCALL(sys_uselib,sys_uselib,compat_sys_uselib) | 97 | SYSCALL(sys_uselib,sys_uselib,compat_sys_uselib) |
98 | SYSCALL(sys_swapon,sys_swapon,compat_sys_swapon) | 98 | SYSCALL(sys_swapon,sys_swapon,compat_sys_swapon) |
99 | SYSCALL(sys_reboot,sys_reboot,sys32_reboot_wrapper) | 99 | SYSCALL(sys_reboot,sys_reboot,compat_sys_reboot) |
100 | SYSCALL(sys_ni_syscall,sys_ni_syscall,old32_readdir_wrapper) /* old readdir syscall */ | 100 | SYSCALL(sys_ni_syscall,sys_ni_syscall,old32_readdir_wrapper) /* old readdir syscall */ |
101 | SYSCALL(sys_old_mmap,sys_old_mmap,compat_sys_s390_old_mmap) /* 90 */ | 101 | SYSCALL(sys_old_mmap,sys_old_mmap,compat_sys_s390_old_mmap) /* 90 */ |
102 | SYSCALL(sys_munmap,sys_munmap,sys32_munmap_wrapper) | 102 | SYSCALL(sys_munmap,sys_munmap,compat_sys_munmap) |
103 | SYSCALL(sys_truncate,sys_truncate,compat_sys_truncate) | 103 | SYSCALL(sys_truncate,sys_truncate,compat_sys_truncate) |
104 | SYSCALL(sys_ftruncate,sys_ftruncate,compat_sys_ftruncate) | 104 | SYSCALL(sys_ftruncate,sys_ftruncate,compat_sys_ftruncate) |
105 | SYSCALL(sys_fchmod,sys_fchmod,sys32_fchmod_wrapper) | 105 | SYSCALL(sys_fchmod,sys_fchmod,compat_sys_fchmod) |
106 | SYSCALL(sys_fchown16,sys_ni_syscall,compat_sys_s390_fchown16) /* 95 old fchown16 syscall*/ | 106 | SYSCALL(sys_fchown16,sys_ni_syscall,compat_sys_s390_fchown16) /* 95 old fchown16 syscall*/ |
107 | SYSCALL(sys_getpriority,sys_getpriority,sys32_getpriority_wrapper) | 107 | SYSCALL(sys_getpriority,sys_getpriority,compat_sys_getpriority) |
108 | SYSCALL(sys_setpriority,sys_setpriority,sys32_setpriority_wrapper) | 108 | SYSCALL(sys_setpriority,sys_setpriority,compat_sys_setpriority) |
109 | NI_SYSCALL /* old profil syscall */ | 109 | NI_SYSCALL /* old profil syscall */ |
110 | SYSCALL(sys_statfs,sys_statfs,compat_sys_statfs_wrapper) | 110 | SYSCALL(sys_statfs,sys_statfs,compat_sys_statfs_wrapper) |
111 | SYSCALL(sys_fstatfs,sys_fstatfs,compat_sys_fstatfs_wrapper) /* 100 */ | 111 | SYSCALL(sys_fstatfs,sys_fstatfs,compat_sys_fstatfs_wrapper) /* 100 */ |
112 | NI_SYSCALL /* ioperm for i386 */ | 112 | NI_SYSCALL /* ioperm for i386 */ |
113 | SYSCALL(sys_socketcall,sys_socketcall,compat_sys_socketcall_wrapper) | 113 | SYSCALL(sys_socketcall,sys_socketcall,compat_sys_socketcall_wrapper) |
114 | SYSCALL(sys_syslog,sys_syslog,sys32_syslog_wrapper) | 114 | SYSCALL(sys_syslog,sys_syslog,compat_sys_syslog) |
115 | SYSCALL(sys_setitimer,sys_setitimer,compat_sys_setitimer) | 115 | SYSCALL(sys_setitimer,sys_setitimer,compat_sys_setitimer) |
116 | SYSCALL(sys_getitimer,sys_getitimer,compat_sys_getitimer) /* 105 */ | 116 | SYSCALL(sys_getitimer,sys_getitimer,compat_sys_getitimer) /* 105 */ |
117 | SYSCALL(sys_newstat,sys_newstat,compat_sys_newstat_wrapper) | 117 | SYSCALL(sys_newstat,sys_newstat,compat_sys_newstat_wrapper) |
@@ -123,14 +123,14 @@ SYSCALL(sys_vhangup,sys_vhangup,sys_vhangup) | |||
123 | NI_SYSCALL /* old "idle" system call */ | 123 | NI_SYSCALL /* old "idle" system call */ |
124 | NI_SYSCALL /* vm86old for i386 */ | 124 | NI_SYSCALL /* vm86old for i386 */ |
125 | SYSCALL(sys_wait4,sys_wait4,compat_sys_wait4) | 125 | SYSCALL(sys_wait4,sys_wait4,compat_sys_wait4) |
126 | SYSCALL(sys_swapoff,sys_swapoff,sys32_swapoff_wrapper) /* 115 */ | 126 | SYSCALL(sys_swapoff,sys_swapoff,compat_sys_swapoff) /* 115 */ |
127 | SYSCALL(sys_sysinfo,sys_sysinfo,compat_sys_sysinfo_wrapper) | 127 | SYSCALL(sys_sysinfo,sys_sysinfo,compat_sys_sysinfo_wrapper) |
128 | SYSCALL(sys_s390_ipc,sys_s390_ipc,compat_sys_s390_ipc) | 128 | SYSCALL(sys_s390_ipc,sys_s390_ipc,compat_sys_s390_ipc) |
129 | SYSCALL(sys_fsync,sys_fsync,sys32_fsync_wrapper) | 129 | SYSCALL(sys_fsync,sys_fsync,compat_sys_fsync) |
130 | SYSCALL(sys_sigreturn,sys_sigreturn,sys32_sigreturn) | 130 | SYSCALL(sys_sigreturn,sys_sigreturn,sys32_sigreturn) |
131 | SYSCALL(sys_clone,sys_clone,sys_clone_wrapper) /* 120 */ | 131 | SYSCALL(sys_clone,sys_clone,sys_clone_wrapper) /* 120 */ |
132 | SYSCALL(sys_setdomainname,sys_setdomainname,sys32_setdomainname_wrapper) | 132 | SYSCALL(sys_setdomainname,sys_setdomainname,compat_sys_setdomainname) |
133 | SYSCALL(sys_newuname,sys_newuname,sys32_newuname_wrapper) | 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,sys32_mprotect_wrapper) /* 125 */ |