2 * sys_ppc32.c: Conversion between 32bit and 64bit native syscalls.
4 * Copyright (C) 2001 IBM
5 * Copyright (C) 1997,1998 Jakub Jelinek (jj@sunsite.mff.cuni.cz)
6 * Copyright (C) 1997 David S. Miller (davem@caip.rutgers.edu)
8 * These routines maintain argument size conversion between 32bit and 64bit
11 * This program is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU General Public License
13 * as published by the Free Software Foundation; either version
14 * 2 of the License, or (at your option) any later version.
17 #include <linux/kernel.h>
18 #include <linux/sched.h>
21 #include <linux/file.h>
22 #include <linux/signal.h>
23 #include <linux/resource.h>
24 #include <linux/times.h>
25 #include <linux/utsname.h>
26 #include <linux/smp.h>
27 #include <linux/smp_lock.h>
28 #include <linux/sem.h>
29 #include <linux/msg.h>
30 #include <linux/shm.h>
31 #include <linux/poll.h>
32 #include <linux/personality.h>
33 #include <linux/stat.h>
34 #include <linux/mman.h>
36 #include <linux/syscalls.h>
37 #include <linux/unistd.h>
38 #include <linux/sysctl.h>
39 #include <linux/binfmts.h>
40 #include <linux/security.h>
41 #include <linux/compat.h>
42 #include <linux/ptrace.h>
43 #include <linux/elf.h>
44 #include <linux/ipc.h>
46 #include <asm/ptrace.h>
47 #include <asm/types.h>
48 #include <asm/uaccess.h>
49 #include <asm/unistd.h>
51 #include <asm/mmu_context.h>
52 #include <asm/ppc-pci.h>
53 #include <asm/syscalls.h>
55 struct old_linux_dirent32 {
58 unsigned short d_namlen;
62 struct readdir_callback32 {
63 struct old_linux_dirent32 __user * dirent;
67 static int fillonedir(void * __buf, const char * name, int namlen,
68 off_t offset, u64 ino, unsigned int d_type)
70 struct readdir_callback32 * buf = (struct readdir_callback32 *) __buf;
71 struct old_linux_dirent32 __user * dirent;
77 if (sizeof(d_ino) < sizeof(ino) && d_ino != ino)
81 put_user(d_ino, &dirent->d_ino);
82 put_user(offset, &dirent->d_offset);
83 put_user(namlen, &dirent->d_namlen);
84 copy_to_user(dirent->d_name, name, namlen);
85 put_user(0, dirent->d_name + namlen);
89 asmlinkage int old32_readdir(unsigned int fd, struct old_linux_dirent32 __user *dirent, unsigned int count)
93 struct readdir_callback32 buf;
102 error = vfs_readdir(file, (filldir_t)fillonedir, &buf);
113 asmlinkage long ppc32_select(u32 n, compat_ulong_t __user *inp,
114 compat_ulong_t __user *outp, compat_ulong_t __user *exp,
118 return compat_sys_select((int)n, inp, outp, exp, compat_ptr(tvp_x));
121 int cp_compat_stat(struct kstat *stat, struct compat_stat __user *statbuf)
126 if (stat->size > MAX_NON_LFS || !new_valid_dev(stat->dev) ||
127 !new_valid_dev(stat->rdev))
131 if (sizeof(ino) < sizeof(stat->ino) && ino != stat->ino)
134 err = access_ok(VERIFY_WRITE, statbuf, sizeof(*statbuf)) ? 0 : -EFAULT;
135 err |= __put_user(new_encode_dev(stat->dev), &statbuf->st_dev);
136 err |= __put_user(ino, &statbuf->st_ino);
137 err |= __put_user(stat->mode, &statbuf->st_mode);
138 err |= __put_user(stat->nlink, &statbuf->st_nlink);
139 err |= __put_user(stat->uid, &statbuf->st_uid);
140 err |= __put_user(stat->gid, &statbuf->st_gid);
141 err |= __put_user(new_encode_dev(stat->rdev), &statbuf->st_rdev);
142 err |= __put_user(stat->size, &statbuf->st_size);
143 err |= __put_user(stat->atime.tv_sec, &statbuf->st_atime);
144 err |= __put_user(stat->atime.tv_nsec, &statbuf->st_atime_nsec);
145 err |= __put_user(stat->mtime.tv_sec, &statbuf->st_mtime);
146 err |= __put_user(stat->mtime.tv_nsec, &statbuf->st_mtime_nsec);
147 err |= __put_user(stat->ctime.tv_sec, &statbuf->st_ctime);
148 err |= __put_user(stat->ctime.tv_nsec, &statbuf->st_ctime_nsec);
149 err |= __put_user(stat->blksize, &statbuf->st_blksize);
150 err |= __put_user(stat->blocks, &statbuf->st_blocks);
151 err |= __put_user(0, &statbuf->__unused4[0]);
152 err |= __put_user(0, &statbuf->__unused4[1]);
157 /* Note: it is necessary to treat option as an unsigned int,
158 * with the corresponding cast to a signed int to insure that the
159 * proper conversion (sign extension) between the register representation of a signed int (msr in 32-bit mode)
160 * and the register representation of a signed int (msr in 64-bit mode) is performed.
162 asmlinkage long compat_sys_sysfs(u32 option, u32 arg1, u32 arg2)
164 return sys_sysfs((int)option, arg1, arg2);
167 asmlinkage long compat_sys_pause(void)
169 current->state = TASK_INTERRUPTIBLE;
172 return -ERESTARTNOHAND;
175 static inline long get_ts32(struct timespec *o, struct compat_timeval __user *i)
179 if (!access_ok(VERIFY_READ, i, sizeof(*i)))
181 if (__get_user(o->tv_sec, &i->tv_sec))
183 if (__get_user(usec, &i->tv_usec))
185 o->tv_nsec = usec * 1000;
189 static inline long put_tv32(struct compat_timeval __user *o, struct timeval *i)
191 return (!access_ok(VERIFY_WRITE, o, sizeof(*o)) ||
192 (__put_user(i->tv_sec, &o->tv_sec) |
193 __put_user(i->tv_usec, &o->tv_usec)));
199 /* Translations due to time_t size differences. Which affects all
200 sorts of things, like timeval and itimerval. */
201 extern struct timezone sys_tz;
203 asmlinkage long compat_sys_gettimeofday(struct compat_timeval __user *tv, struct timezone __user *tz)
207 do_gettimeofday(&ktv);
208 if (put_tv32(tv, &ktv))
212 if (copy_to_user(tz, &sys_tz, sizeof(sys_tz)))
221 asmlinkage long compat_sys_settimeofday(struct compat_timeval __user *tv, struct timezone __user *tz)
227 if (get_ts32(&kts, tv))
231 if (copy_from_user(&ktz, tz, sizeof(ktz)))
235 return do_sys_settimeofday(tv ? &kts : NULL, tz ? &ktz : NULL);
238 #ifdef CONFIG_SYSVIPC
239 long compat_sys_ipc(u32 call, u32 first, u32 second, u32 third, compat_uptr_t ptr,
244 version = call >> 16; /* hack for backward compatibility */
251 /* sign extend semid */
252 return compat_sys_semtimedop((int)first,
253 compat_ptr(ptr), second,
255 /* else fall through for normal semop() */
257 /* struct sembuf is the same on 32 and 64bit :)) */
258 /* sign extend semid */
259 return sys_semtimedop((int)first, compat_ptr(ptr), second,
262 /* sign extend key, nsems */
263 return sys_semget((int)first, (int)second, third);
265 /* sign extend semid, semnum */
266 return compat_sys_semctl((int)first, (int)second, third,
270 /* sign extend msqid */
271 return compat_sys_msgsnd((int)first, (int)second, third,
274 /* sign extend msqid, msgtyp */
275 return compat_sys_msgrcv((int)first, second, (int)fifth,
276 third, version, compat_ptr(ptr));
278 /* sign extend key */
279 return sys_msgget((int)first, second);
281 /* sign extend msqid */
282 return compat_sys_msgctl((int)first, second, compat_ptr(ptr));
285 /* sign extend shmid */
286 return compat_sys_shmat((int)first, second, third, version,
289 return sys_shmdt(compat_ptr(ptr));
291 /* sign extend key_t */
292 return sys_shmget((int)first, second, third);
294 /* sign extend shmid */
295 return compat_sys_shmctl((int)first, second, compat_ptr(ptr));
305 /* Note: it is necessary to treat out_fd and in_fd as unsigned ints,
306 * with the corresponding cast to a signed int to insure that the
307 * proper conversion (sign extension) between the register representation of a signed int (msr in 32-bit mode)
308 * and the register representation of a signed int (msr in 64-bit mode) is performed.
310 asmlinkage long compat_sys_sendfile(u32 out_fd, u32 in_fd, compat_off_t __user * offset, u32 count)
312 mm_segment_t old_fs = get_fs();
317 if (offset && get_user(of, offset))
320 /* The __user pointer cast is valid because of the set_fs() */
322 up = offset ? (off_t __user *) &of : NULL;
323 ret = sys_sendfile((int)out_fd, (int)in_fd, up, count);
326 if (offset && put_user(of, offset))
332 asmlinkage int compat_sys_sendfile64(int out_fd, int in_fd, compat_loff_t __user *offset, s32 count)
334 mm_segment_t old_fs = get_fs();
339 if (offset && get_user(lof, offset))
342 /* The __user pointer cast is valid because of the set_fs() */
344 up = offset ? (loff_t __user *) &lof : NULL;
345 ret = sys_sendfile64(out_fd, in_fd, up, count);
348 if (offset && put_user(lof, offset))
354 long compat_sys_execve(unsigned long a0, unsigned long a1, unsigned long a2,
355 unsigned long a3, unsigned long a4, unsigned long a5,
356 struct pt_regs *regs)
361 filename = getname((char __user *) a0);
362 error = PTR_ERR(filename);
363 if (IS_ERR(filename))
365 flush_fp_to_thread(current);
366 flush_altivec_to_thread(current);
368 error = compat_do_execve(filename, compat_ptr(a1), compat_ptr(a2), regs);
372 current->ptrace &= ~PT_DTRACE;
373 task_unlock(current);
381 /* Note: it is necessary to treat option as an unsigned int,
382 * with the corresponding cast to a signed int to insure that the
383 * proper conversion (sign extension) between the register representation of a signed int (msr in 32-bit mode)
384 * and the register representation of a signed int (msr in 64-bit mode) is performed.
386 asmlinkage long compat_sys_prctl(u32 option, u32 arg2, u32 arg3, u32 arg4, u32 arg5)
388 return sys_prctl((int)option,
389 (unsigned long) arg2,
390 (unsigned long) arg3,
391 (unsigned long) arg4,
392 (unsigned long) arg5);
395 /* Note: it is necessary to treat pid as an unsigned int,
396 * with the corresponding cast to a signed int to insure that the
397 * proper conversion (sign extension) between the register representation of a signed int (msr in 32-bit mode)
398 * and the register representation of a signed int (msr in 64-bit mode) is performed.
400 asmlinkage long compat_sys_sched_rr_get_interval(u32 pid, struct compat_timespec __user *interval)
404 mm_segment_t old_fs = get_fs ();
406 /* The __user pointer cast is valid because of the set_fs() */
408 ret = sys_sched_rr_get_interval((int)pid, (struct timespec __user *) &t);
410 if (put_compat_timespec(&t, interval))
415 /* Note: it is necessary to treat mode as an unsigned int,
416 * with the corresponding cast to a signed int to insure that the
417 * proper conversion (sign extension) between the register representation of a signed int (msr in 32-bit mode)
418 * and the register representation of a signed int (msr in 64-bit mode) is performed.
420 asmlinkage long compat_sys_access(const char __user * filename, u32 mode)
422 return sys_access(filename, (int)mode);
426 /* Note: it is necessary to treat mode as an unsigned int,
427 * with the corresponding cast to a signed int to insure that the
428 * proper conversion (sign extension) between the register representation of a signed int (msr in 32-bit mode)
429 * and the register representation of a signed int (msr in 64-bit mode) is performed.
431 asmlinkage long compat_sys_creat(const char __user * pathname, u32 mode)
433 return sys_creat(pathname, (int)mode);
437 /* Note: it is necessary to treat pid and options as unsigned ints,
438 * with the corresponding cast to a signed int to insure that the
439 * proper conversion (sign extension) between the register representation of a signed int (msr in 32-bit mode)
440 * and the register representation of a signed int (msr in 64-bit mode) is performed.
442 asmlinkage long compat_sys_waitpid(u32 pid, unsigned int __user * stat_addr, u32 options)
444 return sys_waitpid((int)pid, stat_addr, (int)options);
448 /* Note: it is necessary to treat gidsetsize as an unsigned int,
449 * with the corresponding cast to a signed int to insure that the
450 * proper conversion (sign extension) between the register representation of a signed int (msr in 32-bit mode)
451 * and the register representation of a signed int (msr in 64-bit mode) is performed.
453 asmlinkage long compat_sys_getgroups(u32 gidsetsize, gid_t __user *grouplist)
455 return sys_getgroups((int)gidsetsize, grouplist);
459 /* Note: it is necessary to treat pid as an unsigned int,
460 * with the corresponding cast to a signed int to insure that the
461 * proper conversion (sign extension) between the register representation of a signed int (msr in 32-bit mode)
462 * and the register representation of a signed int (msr in 64-bit mode) is performed.
464 asmlinkage long compat_sys_getpgid(u32 pid)
466 return sys_getpgid((int)pid);
471 /* Note: it is necessary to treat pid as an unsigned int,
472 * with the corresponding cast to a signed int to insure that the
473 * proper conversion (sign extension) between the register representation of a signed int (msr in 32-bit mode)
474 * and the register representation of a signed int (msr in 64-bit mode) is performed.
476 asmlinkage long compat_sys_getsid(u32 pid)
478 return sys_getsid((int)pid);
482 /* Note: it is necessary to treat pid and sig as unsigned ints,
483 * with the corresponding cast to a signed int to insure that the
484 * proper conversion (sign extension) between the register representation of a signed int (msr in 32-bit mode)
485 * and the register representation of a signed int (msr in 64-bit mode) is performed.
487 asmlinkage long compat_sys_kill(u32 pid, u32 sig)
489 return sys_kill((int)pid, (int)sig);
493 /* Note: it is necessary to treat mode as an unsigned int,
494 * with the corresponding cast to a signed int to insure that the
495 * proper conversion (sign extension) between the register representation of a signed int (msr in 32-bit mode)
496 * and the register representation of a signed int (msr in 64-bit mode) is performed.
498 asmlinkage long compat_sys_mkdir(const char __user * pathname, u32 mode)
500 return sys_mkdir(pathname, (int)mode);
503 long compat_sys_nice(u32 increment)
505 /* sign extend increment */
506 return sys_nice((int)increment);
509 off_t ppc32_lseek(unsigned int fd, u32 offset, unsigned int origin)
512 return sys_lseek(fd, (int)offset, origin);
515 /* Note: it is necessary to treat bufsiz as an unsigned int,
516 * with the corresponding cast to a signed int to insure that the
517 * proper conversion (sign extension) between the register representation of a signed int (msr in 32-bit mode)
518 * and the register representation of a signed int (msr in 64-bit mode) is performed.
520 asmlinkage long compat_sys_readlink(const char __user * path, char __user * buf, u32 bufsiz)
522 return sys_readlink(path, buf, (int)bufsiz);
525 /* Note: it is necessary to treat option as an unsigned int,
526 * with the corresponding cast to a signed int to insure that the
527 * proper conversion (sign extension) between the register representation of a signed int (msr in 32-bit mode)
528 * and the register representation of a signed int (msr in 64-bit mode) is performed.
530 asmlinkage long compat_sys_sched_get_priority_max(u32 policy)
532 return sys_sched_get_priority_max((int)policy);
536 /* Note: it is necessary to treat policy as an unsigned int,
537 * with the corresponding cast to a signed int to insure that the
538 * proper conversion (sign extension) between the register representation of a signed int (msr in 32-bit mode)
539 * and the register representation of a signed int (msr in 64-bit mode) is performed.
541 asmlinkage long compat_sys_sched_get_priority_min(u32 policy)
543 return sys_sched_get_priority_min((int)policy);
547 /* Note: it is necessary to treat pid as an unsigned int,
548 * with the corresponding cast to a signed int to insure that the
549 * proper conversion (sign extension) between the register representation of a signed int (msr in 32-bit mode)
550 * and the register representation of a signed int (msr in 64-bit mode) is performed.
552 asmlinkage long compat_sys_sched_getparam(u32 pid, struct sched_param __user *param)
554 return sys_sched_getparam((int)pid, param);
558 /* Note: it is necessary to treat pid as an unsigned int,
559 * with the corresponding cast to a signed int to insure that the
560 * proper conversion (sign extension) between the register representation of a signed int (msr in 32-bit mode)
561 * and the register representation of a signed int (msr in 64-bit mode) is performed.
563 asmlinkage long compat_sys_sched_getscheduler(u32 pid)
565 return sys_sched_getscheduler((int)pid);
569 /* Note: it is necessary to treat pid as an unsigned int,
570 * with the corresponding cast to a signed int to insure that the
571 * proper conversion (sign extension) between the register representation of a signed int (msr in 32-bit mode)
572 * and the register representation of a signed int (msr in 64-bit mode) is performed.
574 asmlinkage long compat_sys_sched_setparam(u32 pid, struct sched_param __user *param)
576 return sys_sched_setparam((int)pid, param);
580 /* Note: it is necessary to treat pid and policy as unsigned ints,
581 * with the corresponding cast to a signed int to insure that the
582 * proper conversion (sign extension) between the register representation of a signed int (msr in 32-bit mode)
583 * and the register representation of a signed int (msr in 64-bit mode) is performed.
585 asmlinkage long compat_sys_sched_setscheduler(u32 pid, u32 policy, struct sched_param __user *param)
587 return sys_sched_setscheduler((int)pid, (int)policy, param);
591 /* Note: it is necessary to treat len as an unsigned int,
592 * with the corresponding cast to a signed int to insure that the
593 * proper conversion (sign extension) between the register representation of a signed int (msr in 32-bit mode)
594 * and the register representation of a signed int (msr in 64-bit mode) is performed.
596 asmlinkage long compat_sys_setdomainname(char __user *name, u32 len)
598 return sys_setdomainname(name, (int)len);
602 /* Note: it is necessary to treat gidsetsize as an unsigned int,
603 * with the corresponding cast to a signed int to insure that the
604 * proper conversion (sign extension) between the register representation of a signed int (msr in 32-bit mode)
605 * and the register representation of a signed int (msr in 64-bit mode) is performed.
607 asmlinkage long compat_sys_setgroups(u32 gidsetsize, gid_t __user *grouplist)
609 return sys_setgroups((int)gidsetsize, grouplist);
613 asmlinkage long compat_sys_sethostname(char __user *name, u32 len)
615 /* sign extend len */
616 return sys_sethostname(name, (int)len);
620 /* Note: it is necessary to treat pid and pgid as unsigned ints,
621 * with the corresponding cast to a signed int to insure that the
622 * proper conversion (sign extension) between the register representation of a signed int (msr in 32-bit mode)
623 * and the register representation of a signed int (msr in 64-bit mode) is performed.
625 asmlinkage long compat_sys_setpgid(u32 pid, u32 pgid)
627 return sys_setpgid((int)pid, (int)pgid);
630 long compat_sys_getpriority(u32 which, u32 who)
632 /* sign extend which and who */
633 return sys_getpriority((int)which, (int)who);
636 long compat_sys_setpriority(u32 which, u32 who, u32 niceval)
638 /* sign extend which, who and niceval */
639 return sys_setpriority((int)which, (int)who, (int)niceval);
642 long compat_sys_ioprio_get(u32 which, u32 who)
644 /* sign extend which and who */
645 return sys_ioprio_get((int)which, (int)who);
648 long compat_sys_ioprio_set(u32 which, u32 who, u32 ioprio)
650 /* sign extend which, who and ioprio */
651 return sys_ioprio_set((int)which, (int)who, (int)ioprio);
654 /* Note: it is necessary to treat newmask as an unsigned int,
655 * with the corresponding cast to a signed int to insure that the
656 * proper conversion (sign extension) between the register representation of a signed int (msr in 32-bit mode)
657 * and the register representation of a signed int (msr in 64-bit mode) is performed.
659 asmlinkage long compat_sys_ssetmask(u32 newmask)
661 return sys_ssetmask((int) newmask);
664 asmlinkage long compat_sys_syslog(u32 type, char __user * buf, u32 len)
666 /* sign extend len */
667 return sys_syslog(type, buf, (int)len);
671 /* Note: it is necessary to treat mask as an unsigned int,
672 * with the corresponding cast to a signed int to insure that the
673 * proper conversion (sign extension) between the register representation of a signed int (msr in 32-bit mode)
674 * and the register representation of a signed int (msr in 64-bit mode) is performed.
676 asmlinkage long compat_sys_umask(u32 mask)
678 return sys_umask((int)mask);
681 #ifdef CONFIG_SYSCTL_SYSCALL
682 struct __sysctl_args32 {
692 asmlinkage long compat_sys_sysctl(struct __sysctl_args32 __user *args)
694 struct __sysctl_args32 tmp;
697 size_t __user *oldlenp = NULL;
698 unsigned long addr = (((unsigned long)&args->__unused[0]) + 7) & ~7;
700 if (copy_from_user(&tmp, args, sizeof(tmp)))
703 if (tmp.oldval && tmp.oldlenp) {
704 /* Duh, this is ugly and might not work if sysctl_args
705 is in read-only memory, but do_sysctl does indirectly
706 a lot of uaccess in both directions and we'd have to
707 basically copy the whole sysctl.c here, and
708 glibc's __sysctl uses rw memory for the structure
710 oldlenp = (size_t __user *)addr;
711 if (get_user(oldlen, (compat_size_t __user *)compat_ptr(tmp.oldlenp)) ||
712 put_user(oldlen, oldlenp))
717 error = do_sysctl(compat_ptr(tmp.name), tmp.nlen,
718 compat_ptr(tmp.oldval), oldlenp,
719 compat_ptr(tmp.newval), tmp.newlen);
723 if (get_user(oldlen, oldlenp) ||
724 put_user(oldlen, (compat_size_t __user *)compat_ptr(tmp.oldlenp)))
727 copy_to_user(args->__unused, tmp.__unused, sizeof(tmp.__unused));
733 unsigned long compat_sys_mmap2(unsigned long addr, size_t len,
734 unsigned long prot, unsigned long flags,
735 unsigned long fd, unsigned long pgoff)
737 /* This should remain 12 even if PAGE_SIZE changes */
738 return sys_mmap(addr, len, prot, flags, fd, pgoff << 12);
741 long compat_sys_tgkill(u32 tgid, u32 pid, int sig)
743 /* sign extend tgid, pid */
744 return sys_tgkill((int)tgid, (int)pid, sig);
749 * The 32 bit ABI passes long longs in an odd even register pair.
752 compat_ssize_t compat_sys_pread64(unsigned int fd, char __user *ubuf, compat_size_t count,
753 u32 reg6, u32 poshi, u32 poslo)
755 return sys_pread64(fd, ubuf, count, ((loff_t)poshi << 32) | poslo);
758 compat_ssize_t compat_sys_pwrite64(unsigned int fd, char __user *ubuf, compat_size_t count,
759 u32 reg6, u32 poshi, u32 poslo)
761 return sys_pwrite64(fd, ubuf, count, ((loff_t)poshi << 32) | poslo);
764 compat_ssize_t compat_sys_readahead(int fd, u32 r4, u32 offhi, u32 offlo, u32 count)
766 return sys_readahead(fd, ((loff_t)offhi << 32) | offlo, count);
769 asmlinkage int compat_sys_truncate64(const char __user * path, u32 reg4,
770 unsigned long high, unsigned long low)
772 return sys_truncate(path, (high << 32) | low);
775 asmlinkage long compat_sys_fallocate(int fd, int mode, u32 offhi, u32 offlo,
776 u32 lenhi, u32 lenlo)
778 return sys_fallocate(fd, mode, ((loff_t)offhi << 32) | offlo,
779 ((loff_t)lenhi << 32) | lenlo);
782 asmlinkage int compat_sys_ftruncate64(unsigned int fd, u32 reg4, unsigned long high,
785 return sys_ftruncate(fd, (high << 32) | low);
788 long ppc32_lookup_dcookie(u32 cookie_high, u32 cookie_low, char __user *buf,
791 return sys_lookup_dcookie((u64)cookie_high << 32 | cookie_low,
795 long ppc32_fadvise64(int fd, u32 unused, u32 offset_high, u32 offset_low,
796 size_t len, int advice)
798 return sys_fadvise64(fd, (u64)offset_high << 32 | offset_low, len,
802 asmlinkage long compat_sys_add_key(const char __user *_type,
803 const char __user *_description,
804 const void __user *_payload,
808 return sys_add_key(_type, _description, _payload, plen, ringid);
811 asmlinkage long compat_sys_request_key(const char __user *_type,
812 const char __user *_description,
813 const char __user *_callout_info,
816 return sys_request_key(_type, _description, _callout_info, destringid);
819 asmlinkage long compat_sys_sync_file_range2(int fd, unsigned int flags,
820 unsigned offset_hi, unsigned offset_lo,
821 unsigned nbytes_hi, unsigned nbytes_lo)
823 loff_t offset = ((loff_t)offset_hi << 32) | offset_lo;
824 loff_t nbytes = ((loff_t)nbytes_hi << 32) | nbytes_lo;
826 return sys_sync_file_range(fd, offset, nbytes, flags);