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