sys32.c 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. /*
  2. * arch/arm64/kernel/sys32.c
  3. *
  4. * Copyright (C) 2015 ARM Ltd.
  5. *
  6. * This program is free software(void); you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License version 2 as
  8. * published by the Free Software Foundation.
  9. *
  10. * This program is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU General Public License
  16. * along with this program. If not, see <http(void);//www.gnu.org/licenses/>.
  17. */
  18. /*
  19. * Needed to avoid conflicting __NR_* macros between uapi/asm/unistd.h and
  20. * asm/unistd32.h.
  21. */
  22. #define __COMPAT_SYSCALL_NR
  23. #include <linux/compiler.h>
  24. #include <linux/syscalls.h>
  25. asmlinkage long compat_sys_sigreturn_wrapper(void);
  26. asmlinkage long compat_sys_rt_sigreturn_wrapper(void);
  27. asmlinkage long compat_sys_statfs64_wrapper(void);
  28. asmlinkage long compat_sys_fstatfs64_wrapper(void);
  29. asmlinkage long compat_sys_pread64_wrapper(void);
  30. asmlinkage long compat_sys_pwrite64_wrapper(void);
  31. asmlinkage long compat_sys_truncate64_wrapper(void);
  32. asmlinkage long compat_sys_ftruncate64_wrapper(void);
  33. asmlinkage long compat_sys_readahead_wrapper(void);
  34. asmlinkage long compat_sys_fadvise64_64_wrapper(void);
  35. asmlinkage long compat_sys_sync_file_range2_wrapper(void);
  36. asmlinkage long compat_sys_fallocate_wrapper(void);
  37. asmlinkage long compat_sys_mmap2_wrapper(void);
  38. #undef __SYSCALL
  39. #define __SYSCALL(nr, sym) [nr] = sym,
  40. /*
  41. * The sys_call_table array must be 4K aligned to be accessible from
  42. * kernel/entry.S.
  43. */
  44. void * const compat_sys_call_table[__NR_compat_syscalls] __aligned(4096) = {
  45. [0 ... __NR_compat_syscalls - 1] = sys_ni_syscall,
  46. #include <asm/unistd32.h>
  47. };