aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorChris Metcalf <cmetcalf@tilera.com>2011-05-09 13:12:30 -0400
committerChris Metcalf <cmetcalf@tilera.com>2011-05-12 15:51:36 -0400
commitbe84cb43833ee40a42e08f5425d20310f16229c7 (patch)
tree0d5ddbaac88aa99ab5dbd0925ec525d399405fd5 /include
parentd2e48c1d4184a0baa4bf09920b63661e0b860b8c (diff)
compat: fixes to allow working with tile arch
The existing <asm-generic/unistd.h> mechanism doesn't really provide enough to create the 64-bit "compat" ABI properly in a generic way, since the compat ABI is a mix of things were you can re-use the 64-bit versions of syscalls and things where you need a compat wrapper. To provide this in the most direct way possible, I added two new macros to go along with the existing __SYSCALL and __SC_3264 macros: __SC_COMP and SC_COMP_3264. These macros take an additional argument, typically a "compat_sys_xxx" function, which is passed to __SYSCALL if you define __SYSCALL_COMPAT when including the header, resulting in a pointer to the compat function being placed in the generated syscall table. The change also adds some missing definitions to <linux/compat.h> so that it actually has declarations for all the compat syscalls, since the "[nr] = ##call" approach requires proper C declarations for all the functions included in the syscall table. Finally, compat.c defines compat_sys_sigpending() and compat_sys_sigprocmask() even if the underlying architecture doesn't request it, which tries to pull in undefined compat_old_sigset_t defines. We need to guard those compat syscall definitions with appropriate __ARCH_WANT_SYS_xxx ifdefs. Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
Diffstat (limited to 'include')
-rw-r--r--include/asm-generic/unistd.h221
-rw-r--r--include/linux/compat.h187
2 files changed, 311 insertions, 97 deletions
diff --git a/include/asm-generic/unistd.h b/include/asm-generic/unistd.h
index 07c40d5149de..33d524704883 100644
--- a/include/asm-generic/unistd.h
+++ b/include/asm-generic/unistd.h
@@ -24,16 +24,24 @@
24#define __SC_3264(_nr, _32, _64) __SYSCALL(_nr, _64) 24#define __SC_3264(_nr, _32, _64) __SYSCALL(_nr, _64)
25#endif 25#endif
26 26
27#ifdef __SYSCALL_COMPAT
28#define __SC_COMP(_nr, _sys, _comp) __SYSCALL(_nr, _comp)
29#define __SC_COMP_3264(_nr, _32, _64, _comp) __SYSCALL(_nr, _comp)
30#else
31#define __SC_COMP(_nr, _sys, _comp) __SYSCALL(_nr, _sys)
32#define __SC_COMP_3264(_nr, _32, _64, _comp) __SC_3264(_nr, _32, _64)
33#endif
34
27#define __NR_io_setup 0 35#define __NR_io_setup 0
28__SYSCALL(__NR_io_setup, sys_io_setup) 36__SC_COMP(__NR_io_setup, sys_io_setup, compat_sys_io_setup)
29#define __NR_io_destroy 1 37#define __NR_io_destroy 1
30__SYSCALL(__NR_io_destroy, sys_io_destroy) 38__SYSCALL(__NR_io_destroy, sys_io_destroy)
31#define __NR_io_submit 2 39#define __NR_io_submit 2
32__SYSCALL(__NR_io_submit, sys_io_submit) 40__SC_COMP(__NR_io_submit, sys_io_submit, compat_sys_io_submit)
33#define __NR_io_cancel 3 41#define __NR_io_cancel 3
34__SYSCALL(__NR_io_cancel, sys_io_cancel) 42__SYSCALL(__NR_io_cancel, sys_io_cancel)
35#define __NR_io_getevents 4 43#define __NR_io_getevents 4
36__SYSCALL(__NR_io_getevents, sys_io_getevents) 44__SC_COMP(__NR_io_getevents, sys_io_getevents, compat_sys_io_getevents)
37 45
38/* fs/xattr.c */ 46/* fs/xattr.c */
39#define __NR_setxattr 5 47#define __NR_setxattr 5
@@ -67,7 +75,7 @@ __SYSCALL(__NR_getcwd, sys_getcwd)
67 75
68/* fs/cookies.c */ 76/* fs/cookies.c */
69#define __NR_lookup_dcookie 18 77#define __NR_lookup_dcookie 18
70__SYSCALL(__NR_lookup_dcookie, sys_lookup_dcookie) 78__SC_COMP(__NR_lookup_dcookie, sys_lookup_dcookie, compat_sys_lookup_dcookie)
71 79
72/* fs/eventfd.c */ 80/* fs/eventfd.c */
73#define __NR_eventfd2 19 81#define __NR_eventfd2 19
@@ -79,7 +87,7 @@ __SYSCALL(__NR_epoll_create1, sys_epoll_create1)
79#define __NR_epoll_ctl 21 87#define __NR_epoll_ctl 21
80__SYSCALL(__NR_epoll_ctl, sys_epoll_ctl) 88__SYSCALL(__NR_epoll_ctl, sys_epoll_ctl)
81#define __NR_epoll_pwait 22 89#define __NR_epoll_pwait 22
82__SYSCALL(__NR_epoll_pwait, sys_epoll_pwait) 90__SC_COMP(__NR_epoll_pwait, sys_epoll_pwait, compat_sys_epoll_pwait)
83 91
84/* fs/fcntl.c */ 92/* fs/fcntl.c */
85#define __NR_dup 23 93#define __NR_dup 23
@@ -87,7 +95,7 @@ __SYSCALL(__NR_dup, sys_dup)
87#define __NR_dup3 24 95#define __NR_dup3 24
88__SYSCALL(__NR_dup3, sys_dup3) 96__SYSCALL(__NR_dup3, sys_dup3)
89#define __NR3264_fcntl 25 97#define __NR3264_fcntl 25
90__SC_3264(__NR3264_fcntl, sys_fcntl64, sys_fcntl) 98__SC_COMP_3264(__NR3264_fcntl, sys_fcntl64, sys_fcntl, compat_sys_fcntl64)
91 99
92/* fs/inotify_user.c */ 100/* fs/inotify_user.c */
93#define __NR_inotify_init1 26 101#define __NR_inotify_init1 26
@@ -99,7 +107,7 @@ __SYSCALL(__NR_inotify_rm_watch, sys_inotify_rm_watch)
99 107
100/* fs/ioctl.c */ 108/* fs/ioctl.c */
101#define __NR_ioctl 29 109#define __NR_ioctl 29
102__SYSCALL(__NR_ioctl, sys_ioctl) 110__SC_COMP(__NR_ioctl, sys_ioctl, compat_sys_ioctl)
103 111
104/* fs/ioprio.c */ 112/* fs/ioprio.c */
105#define __NR_ioprio_set 30 113#define __NR_ioprio_set 30
@@ -129,26 +137,30 @@ __SYSCALL(__NR_renameat, sys_renameat)
129#define __NR_umount2 39 137#define __NR_umount2 39
130__SYSCALL(__NR_umount2, sys_umount) 138__SYSCALL(__NR_umount2, sys_umount)
131#define __NR_mount 40 139#define __NR_mount 40
132__SYSCALL(__NR_mount, sys_mount) 140__SC_COMP(__NR_mount, sys_mount, compat_sys_mount)
133#define __NR_pivot_root 41 141#define __NR_pivot_root 41
134__SYSCALL(__NR_pivot_root, sys_pivot_root) 142__SYSCALL(__NR_pivot_root, sys_pivot_root)
135 143
136/* fs/nfsctl.c */ 144/* fs/nfsctl.c */
137#define __NR_nfsservctl 42 145#define __NR_nfsservctl 42
138__SYSCALL(__NR_nfsservctl, sys_nfsservctl) 146__SC_COMP(__NR_nfsservctl, sys_nfsservctl, compat_sys_nfsservctl)
139 147
140/* fs/open.c */ 148/* fs/open.c */
141#define __NR3264_statfs 43 149#define __NR3264_statfs 43
142__SC_3264(__NR3264_statfs, sys_statfs64, sys_statfs) 150__SC_COMP_3264(__NR3264_statfs, sys_statfs64, sys_statfs, \
151 compat_sys_statfs64)
143#define __NR3264_fstatfs 44 152#define __NR3264_fstatfs 44
144__SC_3264(__NR3264_fstatfs, sys_fstatfs64, sys_fstatfs) 153__SC_COMP_3264(__NR3264_fstatfs, sys_fstatfs64, sys_fstatfs, \
154 compat_sys_fstatfs64)
145#define __NR3264_truncate 45 155#define __NR3264_truncate 45
146__SC_3264(__NR3264_truncate, sys_truncate64, sys_truncate) 156__SC_COMP_3264(__NR3264_truncate, sys_truncate64, sys_truncate, \
157 compat_sys_truncate64)
147#define __NR3264_ftruncate 46 158#define __NR3264_ftruncate 46
148__SC_3264(__NR3264_ftruncate, sys_ftruncate64, sys_ftruncate) 159__SC_COMP_3264(__NR3264_ftruncate, sys_ftruncate64, sys_ftruncate, \
160 compat_sys_ftruncate64)
149 161
150#define __NR_fallocate 47 162#define __NR_fallocate 47
151__SYSCALL(__NR_fallocate, sys_fallocate) 163__SC_COMP(__NR_fallocate, sys_fallocate, compat_sys_fallocate)
152#define __NR_faccessat 48 164#define __NR_faccessat 48
153__SYSCALL(__NR_faccessat, sys_faccessat) 165__SYSCALL(__NR_faccessat, sys_faccessat)
154#define __NR_chdir 49 166#define __NR_chdir 49
@@ -166,7 +178,7 @@ __SYSCALL(__NR_fchownat, sys_fchownat)
166#define __NR_fchown 55 178#define __NR_fchown 55
167__SYSCALL(__NR_fchown, sys_fchown) 179__SYSCALL(__NR_fchown, sys_fchown)
168#define __NR_openat 56 180#define __NR_openat 56
169__SYSCALL(__NR_openat, sys_openat) 181__SC_COMP(__NR_openat, sys_openat, compat_sys_openat)
170#define __NR_close 57 182#define __NR_close 57
171__SYSCALL(__NR_close, sys_close) 183__SYSCALL(__NR_close, sys_close)
172#define __NR_vhangup 58 184#define __NR_vhangup 58
@@ -182,7 +194,7 @@ __SYSCALL(__NR_quotactl, sys_quotactl)
182 194
183/* fs/readdir.c */ 195/* fs/readdir.c */
184#define __NR_getdents64 61 196#define __NR_getdents64 61
185__SYSCALL(__NR_getdents64, sys_getdents64) 197__SC_COMP(__NR_getdents64, sys_getdents64, compat_sys_getdents64)
186 198
187/* fs/read_write.c */ 199/* fs/read_write.c */
188#define __NR3264_lseek 62 200#define __NR3264_lseek 62
@@ -192,17 +204,17 @@ __SYSCALL(__NR_read, sys_read)
192#define __NR_write 64 204#define __NR_write 64
193__SYSCALL(__NR_write, sys_write) 205__SYSCALL(__NR_write, sys_write)
194#define __NR_readv 65 206#define __NR_readv 65
195__SYSCALL(__NR_readv, sys_readv) 207__SC_COMP(__NR_readv, sys_readv, compat_sys_readv)
196#define __NR_writev 66 208#define __NR_writev 66
197__SYSCALL(__NR_writev, sys_writev) 209__SC_COMP(__NR_writev, sys_writev, compat_sys_writev)
198#define __NR_pread64 67 210#define __NR_pread64 67
199__SYSCALL(__NR_pread64, sys_pread64) 211__SC_COMP(__NR_pread64, sys_pread64, compat_sys_pread64)
200#define __NR_pwrite64 68 212#define __NR_pwrite64 68
201__SYSCALL(__NR_pwrite64, sys_pwrite64) 213__SC_COMP(__NR_pwrite64, sys_pwrite64, compat_sys_pwrite64)
202#define __NR_preadv 69 214#define __NR_preadv 69
203__SYSCALL(__NR_preadv, sys_preadv) 215__SC_COMP(__NR_preadv, sys_preadv, compat_sys_preadv)
204#define __NR_pwritev 70 216#define __NR_pwritev 70
205__SYSCALL(__NR_pwritev, sys_pwritev) 217__SC_COMP(__NR_pwritev, sys_pwritev, compat_sys_pwritev)
206 218
207/* fs/sendfile.c */ 219/* fs/sendfile.c */
208#define __NR3264_sendfile 71 220#define __NR3264_sendfile 71
@@ -210,17 +222,17 @@ __SC_3264(__NR3264_sendfile, sys_sendfile64, sys_sendfile)
210 222
211/* fs/select.c */ 223/* fs/select.c */
212#define __NR_pselect6 72 224#define __NR_pselect6 72
213__SYSCALL(__NR_pselect6, sys_pselect6) 225__SC_COMP(__NR_pselect6, sys_pselect6, compat_sys_pselect6)
214#define __NR_ppoll 73 226#define __NR_ppoll 73
215__SYSCALL(__NR_ppoll, sys_ppoll) 227__SC_COMP(__NR_ppoll, sys_ppoll, compat_sys_ppoll)
216 228
217/* fs/signalfd.c */ 229/* fs/signalfd.c */
218#define __NR_signalfd4 74 230#define __NR_signalfd4 74
219__SYSCALL(__NR_signalfd4, sys_signalfd4) 231__SC_COMP(__NR_signalfd4, sys_signalfd4, compat_sys_signalfd4)
220 232
221/* fs/splice.c */ 233/* fs/splice.c */
222#define __NR_vmsplice 75 234#define __NR_vmsplice 75
223__SYSCALL(__NR_vmsplice, sys_vmsplice) 235__SC_COMP(__NR_vmsplice, sys_vmsplice, compat_sys_vmsplice)
224#define __NR_splice 76 236#define __NR_splice 76
225__SYSCALL(__NR_splice, sys_splice) 237__SYSCALL(__NR_splice, sys_splice)
226#define __NR_tee 77 238#define __NR_tee 77
@@ -243,23 +255,27 @@ __SYSCALL(__NR_fsync, sys_fsync)
243__SYSCALL(__NR_fdatasync, sys_fdatasync) 255__SYSCALL(__NR_fdatasync, sys_fdatasync)
244#ifdef __ARCH_WANT_SYNC_FILE_RANGE2 256#ifdef __ARCH_WANT_SYNC_FILE_RANGE2
245#define __NR_sync_file_range2 84 257#define __NR_sync_file_range2 84
246__SYSCALL(__NR_sync_file_range2, sys_sync_file_range2) 258__SC_COMP(__NR_sync_file_range2, sys_sync_file_range2, \
259 compat_sys_sync_file_range2)
247#else 260#else
248#define __NR_sync_file_range 84 261#define __NR_sync_file_range 84
249__SYSCALL(__NR_sync_file_range, sys_sync_file_range) 262__SC_COMP(__NR_sync_file_range, sys_sync_file_range, \
263 compat_sys_sync_file_range)
250#endif 264#endif
251 265
252/* fs/timerfd.c */ 266/* fs/timerfd.c */
253#define __NR_timerfd_create 85 267#define __NR_timerfd_create 85
254__SYSCALL(__NR_timerfd_create, sys_timerfd_create) 268__SYSCALL(__NR_timerfd_create, sys_timerfd_create)
255#define __NR_timerfd_settime 86 269#define __NR_timerfd_settime 86
256__SYSCALL(__NR_timerfd_settime, sys_timerfd_settime) 270__SC_COMP(__NR_timerfd_settime, sys_timerfd_settime, \
271 compat_sys_timerfd_settime)
257#define __NR_timerfd_gettime 87 272#define __NR_timerfd_gettime 87
258__SYSCALL(__NR_timerfd_gettime, sys_timerfd_gettime) 273__SC_COMP(__NR_timerfd_gettime, sys_timerfd_gettime, \
274 compat_sys_timerfd_gettime)
259 275
260/* fs/utimes.c */ 276/* fs/utimes.c */
261#define __NR_utimensat 88 277#define __NR_utimensat 88
262__SYSCALL(__NR_utimensat, sys_utimensat) 278__SC_COMP(__NR_utimensat, sys_utimensat, compat_sys_utimensat)
263 279
264/* kernel/acct.c */ 280/* kernel/acct.c */
265#define __NR_acct 89 281#define __NR_acct 89
@@ -281,7 +297,7 @@ __SYSCALL(__NR_exit, sys_exit)
281#define __NR_exit_group 94 297#define __NR_exit_group 94
282__SYSCALL(__NR_exit_group, sys_exit_group) 298__SYSCALL(__NR_exit_group, sys_exit_group)
283#define __NR_waitid 95 299#define __NR_waitid 95
284__SYSCALL(__NR_waitid, sys_waitid) 300__SC_COMP(__NR_waitid, sys_waitid, compat_sys_waitid)
285 301
286/* kernel/fork.c */ 302/* kernel/fork.c */
287#define __NR_set_tid_address 96 303#define __NR_set_tid_address 96
@@ -291,25 +307,27 @@ __SYSCALL(__NR_unshare, sys_unshare)
291 307
292/* kernel/futex.c */ 308/* kernel/futex.c */
293#define __NR_futex 98 309#define __NR_futex 98
294__SYSCALL(__NR_futex, sys_futex) 310__SC_COMP(__NR_futex, sys_futex, compat_sys_futex)
295#define __NR_set_robust_list 99 311#define __NR_set_robust_list 99
296__SYSCALL(__NR_set_robust_list, sys_set_robust_list) 312__SC_COMP(__NR_set_robust_list, sys_set_robust_list, \
313 compat_sys_set_robust_list)
297#define __NR_get_robust_list 100 314#define __NR_get_robust_list 100
298__SYSCALL(__NR_get_robust_list, sys_get_robust_list) 315__SC_COMP(__NR_get_robust_list, sys_get_robust_list, \
316 compat_sys_get_robust_list)
299 317
300/* kernel/hrtimer.c */ 318/* kernel/hrtimer.c */
301#define __NR_nanosleep 101 319#define __NR_nanosleep 101
302__SYSCALL(__NR_nanosleep, sys_nanosleep) 320__SC_COMP(__NR_nanosleep, sys_nanosleep, compat_sys_nanosleep)
303 321
304/* kernel/itimer.c */ 322/* kernel/itimer.c */
305#define __NR_getitimer 102 323#define __NR_getitimer 102
306__SYSCALL(__NR_getitimer, sys_getitimer) 324__SC_COMP(__NR_getitimer, sys_getitimer, compat_sys_getitimer)
307#define __NR_setitimer 103 325#define __NR_setitimer 103
308__SYSCALL(__NR_setitimer, sys_setitimer) 326__SC_COMP(__NR_setitimer, sys_setitimer, compat_sys_setitimer)
309 327
310/* kernel/kexec.c */ 328/* kernel/kexec.c */
311#define __NR_kexec_load 104 329#define __NR_kexec_load 104
312__SYSCALL(__NR_kexec_load, sys_kexec_load) 330__SC_COMP(__NR_kexec_load, sys_kexec_load, compat_sys_kexec_load)
313 331
314/* kernel/module.c */ 332/* kernel/module.c */
315#define __NR_init_module 105 333#define __NR_init_module 105
@@ -319,23 +337,24 @@ __SYSCALL(__NR_delete_module, sys_delete_module)
319 337
320/* kernel/posix-timers.c */ 338/* kernel/posix-timers.c */
321#define __NR_timer_create 107 339#define __NR_timer_create 107
322__SYSCALL(__NR_timer_create, sys_timer_create) 340__SC_COMP(__NR_timer_create, sys_timer_create, compat_sys_timer_create)
323#define __NR_timer_gettime 108 341#define __NR_timer_gettime 108
324__SYSCALL(__NR_timer_gettime, sys_timer_gettime) 342__SC_COMP(__NR_timer_gettime, sys_timer_gettime, compat_sys_timer_gettime)
325#define __NR_timer_getoverrun 109 343#define __NR_timer_getoverrun 109
326__SYSCALL(__NR_timer_getoverrun, sys_timer_getoverrun) 344__SYSCALL(__NR_timer_getoverrun, sys_timer_getoverrun)
327#define __NR_timer_settime 110 345#define __NR_timer_settime 110
328__SYSCALL(__NR_timer_settime, sys_timer_settime) 346__SC_COMP(__NR_timer_settime, sys_timer_settime, compat_sys_timer_settime)
329#define __NR_timer_delete 111 347#define __NR_timer_delete 111
330__SYSCALL(__NR_timer_delete, sys_timer_delete) 348__SYSCALL(__NR_timer_delete, sys_timer_delete)
331#define __NR_clock_settime 112 349#define __NR_clock_settime 112
332__SYSCALL(__NR_clock_settime, sys_clock_settime) 350__SC_COMP(__NR_clock_settime, sys_clock_settime, compat_sys_clock_settime)
333#define __NR_clock_gettime 113 351#define __NR_clock_gettime 113
334__SYSCALL(__NR_clock_gettime, sys_clock_gettime) 352__SC_COMP(__NR_clock_gettime, sys_clock_gettime, compat_sys_clock_gettime)
335#define __NR_clock_getres 114 353#define __NR_clock_getres 114
336__SYSCALL(__NR_clock_getres, sys_clock_getres) 354__SC_COMP(__NR_clock_getres, sys_clock_getres, compat_sys_clock_getres)
337#define __NR_clock_nanosleep 115 355#define __NR_clock_nanosleep 115
338__SYSCALL(__NR_clock_nanosleep, sys_clock_nanosleep) 356__SC_COMP(__NR_clock_nanosleep, sys_clock_nanosleep, \
357 compat_sys_clock_nanosleep)
339 358
340/* kernel/printk.c */ 359/* kernel/printk.c */
341#define __NR_syslog 116 360#define __NR_syslog 116
@@ -355,9 +374,11 @@ __SYSCALL(__NR_sched_getscheduler, sys_sched_getscheduler)
355#define __NR_sched_getparam 121 374#define __NR_sched_getparam 121
356__SYSCALL(__NR_sched_getparam, sys_sched_getparam) 375__SYSCALL(__NR_sched_getparam, sys_sched_getparam)
357#define __NR_sched_setaffinity 122 376#define __NR_sched_setaffinity 122
358__SYSCALL(__NR_sched_setaffinity, sys_sched_setaffinity) 377__SC_COMP(__NR_sched_setaffinity, sys_sched_setaffinity, \
378 compat_sys_sched_setaffinity)
359#define __NR_sched_getaffinity 123 379#define __NR_sched_getaffinity 123
360__SYSCALL(__NR_sched_getaffinity, sys_sched_getaffinity) 380__SC_COMP(__NR_sched_getaffinity, sys_sched_getaffinity, \
381 compat_sys_sched_getaffinity)
361#define __NR_sched_yield 124 382#define __NR_sched_yield 124
362__SYSCALL(__NR_sched_yield, sys_sched_yield) 383__SYSCALL(__NR_sched_yield, sys_sched_yield)
363#define __NR_sched_get_priority_max 125 384#define __NR_sched_get_priority_max 125
@@ -365,7 +386,8 @@ __SYSCALL(__NR_sched_get_priority_max, sys_sched_get_priority_max)
365#define __NR_sched_get_priority_min 126 386#define __NR_sched_get_priority_min 126
366__SYSCALL(__NR_sched_get_priority_min, sys_sched_get_priority_min) 387__SYSCALL(__NR_sched_get_priority_min, sys_sched_get_priority_min)
367#define __NR_sched_rr_get_interval 127 388#define __NR_sched_rr_get_interval 127
368__SYSCALL(__NR_sched_rr_get_interval, sys_sched_rr_get_interval) 389__SC_COMP(__NR_sched_rr_get_interval, sys_sched_rr_get_interval, \
390 compat_sys_sched_rr_get_interval)
369 391
370/* kernel/signal.c */ 392/* kernel/signal.c */
371#define __NR_restart_syscall 128 393#define __NR_restart_syscall 128
@@ -377,21 +399,23 @@ __SYSCALL(__NR_tkill, sys_tkill)
377#define __NR_tgkill 131 399#define __NR_tgkill 131
378__SYSCALL(__NR_tgkill, sys_tgkill) 400__SYSCALL(__NR_tgkill, sys_tgkill)
379#define __NR_sigaltstack 132 401#define __NR_sigaltstack 132
380__SYSCALL(__NR_sigaltstack, sys_sigaltstack) 402__SC_COMP(__NR_sigaltstack, sys_sigaltstack, compat_sys_sigaltstack)
381#define __NR_rt_sigsuspend 133 403#define __NR_rt_sigsuspend 133
382__SYSCALL(__NR_rt_sigsuspend, sys_rt_sigsuspend) /* __ARCH_WANT_SYS_RT_SIGSUSPEND */ 404__SC_COMP(__NR_rt_sigsuspend, sys_rt_sigsuspend, compat_sys_rt_sigsuspend)
383#define __NR_rt_sigaction 134 405#define __NR_rt_sigaction 134
384__SYSCALL(__NR_rt_sigaction, sys_rt_sigaction) /* __ARCH_WANT_SYS_RT_SIGACTION */ 406__SC_COMP(__NR_rt_sigaction, sys_rt_sigaction, compat_sys_rt_sigaction)
385#define __NR_rt_sigprocmask 135 407#define __NR_rt_sigprocmask 135
386__SYSCALL(__NR_rt_sigprocmask, sys_rt_sigprocmask) 408__SYSCALL(__NR_rt_sigprocmask, sys_rt_sigprocmask)
387#define __NR_rt_sigpending 136 409#define __NR_rt_sigpending 136
388__SYSCALL(__NR_rt_sigpending, sys_rt_sigpending) 410__SYSCALL(__NR_rt_sigpending, sys_rt_sigpending)
389#define __NR_rt_sigtimedwait 137 411#define __NR_rt_sigtimedwait 137
390__SYSCALL(__NR_rt_sigtimedwait, sys_rt_sigtimedwait) 412__SC_COMP(__NR_rt_sigtimedwait, sys_rt_sigtimedwait, \
413 compat_sys_rt_sigtimedwait)
391#define __NR_rt_sigqueueinfo 138 414#define __NR_rt_sigqueueinfo 138
392__SYSCALL(__NR_rt_sigqueueinfo, sys_rt_sigqueueinfo) 415__SC_COMP(__NR_rt_sigqueueinfo, sys_rt_sigqueueinfo, \
416 compat_sys_rt_sigqueueinfo)
393#define __NR_rt_sigreturn 139 417#define __NR_rt_sigreturn 139
394__SYSCALL(__NR_rt_sigreturn, sys_rt_sigreturn) /* sys_rt_sigreturn_wrapper, */ 418__SC_COMP(__NR_rt_sigreturn, sys_rt_sigreturn, compat_sys_rt_sigreturn)
395 419
396/* kernel/sys.c */ 420/* kernel/sys.c */
397#define __NR_setpriority 140 421#define __NR_setpriority 140
@@ -421,7 +445,7 @@ __SYSCALL(__NR_setfsuid, sys_setfsuid)
421#define __NR_setfsgid 152 445#define __NR_setfsgid 152
422__SYSCALL(__NR_setfsgid, sys_setfsgid) 446__SYSCALL(__NR_setfsgid, sys_setfsgid)
423#define __NR_times 153 447#define __NR_times 153
424__SYSCALL(__NR_times, sys_times) 448__SC_COMP(__NR_times, sys_times, compat_sys_times)
425#define __NR_setpgid 154 449#define __NR_setpgid 154
426__SYSCALL(__NR_setpgid, sys_setpgid) 450__SYSCALL(__NR_setpgid, sys_setpgid)
427#define __NR_getpgid 155 451#define __NR_getpgid 155
@@ -441,11 +465,11 @@ __SYSCALL(__NR_sethostname, sys_sethostname)
441#define __NR_setdomainname 162 465#define __NR_setdomainname 162
442__SYSCALL(__NR_setdomainname, sys_setdomainname) 466__SYSCALL(__NR_setdomainname, sys_setdomainname)
443#define __NR_getrlimit 163 467#define __NR_getrlimit 163
444__SYSCALL(__NR_getrlimit, sys_getrlimit) 468__SC_COMP(__NR_getrlimit, sys_getrlimit, compat_sys_getrlimit)
445#define __NR_setrlimit 164 469#define __NR_setrlimit 164
446__SYSCALL(__NR_setrlimit, sys_setrlimit) 470__SC_COMP(__NR_setrlimit, sys_setrlimit, compat_sys_setrlimit)
447#define __NR_getrusage 165 471#define __NR_getrusage 165
448__SYSCALL(__NR_getrusage, sys_getrusage) 472__SC_COMP(__NR_getrusage, sys_getrusage, compat_sys_getrusage)
449#define __NR_umask 166 473#define __NR_umask 166
450__SYSCALL(__NR_umask, sys_umask) 474__SYSCALL(__NR_umask, sys_umask)
451#define __NR_prctl 167 475#define __NR_prctl 167
@@ -455,11 +479,11 @@ __SYSCALL(__NR_getcpu, sys_getcpu)
455 479
456/* kernel/time.c */ 480/* kernel/time.c */
457#define __NR_gettimeofday 169 481#define __NR_gettimeofday 169
458__SYSCALL(__NR_gettimeofday, sys_gettimeofday) 482__SC_COMP(__NR_gettimeofday, sys_gettimeofday, compat_sys_gettimeofday)
459#define __NR_settimeofday 170 483#define __NR_settimeofday 170
460__SYSCALL(__NR_settimeofday, sys_settimeofday) 484__SC_COMP(__NR_settimeofday, sys_settimeofday, compat_sys_settimeofday)
461#define __NR_adjtimex 171 485#define __NR_adjtimex 171
462__SYSCALL(__NR_adjtimex, sys_adjtimex) 486__SC_COMP(__NR_adjtimex, sys_adjtimex, compat_sys_adjtimex)
463 487
464/* kernel/timer.c */ 488/* kernel/timer.c */
465#define __NR_getpid 172 489#define __NR_getpid 172
@@ -477,39 +501,40 @@ __SYSCALL(__NR_getegid, sys_getegid)
477#define __NR_gettid 178 501#define __NR_gettid 178
478__SYSCALL(__NR_gettid, sys_gettid) 502__SYSCALL(__NR_gettid, sys_gettid)
479#define __NR_sysinfo 179 503#define __NR_sysinfo 179
480__SYSCALL(__NR_sysinfo, sys_sysinfo) 504__SC_COMP(__NR_sysinfo, sys_sysinfo, compat_sys_sysinfo)
481 505
482/* ipc/mqueue.c */ 506/* ipc/mqueue.c */
483#define __NR_mq_open 180 507#define __NR_mq_open 180
484__SYSCALL(__NR_mq_open, sys_mq_open) 508__SC_COMP(__NR_mq_open, sys_mq_open, compat_sys_mq_open)
485#define __NR_mq_unlink 181 509#define __NR_mq_unlink 181
486__SYSCALL(__NR_mq_unlink, sys_mq_unlink) 510__SYSCALL(__NR_mq_unlink, sys_mq_unlink)
487#define __NR_mq_timedsend 182 511#define __NR_mq_timedsend 182
488__SYSCALL(__NR_mq_timedsend, sys_mq_timedsend) 512__SC_COMP(__NR_mq_timedsend, sys_mq_timedsend, compat_sys_mq_timedsend)
489#define __NR_mq_timedreceive 183 513#define __NR_mq_timedreceive 183
490__SYSCALL(__NR_mq_timedreceive, sys_mq_timedreceive) 514__SC_COMP(__NR_mq_timedreceive, sys_mq_timedreceive, \
515 compat_sys_mq_timedreceive)
491#define __NR_mq_notify 184 516#define __NR_mq_notify 184
492__SYSCALL(__NR_mq_notify, sys_mq_notify) 517__SC_COMP(__NR_mq_notify, sys_mq_notify, compat_sys_mq_notify)
493#define __NR_mq_getsetattr 185 518#define __NR_mq_getsetattr 185
494__SYSCALL(__NR_mq_getsetattr, sys_mq_getsetattr) 519__SC_COMP(__NR_mq_getsetattr, sys_mq_getsetattr, compat_sys_mq_getsetattr)
495 520
496/* ipc/msg.c */ 521/* ipc/msg.c */
497#define __NR_msgget 186 522#define __NR_msgget 186
498__SYSCALL(__NR_msgget, sys_msgget) 523__SYSCALL(__NR_msgget, sys_msgget)
499#define __NR_msgctl 187 524#define __NR_msgctl 187
500__SYSCALL(__NR_msgctl, sys_msgctl) 525__SC_COMP(__NR_msgctl, sys_msgctl, compat_sys_msgctl)
501#define __NR_msgrcv 188 526#define __NR_msgrcv 188
502__SYSCALL(__NR_msgrcv, sys_msgrcv) 527__SC_COMP(__NR_msgrcv, sys_msgrcv, compat_sys_msgrcv)
503#define __NR_msgsnd 189 528#define __NR_msgsnd 189
504__SYSCALL(__NR_msgsnd, sys_msgsnd) 529__SC_COMP(__NR_msgsnd, sys_msgsnd, compat_sys_msgsnd)
505 530
506/* ipc/sem.c */ 531/* ipc/sem.c */
507#define __NR_semget 190 532#define __NR_semget 190
508__SYSCALL(__NR_semget, sys_semget) 533__SYSCALL(__NR_semget, sys_semget)
509#define __NR_semctl 191 534#define __NR_semctl 191
510__SYSCALL(__NR_semctl, sys_semctl) 535__SC_COMP(__NR_semctl, sys_semctl, compat_sys_semctl)
511#define __NR_semtimedop 192 536#define __NR_semtimedop 192
512__SYSCALL(__NR_semtimedop, sys_semtimedop) 537__SC_COMP(__NR_semtimedop, sys_semtimedop, compat_sys_semtimedop)
513#define __NR_semop 193 538#define __NR_semop 193
514__SYSCALL(__NR_semop, sys_semop) 539__SYSCALL(__NR_semop, sys_semop)
515 540
@@ -517,9 +542,9 @@ __SYSCALL(__NR_semop, sys_semop)
517#define __NR_shmget 194 542#define __NR_shmget 194
518__SYSCALL(__NR_shmget, sys_shmget) 543__SYSCALL(__NR_shmget, sys_shmget)
519#define __NR_shmctl 195 544#define __NR_shmctl 195
520__SYSCALL(__NR_shmctl, sys_shmctl) 545__SC_COMP(__NR_shmctl, sys_shmctl, compat_sys_shmctl)
521#define __NR_shmat 196 546#define __NR_shmat 196
522__SYSCALL(__NR_shmat, sys_shmat) 547__SC_COMP(__NR_shmat, sys_shmat, compat_sys_shmat)
523#define __NR_shmdt 197 548#define __NR_shmdt 197
524__SYSCALL(__NR_shmdt, sys_shmdt) 549__SYSCALL(__NR_shmdt, sys_shmdt)
525 550
@@ -543,21 +568,21 @@ __SYSCALL(__NR_getpeername, sys_getpeername)
543#define __NR_sendto 206 568#define __NR_sendto 206
544__SYSCALL(__NR_sendto, sys_sendto) 569__SYSCALL(__NR_sendto, sys_sendto)
545#define __NR_recvfrom 207 570#define __NR_recvfrom 207
546__SYSCALL(__NR_recvfrom, sys_recvfrom) 571__SC_COMP(__NR_recvfrom, sys_recvfrom, compat_sys_recvfrom)
547#define __NR_setsockopt 208 572#define __NR_setsockopt 208
548__SYSCALL(__NR_setsockopt, sys_setsockopt) 573__SC_COMP(__NR_setsockopt, sys_setsockopt, compat_sys_setsockopt)
549#define __NR_getsockopt 209 574#define __NR_getsockopt 209
550__SYSCALL(__NR_getsockopt, sys_getsockopt) 575__SC_COMP(__NR_getsockopt, sys_getsockopt, compat_sys_getsockopt)
551#define __NR_shutdown 210 576#define __NR_shutdown 210
552__SYSCALL(__NR_shutdown, sys_shutdown) 577__SYSCALL(__NR_shutdown, sys_shutdown)
553#define __NR_sendmsg 211 578#define __NR_sendmsg 211
554__SYSCALL(__NR_sendmsg, sys_sendmsg) 579__SC_COMP(__NR_sendmsg, sys_sendmsg, compat_sys_sendmsg)
555#define __NR_recvmsg 212 580#define __NR_recvmsg 212
556__SYSCALL(__NR_recvmsg, sys_recvmsg) 581__SC_COMP(__NR_recvmsg, sys_recvmsg, compat_sys_recvmsg)
557 582
558/* mm/filemap.c */ 583/* mm/filemap.c */
559#define __NR_readahead 213 584#define __NR_readahead 213
560__SYSCALL(__NR_readahead, sys_readahead) 585__SC_COMP(__NR_readahead, sys_readahead, compat_sys_readahead)
561 586
562/* mm/nommu.c, also with MMU */ 587/* mm/nommu.c, also with MMU */
563#define __NR_brk 214 588#define __NR_brk 214
@@ -573,19 +598,19 @@ __SYSCALL(__NR_add_key, sys_add_key)
573#define __NR_request_key 218 598#define __NR_request_key 218
574__SYSCALL(__NR_request_key, sys_request_key) 599__SYSCALL(__NR_request_key, sys_request_key)
575#define __NR_keyctl 219 600#define __NR_keyctl 219
576__SYSCALL(__NR_keyctl, sys_keyctl) 601__SC_COMP(__NR_keyctl, sys_keyctl, compat_sys_keyctl)
577 602
578/* arch/example/kernel/sys_example.c */ 603/* arch/example/kernel/sys_example.c */
579#define __NR_clone 220 604#define __NR_clone 220
580__SYSCALL(__NR_clone, sys_clone) /* .long sys_clone_wrapper */ 605__SYSCALL(__NR_clone, sys_clone)
581#define __NR_execve 221 606#define __NR_execve 221
582__SYSCALL(__NR_execve, sys_execve) /* .long sys_execve_wrapper */ 607__SC_COMP(__NR_execve, sys_execve, compat_sys_execve)
583 608
584#define __NR3264_mmap 222 609#define __NR3264_mmap 222
585__SC_3264(__NR3264_mmap, sys_mmap2, sys_mmap) 610__SC_3264(__NR3264_mmap, sys_mmap2, sys_mmap)
586/* mm/fadvise.c */ 611/* mm/fadvise.c */
587#define __NR3264_fadvise64 223 612#define __NR3264_fadvise64 223
588__SYSCALL(__NR3264_fadvise64, sys_fadvise64_64) 613__SC_COMP(__NR3264_fadvise64, sys_fadvise64_64, compat_sys_fadvise64_64)
589 614
590/* mm/, CONFIG_MMU only */ 615/* mm/, CONFIG_MMU only */
591#ifndef __ARCH_NOMMU 616#ifndef __ARCH_NOMMU
@@ -612,25 +637,26 @@ __SYSCALL(__NR_madvise, sys_madvise)
612#define __NR_remap_file_pages 234 637#define __NR_remap_file_pages 234
613__SYSCALL(__NR_remap_file_pages, sys_remap_file_pages) 638__SYSCALL(__NR_remap_file_pages, sys_remap_file_pages)
614#define __NR_mbind 235 639#define __NR_mbind 235
615__SYSCALL(__NR_mbind, sys_mbind) 640__SC_COMP(__NR_mbind, sys_mbind, compat_sys_mbind)
616#define __NR_get_mempolicy 236 641#define __NR_get_mempolicy 236
617__SYSCALL(__NR_get_mempolicy, sys_get_mempolicy) 642__SC_COMP(__NR_get_mempolicy, sys_get_mempolicy, compat_sys_get_mempolicy)
618#define __NR_set_mempolicy 237 643#define __NR_set_mempolicy 237
619__SYSCALL(__NR_set_mempolicy, sys_set_mempolicy) 644__SC_COMP(__NR_set_mempolicy, sys_set_mempolicy, compat_sys_set_mempolicy)
620#define __NR_migrate_pages 238 645#define __NR_migrate_pages 238
621__SYSCALL(__NR_migrate_pages, sys_migrate_pages) 646__SC_COMP(__NR_migrate_pages, sys_migrate_pages, compat_sys_migrate_pages)
622#define __NR_move_pages 239 647#define __NR_move_pages 239
623__SYSCALL(__NR_move_pages, sys_move_pages) 648__SC_COMP(__NR_move_pages, sys_move_pages, compat_sys_move_pages)
624#endif 649#endif
625 650
626#define __NR_rt_tgsigqueueinfo 240 651#define __NR_rt_tgsigqueueinfo 240
627__SYSCALL(__NR_rt_tgsigqueueinfo, sys_rt_tgsigqueueinfo) 652__SC_COMP(__NR_rt_tgsigqueueinfo, sys_rt_tgsigqueueinfo, \
653 compat_sys_rt_tgsigqueueinfo)
628#define __NR_perf_event_open 241 654#define __NR_perf_event_open 241
629__SYSCALL(__NR_perf_event_open, sys_perf_event_open) 655__SYSCALL(__NR_perf_event_open, sys_perf_event_open)
630#define __NR_accept4 242 656#define __NR_accept4 242
631__SYSCALL(__NR_accept4, sys_accept4) 657__SYSCALL(__NR_accept4, sys_accept4)
632#define __NR_recvmmsg 243 658#define __NR_recvmmsg 243
633__SYSCALL(__NR_recvmmsg, sys_recvmmsg) 659__SC_COMP(__NR_recvmmsg, sys_recvmmsg, compat_sys_recvmmsg)
634 660
635/* 661/*
636 * Architectures may provide up to 16 syscalls of their own 662 * Architectures may provide up to 16 syscalls of their own
@@ -639,19 +665,20 @@ __SYSCALL(__NR_recvmmsg, sys_recvmmsg)
639#define __NR_arch_specific_syscall 244 665#define __NR_arch_specific_syscall 244
640 666
641#define __NR_wait4 260 667#define __NR_wait4 260
642__SYSCALL(__NR_wait4, sys_wait4) 668__SC_COMP(__NR_wait4, sys_wait4, compat_sys_wait4)
643#define __NR_prlimit64 261 669#define __NR_prlimit64 261
644__SYSCALL(__NR_prlimit64, sys_prlimit64) 670__SYSCALL(__NR_prlimit64, sys_prlimit64)
645#define __NR_fanotify_init 262 671#define __NR_fanotify_init 262
646__SYSCALL(__NR_fanotify_init, sys_fanotify_init) 672__SYSCALL(__NR_fanotify_init, sys_fanotify_init)
647#define __NR_fanotify_mark 263 673#define __NR_fanotify_mark 263
648__SYSCALL(__NR_fanotify_mark, sys_fanotify_mark) 674__SYSCALL(__NR_fanotify_mark, sys_fanotify_mark)
649#define __NR_name_to_handle_at 264 675#define __NR_name_to_handle_at 264
650__SYSCALL(__NR_name_to_handle_at, sys_name_to_handle_at) 676__SYSCALL(__NR_name_to_handle_at, sys_name_to_handle_at)
651#define __NR_open_by_handle_at 265 677#define __NR_open_by_handle_at 265
652__SYSCALL(__NR_open_by_handle_at, sys_open_by_handle_at) 678__SC_COMP(__NR_open_by_handle_at, sys_open_by_handle_at, \
679 compat_sys_open_by_handle_at)
653#define __NR_clock_adjtime 266 680#define __NR_clock_adjtime 266
654__SYSCALL(__NR_clock_adjtime, sys_clock_adjtime) 681__SC_COMP(__NR_clock_adjtime, sys_clock_adjtime, compat_sys_clock_adjtime)
655#define __NR_syncfs 267 682#define __NR_syncfs 267
656__SYSCALL(__NR_syncfs, sys_syncfs) 683__SYSCALL(__NR_syncfs, sys_syncfs)
657 684
diff --git a/include/linux/compat.h b/include/linux/compat.h
index 5778b559d59c..e94184834b71 100644
--- a/include/linux/compat.h
+++ b/include/linux/compat.h
@@ -12,6 +12,7 @@
12#include <linux/sem.h> 12#include <linux/sem.h>
13#include <linux/socket.h> 13#include <linux/socket.h>
14#include <linux/if.h> 14#include <linux/if.h>
15#include <linux/fs.h>
15 16
16#include <asm/compat.h> 17#include <asm/compat.h>
17#include <asm/siginfo.h> 18#include <asm/siginfo.h>
@@ -209,6 +210,18 @@ struct compat_robust_list_head {
209 compat_uptr_t list_op_pending; 210 compat_uptr_t list_op_pending;
210}; 211};
211 212
213struct compat_statfs;
214struct compat_statfs64;
215struct compat_old_linux_dirent;
216struct compat_linux_dirent;
217struct linux_dirent64;
218struct compat_msghdr;
219struct compat_mmsghdr;
220struct compat_sysinfo;
221struct compat_sysctl_args;
222struct compat_kexec_segment;
223struct compat_mq_attr;
224
212extern void compat_exit_robust_list(struct task_struct *curr); 225extern void compat_exit_robust_list(struct task_struct *curr);
213 226
214asmlinkage long 227asmlinkage long
@@ -331,9 +344,13 @@ asmlinkage long compat_sys_epoll_pwait(int epfd,
331 const compat_sigset_t __user *sigmask, 344 const compat_sigset_t __user *sigmask,
332 compat_size_t sigsetsize); 345 compat_size_t sigsetsize);
333 346
347asmlinkage long compat_sys_utime(const char __user *filename,
348 struct compat_utimbuf __user *t);
334asmlinkage long compat_sys_utimensat(unsigned int dfd, const char __user *filename, 349asmlinkage long compat_sys_utimensat(unsigned int dfd, const char __user *filename,
335 struct compat_timespec __user *t, int flags); 350 struct compat_timespec __user *t, int flags);
336 351
352asmlinkage long compat_sys_time(compat_time_t __user *tloc);
353asmlinkage long compat_sys_stime(compat_time_t __user *tptr);
337asmlinkage long compat_sys_signalfd(int ufd, 354asmlinkage long compat_sys_signalfd(int ufd,
338 const compat_sigset_t __user *sigmask, 355 const compat_sigset_t __user *sigmask,
339 compat_size_t sigsetsize); 356 compat_size_t sigsetsize);
@@ -350,11 +367,181 @@ asmlinkage long compat_sys_move_pages(pid_t pid, unsigned long nr_page,
350 int flags); 367 int flags);
351asmlinkage long compat_sys_futimesat(unsigned int dfd, const char __user *filename, 368asmlinkage long compat_sys_futimesat(unsigned int dfd, const char __user *filename,
352 struct compat_timeval __user *t); 369 struct compat_timeval __user *t);
370asmlinkage long compat_sys_utimes(const char __user *filename,
371 struct compat_timeval __user *t);
372asmlinkage long compat_sys_newstat(const char __user * filename,
373 struct compat_stat __user *statbuf);
374asmlinkage long compat_sys_newlstat(const char __user * filename,
375 struct compat_stat __user *statbuf);
353asmlinkage long compat_sys_newfstatat(unsigned int dfd, const char __user * filename, 376asmlinkage long compat_sys_newfstatat(unsigned int dfd, const char __user * filename,
354 struct compat_stat __user *statbuf, 377 struct compat_stat __user *statbuf,
355 int flag); 378 int flag);
379asmlinkage long compat_sys_newfstat(unsigned int fd,
380 struct compat_stat __user * statbuf);
381asmlinkage long compat_sys_statfs(const char __user *pathname,
382 struct compat_statfs __user *buf);
383asmlinkage long compat_sys_fstatfs(unsigned int fd,
384 struct compat_statfs __user *buf);
385asmlinkage long compat_sys_statfs64(const char __user *pathname,
386 compat_size_t sz,
387 struct compat_statfs64 __user *buf);
388asmlinkage long compat_sys_fstatfs64(unsigned int fd, compat_size_t sz,
389 struct compat_statfs64 __user *buf);
390asmlinkage long compat_sys_fcntl64(unsigned int fd, unsigned int cmd,
391 unsigned long arg);
392asmlinkage long compat_sys_fcntl(unsigned int fd, unsigned int cmd,
393 unsigned long arg);
394asmlinkage long compat_sys_io_setup(unsigned nr_reqs, u32 __user *ctx32p);
395asmlinkage long compat_sys_io_getevents(aio_context_t ctx_id,
396 unsigned long min_nr,
397 unsigned long nr,
398 struct io_event __user *events,
399 struct compat_timespec __user *timeout);
400asmlinkage long compat_sys_io_submit(aio_context_t ctx_id, int nr,
401 u32 __user *iocb);
402asmlinkage long compat_sys_mount(const char __user * dev_name,
403 const char __user * dir_name,
404 const char __user * type, unsigned long flags,
405 const void __user * data);
406asmlinkage long compat_sys_old_readdir(unsigned int fd,
407 struct compat_old_linux_dirent __user *,
408 unsigned int count);
409asmlinkage long compat_sys_getdents(unsigned int fd,
410 struct compat_linux_dirent __user *dirent,
411 unsigned int count);
412asmlinkage long compat_sys_getdents64(unsigned int fd,
413 struct linux_dirent64 __user * dirent,
414 unsigned int count);
415asmlinkage long compat_sys_vmsplice(int fd, const struct compat_iovec __user *,
416 unsigned int nr_segs, unsigned int flags);
417asmlinkage long compat_sys_open(const char __user *filename, int flags,
418 int mode);
356asmlinkage long compat_sys_openat(unsigned int dfd, const char __user *filename, 419asmlinkage long compat_sys_openat(unsigned int dfd, const char __user *filename,
357 int flags, int mode); 420 int flags, int mode);
421asmlinkage long compat_sys_open_by_handle_at(int mountdirfd,
422 struct file_handle __user *handle,
423 int flags);
424asmlinkage long compat_sys_pselect6(int n, compat_ulong_t __user *inp,
425 compat_ulong_t __user *outp,
426 compat_ulong_t __user *exp,
427 struct compat_timespec __user *tsp,
428 void __user *sig);
429asmlinkage long compat_sys_ppoll(struct pollfd __user *ufds,
430 unsigned int nfds,
431 struct compat_timespec __user *tsp,
432 const compat_sigset_t __user *sigmask,
433 compat_size_t sigsetsize);
434#if (defined(CONFIG_NFSD) || defined(CONFIG_NFSD_MODULE)) && !defined(CONFIG_NFSD_DEPRECATED)
435union compat_nfsctl_res;
436struct compat_nfsctl_arg;
437asmlinkage long compat_sys_nfsservctl(int cmd,
438 struct compat_nfsctl_arg __user *arg,
439 union compat_nfsctl_res __user *res);
440#else
441long asmlinkage compat_sys_nfsservctl(int cmd, void *notused, void *notused2);
442#endif
443asmlinkage long compat_sys_signalfd4(int ufd,
444 const compat_sigset_t __user *sigmask,
445 compat_size_t sigsetsize, int flags);
446asmlinkage long compat_sys_get_mempolicy(int __user *policy,
447 compat_ulong_t __user *nmask,
448 compat_ulong_t maxnode,
449 compat_ulong_t addr,
450 compat_ulong_t flags);
451asmlinkage long compat_sys_set_mempolicy(int mode, compat_ulong_t __user *nmask,
452 compat_ulong_t maxnode);
453asmlinkage long compat_sys_mbind(compat_ulong_t start, compat_ulong_t len,
454 compat_ulong_t mode,
455 compat_ulong_t __user *nmask,
456 compat_ulong_t maxnode, compat_ulong_t flags);
457
458asmlinkage long compat_sys_setsockopt(int fd, int level, int optname,
459 char __user *optval, unsigned int optlen);
460asmlinkage long compat_sys_sendmsg(int fd, struct compat_msghdr __user *msg,
461 unsigned flags);
462asmlinkage long compat_sys_recvmsg(int fd, struct compat_msghdr __user *msg,
463 unsigned int flags);
464asmlinkage long compat_sys_recv(int fd, void __user *buf, size_t len,
465 unsigned flags);
466asmlinkage long compat_sys_recvfrom(int fd, void __user *buf, size_t len,
467 unsigned flags, struct sockaddr __user *addr,
468 int __user *addrlen);
469asmlinkage long compat_sys_recvmmsg(int fd, struct compat_mmsghdr __user *mmsg,
470 unsigned vlen, unsigned int flags,
471 struct compat_timespec __user *timeout);
472asmlinkage long compat_sys_nanosleep(struct compat_timespec __user *rqtp,
473 struct compat_timespec __user *rmtp);
474asmlinkage long compat_sys_getitimer(int which,
475 struct compat_itimerval __user *it);
476asmlinkage long compat_sys_setitimer(int which,
477 struct compat_itimerval __user *in,
478 struct compat_itimerval __user *out);
479asmlinkage long compat_sys_times(struct compat_tms __user *tbuf);
480asmlinkage long compat_sys_setrlimit(unsigned int resource,
481 struct compat_rlimit __user *rlim);
482asmlinkage long compat_sys_getrlimit (unsigned int resource,
483 struct compat_rlimit __user *rlim);
484asmlinkage long compat_sys_getrusage(int who, struct compat_rusage __user *ru);
485asmlinkage long compat_sys_sched_setaffinity(compat_pid_t pid,
486 unsigned int len,
487 compat_ulong_t __user *user_mask_ptr);
488asmlinkage long compat_sys_sched_getaffinity(compat_pid_t pid,
489 unsigned int len,
490 compat_ulong_t __user *user_mask_ptr);
491asmlinkage long compat_sys_timer_create(clockid_t which_clock,
492 struct compat_sigevent __user *timer_event_spec,
493 timer_t __user *created_timer_id);
494asmlinkage long compat_sys_timer_settime(timer_t timer_id, int flags,
495 struct compat_itimerspec __user *new,
496 struct compat_itimerspec __user *old);
497asmlinkage long compat_sys_timer_gettime(timer_t timer_id,
498 struct compat_itimerspec __user *setting);
499asmlinkage long compat_sys_clock_settime(clockid_t which_clock,
500 struct compat_timespec __user *tp);
501asmlinkage long compat_sys_clock_gettime(clockid_t which_clock,
502 struct compat_timespec __user *tp);
503asmlinkage long compat_sys_clock_adjtime(clockid_t which_clock,
504 struct compat_timex __user *tp);
505asmlinkage long compat_sys_clock_getres(clockid_t which_clock,
506 struct compat_timespec __user *tp);
507asmlinkage long compat_sys_clock_nanosleep(clockid_t which_clock, int flags,
508 struct compat_timespec __user *rqtp,
509 struct compat_timespec __user *rmtp);
510asmlinkage long compat_sys_rt_sigtimedwait (compat_sigset_t __user *uthese,
511 struct compat_siginfo __user *uinfo,
512 struct compat_timespec __user *uts, compat_size_t sigsetsize);
513asmlinkage long compat_sys_rt_sigsuspend(compat_sigset_t __user *unewset,
514 compat_size_t sigsetsize);
515asmlinkage long compat_sys_sysinfo(struct compat_sysinfo __user *info);
516asmlinkage long compat_sys_ioctl(unsigned int fd, unsigned int cmd,
517 unsigned long arg);
518asmlinkage long compat_sys_futex(u32 __user *uaddr, int op, u32 val,
519 struct compat_timespec __user *utime, u32 __user *uaddr2,
520 u32 val3);
521asmlinkage long compat_sys_getsockopt(int fd, int level, int optname,
522 char __user *optval, int __user *optlen);
523asmlinkage long compat_sys_kexec_load(unsigned long entry,
524 unsigned long nr_segments,
525 struct compat_kexec_segment __user *,
526 unsigned long flags);
527asmlinkage long compat_sys_mq_getsetattr(mqd_t mqdes,
528 const struct compat_mq_attr __user *u_mqstat,
529 struct compat_mq_attr __user *u_omqstat);
530asmlinkage long compat_sys_mq_notify(mqd_t mqdes,
531 const struct compat_sigevent __user *u_notification);
532asmlinkage long compat_sys_mq_open(const char __user *u_name,
533 int oflag, compat_mode_t mode,
534 struct compat_mq_attr __user *u_attr);
535asmlinkage long compat_sys_mq_timedsend(mqd_t mqdes,
536 const char __user *u_msg_ptr,
537 size_t msg_len, unsigned int msg_prio,
538 const struct compat_timespec __user *u_abs_timeout);
539asmlinkage ssize_t compat_sys_mq_timedreceive(mqd_t mqdes,
540 char __user *u_msg_ptr,
541 size_t msg_len, unsigned int __user *u_msg_prio,
542 const struct compat_timespec __user *u_abs_timeout);
543asmlinkage long compat_sys_socketcall(int call, u32 __user *args);
544asmlinkage long compat_sys_sysctl(struct compat_sysctl_args __user *args);
358 545
359extern ssize_t compat_rw_copy_check_uvector(int type, 546extern ssize_t compat_rw_copy_check_uvector(int type,
360 const struct compat_iovec __user *uvector, unsigned long nr_segs, 547 const struct compat_iovec __user *uvector, unsigned long nr_segs,