shim_table.h 41 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850
  1. /* -*- mode:c; c-file-style:"k&r"; c-basic-offset: 4; tab-width:4; indent-tabs-mode:nil; mode:auto-fill; fill-column:78; -*- */
  2. /* vim: set ts=4 sw=4 et tw=78 fo=cqt wm=0: */
  3. #ifndef _SHIM_TABLE_H_
  4. #define _SHIM_TABLE_H_
  5. #include <shim_types.h>
  6. #include <shim_unistd.h>
  7. #ifdef IN_SHIM
  8. long __shim_read (long, long , long);
  9. long __shim_write (long, long, long);
  10. long __shim_open (long, long , long);
  11. long __shim_close (long);
  12. long __shim_stat (long, long);
  13. long __shim_fstat (long, long);
  14. long __shim_lstat (long, long);
  15. long __shim_poll (long, long, long);
  16. long __shim_lseek (long, long, long);
  17. long __shim_mmap (long, long, long, long, long, long);
  18. long __shim_mprotect (long, long, long);
  19. long __shim_munmap (long, long);
  20. long __shim_brk (long);
  21. long __shim_rt_sigaction (long, long, long);
  22. long __shim_rt_sigprocmask (long, long, long);
  23. long __shim_rt_sigreturn (long);
  24. long __shim_ioctl (long, long, long);
  25. long __shim_pread64 (long, long, long, long);
  26. long __shim_pwrite64 (long, long, long, long);
  27. long __shim_readv (long, long, long);
  28. long __shim_writev (long, long, long);
  29. long __shim_access (long, long);
  30. long __shim_pipe (long);
  31. long __shim_select (long, long, long, long, long);
  32. long __shim_sched_yield (void);
  33. long __shim_mremap (long, long, long, long, long);
  34. long __shim_msync (long, long, long);
  35. long __shim_mincore (long, long, long);
  36. long __shim_madvise (long, long, long);
  37. long __shim_shmget (long, long, long);
  38. long __shim_shmat (long, long, long);
  39. long __shim_shmctl (long, long, long);
  40. long __shim_dup (long);
  41. long __shim_dup2 (long, long);
  42. long __shim_pause (void);
  43. long __shim_nanosleep (long, long);
  44. long __shim_getitimer (long, long);
  45. long __shim_alarm (long);
  46. long __shim_setitimer (long, long, long);
  47. long __shim_getpid (void);
  48. long __shim_sendfile (long, long, long, long);
  49. long __shim_socket (long, long, long);
  50. long __shim_connect (long, long, long);
  51. long __shim_accept (long, long, long);
  52. long __shim_sendto (long, long, long, long, long, long);
  53. long __shim_recvfrom (long, long, long, long, long, long);
  54. long __shim_sendmsg (long, long, long);
  55. long __shim_recvmsg (long, long, long);
  56. long __shim_shutdown (long, long);
  57. long __shim_bind (long, long, long);
  58. long __shim_listen (long, long);
  59. long __shim_getsockname (long, long, long);
  60. long __shim_getpeername (long, long, long);
  61. long __shim_socketpair (long, long, long, long);
  62. long __shim_setsockopt (long, long, long, long, long);
  63. long __shim_getsockopt (long, long, long, long, long);
  64. long __shim_clone (long, long, long, long, long);
  65. long __shim_fork (void);
  66. long __shim_vfork (void);
  67. long __shim_execve (long, long, long);
  68. long __shim_exit (long);
  69. long __shim_wait4 (long, long, long, long);
  70. long __shim_kill (long, long);
  71. long __shim_uname (long);
  72. long __shim_semget (long, long, long);
  73. long __shim_semop (long, long, long);
  74. long __shim_semctl (long, long, long, long);
  75. long __shim_shmdt (long);
  76. long __shim_msgget (long, long);
  77. long __shim_msgsnd (long, long, long, long);
  78. long __shim_msgrcv (long, long, long, long, long);
  79. long __shim_msgctl (long, long, long);
  80. long __shim_fcntl (long, long, long);
  81. long __shim_flock (long, long);
  82. long __shim_fsync (long);
  83. long __shim_fdatasync (long);
  84. long __shim_truncate (long, long);
  85. long __shim_ftruncate (long, long);
  86. long __shim_getdents (long, long, long);
  87. long __shim_getcwd (long, long);
  88. long __shim_chdir (long);
  89. long __shim_fchdir (long);
  90. long __shim_rename (long, long);
  91. long __shim_mkdir (long, long);
  92. long __shim_rmdir (long);
  93. long __shim_creat (long, long);
  94. long __shim_link (long, long);
  95. long __shim_unlink (long);
  96. long __shim_symlink (long, long);
  97. long __shim_readlink (long, long, long);
  98. long __shim_chmod (long, long);
  99. long __shim_fchmod (long, long);
  100. long __shim_chown (long, long, long);
  101. long __shim_fchown (long, long, long);
  102. long __shim_lchown (long, long, long);
  103. long __shim_umask (long);
  104. long __shim_gettimeofday (long, long);
  105. long __shim_getrlimit (long, long);
  106. long __shim_getrusage (long, long);
  107. long __shim_sysinfo (long);
  108. long __shim_times (long);
  109. long __shim_ptrace (long, long, long, long);
  110. long __shim_getuid (void);
  111. long __shim_syslog (long, long, long);
  112. long __shim_getgid (void);
  113. long __shim_setuid (long);
  114. long __shim_setgid (long);
  115. long __shim_geteuid (void);
  116. long __shim_getegid (void);
  117. long __shim_setpgid (long, long);
  118. long __shim_getppid (void);
  119. long __shim_getpgrp (void);
  120. long __shim_setsid (void);
  121. long __shim_setreuid (long, long);
  122. long __shim_setregid (long, long);
  123. long __shim_getgroups (long, long);
  124. long __shim_setgroups (long, long);
  125. long __shim_setresuid (long, long, long);
  126. long __shim_getresuid (long, long, long);
  127. long __shim_setresgid (long, long, long);
  128. long __shim_getresgid (long, long, long);
  129. long __shim_getpgid (long);
  130. long __shim_setfsuid (long);
  131. long __shim_setfsgid (long);
  132. long __shim_getsid (long);
  133. long __shim_capget (long, long);
  134. long __shim_capset (long, long);
  135. long __shim_rt_sigpending (long, long);
  136. long __shim_rt_sigtimedwait (long, long, long, long);
  137. long __shim_rt_sigqueueinfo (long, long, long);
  138. long __shim_rt_sigsuspend (long);
  139. long __shim_sigaltstack (long, long);
  140. long __shim_utime (long, long);
  141. long __shim_mknod (long, long, long);
  142. long __shim_uselib (long);
  143. long __shim_personality (long);
  144. long __shim_ustat (long, long);
  145. long __shim_statfs (long, long);
  146. long __shim_fstatfs (long, long);
  147. long __shim_sysfs (long, long, long);
  148. long __shim_getpriority (long, long);
  149. long __shim_setpriority (long, long, long);
  150. long __shim_sched_setparam (long, long);
  151. long __shim_sched_getparam (long, long);
  152. long __shim_sched_setscheduler (long, long, long);
  153. long __shim_sched_getscheduler (long);
  154. long __shim_sched_get_priority_max (long);
  155. long __shim_sched_get_priority_min (long);
  156. long __shim_sched_rr_get_interval (long, long);
  157. long __shim_mlock (long, long);
  158. long __shim_munlock (long, long);
  159. long __shim_mlockall (long);
  160. long __shim_munlockall (void);
  161. long __shim_vhangup (void);
  162. long __shim_modify_ldt (long, long, long);
  163. long __shim_pivot_root (long, long);
  164. long __shim__sysctl (long);
  165. long __shim_prctl (long, long, long, long, long);
  166. long __shim_arch_prctl (long, long);
  167. long __shim_adjtimex (long);
  168. long __shim_setrlimit (long, long);
  169. long __shim_chroot (long);
  170. long __shim_sync (void);
  171. long __shim_acct (long);
  172. long __shim_settimeofday (long, long);
  173. long __shim_mount (long, long, long, long, long);
  174. long __shim_umount2 (long, long);
  175. long __shim_swapon (long, long);
  176. long __shim_swapoff (long);
  177. long __shim_reboot (long, long, long, long);
  178. long __shim_sethostname (long, long);
  179. long __shim_setdomainname (long, long);
  180. long __shim_iopl (long);
  181. long __shim_ioperm (long, long, long);
  182. long __shim_create_module (long, long);
  183. long __shim_init_module (long, long, long);
  184. long __shim_delete_module (long, long);
  185. long __shim_get_kernel_syms (long);
  186. long __shim_query_module (long, long, long, long, long);
  187. long __shim_quotactl (long, long, long, long);
  188. long __shim_nfsservctl (long, long, long);
  189. long __shim_gettid (void);
  190. long __shim_readahead (long, long, long);
  191. long __shim_setxattr (long, long, long, long, long);
  192. long __shim_lsetxattr (long, long, long, long, long);
  193. long __shim_fsetxattr (long, long, long, long, long);
  194. long __shim_getxattr (long, long, long, long);
  195. long __shim_lgetxattr (long, long, long, long);
  196. long __shim_fgetxattr (long, long, long, long);
  197. long __shim_listxattr (long, long, long);
  198. long __shim_llistxattr (long, long, long);
  199. long __shim_flistxattr (long, long, long);
  200. long __shim_removexattr (long, long);
  201. long __shim_lremovexattr (long, long);
  202. long __shim_fremovexattr (long, long);
  203. long __shim_tkill (long, long);
  204. long __shim_time (long);
  205. long __shim_futex (long, long, long, long, long, long);
  206. long __shim_sched_setaffinity (long, long, long);
  207. long __shim_sched_getaffinity (long, long, long);
  208. long __shim_set_thread_area (long);
  209. long __shim_io_setup (long, long);
  210. long __shim_io_destroy (long);
  211. long __shim_io_getevents (long, long, long, long, long);
  212. long __shim_io_submit (long, long, long);
  213. long __shim_io_cancel (long, long, long);
  214. long __shim_get_thread_area (long);
  215. long __shim_lookup_dcookie (long, long, long);
  216. long __shim_epoll_create (long);
  217. long __shim_remap_file_pages (long, long, long, long, long);
  218. long __shim_getdents64 (long, long, long);
  219. long __shim_set_tid_address (long);
  220. long __shim_restart_syscall (void);
  221. long __shim_semtimedop (long, long, long, long);
  222. long __shim_fadvise64 (long, long, long, long);
  223. long __shim_timer_create (long, long, long);
  224. long __shim_timer_settime (long, long, long, long);
  225. long __shim_timer_gettime (long, long);
  226. long __shim_timer_getoverrun (long);
  227. long __shim_timer_delete (long);
  228. long __shim_clock_settime (long, long);
  229. long __shim_clock_gettime (long, long);
  230. long __shim_clock_getres (long, long);
  231. long __shim_clock_nanosleep (long, long, long, long);
  232. long __shim_exit_group (long);
  233. long __shim_epoll_wait (long, long, long, long);
  234. long __shim_epoll_ctl (long, long, long, long);
  235. long __shim_tgkill (long, long, long);
  236. long __shim_utimes (long, long);
  237. long __shim_mbind (long, long, long, long, long, long);
  238. long __shim_set_mempolicy (long, long, long);
  239. long __shim_get_mempolicy (long, long, long, long, long);
  240. long __shim_mq_open (long, long, long, long);
  241. long __shim_mq_unlink (long);
  242. long __shim_mq_timedsend (long, long, long, long, long);
  243. long __shim_mq_timedreceive (long, long, long, long, long);
  244. long __shim_mq_notify (long, long);
  245. long __shim_mq_getsetattr (long, long, long);
  246. long __shim_kexec_load (long, long, long, long);
  247. long __shim_waitid (long, long, long, long, long);
  248. long __shim_add_key (long, long, long, long, long);
  249. long __shim_request_key (long, long, long, long);
  250. long __shim_keyctl (long, long, long, long, long);
  251. long __shim_ioprio_set (long, long, long);
  252. long __shim_ioprio_get (long, long);
  253. long __shim_inotify_init (void);
  254. long __shim_inotify_add_watch (long, long, long);
  255. long __shim_inotify_rm_watch (long, long);
  256. long __shim_migrate_pages (long, long, long, long);
  257. long __shim_openat (long, long, long, long);
  258. long __shim_mkdirat (long, long, long);
  259. long __shim_mknodat (long, long, long, long);
  260. long __shim_fchownat (long, long, long, long, long);
  261. long __shim_futimesat (long, long, long);
  262. long __shim_newfstatat (long, long, long, long);
  263. long __shim_unlinkat (long, long, long);
  264. long __shim_renameat (long, long, long, long);
  265. long __shim_linkat (long, long, long, long, long);
  266. long __shim_symlinkat (long, long, long);
  267. long __shim_readlinkat (long, long, long, long);
  268. long __shim_fchmodat (long, long, long);
  269. long __shim_faccessat (long, long, long);
  270. long __shim_pselect6 (long, long, long, long, long, long);
  271. long __shim_ppoll (long, long, long, long, long);
  272. long __shim_unshare (long);
  273. long __shim_set_robust_list (long, long);
  274. long __shim_get_robust_list (long, long, long);
  275. long __shim_splice (long, long, long, long, long, long);
  276. long __shim_tee (long, long, long, long);
  277. long __shim_sync_file_range (long, long, long, long);
  278. long __shim_vmsplice (long, long, long, long);
  279. long __shim_move_pages (long, long, long, long, long, long);
  280. long __shim_utimensat (long, long, long, long);
  281. long __shim_epoll_pwait (long, long, long, long, long, long);
  282. long __shim_signalfd (long, long, long);
  283. long __shim_timerfd_create (long, long);
  284. long __shim_eventfd (long);
  285. long __shim_fallocate (long, long, long, long);
  286. long __shim_timerfd_settime (long, long, long, long);
  287. long __shim_timerfd_gettime (long, long);
  288. long __shim_accept4 (long, long, long, long);
  289. long __shim_signalfd4 (long, long, long, long);
  290. long __shim_eventfd2 (long, long);
  291. long __shim_epoll_create1 (long);
  292. long __shim_dup3 (long, long, long);
  293. long __shim_pipe2 (long, long);
  294. long __shim_inotify_init1 (long);
  295. long __shim_preadv (long, long, long, long, long);
  296. long __shim_pwritev (long, long, long, long, long);
  297. long __shim_rt_tgsigqueueinfo (long, long, long, long);
  298. long __shim_perf_event_open (long, long, long, long, long);
  299. long __shim_recvmmsg (long, long, long, long, long);
  300. long __shim_sandbox_create (long, long, long);
  301. long __shim_sandbox_attach (long);
  302. long __shim_sandbox_current (void);
  303. long __shim_msgpersist (long, long);
  304. long __shim_benchmark_rpc (long, long, long, long);
  305. long __shim_send_rpc (long, long, long);
  306. long __shim_recv_rpc (long, long, long);
  307. long __shim_checkpoint(long);
  308. typedef void (*shim_fp)(void);
  309. extern shim_fp shim_table [SHIM_NSYSCALLS];
  310. size_t shim_do_read (int fd, void * buf, size_t count);
  311. size_t shim_do_write (int fd, const void * buf, size_t count);
  312. int shim_do_open (const char * file, int flags, mode_t mode);
  313. int shim_do_close (int fd);
  314. int shim_do_stat (const char * file, struct stat * statbuf);
  315. int shim_do_fstat (int fd, struct stat * statbuf);
  316. int shim_do_lstat (const char * file, struct stat * stat);
  317. int shim_do_poll (struct pollfd * fds, nfds_t nfds, int timeout);
  318. off_t shim_do_lseek (int fd, off_t offset, int origin);
  319. void * shim_do_mmap (void * addr, size_t length, int prot, int flags, int fd,
  320. off_t offset);
  321. int shim_do_mprotect (void * addr, size_t len, int prot);
  322. int shim_do_munmap (void * addr, size_t len);
  323. void * shim_do_brk (void * brk);
  324. int shim_do_sigaction (int signum, const struct __kernel_sigaction * act,
  325. struct __kernel_sigaction * oldact);
  326. int shim_do_sigprocmask (int how, const __sigset_t * set, __sigset_t * oldset);
  327. int shim_do_sigreturn (int __unused);
  328. int shim_do_ioctl (int fd, int cmd, unsigned long arg);
  329. size_t shim_do_pread64 (int fd, char * buf, size_t count, loff_t pos);
  330. size_t shim_do_pwrite64 (int fd, char * buf, size_t count, loff_t pos);
  331. ssize_t shim_do_readv (int fd, const struct iovec * vec, int vlen);
  332. ssize_t shim_do_writev (int fd, const struct iovec * vec, int vlen);
  333. int shim_do_access (const char * file, mode_t mode);
  334. int shim_do_pipe (int * fildes);
  335. int shim_do_select (int nfds, fd_set * readfds, fd_set * writefds,
  336. fd_set * errorfds, struct __kernel_timeval * timeout);
  337. int shim_do_sched_yield (void);
  338. void * shim_do_mremap (void * addr, size_t old_len, size_t new_len,
  339. int flags, void * new_addr);
  340. int shim_do_msync (void * start, size_t len, int flags);
  341. int shim_do_dup (int fd);
  342. int shim_do_dup2 (int oldfd, int newfd);
  343. int shim_do_pause (void);
  344. int shim_do_nanosleep (const struct __kernel_timespec * rqtp,
  345. struct __kernel_timespec * rmtp);
  346. int shim_do_getitimer (int which, struct __kernel_itimerval * value);
  347. int shim_do_alarm (unsigned int seconds);
  348. int shim_do_setitimer (int which, struct __kernel_itimerval * value,
  349. struct __kernel_itimerval * ovalue);
  350. pid_t shim_do_getpid (void);
  351. ssize_t shim_do_sendfile (int out_fd, int in_fd, off_t * offset, size_t count);
  352. int shim_do_socket (int family, int type, int protocol);
  353. int shim_do_connect (int sockfd, struct sockaddr * addr, int addrlen);
  354. int shim_do_accept (int fd, struct sockaddr * addr, socklen_t * addrlen);
  355. ssize_t shim_do_sendto (int fd, const void * buf, size_t len, int flags,
  356. const struct sockaddr * dest_addr, socklen_t addrlen);
  357. ssize_t shim_do_recvfrom (int fd, void * buf, size_t len, int flags,
  358. struct sockaddr * addr, socklen_t * addrlen);
  359. int shim_do_bind (int sockfd, struct sockaddr * addr, socklen_t addrlen);
  360. int shim_do_listen (int sockfd, int backlog);
  361. ssize_t shim_do_sendmsg (int fd, struct msghdr * msg, int flags);
  362. ssize_t shim_do_recvmsg (int fd, struct msghdr * msg, int flags);
  363. int shim_do_shutdown (int sockfd, int how);
  364. int shim_do_getsockname (int sockfd, struct sockaddr * addr, int * addrlen);
  365. int shim_do_getpeername (int sockfd, struct sockaddr * addr, int * addrlen);
  366. int shim_do_socketpair (int domain, int type, int protocol, int * sv);
  367. int shim_do_setsockopt (int fd, int level, int optname, char * optval,
  368. int optlen);
  369. int shim_do_getsockopt (int fd, int level, int optname, char * optval,
  370. int * optlen);
  371. int shim_do_clone (int flags, void * user_stack_addr, int * parent_tidptr,
  372. void * tls, int * child_tidptr);
  373. int shim_do_fork (void);
  374. int shim_do_vfork (void);
  375. int shim_do_execve (const char * file, const char ** argv, const char ** envp);
  376. int shim_do_exit (int error_code);
  377. pid_t shim_do_wait4 (pid_t pid, int * stat_addr, int option,
  378. struct __kernel_rusage * ru);
  379. int shim_do_kill (pid_t pid, int sig);
  380. int shim_do_uname (struct old_utsname * buf);
  381. int shim_do_semget (key_t key, int nsems, int semflg);
  382. int shim_do_semop (int semid, struct sembuf * sops, unsigned int nsops);
  383. int shim_do_semctl (int semid, int semnum, int cmd, unsigned long arg);
  384. int shim_do_msgget (key_t key, int msgflg);
  385. int shim_do_msgsnd ( int msqid, const void * msgp, size_t msgsz, int msgflg);
  386. int shim_do_msgrcv (int msqid, void * msgp, size_t msgsz, long msgtyp,
  387. int msgflg);
  388. int shim_do_msgctl (int msqid, int cmd, struct msqid_ds * buf);
  389. int shim_do_fcntl (int fd, int cmd, unsigned long arg);
  390. int shim_do_fsync (int fd);
  391. int shim_do_fdatasync (int fd);
  392. int shim_do_truncate (const char * path, loff_t length);
  393. int shim_do_ftruncate (int fd, loff_t length);
  394. size_t shim_do_getdents (int fd, struct linux_dirent * buf, size_t count);
  395. int shim_do_getcwd (char *buf, size_t size);
  396. int shim_do_chdir (const char * filename);
  397. int shim_do_fchdir (int fd);
  398. int shim_do_rename (const char * oldname, const char * newname);
  399. int shim_do_mkdir (const char * pathname, int mode);
  400. int shim_do_rmdir (const char * pathname);
  401. int shim_do_creat (const char * path, mode_t mode);
  402. int shim_do_unlink (const char * file);
  403. int shim_do_readlink (const char * file, char * buf, int bufsize);
  404. int shim_do_chmod (const char * filename, mode_t mode);
  405. int shim_do_fchmod (int fd, mode_t mode);
  406. mode_t shim_do_umask (mode_t mask);
  407. int shim_do_gettimeofday (struct __kernel_timeval * tv,
  408. struct __kernel_timezone * tz);
  409. int shim_do_getrlimit (int resource, struct __kernel_rlimit * rlim);
  410. uid_t shim_do_getuid (void);
  411. gid_t shim_do_getgid (void);
  412. int shim_do_setuid (uid_t uid);
  413. int shim_do_setgid (gid_t gid);
  414. uid_t shim_do_geteuid (void);
  415. gid_t shim_do_getegid (void);
  416. pid_t shim_do_getppid (void);
  417. int shim_do_setpgid (pid_t pid, pid_t pgid);
  418. pid_t shim_do_getpgrp (void);
  419. int shim_do_setsid (void);
  420. int shim_do_getpgid (pid_t pid);
  421. int shim_do_getsid (pid_t pid);
  422. void * shim_do_arch_prctl (int code, void * addr);
  423. int shim_do_setrlimit (int resource, struct __kernel_rlimit * rlim);
  424. int shim_do_chroot (const char * filename);
  425. pid_t shim_do_gettid (void);
  426. int shim_do_tkill (int pid, int sig);
  427. time_t shim_do_time (time_t * tloc);
  428. int shim_do_futex (unsigned int * uaddr, int op, int val, void * utime,
  429. unsigned int * uaddr2, int val3);
  430. int shim_do_set_tid_address (int * tidptr);
  431. int shim_do_semtimedop (int semid, struct sembuf * sops, unsigned int nsops,
  432. const struct timespec * timeout);
  433. int shim_do_epoll_create (int size);
  434. size_t shim_do_getdents64 (int fd, struct linux_dirent64 * buf, size_t count);
  435. int shim_do_epoll_wait (int epfd, struct __kernel_epoll_event * events,
  436. int maxevents, int timeout);
  437. int shim_do_epoll_ctl (int epfd, int op, int fd,
  438. struct __kernel_epoll_event * event);
  439. int shim_do_clock_gettime (clockid_t which_clock,
  440. struct timespec * tp);
  441. int shim_do_clock_getres (clockid_t which_clock,
  442. struct timespec * tp);
  443. int shim_do_exit_group (int error_code);
  444. int shim_do_tgkill (int tgid, int pid, int sig);
  445. int shim_do_openat (int dfd, const char * filename, int flags, int mode);
  446. int shim_do_mkdirat (int dfd, const char * pathname, int mode);
  447. int shim_do_unlinkat (int dfd, const char * pathname, int flag);
  448. int shim_do_renameat (int olddfd, const char * pathname, int newdfd,
  449. const char * newname);
  450. int shim_do_fchmodat (int dfd, const char * filename, mode_t mode);
  451. int shim_do_faccessat (int dfd, const char * filename, mode_t mode);
  452. int shim_do_pselect6 (int nfds, fd_set * readfds, fd_set * writefds,
  453. fd_set * exceptfds, const struct __kernel_timespec * tsp,
  454. const __sigset_t * sigmask);
  455. int shim_do_ppoll (struct pollfd * fds, int nfds, struct timespec * tsp,
  456. const __sigset_t * sigmask, size_t sigsetsize);
  457. int shim_do_set_robust_list (struct robust_list_head * head, size_t len);
  458. int shim_do_get_robust_list (pid_t pid, struct robust_list_head ** head,
  459. size_t * len);
  460. int shim_do_epoll_pwait (int epfd, struct __kernel_epoll_event * events,
  461. int maxevents, int timeout, const __sigset_t * sigmask,
  462. size_t sigsetsize);
  463. int shim_do_accept4 (int sockfd, struct sockaddr * addr, socklen_t * addrlen,
  464. int flags);
  465. int shim_do_dup3 (int oldfd, int newfd, int flags);
  466. int shim_do_epoll_create1 (int flags);
  467. int shim_do_pipe2 (int * fildes, int flags);
  468. long shim_do_sandbox_create (int flags, const char * fs_sb,
  469. struct net_sb * net_sb);
  470. int shim_do_sandbox_attach (unsigned int sbid);
  471. long shim_do_sandbox_current (void);
  472. int shim_do_msgpersist (int msqid, int cmd);
  473. int shim_do_benchmark_rpc (pid_t pid, int times, const void * buf, size_t size);
  474. size_t shim_do_send_rpc (pid_t pid, const void * buf, size_t size);
  475. size_t shim_do_recv_rpc (pid_t * pid, void * buf, size_t size);
  476. int shim_do_checkpoint(const char * filename);
  477. #endif /* ! IN_SHIM */
  478. size_t shim_read (int fd, void * buf, size_t count);
  479. size_t shim_write (int fd, const void * buf, size_t count);
  480. int shim_open (const char * file, int flags, mode_t mode);
  481. int shim_close (int fd);
  482. int shim_stat (const char * file, struct stat * statbuf);
  483. int shim_fstat (int fd, struct stat * statbuf);
  484. int shim_lstat (const char * file, struct stat * statbuf);
  485. int shim_poll (struct pollfd * fds, nfds_t nfds, int timeout);
  486. off_t shim_lseek (int fd, off_t offset, int origin);
  487. void * shim_mmap (void * addr, size_t length, int prot, int flags, int fd,
  488. off_t offset);
  489. int shim_mprotect (void * addr, size_t len, int prot);
  490. int shim_munmap (void * addr, size_t len);
  491. void * shim_brk (void * brk);
  492. int shim_rt_sigaction (int signum, const struct __kernel_sigaction * act,
  493. struct __kernel_sigaction * oldact);
  494. int shim_rt_sigprocmask (int how, const __sigset_t * set, __sigset_t * oldset);
  495. int shim_rt_sigreturn (int __unused);
  496. int shim_ioctl (int fd, int cmd, unsigned long arg);
  497. size_t shim_pread64 (int fd, char * buf, size_t count, loff_t pos);
  498. size_t shim_pwrite64 (int fd, char * buf, size_t count, loff_t pos);
  499. ssize_t shim_readv (int fd, const struct iovec * vec, int vlen);
  500. ssize_t shim_writev (int fd, const struct iovec * vec, int vlen);
  501. int shim_access (const char * file, mode_t mode);
  502. int shim_pipe (int * fildes);
  503. int shim_select (int nfds, fd_set * readfds, fd_set * writefds,
  504. fd_set * errorfds, struct __kernel_timeval * timeout);
  505. int shim_sched_yield (void);
  506. void * shim_mremap (void * addr, size_t old_len, size_t new_len, int flags,
  507. void * new_addr);
  508. int shim_msync (void * start, size_t len, int flags);
  509. int shim_mincore (void * start, size_t len, unsigned char * vec);
  510. int shim_madvise (void * start, size_t len, int behavior);
  511. int shim_shmget (key_t key, size_t size, int shmflg);
  512. void * shim_shmat (int shmid, const void * shmaddr, int shmflg);
  513. int shim_shmctl (int shmid, int cmd, struct shmid_ds * buf);
  514. int shim_dup (int fd);
  515. int shim_dup2 (int oldfd, int newfd);
  516. int shim_pause (void);
  517. int shim_nanosleep (const struct __kernel_timespec * rqtp,
  518. struct __kernel_timespec * rmtp);
  519. int shim_getitimer (int which, struct __kernel_itimerval * value);
  520. int shim_alarm (unsigned int seconds);
  521. int shim_setitimer (int which, struct __kernel_itimerval * value,
  522. struct __kernel_itimerval * ovalue);
  523. pid_t shim_getpid (void);
  524. ssize_t shim_sendfile (int out_fd, int in_fd, off_t * offset, size_t count);
  525. int shim_socket (int family, int type, int protocol);
  526. int shim_connect (int sockfd, struct sockaddr * addr, int addrlen);
  527. int shim_accept (int fd, struct sockaddr * addr, socklen_t * addrlen);
  528. ssize_t shim_sendto (int fd, const void * buf, size_t len, int flags,
  529. const struct sockaddr * dest_addr, socklen_t addrlen);
  530. ssize_t shim_recvfrom (int fd, void * buf, size_t len, int flags,
  531. struct sockaddr * addr, socklen_t * addrlen);
  532. int shim_bind (int sockfd, struct sockaddr * addr, socklen_t addrlen);
  533. int shim_listen (int sockfd, int backlog);
  534. ssize_t shim_sendmsg (int fd, struct msghdr * msg, int flags);
  535. ssize_t shim_recvmsg (int fd, struct msghdr * msg, int flags);
  536. int shim_shutdown (int sockfd, int how);
  537. int shim_getsockname (int sockfd, struct sockaddr * addr, int * addrlen);
  538. int shim_getpeername (int sockfd, struct sockaddr * addr, int * addrlen);
  539. int shim_socketpair (int domain, int type, int protocol, int * sv);
  540. int shim_setsockopt (int fd, int level, int optname, char * optval, int optlen);
  541. int shim_getsockopt (int fd, int level, int optname, char * optval,
  542. int * optlen);
  543. int shim_clone (int flags, void * user_stack_addr, int * parent_tidptr,
  544. void * tls, int * child_tidptr);
  545. int shim_fork (void);
  546. int shim_vfork (void);
  547. int shim_execve (const char * file, const char ** argv, const char ** envp);
  548. int shim_exit (int error_code);
  549. pid_t shim_wait4 (pid_t pid, int * stat_addr, int option,
  550. struct __kernel_rusage * ru);
  551. int shim_kill (pid_t pid, int sig);
  552. int shim_uname (struct old_utsname * buf);
  553. int shim_semget (key_t key, int nsems, int semflg);
  554. int shim_semop (int semid, struct sembuf * sops, unsigned int nsops);
  555. int shim_semctl (int semid, int semnum, int cmd, unsigned long arg);
  556. int shim_shmdt (const void * shmaddr);
  557. int shim_msgget (key_t key, int msgflg);
  558. int shim_msgsnd (int msqid, const void * msgp, size_t msgsz, int msgflg);
  559. int shim_msgrcv (int msqid, void * msgp, size_t msgsz, long msgtyp, int msgflg);
  560. int shim_msgctl (int msqid, int cmd, struct msqid_ds * buf);
  561. int shim_fcntl (int fd, int cmd, unsigned long arg);
  562. int shim_flock (int fd, int cmd);
  563. int shim_fsync (int fd);
  564. int shim_fdatasync (int fd);
  565. int shim_truncate (const char * path, loff_t length);
  566. int shim_ftruncate (int fd, loff_t length);
  567. size_t shim_getdents (int fd, struct linux_dirent * buf, size_t count);
  568. int shim_getcwd (char * buf, size_t size);
  569. int shim_chdir (const char * filename);
  570. int shim_fchdir (int fd);
  571. int shim_rename (const char * oldname, const char * newname);
  572. int shim_mkdir (const char * pathname, int mode);
  573. int shim_rmdir (const char * pathname);
  574. int shim_creat (const char * path, mode_t mode);
  575. int shim_link (const char * oldname, const char * newname);
  576. int shim_unlink (const char * file);
  577. int shim_symlink (const char * old, const char * new);
  578. int shim_readlink (const char * file, char * buf, int bufsize);
  579. int shim_chmod (const char * filename, mode_t mode);
  580. int shim_fchmod (int fd, mode_t mode);
  581. int shim_chown (const char * filename, uid_t user, gid_t group);
  582. int shim_fchown (int fd, uid_t user, gid_t group);
  583. int shim_lchown (const char * filename, uid_t user, gid_t group);
  584. mode_t shim_umask (mode_t mask);
  585. int shim_gettimeofday (struct __kernel_timeval * tv,
  586. struct __kernel_timezone * tz);
  587. int shim_getrlimit (int resource, struct __kernel_rlimit * rlim);
  588. int shim_getrusage (int who, struct __kernel_rusage * ru);
  589. int shim_sysinfo (struct sysinfo * info);
  590. int shim_times (struct tms * tbuf);
  591. int shim_ptrace (long request, pid_t pid, void * addr, void * data);
  592. uid_t shim_getuid (void);
  593. int shim_syslog (int type, char * buf, int len);
  594. gid_t shim_getgid (void);
  595. int shim_setuid (uid_t uid);
  596. int shim_setgid (gid_t gid);
  597. uid_t shim_geteuid (void);
  598. gid_t shim_getegid (void);
  599. int shim_setpgid (pid_t pid, pid_t pgid);
  600. pid_t shim_getppid (void);
  601. pid_t shim_getpgrp (void);
  602. int shim_setsid (void);
  603. int shim_setreuid (uid_t ruid, uid_t euid);
  604. int shim_setregid (gid_t rgid, gid_t egid);
  605. int shim_getgroups (int gidsetsize, gid_t * grouplist);
  606. int shim_setgroups (int gidsetsize, gid_t * grouplist);
  607. int shim_setresuid (uid_t ruid, uid_t euid, uid_t suid);
  608. int shim_getresuid (uid_t * ruid, uid_t * euid, uid_t * suid);
  609. int shim_setresgid (gid_t rgid, gid_t egid, gid_t sgid);
  610. int shim_getresgid (gid_t * rgid, gid_t * egid, gid_t * sgid);
  611. int shim_getpgid (pid_t pid);
  612. int shim_setfsuid (uid_t uid);
  613. int shim_setfsgid (gid_t gid);
  614. int shim_getsid (pid_t pid);
  615. int shim_capget (cap_user_header_t header, cap_user_data_t dataptr);
  616. int shim_capset (cap_user_header_t header, const cap_user_data_t data);
  617. int shim_rt_sigpending (__sigset_t * set, size_t sigsetsize);
  618. int shim_rt_sigtimedwait (const __sigset_t * uthese, siginfo_t * uinfo,
  619. const struct timespec * uts, size_t sigsetsize);
  620. int shim_rt_sigqueueinfo (int pid, int sig, siginfo_t * uinfo);
  621. int shim_rt_sigsuspend (const __sigset_t * mask);
  622. int shim_sigaltstack (const stack_t * ss, stack_t * oss);
  623. int shim_utime (char * filename, struct utimbuf * times);
  624. int shim_mknod (const char * filename, int mode, unsigned dev);
  625. int shim_uselib (const char * library);
  626. int shim_personality (unsigned int personality);
  627. int shim_ustat (unsigned dev, struct __kernel_ustat * ubuf);
  628. int shim_statfs (const char * path, struct statfs * buf);
  629. int shim_fstatfs (int fd, struct statfs * buf);
  630. int shim_sysfs (int option, unsigned long arg1, unsigned long arg2);
  631. int shim_getpriority (int which, int who);
  632. int shim_setpriority (int which, int who, int niceval);
  633. int shim_sched_setparam (pid_t pid, struct __kernel_sched_param * param);
  634. int shim_sched_getparam (pid_t pid, struct __kernel_sched_param * param);
  635. int shim_sched_setscheduler (pid_t pid, int policy,
  636. struct __kernel_sched_param * param);
  637. int shim_sched_getscheduler (pid_t pid);
  638. int shim_sched_get_priority_max (int policy);
  639. int shim_sched_get_priority_min (int policy);
  640. int shim_sched_rr_get_interval (pid_t pid, struct timespec * interval);
  641. int shim_mlock (void * start, size_t len);
  642. int shim_munlock (void * start, size_t len);
  643. int shim_mlockall (int flags);
  644. int shim_munlockall (void);
  645. int shim_vhangup (void);
  646. int shim_modify_ldt (int func, void * ptr, unsigned long bytecount);
  647. int shim_pivot_root (const char * new_root, const char * put_old);
  648. int shim__sysctl (struct __kernel_sysctl_args * args);
  649. int shim_prctl (int option, unsigned long arg2, unsigned long arg3,
  650. unsigned long arg4, unsigned long arg5);
  651. void * shim_arch_prctl (int code, void * addr);
  652. int shim_adjtimex (struct __kernel_timex * txc_p);
  653. int shim_setrlimit (int resource, struct __kernel_rlimit * rlim);
  654. int shim_chroot (const char * filename);
  655. int shim_sync (void);
  656. int shim_acct (const char * name);
  657. int shim_settimeofday (struct timeval * tv, struct __kernel_timezone * tz);
  658. int shim_mount (char * dev_name, char * dir_name, char * type,
  659. unsigned long flags, void * data);
  660. int shim_umount2 (const char * target, int flags);
  661. int shim_swapon (const char * specialfile, int swap_flags);
  662. int shim_swapoff (const char * specialfile);
  663. int shim_reboot (int magic1, int magic2, int cmd, void * arg);
  664. int shim_sethostname (char * name, int len);
  665. int shim_setdomainname (char * name, int len);
  666. int shim_iopl (int level);
  667. int shim_ioperm (unsigned long from, unsigned long num, int on);
  668. int shim_create_module (const char * name, size_t size);
  669. int shim_init_module (void * umod, unsigned long len, const char * uargs);
  670. int shim_delete_module (const char * name_user, unsigned int flags);
  671. int shim_query_module (const char * name, int which, void * buf, size_t bufsize,
  672. size_t * retsize);
  673. int shim_quotactl (int cmd, const char * special, qid_t id, void * addr);
  674. pid_t shim_gettid (void);
  675. int shim_readahead (int fd, loff_t offset, size_t count);
  676. int shim_setxattr (const char * path, const char * name, const void * value,
  677. size_t size, int flags);
  678. int shim_lsetxattr (const char * path, const char * name, const void * value,
  679. size_t size, int flags);
  680. int shim_fsetxattr (int fd, const char * name, const void * value, size_t size,
  681. int flags);
  682. int shim_getxattr (const char * path, const char * name, void * value,
  683. size_t size);
  684. int shim_lgetxattr (const char * path, const char * name, void * value,
  685. size_t size);
  686. int shim_fgetxattr (int fd, const char * name, void * value, size_t size);
  687. int shim_listxattr (const char * path, char * list, size_t size);
  688. int shim_llistxattr (const char * path, char * list, size_t size);
  689. int shim_flistxattr (int fd, char * list, size_t size);
  690. int shim_removexattr (const char * path, const char * name);
  691. int shim_lremovexattr (const char * path, const char * name);
  692. int shim_fremovexattr (int fd, const char * name);
  693. int shim_tkill (int pid, int sig);
  694. time_t shim_time (time_t * tloc);
  695. int shim_futex (unsigned int * uaddr, int op, int val, void * utime,
  696. unsigned int * uaddr2, int val3);
  697. int shim_sched_setaffinity (pid_t pid, size_t len,
  698. __kernel_cpu_set_t * user_mask_ptr);
  699. int shim_sched_getaffinity (pid_t pid, size_t len,
  700. __kernel_cpu_set_t * user_mask_ptr);
  701. int shim_set_thread_area (struct user_desc * u_info);
  702. int shim_io_setup (unsigned nr_reqs, aio_context_t * ctx);
  703. int shim_io_destroy (aio_context_t ctx);
  704. int shim_io_getevents (aio_context_t ctx_id, long min_nr, long nr,
  705. struct io_event * events, struct timespec * timeout);
  706. int shim_io_submit (aio_context_t ctx_id, long nr, struct iocb ** iocbpp);
  707. int shim_io_cancel (aio_context_t ctx_id, struct iocb * iocb,
  708. struct io_event * result);
  709. int shim_get_thread_area (struct user_desc * u_info);
  710. int shim_lookup_dcookie (unsigned long cookie64, char * buf, size_t len);
  711. int shim_epoll_create (int size);
  712. int shim_remap_file_pages (void * start, size_t size, int prot, ssize_t pgoff,
  713. int flags);
  714. size_t shim_getdents64 (int fd, struct linux_dirent64 * buf, size_t count);
  715. int shim_set_tid_address (int * tidptr);
  716. int shim_restart_syscall (void);
  717. int shim_semtimedop (int semid, struct sembuf * sops, unsigned nsops,
  718. const struct timespec * timeout);
  719. int shim_fadvise64 (int fd, loff_t offset, size_t len, int advice);
  720. int shim_timer_create (clockid_t which_clock,
  721. struct sigevent * timer_event_spec,
  722. timer_t * created_timer_id);
  723. int shim_timer_settime (timer_t timer_id, int flags,
  724. const struct __kernel_itimerspec * new_setting,
  725. struct __kernel_itimerspec * old_setting);
  726. int shim_timer_gettime (timer_t timer_id, struct __kernel_itimerspec * setting);
  727. int shim_timer_getoverrun (timer_t timer_id);
  728. int shim_timer_delete (timer_t timer_id);
  729. int shim_clock_settime (clockid_t which_clock, const struct timespec * tp);
  730. int shim_clock_gettime (clockid_t which_clock, struct timespec * tp);
  731. int shim_clock_getres (clockid_t which_clock, struct timespec * tp);
  732. int shim_clock_nanosleep (clockid_t which_clock, int flags,
  733. const struct timespec * rqtp, struct timespec * rmtp);
  734. int shim_exit_group (int error_code);
  735. int shim_epoll_wait (int epfd, struct __kernel_epoll_event * events,
  736. int maxevents, int timeout);
  737. int shim_epoll_ctl (int epfd, int op, int fd,
  738. struct __kernel_epoll_event * event);
  739. int shim_tgkill (int tgid, int pid, int sig);
  740. int shim_utimes (char * filename, struct timeval * utimes);
  741. int shim_mbind (void * start, unsigned long len, int mode,
  742. unsigned long * nmask, unsigned long maxnode, int flags);
  743. int shim_set_mempolicy (int mode, unsigned long * nmask, unsigned long maxnode);
  744. int shim_get_mempolicy (int * policy, unsigned long * nmask,
  745. unsigned long maxnode, unsigned long addr,
  746. unsigned long flags);
  747. int shim_mq_open (const char * name, int oflag, mode_t mode,
  748. struct __kernel_mq_attr * attr);
  749. int shim_mq_unlink (const char * name);
  750. int shim_mq_timedsend (__kernel_mqd_t mqdes, const char * msg_ptr,
  751. size_t msg_len, unsigned int msg_prio,
  752. const struct timespec * abs_timeout);
  753. int shim_mq_timedreceive (__kernel_mqd_t mqdes, char * msg_ptr, size_t msg_len,
  754. unsigned int * msg_prio,
  755. const struct timespec * abs_timeout);
  756. int shim_mq_notify (__kernel_mqd_t mqdes, const struct sigevent * notification);
  757. int shim_mq_getsetattr (__kernel_mqd_t mqdes,
  758. const struct __kernel_mq_attr * mqstat,
  759. struct __kernel_mq_attr * omqstat);
  760. int shim_waitid (int which, pid_t pid, siginfo_t * infop, int options,
  761. struct __kernel_rusage * ru);
  762. int shim_ioprio_set (int which, int who, int ioprio);
  763. int shim_ioprio_get (int which, int who);
  764. int shim_inotify_init (void);
  765. int shim_inotify_add_watch (int fd, const char * path, unsigned int mask);
  766. int shim_inotify_rm_watch (int fd, unsigned int wd);
  767. int shim_migrate_pages (pid_t pid, unsigned long maxnode,
  768. const unsigned long * from, const unsigned long * to);
  769. int shim_openat (int dfd, const char * filename, int flags, int mode);
  770. int shim_mkdirat (int dfd, const char * pathname, int mode);
  771. int shim_mknodat (int dfd, const char * filename, int mode, unsigned dev);
  772. int shim_fchownat (int dfd, const char * filename, uid_t user, gid_t group,
  773. int flag);
  774. int shim_futimesat (int dfd, const char * filename, struct timeval * utimes);
  775. int shim_newfstatat (int dfd, const char * filename, struct stat * statbuf,
  776. int flag);
  777. int shim_unlinkat (int dfd, const char * pathname, int flag);
  778. int shim_renameat (int olddfd, const char * oldname, int newdfd,
  779. const char * newname);
  780. int shim_linkat (int olddfd, const char * oldname, int newdfd,
  781. const char * newname, int flags);
  782. int shim_symlinkat (const char * oldname, int newdfd, const char * newname);
  783. int shim_readlinkat (int dfd, const char * path, char * buf, int bufsiz);
  784. int shim_fchmodat (int dfd, const char * filename, mode_t mode);
  785. int shim_faccessat (int dfd, const char * filename, int mode);
  786. int shim_pselect6 (int nfds, fd_set * readfds, fd_set * writefds,
  787. fd_set * exceptfds, const struct __kernel_timespec * tsp,
  788. const __sigset_t * sigmask);
  789. int shim_ppoll (struct pollfd * fds, int nfds, struct timespec * tsp,
  790. const __sigset_t * sigmask, size_t sigsetsize);
  791. int shim_unshare (int unshare_flags);
  792. int shim_set_robust_list (struct robust_list_head * head, size_t len);
  793. int shim_get_robust_list (pid_t pid, struct robust_list_head ** head,
  794. size_t * len);
  795. int shim_splice (int fd_in, loff_t * off_in, int fd_out, loff_t * off_out,
  796. size_t len, int flags);
  797. int shim_tee (int fdin, int fdout, size_t len, unsigned int flags);
  798. int shim_sync_file_range (int fd, loff_t offset, loff_t nbytes, int flags);
  799. int shim_vmsplice (int fd, const struct iovec * iov, unsigned long nr_segs,
  800. int flags);
  801. int shim_move_pages (pid_t pid, unsigned long nr_pages, void ** pages,
  802. const int * nodes, int * status, int flags);
  803. int shim_utimensat (int dfd, const char * filename, struct timespec *
  804. utimes, int flags);
  805. int shim_epoll_pwait (int epfd, struct __kernel_epoll_event * events,
  806. int maxevents, int timeout, const __sigset_t * sigmask,
  807. size_t sigsetsize);
  808. int shim_signalfd (int ufd, __sigset_t * user_mask, size_t sizemask);
  809. int shim_timerfd_create (int clockid, int flags);
  810. int shim_eventfd (int count);
  811. int shim_fallocate (int fd, int mode, loff_t offset, loff_t len);
  812. int shim_timerfd_settime (int ufd, int flags,
  813. const struct __kernel_itimerspec * utmr,
  814. struct __kernel_itimerspec * otmr);
  815. int shim_timerfd_gettime (int ufd, struct __kernel_itimerspec * otmr);
  816. int shim_accept4 (int sockfd, struct sockaddr * addr, socklen_t * addrlen,
  817. int flags);
  818. int shim_signalfd4 (int ufd, __sigset_t * user_mask, size_t sizemask, int flags);
  819. int shim_eventfd2 (int count, int flags);
  820. int shim_epoll_create1 (int flags);
  821. int shim_dup3 (int oldfd, int newfd, int flags);
  822. int shim_pipe2 (int * fildes, int flags);
  823. int shim_inotify_init1 (int flags);
  824. int shim_preadv (unsigned long fd, const struct iovec * vec,
  825. unsigned long vlen, unsigned long pos_l, unsigned long pos_h);
  826. int shim_pwritev (unsigned long fd, const struct iovec * vec,
  827. unsigned long vlen, unsigned long pos_l, unsigned long pos_h);
  828. int shim_rt_tgsigqueueinfo (pid_t tgid, pid_t pid, int sig, siginfo_t * uinfo);
  829. int shim_perf_event_open (struct perf_event_attr * attr_uptr, pid_t pid,
  830. int cpu, int group_fd, int flags);
  831. int shim_recvmmsg (int fd, struct mmsghdr * msg, int vlen, int flags,
  832. struct __kernel_timespec * timeout);
  833. long shim_sandbox_create (int flags, const char * fs_sb, struct net_sb * net_sb);
  834. int shim_sandbox_attach (unsigned int sbid);
  835. long shim_sandbox_current (void);
  836. int shim_msgpersist (int msqid, int cmd);
  837. int shim_benchmark_rpc (pid_t pid, int times, const void * buf, size_t size);
  838. size_t shim_send_rpc (pid_t pid, const void * buf, size_t size);
  839. size_t shim_recv_rpc (pid_t * pid, void * buf, size_t size);
  840. int shim_checkpoint(const char * filename);
  841. #endif /* _SHIM_TABLE_H_ */