include/linux/compat.h: coding-style fixes
[linux-3.10.git] / include / linux / compat.h
1 #ifndef _LINUX_COMPAT_H
2 #define _LINUX_COMPAT_H
3 /*
4  * These are the type definitions for the architecture specific
5  * syscall compatibility layer.
6  */
7
8 #ifdef CONFIG_COMPAT
9
10 #include <linux/stat.h>
11 #include <linux/param.h>        /* for HZ */
12 #include <linux/sem.h>
13 #include <linux/socket.h>
14 #include <linux/if.h>
15 #include <linux/fs.h>
16
17 #include <asm/compat.h>
18 #include <asm/siginfo.h>
19 #include <asm/signal.h>
20
21 #define compat_jiffies_to_clock_t(x)    \
22                 (((unsigned long)(x) * COMPAT_USER_HZ) / HZ)
23
24 typedef __compat_uid32_t        compat_uid_t;
25 typedef __compat_gid32_t        compat_gid_t;
26
27 struct compat_sel_arg_struct;
28 struct rusage;
29
30 struct compat_itimerspec {
31         struct compat_timespec it_interval;
32         struct compat_timespec it_value;
33 };
34
35 struct compat_utimbuf {
36         compat_time_t           actime;
37         compat_time_t           modtime;
38 };
39
40 struct compat_itimerval {
41         struct compat_timeval   it_interval;
42         struct compat_timeval   it_value;
43 };
44
45 struct compat_tms {
46         compat_clock_t          tms_utime;
47         compat_clock_t          tms_stime;
48         compat_clock_t          tms_cutime;
49         compat_clock_t          tms_cstime;
50 };
51
52 struct compat_timex {
53         compat_uint_t modes;
54         compat_long_t offset;
55         compat_long_t freq;
56         compat_long_t maxerror;
57         compat_long_t esterror;
58         compat_int_t status;
59         compat_long_t constant;
60         compat_long_t precision;
61         compat_long_t tolerance;
62         struct compat_timeval time;
63         compat_long_t tick;
64         compat_long_t ppsfreq;
65         compat_long_t jitter;
66         compat_int_t shift;
67         compat_long_t stabil;
68         compat_long_t jitcnt;
69         compat_long_t calcnt;
70         compat_long_t errcnt;
71         compat_long_t stbcnt;
72         compat_int_t tai;
73
74         compat_int_t:32; compat_int_t:32; compat_int_t:32; compat_int_t:32;
75         compat_int_t:32; compat_int_t:32; compat_int_t:32; compat_int_t:32;
76         compat_int_t:32; compat_int_t:32; compat_int_t:32;
77 };
78
79 #define _COMPAT_NSIG_WORDS      (_COMPAT_NSIG / _COMPAT_NSIG_BPW)
80
81 typedef struct {
82         compat_sigset_word      sig[_COMPAT_NSIG_WORDS];
83 } compat_sigset_t;
84
85 extern int get_compat_timespec(struct timespec *,
86                                const struct compat_timespec __user *);
87 extern int put_compat_timespec(const struct timespec *,
88                                struct compat_timespec __user *);
89
90 struct compat_iovec {
91         compat_uptr_t   iov_base;
92         compat_size_t   iov_len;
93 };
94
95 struct compat_rlimit {
96         compat_ulong_t  rlim_cur;
97         compat_ulong_t  rlim_max;
98 };
99
100 struct compat_rusage {
101         struct compat_timeval ru_utime;
102         struct compat_timeval ru_stime;
103         compat_long_t   ru_maxrss;
104         compat_long_t   ru_ixrss;
105         compat_long_t   ru_idrss;
106         compat_long_t   ru_isrss;
107         compat_long_t   ru_minflt;
108         compat_long_t   ru_majflt;
109         compat_long_t   ru_nswap;
110         compat_long_t   ru_inblock;
111         compat_long_t   ru_oublock;
112         compat_long_t   ru_msgsnd;
113         compat_long_t   ru_msgrcv;
114         compat_long_t   ru_nsignals;
115         compat_long_t   ru_nvcsw;
116         compat_long_t   ru_nivcsw;
117 };
118
119 extern int put_compat_rusage(const struct rusage *,
120                              struct compat_rusage __user *);
121
122 struct compat_siginfo;
123
124 extern asmlinkage long compat_sys_waitid(int, compat_pid_t,
125                 struct compat_siginfo __user *, int,
126                 struct compat_rusage __user *);
127
128 struct compat_dirent {
129         u32             d_ino;
130         compat_off_t    d_off;
131         u16             d_reclen;
132         char            d_name[256];
133 };
134
135 struct compat_ustat {
136         compat_daddr_t          f_tfree;
137         compat_ino_t            f_tinode;
138         char                    f_fname[6];
139         char                    f_fpack[6];
140 };
141
142 typedef union compat_sigval {
143         compat_int_t    sival_int;
144         compat_uptr_t   sival_ptr;
145 } compat_sigval_t;
146
147 #define COMPAT_SIGEV_PAD_SIZE   ((SIGEV_MAX_SIZE/sizeof(int)) - 3)
148
149 typedef struct compat_sigevent {
150         compat_sigval_t sigev_value;
151         compat_int_t sigev_signo;
152         compat_int_t sigev_notify;
153         union {
154                 compat_int_t _pad[COMPAT_SIGEV_PAD_SIZE];
155                 compat_int_t _tid;
156
157                 struct {
158                         compat_uptr_t _function;
159                         compat_uptr_t _attribute;
160                 } _sigev_thread;
161         } _sigev_un;
162 } compat_sigevent_t;
163
164 struct compat_ifmap {
165         compat_ulong_t mem_start;
166         compat_ulong_t mem_end;
167         unsigned short base_addr;
168         unsigned char irq;
169         unsigned char dma;
170         unsigned char port;
171 };
172
173 struct compat_if_settings {
174         unsigned int type;      /* Type of physical device or protocol */
175         unsigned int size;      /* Size of the data allocated by the caller */
176         compat_uptr_t ifs_ifsu; /* union of pointers */
177 };
178
179 struct compat_ifreq {
180         union {
181                 char    ifrn_name[IFNAMSIZ];    /* if name, e.g. "en0" */
182         } ifr_ifrn;
183         union {
184                 struct  sockaddr ifru_addr;
185                 struct  sockaddr ifru_dstaddr;
186                 struct  sockaddr ifru_broadaddr;
187                 struct  sockaddr ifru_netmask;
188                 struct  sockaddr ifru_hwaddr;
189                 short   ifru_flags;
190                 compat_int_t    ifru_ivalue;
191                 compat_int_t    ifru_mtu;
192                 struct  compat_ifmap ifru_map;
193                 char    ifru_slave[IFNAMSIZ];   /* Just fits the size */
194                 char    ifru_newname[IFNAMSIZ];
195                 compat_caddr_t  ifru_data;
196                 struct  compat_if_settings ifru_settings;
197         } ifr_ifru;
198 };
199
200 struct compat_ifconf {
201         compat_int_t    ifc_len;                /* size of buffer */
202         compat_caddr_t  ifcbuf;
203 };
204
205 struct compat_robust_list {
206         compat_uptr_t                   next;
207 };
208
209 struct compat_robust_list_head {
210         struct compat_robust_list       list;
211         compat_long_t                   futex_offset;
212         compat_uptr_t                   list_op_pending;
213 };
214
215 struct compat_statfs;
216 struct compat_statfs64;
217 struct compat_old_linux_dirent;
218 struct compat_linux_dirent;
219 struct linux_dirent64;
220 struct compat_msghdr;
221 struct compat_mmsghdr;
222 struct compat_sysinfo;
223 struct compat_sysctl_args;
224 struct compat_kexec_segment;
225 struct compat_mq_attr;
226
227 extern void compat_exit_robust_list(struct task_struct *curr);
228
229 asmlinkage long
230 compat_sys_set_robust_list(struct compat_robust_list_head __user *head,
231                            compat_size_t len);
232 asmlinkage long
233 compat_sys_get_robust_list(int pid, compat_uptr_t __user *head_ptr,
234                            compat_size_t __user *len_ptr);
235
236 long compat_sys_semctl(int first, int second, int third, void __user *uptr);
237 long compat_sys_msgsnd(int first, int second, int third, void __user *uptr);
238 long compat_sys_msgrcv(int first, int second, int msgtyp, int third,
239                 int version, void __user *uptr);
240 long compat_sys_msgctl(int first, int second, void __user *uptr);
241 long compat_sys_shmat(int first, int second, compat_uptr_t third, int version,
242                 void __user *uptr);
243 long compat_sys_shmctl(int first, int second, void __user *uptr);
244 long compat_sys_semtimedop(int semid, struct sembuf __user *tsems,
245                 unsigned nsems, const struct compat_timespec __user *timeout);
246 asmlinkage long compat_sys_keyctl(u32 option,
247                               u32 arg2, u32 arg3, u32 arg4, u32 arg5);
248 asmlinkage long compat_sys_ustat(unsigned dev, struct compat_ustat __user *u32);
249
250 asmlinkage ssize_t compat_sys_readv(unsigned long fd,
251                 const struct compat_iovec __user *vec, unsigned long vlen);
252 asmlinkage ssize_t compat_sys_writev(unsigned long fd,
253                 const struct compat_iovec __user *vec, unsigned long vlen);
254 asmlinkage ssize_t compat_sys_preadv(unsigned long fd,
255                 const struct compat_iovec __user *vec,
256                 unsigned long vlen, u32 pos_low, u32 pos_high);
257 asmlinkage ssize_t compat_sys_pwritev(unsigned long fd,
258                 const struct compat_iovec __user *vec,
259                 unsigned long vlen, u32 pos_low, u32 pos_high);
260
261 int compat_do_execve(char *filename, compat_uptr_t __user *argv,
262                      compat_uptr_t __user *envp, struct pt_regs *regs);
263
264 asmlinkage long compat_sys_select(int n, compat_ulong_t __user *inp,
265                 compat_ulong_t __user *outp, compat_ulong_t __user *exp,
266                 struct compat_timeval __user *tvp);
267
268 asmlinkage long compat_sys_old_select(struct compat_sel_arg_struct __user *arg);
269
270 asmlinkage long compat_sys_wait4(compat_pid_t pid,
271                                  compat_uint_t __user *stat_addr, int options,
272                                  struct compat_rusage __user *ru);
273
274 #define BITS_PER_COMPAT_LONG    (8*sizeof(compat_long_t))
275
276 #define BITS_TO_COMPAT_LONGS(bits) \
277         (((bits)+BITS_PER_COMPAT_LONG-1)/BITS_PER_COMPAT_LONG)
278
279 long compat_get_bitmap(unsigned long *mask, const compat_ulong_t __user *umask,
280                        unsigned long bitmap_size);
281 long compat_put_bitmap(compat_ulong_t __user *umask, unsigned long *mask,
282                        unsigned long bitmap_size);
283 int copy_siginfo_from_user32(siginfo_t *to, struct compat_siginfo __user *from);
284 int copy_siginfo_to_user32(struct compat_siginfo __user *to, siginfo_t *from);
285 int get_compat_sigevent(struct sigevent *event,
286                 const struct compat_sigevent __user *u_event);
287 long compat_sys_rt_tgsigqueueinfo(compat_pid_t tgid, compat_pid_t pid, int sig,
288                                   struct compat_siginfo __user *uinfo);
289
290 static inline int compat_timeval_compare(struct compat_timeval *lhs,
291                                         struct compat_timeval *rhs)
292 {
293         if (lhs->tv_sec < rhs->tv_sec)
294                 return -1;
295         if (lhs->tv_sec > rhs->tv_sec)
296                 return 1;
297         return lhs->tv_usec - rhs->tv_usec;
298 }
299
300 static inline int compat_timespec_compare(struct compat_timespec *lhs,
301                                         struct compat_timespec *rhs)
302 {
303         if (lhs->tv_sec < rhs->tv_sec)
304                 return -1;
305         if (lhs->tv_sec > rhs->tv_sec)
306                 return 1;
307         return lhs->tv_nsec - rhs->tv_nsec;
308 }
309
310 extern int get_compat_itimerspec(struct itimerspec *dst,
311                                  const struct compat_itimerspec __user *src);
312 extern int put_compat_itimerspec(struct compat_itimerspec __user *dst,
313                                  const struct itimerspec *src);
314
315 asmlinkage long compat_sys_gettimeofday(struct compat_timeval __user *tv,
316                 struct timezone __user *tz);
317 asmlinkage long compat_sys_settimeofday(struct compat_timeval __user *tv,
318                 struct timezone __user *tz);
319
320 asmlinkage long compat_sys_adjtimex(struct compat_timex __user *utp);
321
322 extern int compat_printk(const char *fmt, ...);
323 extern void sigset_from_compat(sigset_t *set, compat_sigset_t *compat);
324
325 asmlinkage long compat_sys_migrate_pages(compat_pid_t pid,
326                 compat_ulong_t maxnode, const compat_ulong_t __user *old_nodes,
327                 const compat_ulong_t __user *new_nodes);
328
329 extern int compat_ptrace_request(struct task_struct *child,
330                                  compat_long_t request,
331                                  compat_ulong_t addr, compat_ulong_t data);
332
333 extern long compat_arch_ptrace(struct task_struct *child, compat_long_t request,
334                                compat_ulong_t addr, compat_ulong_t data);
335 asmlinkage long compat_sys_ptrace(compat_long_t request, compat_long_t pid,
336                                   compat_long_t addr, compat_long_t data);
337
338 /*
339  * epoll (fs/eventpoll.c) compat bits follow ...
340  */
341 struct epoll_event;
342 #define compat_epoll_event      epoll_event
343 asmlinkage long compat_sys_epoll_pwait(int epfd,
344                         struct compat_epoll_event __user *events,
345                         int maxevents, int timeout,
346                         const compat_sigset_t __user *sigmask,
347                         compat_size_t sigsetsize);
348
349 asmlinkage long compat_sys_utime(const char __user *filename,
350                                  struct compat_utimbuf __user *t);
351 asmlinkage long compat_sys_utimensat(unsigned int dfd,
352                                      const char __user *filename,
353                                      struct compat_timespec __user *t,
354                                      int flags);
355
356 asmlinkage long compat_sys_time(compat_time_t __user *tloc);
357 asmlinkage long compat_sys_stime(compat_time_t __user *tptr);
358 asmlinkage long compat_sys_signalfd(int ufd,
359                                     const compat_sigset_t __user *sigmask,
360                                     compat_size_t sigsetsize);
361 asmlinkage long compat_sys_timerfd_settime(int ufd, int flags,
362                                    const struct compat_itimerspec __user *utmr,
363                                    struct compat_itimerspec __user *otmr);
364 asmlinkage long compat_sys_timerfd_gettime(int ufd,
365                                    struct compat_itimerspec __user *otmr);
366
367 asmlinkage long compat_sys_move_pages(pid_t pid, unsigned long nr_page,
368                                       __u32 __user *pages,
369                                       const int __user *nodes,
370                                       int __user *status,
371                                       int flags);
372 asmlinkage long compat_sys_futimesat(unsigned int dfd,
373                                      const char __user *filename,
374                                      struct compat_timeval __user *t);
375 asmlinkage long compat_sys_utimes(const char __user *filename,
376                                   struct compat_timeval __user *t);
377 asmlinkage long compat_sys_newstat(const char __user *filename,
378                                    struct compat_stat __user *statbuf);
379 asmlinkage long compat_sys_newlstat(const char __user *filename,
380                                     struct compat_stat __user *statbuf);
381 asmlinkage long compat_sys_newfstatat(unsigned int dfd,
382                                       const char __user *filename,
383                                       struct compat_stat __user *statbuf,
384                                       int flag);
385 asmlinkage long compat_sys_newfstat(unsigned int fd,
386                                     struct compat_stat __user *statbuf);
387 asmlinkage long compat_sys_statfs(const char __user *pathname,
388                                   struct compat_statfs __user *buf);
389 asmlinkage long compat_sys_fstatfs(unsigned int fd,
390                                    struct compat_statfs __user *buf);
391 asmlinkage long compat_sys_statfs64(const char __user *pathname,
392                                     compat_size_t sz,
393                                     struct compat_statfs64 __user *buf);
394 asmlinkage long compat_sys_fstatfs64(unsigned int fd, compat_size_t sz,
395                                      struct compat_statfs64 __user *buf);
396 asmlinkage long compat_sys_fcntl64(unsigned int fd, unsigned int cmd,
397                                    unsigned long arg);
398 asmlinkage long compat_sys_fcntl(unsigned int fd, unsigned int cmd,
399                                  unsigned long arg);
400 asmlinkage long compat_sys_io_setup(unsigned nr_reqs, u32 __user *ctx32p);
401 asmlinkage long compat_sys_io_getevents(aio_context_t ctx_id,
402                                         unsigned long min_nr,
403                                         unsigned long nr,
404                                         struct io_event __user *events,
405                                         struct compat_timespec __user *timeout);
406 asmlinkage long compat_sys_io_submit(aio_context_t ctx_id, int nr,
407                                      u32 __user *iocb);
408 asmlinkage long compat_sys_mount(const char __user *dev_name,
409                                  const char __user *dir_name,
410                                  const char __user *type, unsigned long flags,
411                                  const void __user *data);
412 asmlinkage long compat_sys_old_readdir(unsigned int fd,
413                                        struct compat_old_linux_dirent __user *,
414                                        unsigned int count);
415 asmlinkage long compat_sys_getdents(unsigned int fd,
416                                     struct compat_linux_dirent __user *dirent,
417                                     unsigned int count);
418 asmlinkage long compat_sys_getdents64(unsigned int fd,
419                                       struct linux_dirent64 __user *dirent,
420                                       unsigned int count);
421 asmlinkage long compat_sys_vmsplice(int fd, const struct compat_iovec __user *,
422                                     unsigned int nr_segs, unsigned int flags);
423 asmlinkage long compat_sys_open(const char __user *filename, int flags,
424                                 int mode);
425 asmlinkage long compat_sys_openat(unsigned int dfd, const char __user *filename,
426                                   int flags, int mode);
427 asmlinkage long compat_sys_open_by_handle_at(int mountdirfd,
428                                              struct file_handle __user *handle,
429                                              int flags);
430 asmlinkage long compat_sys_pselect6(int n, compat_ulong_t __user *inp,
431                                     compat_ulong_t __user *outp,
432                                     compat_ulong_t __user *exp,
433                                     struct compat_timespec __user *tsp,
434                                     void __user *sig);
435 asmlinkage long compat_sys_ppoll(struct pollfd __user *ufds,
436                                  unsigned int nfds,
437                                  struct compat_timespec __user *tsp,
438                                  const compat_sigset_t __user *sigmask,
439                                  compat_size_t sigsetsize);
440 #if (defined(CONFIG_NFSD) || defined(CONFIG_NFSD_MODULE)) && \
441         !defined(CONFIG_NFSD_DEPRECATED)
442 union compat_nfsctl_res;
443 struct compat_nfsctl_arg;
444 asmlinkage long compat_sys_nfsservctl(int cmd,
445                                       struct compat_nfsctl_arg __user *arg,
446                                       union compat_nfsctl_res __user *res);
447 #else
448 asmlinkage long compat_sys_nfsservctl(int cmd, void *notused, void *notused2);
449 #endif
450 asmlinkage long compat_sys_signalfd4(int ufd,
451                                      const compat_sigset_t __user *sigmask,
452                                      compat_size_t sigsetsize, int flags);
453 asmlinkage long compat_sys_get_mempolicy(int __user *policy,
454                                          compat_ulong_t __user *nmask,
455                                          compat_ulong_t maxnode,
456                                          compat_ulong_t addr,
457                                          compat_ulong_t flags);
458 asmlinkage long compat_sys_set_mempolicy(int mode, compat_ulong_t __user *nmask,
459                                          compat_ulong_t maxnode);
460 asmlinkage long compat_sys_mbind(compat_ulong_t start, compat_ulong_t len,
461                                  compat_ulong_t mode,
462                                  compat_ulong_t __user *nmask,
463                                  compat_ulong_t maxnode, compat_ulong_t flags);
464
465 asmlinkage long compat_sys_setsockopt(int fd, int level, int optname,
466                                       char __user *optval, unsigned int optlen);
467 asmlinkage long compat_sys_sendmsg(int fd, struct compat_msghdr __user *msg,
468                                    unsigned flags);
469 asmlinkage long compat_sys_recvmsg(int fd, struct compat_msghdr __user *msg,
470                                    unsigned int flags);
471 asmlinkage long compat_sys_recv(int fd, void __user *buf, size_t len,
472                                 unsigned flags);
473 asmlinkage long compat_sys_recvfrom(int fd, void __user *buf, size_t len,
474                             unsigned flags, struct sockaddr __user *addr,
475                             int __user *addrlen);
476 asmlinkage long compat_sys_recvmmsg(int fd, struct compat_mmsghdr __user *mmsg,
477                                     unsigned vlen, unsigned int flags,
478                                     struct compat_timespec __user *timeout);
479 asmlinkage long compat_sys_nanosleep(struct compat_timespec __user *rqtp,
480                                      struct compat_timespec __user *rmtp);
481 asmlinkage long compat_sys_getitimer(int which,
482                                      struct compat_itimerval __user *it);
483 asmlinkage long compat_sys_setitimer(int which,
484                                      struct compat_itimerval __user *in,
485                                      struct compat_itimerval __user *out);
486 asmlinkage long compat_sys_times(struct compat_tms __user *tbuf);
487 asmlinkage long compat_sys_setrlimit(unsigned int resource,
488                                      struct compat_rlimit __user *rlim);
489 asmlinkage long compat_sys_getrlimit(unsigned int resource,
490                                      struct compat_rlimit __user *rlim);
491 asmlinkage long compat_sys_getrusage(int who, struct compat_rusage __user *ru);
492 asmlinkage long compat_sys_sched_setaffinity(compat_pid_t pid,
493                                      unsigned int len,
494                                      compat_ulong_t __user *user_mask_ptr);
495 asmlinkage long compat_sys_sched_getaffinity(compat_pid_t pid,
496                                      unsigned int len,
497                                      compat_ulong_t __user *user_mask_ptr);
498 asmlinkage long compat_sys_timer_create(clockid_t which_clock,
499                         struct compat_sigevent __user *timer_event_spec,
500                         timer_t __user *created_timer_id);
501 asmlinkage long compat_sys_timer_settime(timer_t timer_id, int flags,
502                                          struct compat_itimerspec __user *new,
503                                          struct compat_itimerspec __user *old);
504 asmlinkage long compat_sys_timer_gettime(timer_t timer_id,
505                                  struct compat_itimerspec __user *setting);
506 asmlinkage long compat_sys_clock_settime(clockid_t which_clock,
507                                          struct compat_timespec __user *tp);
508 asmlinkage long compat_sys_clock_gettime(clockid_t which_clock,
509                                          struct compat_timespec __user *tp);
510 asmlinkage long compat_sys_clock_adjtime(clockid_t which_clock,
511                                          struct compat_timex __user *tp);
512 asmlinkage long compat_sys_clock_getres(clockid_t which_clock,
513                                         struct compat_timespec __user *tp);
514 asmlinkage long compat_sys_clock_nanosleep(clockid_t which_clock, int flags,
515                                            struct compat_timespec __user *rqtp,
516                                            struct compat_timespec __user *rmtp);
517 asmlinkage long compat_sys_rt_sigtimedwait(compat_sigset_t __user *uthese,
518                 struct compat_siginfo __user *uinfo,
519                 struct compat_timespec __user *uts, compat_size_t sigsetsize);
520 asmlinkage long compat_sys_rt_sigsuspend(compat_sigset_t __user *unewset,
521                                          compat_size_t sigsetsize);
522 asmlinkage long compat_sys_sysinfo(struct compat_sysinfo __user *info);
523 asmlinkage long compat_sys_ioctl(unsigned int fd, unsigned int cmd,
524                                  unsigned long arg);
525 asmlinkage long compat_sys_futex(u32 __user *uaddr, int op, u32 val,
526                 struct compat_timespec __user *utime, u32 __user *uaddr2,
527                 u32 val3);
528 asmlinkage long compat_sys_getsockopt(int fd, int level, int optname,
529                                       char __user *optval, int __user *optlen);
530 asmlinkage long compat_sys_kexec_load(unsigned long entry,
531                                       unsigned long nr_segments,
532                                       struct compat_kexec_segment __user *,
533                                       unsigned long flags);
534 asmlinkage long compat_sys_mq_getsetattr(mqd_t mqdes,
535                         const struct compat_mq_attr __user *u_mqstat,
536                         struct compat_mq_attr __user *u_omqstat);
537 asmlinkage long compat_sys_mq_notify(mqd_t mqdes,
538                         const struct compat_sigevent __user *u_notification);
539 asmlinkage long compat_sys_mq_open(const char __user *u_name,
540                         int oflag, compat_mode_t mode,
541                         struct compat_mq_attr __user *u_attr);
542 asmlinkage long compat_sys_mq_timedsend(mqd_t mqdes,
543                         const char __user *u_msg_ptr,
544                         size_t msg_len, unsigned int msg_prio,
545                         const struct compat_timespec __user *u_abs_timeout);
546 asmlinkage ssize_t compat_sys_mq_timedreceive(mqd_t mqdes,
547                         char __user *u_msg_ptr,
548                         size_t msg_len, unsigned int __user *u_msg_prio,
549                         const struct compat_timespec __user *u_abs_timeout);
550 asmlinkage long compat_sys_socketcall(int call, u32 __user *args);
551 asmlinkage long compat_sys_sysctl(struct compat_sysctl_args __user *args);
552
553 extern ssize_t compat_rw_copy_check_uvector(int type,
554                 const struct compat_iovec __user *uvector,
555                 unsigned long nr_segs,
556                 unsigned long fast_segs, struct iovec *fast_pointer,
557                 struct iovec **ret_pointer);
558
559 extern void __user *compat_alloc_user_space(unsigned long len);
560
561 #endif /* CONFIG_COMPAT */
562 #endif /* _LINUX_COMPAT_H */