Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Conversion between 32-bit and 64-bit native system calls. |
| 3 | * |
| 4 | * Copyright (C) 2000 Silicon Graphics, Inc. |
| 5 | * Written by Ulf Carlsson (ulfc@engr.sgi.com) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 6 | */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 7 | #include <linux/compiler.h> |
| 8 | #include <linux/mm.h> |
| 9 | #include <linux/errno.h> |
| 10 | #include <linux/file.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 11 | #include <linux/highuid.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 12 | #include <linux/resource.h> |
| 13 | #include <linux/highmem.h> |
| 14 | #include <linux/time.h> |
| 15 | #include <linux/times.h> |
| 16 | #include <linux/poll.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 17 | #include <linux/skbuff.h> |
| 18 | #include <linux/filter.h> |
| 19 | #include <linux/shm.h> |
| 20 | #include <linux/sem.h> |
| 21 | #include <linux/msg.h> |
| 22 | #include <linux/icmpv6.h> |
| 23 | #include <linux/syscalls.h> |
| 24 | #include <linux/sysctl.h> |
| 25 | #include <linux/utime.h> |
| 26 | #include <linux/utsname.h> |
| 27 | #include <linux/personality.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 28 | #include <linux/dnotify.h> |
| 29 | #include <linux/module.h> |
| 30 | #include <linux/binfmts.h> |
| 31 | #include <linux/security.h> |
| 32 | #include <linux/compat.h> |
| 33 | #include <linux/vfs.h> |
Adrian Bunk | cba4fbb | 2007-10-16 23:29:24 -0700 | [diff] [blame] | 34 | #include <linux/ipc.h> |
Tejun Heo | 5a0e3ad | 2010-03-24 17:04:11 +0900 | [diff] [blame] | 35 | #include <linux/slab.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 36 | |
| 37 | #include <net/sock.h> |
| 38 | #include <net/scm.h> |
| 39 | |
Ralf Baechle | 431dc80 | 2007-02-13 00:05:11 +0000 | [diff] [blame] | 40 | #include <asm/compat-signal.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 41 | #include <asm/sim.h> |
| 42 | #include <asm/uaccess.h> |
| 43 | #include <asm/mmu_context.h> |
| 44 | #include <asm/mman.h> |
| 45 | |
| 46 | /* Use this to get at 32-bit user passed pointers. */ |
| 47 | /* A() macro should be used for places where you e.g. |
| 48 | have some internal variable u32 and just want to get |
| 49 | rid of a compiler warning. AA() has to be used in |
| 50 | places where you want to convert a function argument |
| 51 | to 32bit pointer or when you e.g. access pt_regs |
| 52 | structure and want to consider 32bit registers only. |
| 53 | */ |
| 54 | #define A(__x) ((unsigned long)(__x)) |
| 55 | #define AA(__x) ((unsigned long)((int)__x)) |
| 56 | |
| 57 | #ifdef __MIPSEB__ |
Ralf Baechle | 21a151d | 2007-10-11 23:46:15 +0100 | [diff] [blame] | 58 | #define merge_64(r1, r2) ((((r1) & 0xffffffffUL) << 32) + ((r2) & 0xffffffffUL)) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 59 | #endif |
| 60 | #ifdef __MIPSEL__ |
Ralf Baechle | 21a151d | 2007-10-11 23:46:15 +0100 | [diff] [blame] | 61 | #define merge_64(r1, r2) ((((r2) & 0xffffffffUL) << 32) + ((r1) & 0xffffffffUL)) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 62 | #endif |
| 63 | |
Ralf Baechle | dbda6ac | 2009-02-08 16:00:26 +0000 | [diff] [blame] | 64 | SYSCALL_DEFINE6(32_mmap2, unsigned long, addr, unsigned long, len, |
| 65 | unsigned long, prot, unsigned long, flags, unsigned long, fd, |
| 66 | unsigned long, pgoff) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 67 | { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 68 | unsigned long error; |
| 69 | |
| 70 | error = -EINVAL; |
H. Peter Anvin | 947df17 | 2006-02-24 21:20:29 -0800 | [diff] [blame] | 71 | if (pgoff & (~PAGE_MASK >> 12)) |
| 72 | goto out; |
Al Viro | f8b7256 | 2009-11-30 17:37:04 -0500 | [diff] [blame] | 73 | error = sys_mmap_pgoff(addr, len, prot, flags, fd, |
| 74 | pgoff >> (PAGE_SHIFT-12)); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 75 | out: |
| 76 | return error; |
| 77 | } |
| 78 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 79 | #define RLIM_INFINITY32 0x7fffffff |
| 80 | #define RESOURCE32(x) ((x > RLIM_INFINITY32) ? RLIM_INFINITY32 : x) |
| 81 | |
| 82 | struct rlimit32 { |
| 83 | int rlim_cur; |
| 84 | int rlim_max; |
| 85 | }; |
| 86 | |
Ralf Baechle | dbda6ac | 2009-02-08 16:00:26 +0000 | [diff] [blame] | 87 | SYSCALL_DEFINE4(32_truncate64, const char __user *, path, |
| 88 | unsigned long, __dummy, unsigned long, a2, unsigned long, a3) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 89 | { |
Ralf Baechle | d4e9cff | 2008-01-29 10:15:02 +0000 | [diff] [blame] | 90 | return sys_truncate(path, merge_64(a2, a3)); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 91 | } |
| 92 | |
Ralf Baechle | dbda6ac | 2009-02-08 16:00:26 +0000 | [diff] [blame] | 93 | SYSCALL_DEFINE4(32_ftruncate64, unsigned long, fd, unsigned long, __dummy, |
| 94 | unsigned long, a2, unsigned long, a3) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 95 | { |
Ralf Baechle | d4e9cff | 2008-01-29 10:15:02 +0000 | [diff] [blame] | 96 | return sys_ftruncate(fd, merge_64(a2, a3)); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 97 | } |
| 98 | |
Ralf Baechle | d6c178e | 2009-03-28 01:36:09 +0100 | [diff] [blame] | 99 | SYSCALL_DEFINE5(32_llseek, unsigned int, fd, unsigned int, offset_high, |
| 100 | unsigned int, offset_low, loff_t __user *, result, |
| 101 | unsigned int, origin) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 102 | { |
| 103 | return sys_llseek(fd, offset_high, offset_low, result, origin); |
| 104 | } |
| 105 | |
| 106 | /* From the Single Unix Spec: pread & pwrite act like lseek to pos + op + |
| 107 | lseek back to original location. They fail just like lseek does on |
| 108 | non-seekable files. */ |
| 109 | |
Ralf Baechle | dbda6ac | 2009-02-08 16:00:26 +0000 | [diff] [blame] | 110 | SYSCALL_DEFINE6(32_pread, unsigned long, fd, char __user *, buf, size_t, count, |
| 111 | unsigned long, unused, unsigned long, a4, unsigned long, a5) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 112 | { |
Al Viro | 6ad0013 | 2006-04-26 07:28:09 +0100 | [diff] [blame] | 113 | return sys_pread64(fd, buf, count, merge_64(a4, a5)); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 114 | } |
| 115 | |
Ralf Baechle | dbda6ac | 2009-02-08 16:00:26 +0000 | [diff] [blame] | 116 | SYSCALL_DEFINE6(32_pwrite, unsigned int, fd, const char __user *, buf, |
| 117 | size_t, count, u32, unused, u64, a4, u64, a5) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 118 | { |
Al Viro | 6ad0013 | 2006-04-26 07:28:09 +0100 | [diff] [blame] | 119 | return sys_pwrite64(fd, buf, count, merge_64(a4, a5)); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 120 | } |
| 121 | |
Ralf Baechle | 65f8ebe | 2007-03-10 18:22:25 +0000 | [diff] [blame] | 122 | #ifdef CONFIG_SYSVIPC |
| 123 | |
Ralf Baechle | dbda6ac | 2009-02-08 16:00:26 +0000 | [diff] [blame] | 124 | SYSCALL_DEFINE6(32_ipc, u32, call, long, first, long, second, long, third, |
| 125 | unsigned long, ptr, unsigned long, fifth) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 126 | { |
| 127 | int version, err; |
| 128 | |
| 129 | version = call >> 16; /* hack for backward compatibility */ |
| 130 | call &= 0xffff; |
| 131 | |
| 132 | switch (call) { |
| 133 | case SEMOP: |
| 134 | /* struct sembuf is the same on 32 and 64bit :)) */ |
Atsushi Nemoto | 05e4396 | 2006-11-07 18:02:44 +0900 | [diff] [blame] | 135 | err = sys_semtimedop(first, compat_ptr(ptr), second, NULL); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 136 | break; |
| 137 | case SEMTIMEDOP: |
Atsushi Nemoto | 05e4396 | 2006-11-07 18:02:44 +0900 | [diff] [blame] | 138 | err = compat_sys_semtimedop(first, compat_ptr(ptr), second, |
| 139 | compat_ptr(fifth)); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 140 | break; |
| 141 | case SEMGET: |
Atsushi Nemoto | 05e4396 | 2006-11-07 18:02:44 +0900 | [diff] [blame] | 142 | err = sys_semget(first, second, third); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 143 | break; |
| 144 | case SEMCTL: |
Atsushi Nemoto | 05e4396 | 2006-11-07 18:02:44 +0900 | [diff] [blame] | 145 | err = compat_sys_semctl(first, second, third, compat_ptr(ptr)); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 146 | break; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 147 | case MSGSND: |
Atsushi Nemoto | 05e4396 | 2006-11-07 18:02:44 +0900 | [diff] [blame] | 148 | err = compat_sys_msgsnd(first, second, third, compat_ptr(ptr)); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 149 | break; |
| 150 | case MSGRCV: |
Atsushi Nemoto | 05e4396 | 2006-11-07 18:02:44 +0900 | [diff] [blame] | 151 | err = compat_sys_msgrcv(first, second, fifth, third, |
| 152 | version, compat_ptr(ptr)); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 153 | break; |
| 154 | case MSGGET: |
Atsushi Nemoto | 05e4396 | 2006-11-07 18:02:44 +0900 | [diff] [blame] | 155 | err = sys_msgget((key_t) first, second); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 156 | break; |
| 157 | case MSGCTL: |
Atsushi Nemoto | 05e4396 | 2006-11-07 18:02:44 +0900 | [diff] [blame] | 158 | err = compat_sys_msgctl(first, second, compat_ptr(ptr)); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 159 | break; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 160 | case SHMAT: |
Atsushi Nemoto | 05e4396 | 2006-11-07 18:02:44 +0900 | [diff] [blame] | 161 | err = compat_sys_shmat(first, second, third, version, |
| 162 | compat_ptr(ptr)); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 163 | break; |
| 164 | case SHMDT: |
Atsushi Nemoto | 05e4396 | 2006-11-07 18:02:44 +0900 | [diff] [blame] | 165 | err = sys_shmdt(compat_ptr(ptr)); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 166 | break; |
| 167 | case SHMGET: |
Atsushi Nemoto | 05e4396 | 2006-11-07 18:02:44 +0900 | [diff] [blame] | 168 | err = sys_shmget(first, (unsigned)second, third); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 169 | break; |
| 170 | case SHMCTL: |
Atsushi Nemoto | 05e4396 | 2006-11-07 18:02:44 +0900 | [diff] [blame] | 171 | err = compat_sys_shmctl(first, second, compat_ptr(ptr)); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 172 | break; |
| 173 | default: |
| 174 | err = -EINVAL; |
| 175 | break; |
| 176 | } |
| 177 | |
| 178 | return err; |
| 179 | } |
| 180 | |
Ralf Baechle | 65f8ebe | 2007-03-10 18:22:25 +0000 | [diff] [blame] | 181 | #else |
| 182 | |
Ralf Baechle | dbda6ac | 2009-02-08 16:00:26 +0000 | [diff] [blame] | 183 | SYSCALL_DEFINE6(32_ipc, u32, call, int, first, int, second, int, third, |
Xiaotian Feng | c189846 | 2009-03-09 09:45:12 +0800 | [diff] [blame] | 184 | u32, ptr, u32, fifth) |
Ralf Baechle | 65f8ebe | 2007-03-10 18:22:25 +0000 | [diff] [blame] | 185 | { |
| 186 | return -ENOSYS; |
| 187 | } |
| 188 | |
| 189 | #endif /* CONFIG_SYSVIPC */ |
| 190 | |
Atsushi Nemoto | 05e4396 | 2006-11-07 18:02:44 +0900 | [diff] [blame] | 191 | #ifdef CONFIG_MIPS32_N32 |
Ralf Baechle | dbda6ac | 2009-02-08 16:00:26 +0000 | [diff] [blame] | 192 | SYSCALL_DEFINE4(n32_semctl, int, semid, int, semnum, int, cmd, u32, arg) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 193 | { |
Atsushi Nemoto | 05e4396 | 2006-11-07 18:02:44 +0900 | [diff] [blame] | 194 | /* compat_sys_semctl expects a pointer to union semun */ |
| 195 | u32 __user *uptr = compat_alloc_user_space(sizeof(u32)); |
Atsushi Nemoto | e16d8df | 2007-01-10 18:53:33 +0900 | [diff] [blame] | 196 | if (put_user(arg, uptr)) |
Atsushi Nemoto | 05e4396 | 2006-11-07 18:02:44 +0900 | [diff] [blame] | 197 | return -EFAULT; |
| 198 | return compat_sys_semctl(semid, semnum, cmd, uptr); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 199 | } |
Atsushi Nemoto | e16d8df | 2007-01-10 18:53:33 +0900 | [diff] [blame] | 200 | |
Ralf Baechle | dbda6ac | 2009-02-08 16:00:26 +0000 | [diff] [blame] | 201 | SYSCALL_DEFINE4(n32_msgsnd, int, msqid, u32, msgp, unsigned int, msgsz, |
| 202 | int, msgflg) |
Atsushi Nemoto | e16d8df | 2007-01-10 18:53:33 +0900 | [diff] [blame] | 203 | { |
| 204 | return compat_sys_msgsnd(msqid, msgsz, msgflg, compat_ptr(msgp)); |
| 205 | } |
| 206 | |
Ralf Baechle | dbda6ac | 2009-02-08 16:00:26 +0000 | [diff] [blame] | 207 | SYSCALL_DEFINE5(n32_msgrcv, int, msqid, u32, msgp, size_t, msgsz, |
| 208 | int, msgtyp, int, msgflg) |
Atsushi Nemoto | e16d8df | 2007-01-10 18:53:33 +0900 | [diff] [blame] | 209 | { |
| 210 | return compat_sys_msgrcv(msqid, msgsz, msgtyp, msgflg, IPC_64, |
| 211 | compat_ptr(msgp)); |
| 212 | } |
Atsushi Nemoto | 05e4396 | 2006-11-07 18:02:44 +0900 | [diff] [blame] | 213 | #endif |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 214 | |
Ralf Baechle | dbda6ac | 2009-02-08 16:00:26 +0000 | [diff] [blame] | 215 | SYSCALL_DEFINE1(32_personality, unsigned long, personality) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 216 | { |
David Daney | d62c9ce | 2010-11-01 17:43:08 -0700 | [diff] [blame] | 217 | unsigned int p = personality & 0xffffffff; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 218 | int ret; |
David Daney | d62c9ce | 2010-11-01 17:43:08 -0700 | [diff] [blame] | 219 | |
Thiemo Seufer | 53571ce | 2006-08-13 00:53:29 +0100 | [diff] [blame] | 220 | if (personality(current->personality) == PER_LINUX32 && |
David Daney | d62c9ce | 2010-11-01 17:43:08 -0700 | [diff] [blame] | 221 | personality(p) == PER_LINUX) |
| 222 | p = (p & ~PER_MASK) | PER_LINUX32; |
| 223 | ret = sys_personality(p); |
| 224 | if (ret != -1 && personality(ret) == PER_LINUX32) |
| 225 | ret = (ret & ~PER_MASK) | PER_LINUX; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 226 | return ret; |
| 227 | } |
| 228 | |
Ralf Baechle | dbda6ac | 2009-02-08 16:00:26 +0000 | [diff] [blame] | 229 | SYSCALL_DEFINE4(32_sendfile, long, out_fd, long, in_fd, |
| 230 | compat_off_t __user *, offset, s32, count) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 231 | { |
| 232 | mm_segment_t old_fs = get_fs(); |
| 233 | int ret; |
| 234 | off_t of; |
Ralf Baechle | 42a3b4f | 2005-09-03 15:56:17 -0700 | [diff] [blame] | 235 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 236 | if (offset && get_user(of, offset)) |
| 237 | return -EFAULT; |
Ralf Baechle | 42a3b4f | 2005-09-03 15:56:17 -0700 | [diff] [blame] | 238 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 239 | set_fs(KERNEL_DS); |
Atsushi Nemoto | 219ac73 | 2006-02-21 16:05:11 +0900 | [diff] [blame] | 240 | ret = sys_sendfile(out_fd, in_fd, offset ? (off_t __user *)&of : NULL, count); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 241 | set_fs(old_fs); |
Ralf Baechle | 42a3b4f | 2005-09-03 15:56:17 -0700 | [diff] [blame] | 242 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 243 | if (offset && put_user(of, offset)) |
| 244 | return -EFAULT; |
Ralf Baechle | 42a3b4f | 2005-09-03 15:56:17 -0700 | [diff] [blame] | 245 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 246 | return ret; |
| 247 | } |
| 248 | |
| 249 | asmlinkage ssize_t sys32_readahead(int fd, u32 pad0, u64 a2, u64 a3, |
| 250 | size_t count) |
| 251 | { |
| 252 | return sys_readahead(fd, merge_64(a2, a3), count); |
| 253 | } |
| 254 | |
Ralf Baechle | a8d587a | 2006-04-01 07:49:21 +0100 | [diff] [blame] | 255 | asmlinkage long sys32_sync_file_range(int fd, int __pad, |
| 256 | unsigned long a2, unsigned long a3, |
| 257 | unsigned long a4, unsigned long a5, |
| 258 | int flags) |
| 259 | { |
| 260 | return sys_sync_file_range(fd, |
| 261 | merge_64(a2, a3), merge_64(a4, a5), |
| 262 | flags); |
| 263 | } |
| 264 | |
Atsushi Nemoto | 8676d2e | 2007-05-18 00:46:13 +0900 | [diff] [blame] | 265 | asmlinkage long sys32_fadvise64_64(int fd, int __pad, |
| 266 | unsigned long a2, unsigned long a3, |
| 267 | unsigned long a4, unsigned long a5, |
| 268 | int flags) |
| 269 | { |
| 270 | return sys_fadvise64_64(fd, |
| 271 | merge_64(a2, a3), merge_64(a4, a5), |
| 272 | flags); |
| 273 | } |
| 274 | |
Ralf Baechle | 4dc4677 | 2007-07-26 03:38:24 +0100 | [diff] [blame] | 275 | asmlinkage long sys32_fallocate(int fd, int mode, unsigned offset_a2, |
| 276 | unsigned offset_a3, unsigned len_a4, unsigned len_a5) |
| 277 | { |
| 278 | return sys_fallocate(fd, mode, merge_64(offset_a2, offset_a3), |
| 279 | merge_64(len_a4, len_a5)); |
| 280 | } |
| 281 | |
Wu Zhangjin | 80b8585 | 2009-10-10 19:19:49 +0800 | [diff] [blame] | 282 | asmlinkage long sys32_lookup_dcookie(u32 a0, u32 a1, char __user *buf, |
| 283 | size_t len) |
| 284 | { |
| 285 | return sys_lookup_dcookie(merge_64(a0, a1), buf, len); |
| 286 | } |
David Daney | 5e844b3 | 2010-08-23 14:10:37 -0700 | [diff] [blame] | 287 | |
| 288 | SYSCALL_DEFINE6(32_fanotify_mark, int, fanotify_fd, unsigned int, flags, |
| 289 | u64, a3, u64, a4, int, dfd, const char __user *, pathname) |
| 290 | { |
| 291 | return sys_fanotify_mark(fanotify_fd, flags, merge_64(a3, a4), |
| 292 | dfd, pathname); |
| 293 | } |