Heiko Carstens | 1e4ec62 | 2014-03-29 10:50:47 +0100 | [diff] [blame] | 1 | /* |
Heiko Carstens | 572c3eb | 2014-04-09 10:42:37 +0200 | [diff] [blame] | 2 | * Compat system call wrappers. |
Heiko Carstens | 1e4ec62 | 2014-03-29 10:50:47 +0100 | [diff] [blame] | 3 | * |
| 4 | * Copyright IBM Corp. 2014 |
| 5 | */ |
| 6 | |
Heiko Carstens | b07edab | 2014-02-27 09:52:01 +0100 | [diff] [blame] | 7 | #include <linux/syscalls.h> |
| 8 | #include <linux/compat.h> |
Heiko Carstens | 86d295e | 2014-02-27 15:16:04 +0100 | [diff] [blame] | 9 | #include "entry.h" |
Heiko Carstens | b07edab | 2014-02-27 09:52:01 +0100 | [diff] [blame] | 10 | |
| 11 | #define COMPAT_SYSCALL_WRAP1(name, ...) \ |
| 12 | COMPAT_SYSCALL_WRAPx(1, _##name, __VA_ARGS__) |
| 13 | #define COMPAT_SYSCALL_WRAP2(name, ...) \ |
| 14 | COMPAT_SYSCALL_WRAPx(2, _##name, __VA_ARGS__) |
| 15 | #define COMPAT_SYSCALL_WRAP3(name, ...) \ |
| 16 | COMPAT_SYSCALL_WRAPx(3, _##name, __VA_ARGS__) |
| 17 | #define COMPAT_SYSCALL_WRAP4(name, ...) \ |
| 18 | COMPAT_SYSCALL_WRAPx(4, _##name, __VA_ARGS__) |
| 19 | #define COMPAT_SYSCALL_WRAP5(name, ...) \ |
| 20 | COMPAT_SYSCALL_WRAPx(5, _##name, __VA_ARGS__) |
| 21 | #define COMPAT_SYSCALL_WRAP6(name, ...) \ |
| 22 | COMPAT_SYSCALL_WRAPx(6, _##name, __VA_ARGS__) |
| 23 | |
Heiko Carstens | c2e7c3d | 2014-03-03 10:06:12 +0100 | [diff] [blame] | 24 | #define __SC_COMPAT_TYPE(t, a) \ |
| 25 | __typeof(__builtin_choose_expr(sizeof(t) > 4, 0L, (t)0)) a |
| 26 | |
Heiko Carstens | ab4f8bb | 2014-03-01 13:45:03 +0100 | [diff] [blame] | 27 | #define __SC_COMPAT_CAST(t, a) \ |
| 28 | ({ \ |
| 29 | long __ReS = a; \ |
| 30 | \ |
| 31 | BUILD_BUG_ON((sizeof(t) > 4) && !__TYPE_IS_L(t) && \ |
| 32 | !__TYPE_IS_UL(t) && !__TYPE_IS_PTR(t)); \ |
| 33 | if (__TYPE_IS_L(t)) \ |
| 34 | __ReS = (s32)a; \ |
| 35 | if (__TYPE_IS_UL(t)) \ |
| 36 | __ReS = (u32)a; \ |
| 37 | if (__TYPE_IS_PTR(t)) \ |
| 38 | __ReS = a & 0x7fffffff; \ |
| 39 | (t)__ReS; \ |
| 40 | }) |
| 41 | |
Heiko Carstens | c2e7c3d | 2014-03-03 10:06:12 +0100 | [diff] [blame] | 42 | /* |
| 43 | * The COMPAT_SYSCALL_WRAP macro generates system call wrappers to be used by |
| 44 | * compat tasks. These wrappers will only be used for system calls where only |
| 45 | * the system call arguments need sign or zero extension or zeroing of the upper |
| 46 | * 33 bits of pointers. |
| 47 | * Note: since the wrapper function will afterwards call a system call which |
| 48 | * again performs zero and sign extension for all system call arguments with |
| 49 | * a size of less than eight bytes, these compat wrappers only touch those |
| 50 | * system call arguments with a size of eight bytes ((unsigned) long and |
| 51 | * pointers). Zero and sign extension for e.g. int parameters will be done by |
| 52 | * the regular system call wrappers. |
| 53 | */ |
Heiko Carstens | b07edab | 2014-02-27 09:52:01 +0100 | [diff] [blame] | 54 | #define COMPAT_SYSCALL_WRAPx(x, name, ...) \ |
Heiko Carstens | ab4f8bb | 2014-03-01 13:45:03 +0100 | [diff] [blame] | 55 | asmlinkage long sys##name(__MAP(x,__SC_DECL,__VA_ARGS__)); \ |
Heiko Carstens | c2e7c3d | 2014-03-03 10:06:12 +0100 | [diff] [blame] | 56 | asmlinkage long compat_sys##name(__MAP(x,__SC_COMPAT_TYPE,__VA_ARGS__));\ |
| 57 | asmlinkage long compat_sys##name(__MAP(x,__SC_COMPAT_TYPE,__VA_ARGS__)) \ |
Heiko Carstens | b07edab | 2014-02-27 09:52:01 +0100 | [diff] [blame] | 58 | { \ |
Heiko Carstens | ab4f8bb | 2014-03-01 13:45:03 +0100 | [diff] [blame] | 59 | return sys##name(__MAP(x,__SC_COMPAT_CAST,__VA_ARGS__)); \ |
Heiko Carstens | b07edab | 2014-02-27 09:52:01 +0100 | [diff] [blame] | 60 | } |
| 61 | |
| 62 | COMPAT_SYSCALL_WRAP1(exit, int, error_code); |
| 63 | COMPAT_SYSCALL_WRAP1(close, unsigned int, fd); |
| 64 | COMPAT_SYSCALL_WRAP2(creat, const char __user *, pathname, umode_t, mode); |
| 65 | COMPAT_SYSCALL_WRAP2(link, const char __user *, oldname, const char __user *, newname); |
| 66 | COMPAT_SYSCALL_WRAP1(unlink, const char __user *, pathname); |
| 67 | COMPAT_SYSCALL_WRAP1(chdir, const char __user *, filename); |
| 68 | COMPAT_SYSCALL_WRAP3(mknod, const char __user *, filename, umode_t, mode, unsigned, dev); |
| 69 | COMPAT_SYSCALL_WRAP2(chmod, const char __user *, filename, umode_t, mode); |
| 70 | COMPAT_SYSCALL_WRAP1(oldumount, char __user *, name); |
| 71 | COMPAT_SYSCALL_WRAP1(alarm, unsigned int, seconds); |
| 72 | COMPAT_SYSCALL_WRAP2(access, const char __user *, filename, int, mode); |
| 73 | COMPAT_SYSCALL_WRAP1(nice, int, increment); |
Heiko Carstens | 473a065 | 2014-02-27 13:42:10 +0100 | [diff] [blame] | 74 | COMPAT_SYSCALL_WRAP2(kill, int, pid, int, sig); |
| 75 | COMPAT_SYSCALL_WRAP2(rename, const char __user *, oldname, const char __user *, newname); |
| 76 | COMPAT_SYSCALL_WRAP2(mkdir, const char __user *, pathname, umode_t, mode); |
| 77 | COMPAT_SYSCALL_WRAP1(rmdir, const char __user *, pathname); |
| 78 | COMPAT_SYSCALL_WRAP1(dup, unsigned int, fildes); |
| 79 | COMPAT_SYSCALL_WRAP1(pipe, int __user *, fildes); |
Heiko Carstens | ab4f8bb | 2014-03-01 13:45:03 +0100 | [diff] [blame] | 80 | COMPAT_SYSCALL_WRAP1(brk, unsigned long, brk); |
Heiko Carstens | 473a065 | 2014-02-27 13:42:10 +0100 | [diff] [blame] | 81 | COMPAT_SYSCALL_WRAP2(signal, int, sig, __sighandler_t, handler); |
| 82 | COMPAT_SYSCALL_WRAP1(acct, const char __user *, name); |
| 83 | COMPAT_SYSCALL_WRAP2(umount, char __user *, name, int, flags); |
Heiko Carstens | ab4f8bb | 2014-03-01 13:45:03 +0100 | [diff] [blame] | 84 | COMPAT_SYSCALL_WRAP2(setpgid, pid_t, pid, pid_t, pgid); |
Heiko Carstens | be06fbf | 2014-02-27 14:04:43 +0100 | [diff] [blame] | 85 | COMPAT_SYSCALL_WRAP1(umask, int, mask); |
| 86 | COMPAT_SYSCALL_WRAP1(chroot, const char __user *, filename); |
| 87 | COMPAT_SYSCALL_WRAP2(dup2, unsigned int, oldfd, unsigned int, newfd); |
Heiko Carstens | ab4f8bb | 2014-03-01 13:45:03 +0100 | [diff] [blame] | 88 | COMPAT_SYSCALL_WRAP3(sigsuspend, int, unused1, int, unused2, old_sigset_t, mask); |
Heiko Carstens | be06fbf | 2014-02-27 14:04:43 +0100 | [diff] [blame] | 89 | COMPAT_SYSCALL_WRAP2(sethostname, char __user *, name, int, len); |
| 90 | COMPAT_SYSCALL_WRAP2(symlink, const char __user *, old, const char __user *, new); |
| 91 | COMPAT_SYSCALL_WRAP3(readlink, const char __user *, path, char __user *, buf, int, bufsiz); |
| 92 | COMPAT_SYSCALL_WRAP1(uselib, const char __user *, library); |
| 93 | COMPAT_SYSCALL_WRAP2(swapon, const char __user *, specialfile, int, swap_flags); |
Heiko Carstens | c355ce1 | 2014-02-27 14:20:53 +0100 | [diff] [blame] | 94 | COMPAT_SYSCALL_WRAP4(reboot, int, magic1, int, magic2, unsigned int, cmd, void __user *, arg); |
Heiko Carstens | ab4f8bb | 2014-03-01 13:45:03 +0100 | [diff] [blame] | 95 | COMPAT_SYSCALL_WRAP2(munmap, unsigned long, addr, size_t, len); |
Heiko Carstens | c355ce1 | 2014-02-27 14:20:53 +0100 | [diff] [blame] | 96 | COMPAT_SYSCALL_WRAP2(fchmod, unsigned int, fd, umode_t, mode); |
| 97 | COMPAT_SYSCALL_WRAP2(getpriority, int, which, int, who); |
| 98 | COMPAT_SYSCALL_WRAP3(setpriority, int, which, int, who, int, niceval); |
| 99 | COMPAT_SYSCALL_WRAP3(syslog, int, type, char __user *, buf, int, len); |
| 100 | COMPAT_SYSCALL_WRAP1(swapoff, const char __user *, specialfile); |
| 101 | COMPAT_SYSCALL_WRAP1(fsync, unsigned int, fd); |
| 102 | COMPAT_SYSCALL_WRAP2(setdomainname, char __user *, name, int, len); |
| 103 | COMPAT_SYSCALL_WRAP1(newuname, struct new_utsname __user *, name); |
Heiko Carstens | ab4f8bb | 2014-03-01 13:45:03 +0100 | [diff] [blame] | 104 | COMPAT_SYSCALL_WRAP3(mprotect, unsigned long, start, size_t, len, unsigned long, prot); |
| 105 | COMPAT_SYSCALL_WRAP3(init_module, void __user *, umod, unsigned long, len, const char __user *, uargs); |
Heiko Carstens | 86d295e | 2014-02-27 15:16:04 +0100 | [diff] [blame] | 106 | COMPAT_SYSCALL_WRAP2(delete_module, const char __user *, name_user, unsigned int, flags); |
| 107 | COMPAT_SYSCALL_WRAP4(quotactl, unsigned int, cmd, const char __user *, special, qid_t, id, void __user *, addr); |
Heiko Carstens | ab4f8bb | 2014-03-01 13:45:03 +0100 | [diff] [blame] | 108 | COMPAT_SYSCALL_WRAP1(getpgid, pid_t, pid); |
Heiko Carstens | 86d295e | 2014-02-27 15:16:04 +0100 | [diff] [blame] | 109 | COMPAT_SYSCALL_WRAP1(fchdir, unsigned int, fd); |
Heiko Carstens | ab4f8bb | 2014-03-01 13:45:03 +0100 | [diff] [blame] | 110 | COMPAT_SYSCALL_WRAP2(bdflush, int, func, long, data); |
| 111 | COMPAT_SYSCALL_WRAP3(sysfs, int, option, unsigned long, arg1, unsigned long, arg2); |
Heiko Carstens | 86d295e | 2014-02-27 15:16:04 +0100 | [diff] [blame] | 112 | COMPAT_SYSCALL_WRAP1(s390_personality, unsigned int, personality); |
Heiko Carstens | ab4f8bb | 2014-03-01 13:45:03 +0100 | [diff] [blame] | 113 | COMPAT_SYSCALL_WRAP5(llseek, unsigned int, fd, unsigned long, high, unsigned long, low, loff_t __user *, result, unsigned int, whence); |
Heiko Carstens | ce5cef7 | 2014-02-27 15:33:06 +0100 | [diff] [blame] | 114 | COMPAT_SYSCALL_WRAP2(flock, unsigned int, fd, unsigned int, cmd); |
Heiko Carstens | ab4f8bb | 2014-03-01 13:45:03 +0100 | [diff] [blame] | 115 | COMPAT_SYSCALL_WRAP3(msync, unsigned long, start, size_t, len, int, flags); |
| 116 | COMPAT_SYSCALL_WRAP1(getsid, pid_t, pid); |
Heiko Carstens | ce5cef7 | 2014-02-27 15:33:06 +0100 | [diff] [blame] | 117 | COMPAT_SYSCALL_WRAP1(fdatasync, unsigned int, fd); |
Heiko Carstens | ab4f8bb | 2014-03-01 13:45:03 +0100 | [diff] [blame] | 118 | COMPAT_SYSCALL_WRAP2(mlock, unsigned long, start, size_t, len); |
| 119 | COMPAT_SYSCALL_WRAP2(munlock, unsigned long, start, size_t, len); |
Heiko Carstens | ce5cef7 | 2014-02-27 15:33:06 +0100 | [diff] [blame] | 120 | COMPAT_SYSCALL_WRAP1(mlockall, int, flags); |
Heiko Carstens | ab4f8bb | 2014-03-01 13:45:03 +0100 | [diff] [blame] | 121 | COMPAT_SYSCALL_WRAP2(sched_setparam, pid_t, pid, struct sched_param __user *, param); |
| 122 | COMPAT_SYSCALL_WRAP2(sched_getparam, pid_t, pid, struct sched_param __user *, param); |
| 123 | COMPAT_SYSCALL_WRAP3(sched_setscheduler, pid_t, pid, int, policy, struct sched_param __user *, param); |
| 124 | COMPAT_SYSCALL_WRAP1(sched_getscheduler, pid_t, pid); |
Heiko Carstens | 0ebe3ee | 2014-02-27 16:49:10 +0100 | [diff] [blame] | 125 | COMPAT_SYSCALL_WRAP1(sched_get_priority_max, int, policy); |
| 126 | COMPAT_SYSCALL_WRAP1(sched_get_priority_min, int, policy); |
Heiko Carstens | ab4f8bb | 2014-03-01 13:45:03 +0100 | [diff] [blame] | 127 | COMPAT_SYSCALL_WRAP5(mremap, unsigned long, addr, unsigned long, old_len, unsigned long, new_len, unsigned long, flags, unsigned long, new_addr); |
Heiko Carstens | 0ebe3ee | 2014-02-27 16:49:10 +0100 | [diff] [blame] | 128 | COMPAT_SYSCALL_WRAP3(poll, struct pollfd __user *, ufds, unsigned int, nfds, int, timeout); |
Heiko Carstens | ab4f8bb | 2014-03-01 13:45:03 +0100 | [diff] [blame] | 129 | COMPAT_SYSCALL_WRAP5(prctl, int, option, unsigned long, arg2, unsigned long, arg3, unsigned long, arg4, unsigned long, arg5); |
| 130 | COMPAT_SYSCALL_WRAP2(getcwd, char __user *, buf, unsigned long, size); |
Heiko Carstens | 0ebe3ee | 2014-02-27 16:49:10 +0100 | [diff] [blame] | 131 | COMPAT_SYSCALL_WRAP2(capget, cap_user_header_t, header, cap_user_data_t, dataptr); |
| 132 | COMPAT_SYSCALL_WRAP2(capset, cap_user_header_t, header, const cap_user_data_t, data); |
Heiko Carstens | ab4f8bb | 2014-03-01 13:45:03 +0100 | [diff] [blame] | 133 | COMPAT_SYSCALL_WRAP3(lchown, const char __user *, filename, uid_t, user, gid_t, group); |
| 134 | COMPAT_SYSCALL_WRAP2(setreuid, uid_t, ruid, uid_t, euid); |
| 135 | COMPAT_SYSCALL_WRAP2(setregid, gid_t, rgid, gid_t, egid); |
| 136 | COMPAT_SYSCALL_WRAP2(getgroups, int, gidsetsize, gid_t __user *, grouplist); |
| 137 | COMPAT_SYSCALL_WRAP2(setgroups, int, gidsetsize, gid_t __user *, grouplist); |
| 138 | COMPAT_SYSCALL_WRAP3(fchown, unsigned int, fd, uid_t, user, gid_t, group); |
| 139 | COMPAT_SYSCALL_WRAP3(setresuid, uid_t, ruid, uid_t, euid, uid_t, suid); |
| 140 | COMPAT_SYSCALL_WRAP3(getresuid, uid_t __user *, ruid, uid_t __user *, euid, uid_t __user *, suid); |
| 141 | COMPAT_SYSCALL_WRAP3(setresgid, gid_t, rgid, gid_t, egid, gid_t, sgid); |
| 142 | COMPAT_SYSCALL_WRAP3(getresgid, gid_t __user *, rgid, gid_t __user *, egid, gid_t __user *, sgid); |
| 143 | COMPAT_SYSCALL_WRAP3(chown, const char __user *, filename, uid_t, user, gid_t, group); |
| 144 | COMPAT_SYSCALL_WRAP1(setuid, uid_t, uid); |
| 145 | COMPAT_SYSCALL_WRAP1(setgid, gid_t, gid); |
| 146 | COMPAT_SYSCALL_WRAP1(setfsuid, uid_t, uid); |
| 147 | COMPAT_SYSCALL_WRAP1(setfsgid, gid_t, gid); |
Heiko Carstens | 24e4c2a | 2014-02-28 10:31:37 +0100 | [diff] [blame] | 148 | COMPAT_SYSCALL_WRAP2(pivot_root, const char __user *, new_root, const char __user *, put_old); |
Heiko Carstens | ab4f8bb | 2014-03-01 13:45:03 +0100 | [diff] [blame] | 149 | COMPAT_SYSCALL_WRAP3(mincore, unsigned long, start, size_t, len, unsigned char __user *, vec); |
| 150 | COMPAT_SYSCALL_WRAP3(madvise, unsigned long, start, size_t, len, int, behavior); |
| 151 | COMPAT_SYSCALL_WRAP5(setxattr, const char __user *, path, const char __user *, name, const void __user *, value, size_t, size, int, flags); |
| 152 | COMPAT_SYSCALL_WRAP5(lsetxattr, const char __user *, path, const char __user *, name, const void __user *, value, size_t, size, int, flags); |
| 153 | COMPAT_SYSCALL_WRAP5(fsetxattr, int, fd, const char __user *, name, const void __user *, value, size_t, size, int, flags); |
Heiko Carstens | 1842116 | 2014-02-28 12:59:44 +0100 | [diff] [blame] | 154 | COMPAT_SYSCALL_WRAP3(getdents64, unsigned int, fd, struct linux_dirent64 __user *, dirent, unsigned int, count); |
Heiko Carstens | ab4f8bb | 2014-03-01 13:45:03 +0100 | [diff] [blame] | 155 | COMPAT_SYSCALL_WRAP4(getxattr, const char __user *, path, const char __user *, name, void __user *, value, size_t, size); |
| 156 | COMPAT_SYSCALL_WRAP4(lgetxattr, const char __user *, path, const char __user *, name, void __user *, value, size_t, size); |
| 157 | COMPAT_SYSCALL_WRAP4(fgetxattr, int, fd, const char __user *, name, void __user *, value, size_t, size); |
| 158 | COMPAT_SYSCALL_WRAP3(listxattr, const char __user *, path, char __user *, list, size_t, size); |
| 159 | COMPAT_SYSCALL_WRAP3(llistxattr, const char __user *, path, char __user *, list, size_t, size); |
| 160 | COMPAT_SYSCALL_WRAP3(flistxattr, int, fd, char __user *, list, size_t, size); |
Heiko Carstens | 1842116 | 2014-02-28 12:59:44 +0100 | [diff] [blame] | 161 | COMPAT_SYSCALL_WRAP2(removexattr, const char __user *, path, const char __user *, name); |
| 162 | COMPAT_SYSCALL_WRAP2(lremovexattr, const char __user *, path, const char __user *, name); |
| 163 | COMPAT_SYSCALL_WRAP2(fremovexattr, int, fd, const char __user *, name); |
Heiko Carstens | 9c4d62f | 2014-02-28 13:22:47 +0100 | [diff] [blame] | 164 | COMPAT_SYSCALL_WRAP1(exit_group, int, error_code); |
| 165 | COMPAT_SYSCALL_WRAP1(set_tid_address, int __user *, tidptr); |
| 166 | COMPAT_SYSCALL_WRAP1(epoll_create, int, size); |
| 167 | COMPAT_SYSCALL_WRAP4(epoll_ctl, int, epfd, int, op, int, fd, struct epoll_event __user *, event); |
| 168 | COMPAT_SYSCALL_WRAP4(epoll_wait, int, epfd, struct epoll_event __user *, events, int, maxevents, int, timeout); |
| 169 | COMPAT_SYSCALL_WRAP1(timer_getoverrun, timer_t, timer_id); |
| 170 | COMPAT_SYSCALL_WRAP1(timer_delete, compat_timer_t, compat_timer_id); |
Heiko Carstens | ab4f8bb | 2014-03-01 13:45:03 +0100 | [diff] [blame] | 171 | COMPAT_SYSCALL_WRAP1(io_destroy, aio_context_t, ctx); |
| 172 | COMPAT_SYSCALL_WRAP3(io_cancel, aio_context_t, ctx_id, struct iocb __user *, iocb, struct io_event __user *, result); |
Heiko Carstens | 9c4d62f | 2014-02-28 13:22:47 +0100 | [diff] [blame] | 173 | COMPAT_SYSCALL_WRAP1(mq_unlink, const char __user *, name); |
Heiko Carstens | ab4f8bb | 2014-03-01 13:45:03 +0100 | [diff] [blame] | 174 | COMPAT_SYSCALL_WRAP5(add_key, const char __user *, tp, const char __user *, dsc, const void __user *, pld, size_t, len, key_serial_t, id); |
Heiko Carstens | 20f7835 | 2014-02-28 13:46:09 +0100 | [diff] [blame] | 175 | COMPAT_SYSCALL_WRAP4(request_key, const char __user *, tp, const char __user *, dsc, const char __user *, info, key_serial_t, id); |
Heiko Carstens | ab4f8bb | 2014-03-01 13:45:03 +0100 | [diff] [blame] | 176 | COMPAT_SYSCALL_WRAP5(remap_file_pages, unsigned long, start, unsigned long, size, unsigned long, prot, unsigned long, pgoff, unsigned long, flags); |
Heiko Carstens | 20f7835 | 2014-02-28 13:46:09 +0100 | [diff] [blame] | 177 | COMPAT_SYSCALL_WRAP3(ioprio_set, int, which, int, who, int, ioprio); |
| 178 | COMPAT_SYSCALL_WRAP2(ioprio_get, int, which, int, who); |
| 179 | COMPAT_SYSCALL_WRAP3(inotify_add_watch, int, fd, const char __user *, path, u32, mask); |
| 180 | COMPAT_SYSCALL_WRAP2(inotify_rm_watch, int, fd, __s32, wd); |
| 181 | COMPAT_SYSCALL_WRAP3(mkdirat, int, dfd, const char __user *, pathname, umode_t, mode); |
| 182 | COMPAT_SYSCALL_WRAP4(mknodat, int, dfd, const char __user *, filename, umode_t, mode, unsigned, dev); |
Heiko Carstens | ab4f8bb | 2014-03-01 13:45:03 +0100 | [diff] [blame] | 183 | COMPAT_SYSCALL_WRAP5(fchownat, int, dfd, const char __user *, filename, uid_t, user, gid_t, group, int, flag); |
Heiko Carstens | 28798ab | 2014-02-28 15:33:00 +0100 | [diff] [blame] | 184 | COMPAT_SYSCALL_WRAP3(unlinkat, int, dfd, const char __user *, pathname, int, flag); |
| 185 | COMPAT_SYSCALL_WRAP4(renameat, int, olddfd, const char __user *, oldname, int, newdfd, const char __user *, newname); |
| 186 | COMPAT_SYSCALL_WRAP5(linkat, int, olddfd, const char __user *, oldname, int, newdfd, const char __user *, newname, int, flags); |
| 187 | COMPAT_SYSCALL_WRAP3(symlinkat, const char __user *, oldname, int, newdfd, const char __user *, newname); |
| 188 | COMPAT_SYSCALL_WRAP4(readlinkat, int, dfd, const char __user *, path, char __user *, buf, int, bufsiz); |
| 189 | COMPAT_SYSCALL_WRAP3(fchmodat, int, dfd, const char __user *, filename, umode_t, mode); |
| 190 | COMPAT_SYSCALL_WRAP3(faccessat, int, dfd, const char __user *, filename, int, mode); |
Heiko Carstens | ab4f8bb | 2014-03-01 13:45:03 +0100 | [diff] [blame] | 191 | COMPAT_SYSCALL_WRAP1(unshare, unsigned long, unshare_flags); |
| 192 | COMPAT_SYSCALL_WRAP6(splice, int, fd_in, loff_t __user *, off_in, int, fd_out, loff_t __user *, off_out, size_t, len, unsigned int, flags); |
| 193 | COMPAT_SYSCALL_WRAP4(tee, int, fdin, int, fdout, size_t, len, unsigned int, flags); |
Heiko Carstens | 7f6afe8 | 2014-03-01 11:52:48 +0100 | [diff] [blame] | 194 | COMPAT_SYSCALL_WRAP3(getcpu, unsigned __user *, cpu, unsigned __user *, node, struct getcpu_cache __user *, cache); |
| 195 | COMPAT_SYSCALL_WRAP1(eventfd, unsigned int, count); |
| 196 | COMPAT_SYSCALL_WRAP2(timerfd_create, int, clockid, int, flags); |
| 197 | COMPAT_SYSCALL_WRAP2(eventfd2, unsigned int, count, int, flags); |
| 198 | COMPAT_SYSCALL_WRAP1(inotify_init1, int, flags); |
| 199 | COMPAT_SYSCALL_WRAP2(pipe2, int __user *, fildes, int, flags); |
| 200 | COMPAT_SYSCALL_WRAP3(dup3, unsigned int, oldfd, unsigned int, newfd, int, flags); |
| 201 | COMPAT_SYSCALL_WRAP1(epoll_create1, int, flags); |
| 202 | COMPAT_SYSCALL_WRAP2(tkill, int, pid, int, sig); |
| 203 | COMPAT_SYSCALL_WRAP3(tgkill, int, tgid, int, pid, int, sig); |
Heiko Carstens | ab4f8bb | 2014-03-01 13:45:03 +0100 | [diff] [blame] | 204 | COMPAT_SYSCALL_WRAP5(perf_event_open, struct perf_event_attr __user *, attr_uptr, pid_t, pid, int, cpu, int, group_fd, unsigned long, flags); |
Josh Triplett | 3033f14a | 2015-06-25 15:01:19 -0700 | [diff] [blame] | 205 | COMPAT_SYSCALL_WRAP5(clone, unsigned long, newsp, unsigned long, clone_flags, int __user *, parent_tidptr, int __user *, child_tidptr, unsigned long, tls); |
Heiko Carstens | 00fcb149 | 2014-03-01 12:18:46 +0100 | [diff] [blame] | 206 | COMPAT_SYSCALL_WRAP2(fanotify_init, unsigned int, flags, unsigned int, event_f_flags); |
| 207 | COMPAT_SYSCALL_WRAP4(prlimit64, pid_t, pid, unsigned int, resource, const struct rlimit64 __user *, new_rlim, struct rlimit64 __user *, old_rlim); |
| 208 | COMPAT_SYSCALL_WRAP5(name_to_handle_at, int, dfd, const char __user *, name, struct file_handle __user *, handle, int __user *, mnt_id, int, flag); |
| 209 | COMPAT_SYSCALL_WRAP1(syncfs, int, fd); |
| 210 | COMPAT_SYSCALL_WRAP2(setns, int, fd, int, nstype); |
| 211 | COMPAT_SYSCALL_WRAP2(s390_runtime_instr, int, command, int, signum); |
Heiko Carstens | ab4f8bb | 2014-03-01 13:45:03 +0100 | [diff] [blame] | 212 | COMPAT_SYSCALL_WRAP5(kcmp, pid_t, pid1, pid_t, pid2, int, type, unsigned long, idx1, unsigned long, idx2); |
Heiko Carstens | 00fcb149 | 2014-03-01 12:18:46 +0100 | [diff] [blame] | 213 | COMPAT_SYSCALL_WRAP3(finit_module, int, fd, const char __user *, uargs, int, flags); |
| 214 | COMPAT_SYSCALL_WRAP3(sched_setattr, pid_t, pid, struct sched_attr __user *, attr, unsigned int, flags); |
| 215 | COMPAT_SYSCALL_WRAP4(sched_getattr, pid_t, pid, struct sched_attr __user *, attr, unsigned int, size, unsigned int, flags); |
Heiko Carstens | a1977d1 | 2014-04-08 13:13:38 +0200 | [diff] [blame] | 216 | COMPAT_SYSCALL_WRAP5(renameat2, int, olddfd, const char __user *, oldname, int, newdfd, const char __user *, newname, unsigned int, flags); |
Heiko Carstens | b8a7a99 | 2014-08-08 09:39:14 +0200 | [diff] [blame] | 217 | COMPAT_SYSCALL_WRAP3(seccomp, unsigned int, op, unsigned int, flags, const char __user *, uargs) |
| 218 | COMPAT_SYSCALL_WRAP3(getrandom, char __user *, buf, size_t, count, unsigned int, flags) |
Heiko Carstens | 7bb1cdb | 2014-08-11 14:50:37 +0200 | [diff] [blame] | 219 | COMPAT_SYSCALL_WRAP2(memfd_create, const char __user *, uname, unsigned int, flags) |
Heiko Carstens | fcb1c2d | 2014-10-09 12:58:25 +0200 | [diff] [blame] | 220 | COMPAT_SYSCALL_WRAP3(bpf, int, cmd, union bpf_attr *, attr, unsigned int, size); |
Alexey Ishchuk | 4eafad7 | 2014-11-14 14:27:58 +0100 | [diff] [blame] | 221 | COMPAT_SYSCALL_WRAP3(s390_pci_mmio_write, const unsigned long, mmio_addr, const void __user *, user_buffer, const size_t, length); |
| 222 | COMPAT_SYSCALL_WRAP3(s390_pci_mmio_read, const unsigned long, mmio_addr, void __user *, user_buffer, const size_t, length); |