diff options
| -rw-r--r-- | Documentation/process/adding-syscalls.rst | 4 | ||||
| -rw-r--r-- | arch/x86/entry/syscalls/syscall_32.tbl | 252 | ||||
| -rw-r--r-- | arch/x86/entry/syscalls/syscall_64.tbl | 72 | ||||
| -rw-r--r-- | arch/x86/include/asm/syscall_wrapper.h | 44 | ||||
| -rw-r--r-- | arch/x86/include/asm/syscalls.h | 2 | ||||
| -rw-r--r-- | include/linux/compat.h | 29 | ||||
| -rwxr-xr-x | scripts/bloat-o-meter | 2 |
7 files changed, 205 insertions, 200 deletions
diff --git a/Documentation/process/adding-syscalls.rst b/Documentation/process/adding-syscalls.rst index 314c8bf6f2a2..0d4f29bc798b 100644 --- a/Documentation/process/adding-syscalls.rst +++ b/Documentation/process/adding-syscalls.rst | |||
| @@ -360,7 +360,7 @@ First, the entry in ``arch/x86/entry/syscalls/syscall_32.tbl`` gets an extra | |||
| 360 | column to indicate that a 32-bit userspace program running on a 64-bit kernel | 360 | column to indicate that a 32-bit userspace program running on a 64-bit kernel |
| 361 | should hit the compat entry point:: | 361 | should hit the compat entry point:: |
| 362 | 362 | ||
| 363 | 380 i386 xyzzy sys_xyzzy compat_sys_xyzzy | 363 | 380 i386 xyzzy sys_xyzzy __ia32_compat_sys_xyzzy |
| 364 | 364 | ||
| 365 | Second, you need to figure out what should happen for the x32 ABI version of | 365 | Second, you need to figure out what should happen for the x32 ABI version of |
| 366 | the new system call. There's a choice here: the layout of the arguments | 366 | the new system call. There's a choice here: the layout of the arguments |
| @@ -373,7 +373,7 @@ the compatibility wrapper:: | |||
| 373 | 373 | ||
| 374 | 333 64 xyzzy sys_xyzzy | 374 | 333 64 xyzzy sys_xyzzy |
| 375 | ... | 375 | ... |
| 376 | 555 x32 xyzzy compat_sys_xyzzy | 376 | 555 x32 xyzzy __x32_compat_sys_xyzzy |
| 377 | 377 | ||
| 378 | If no pointers are involved, then it is preferable to re-use the 64-bit system | 378 | If no pointers are involved, then it is preferable to re-use the 64-bit system |
| 379 | call for the x32 ABI (and consequently the entry in | 379 | call for the x32 ABI (and consequently the entry in |
diff --git a/arch/x86/entry/syscalls/syscall_32.tbl b/arch/x86/entry/syscalls/syscall_32.tbl index 539df8f6d0e1..0e6cb1335db2 100644 --- a/arch/x86/entry/syscalls/syscall_32.tbl +++ b/arch/x86/entry/syscalls/syscall_32.tbl | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | # The format is: | 4 | # The format is: |
| 5 | # <number> <abi> <name> <entry point> <compat entry point> | 5 | # <number> <abi> <name> <entry point> <compat entry point> |
| 6 | # | 6 | # |
| 7 | # The __ia32_sys and __compat_sys_ia32 stubs are created on-the-fly for | 7 | # The __ia32_sys and __ia32_compat_sys stubs are created on-the-fly for |
| 8 | # sys_*() system calls and compat_sys_*() compat system calls if | 8 | # sys_*() system calls and compat_sys_*() compat system calls if |
| 9 | # IA32_EMULATION is defined, and expect struct pt_regs *regs as their only | 9 | # IA32_EMULATION is defined, and expect struct pt_regs *regs as their only |
| 10 | # parameter. | 10 | # parameter. |
| @@ -16,32 +16,32 @@ | |||
| 16 | 2 i386 fork sys_fork | 16 | 2 i386 fork sys_fork |
| 17 | 3 i386 read sys_read __ia32_sys_read | 17 | 3 i386 read sys_read __ia32_sys_read |
| 18 | 4 i386 write sys_write __ia32_sys_write | 18 | 4 i386 write sys_write __ia32_sys_write |
| 19 | 5 i386 open sys_open __compat_sys_ia32_open | 19 | 5 i386 open sys_open __ia32_compat_sys_open |
| 20 | 6 i386 close sys_close __ia32_sys_close | 20 | 6 i386 close sys_close __ia32_sys_close |
| 21 | 7 i386 waitpid sys_waitpid __ia32_sys_waitpid | 21 | 7 i386 waitpid sys_waitpid __ia32_sys_waitpid |
| 22 | 8 i386 creat sys_creat __ia32_sys_creat | 22 | 8 i386 creat sys_creat __ia32_sys_creat |
| 23 | 9 i386 link sys_link __ia32_sys_link | 23 | 9 i386 link sys_link __ia32_sys_link |
| 24 | 10 i386 unlink sys_unlink __ia32_sys_unlink | 24 | 10 i386 unlink sys_unlink __ia32_sys_unlink |
| 25 | 11 i386 execve sys_execve __compat_sys_ia32_execve | 25 | 11 i386 execve sys_execve __ia32_compat_sys_execve |
| 26 | 12 i386 chdir sys_chdir __ia32_sys_chdir | 26 | 12 i386 chdir sys_chdir __ia32_sys_chdir |
| 27 | 13 i386 time sys_time __compat_sys_ia32_time | 27 | 13 i386 time sys_time __ia32_compat_sys_time |
| 28 | 14 i386 mknod sys_mknod __ia32_sys_mknod | 28 | 14 i386 mknod sys_mknod __ia32_sys_mknod |
| 29 | 15 i386 chmod sys_chmod __ia32_sys_chmod | 29 | 15 i386 chmod sys_chmod __ia32_sys_chmod |
| 30 | 16 i386 lchown sys_lchown16 __ia32_sys_lchown16 | 30 | 16 i386 lchown sys_lchown16 __ia32_sys_lchown16 |
| 31 | 17 i386 break | 31 | 17 i386 break |
| 32 | 18 i386 oldstat sys_stat __ia32_sys_stat | 32 | 18 i386 oldstat sys_stat __ia32_sys_stat |
| 33 | 19 i386 lseek sys_lseek __compat_sys_ia32_lseek | 33 | 19 i386 lseek sys_lseek __ia32_compat_sys_lseek |
| 34 | 20 i386 getpid sys_getpid | 34 | 20 i386 getpid sys_getpid |
| 35 | 21 i386 mount sys_mount __compat_sys_ia32_mount | 35 | 21 i386 mount sys_mount __ia32_compat_sys_mount |
| 36 | 22 i386 umount sys_oldumount __ia32_sys_oldumount | 36 | 22 i386 umount sys_oldumount __ia32_sys_oldumount |
| 37 | 23 i386 setuid sys_setuid16 __ia32_sys_setuid16 | 37 | 23 i386 setuid sys_setuid16 __ia32_sys_setuid16 |
| 38 | 24 i386 getuid sys_getuid16 | 38 | 24 i386 getuid sys_getuid16 |
| 39 | 25 i386 stime sys_stime __compat_sys_ia32_stime | 39 | 25 i386 stime sys_stime __ia32_compat_sys_stime |
| 40 | 26 i386 ptrace sys_ptrace __compat_sys_ia32_ptrace | 40 | 26 i386 ptrace sys_ptrace __ia32_compat_sys_ptrace |
| 41 | 27 i386 alarm sys_alarm __ia32_sys_alarm | 41 | 27 i386 alarm sys_alarm __ia32_sys_alarm |
| 42 | 28 i386 oldfstat sys_fstat __ia32_sys_fstat | 42 | 28 i386 oldfstat sys_fstat __ia32_sys_fstat |
| 43 | 29 i386 pause sys_pause | 43 | 29 i386 pause sys_pause |
| 44 | 30 i386 utime sys_utime __compat_sys_ia32_utime | 44 | 30 i386 utime sys_utime __ia32_compat_sys_utime |
| 45 | 31 i386 stty | 45 | 31 i386 stty |
| 46 | 32 i386 gtty | 46 | 32 i386 gtty |
| 47 | 33 i386 access sys_access __ia32_sys_access | 47 | 33 i386 access sys_access __ia32_sys_access |
| @@ -54,7 +54,7 @@ | |||
| 54 | 40 i386 rmdir sys_rmdir __ia32_sys_rmdir | 54 | 40 i386 rmdir sys_rmdir __ia32_sys_rmdir |
| 55 | 41 i386 dup sys_dup __ia32_sys_dup | 55 | 41 i386 dup sys_dup __ia32_sys_dup |
| 56 | 42 i386 pipe sys_pipe __ia32_sys_pipe | 56 | 42 i386 pipe sys_pipe __ia32_sys_pipe |
| 57 | 43 i386 times sys_times __compat_sys_ia32_times | 57 | 43 i386 times sys_times __ia32_compat_sys_times |
| 58 | 44 i386 prof | 58 | 44 i386 prof |
| 59 | 45 i386 brk sys_brk __ia32_sys_brk | 59 | 45 i386 brk sys_brk __ia32_sys_brk |
| 60 | 46 i386 setgid sys_setgid16 __ia32_sys_setgid16 | 60 | 46 i386 setgid sys_setgid16 __ia32_sys_setgid16 |
| @@ -65,84 +65,84 @@ | |||
| 65 | 51 i386 acct sys_acct __ia32_sys_acct | 65 | 51 i386 acct sys_acct __ia32_sys_acct |
| 66 | 52 i386 umount2 sys_umount __ia32_sys_umount | 66 | 52 i386 umount2 sys_umount __ia32_sys_umount |
| 67 | 53 i386 lock | 67 | 53 i386 lock |
| 68 | 54 i386 ioctl sys_ioctl __compat_sys_ia32_ioctl | 68 | 54 i386 ioctl sys_ioctl __ia32_compat_sys_ioctl |
| 69 | 55 i386 fcntl sys_fcntl __compat_sys_ia32_fcntl64 | 69 | 55 i386 fcntl sys_fcntl __ia32_compat_sys_fcntl64 |
| 70 | 56 i386 mpx | 70 | 56 i386 mpx |
| 71 | 57 i386 setpgid sys_setpgid __ia32_sys_setpgid | 71 | 57 i386 setpgid sys_setpgid __ia32_sys_setpgid |
| 72 | 58 i386 ulimit | 72 | 58 i386 ulimit |
| 73 | 59 i386 oldolduname sys_olduname __ia32_sys_olduname | 73 | 59 i386 oldolduname sys_olduname __ia32_sys_olduname |
| 74 | 60 i386 umask sys_umask __ia32_sys_umask | 74 | 60 i386 umask sys_umask __ia32_sys_umask |
| 75 | 61 i386 chroot sys_chroot __ia32_sys_chroot | 75 | 61 i386 chroot sys_chroot __ia32_sys_chroot |
| 76 | 62 i386 ustat sys_ustat __compat_sys_ia32_ustat | 76 | 62 i386 ustat sys_ustat __ia32_compat_sys_ustat |
| 77 | 63 i386 dup2 sys_dup2 __ia32_sys_dup2 | 77 | 63 i386 dup2 sys_dup2 __ia32_sys_dup2 |
| 78 | 64 i386 getppid sys_getppid | 78 | 64 i386 getppid sys_getppid |
| 79 | 65 i386 getpgrp sys_getpgrp | 79 | 65 i386 getpgrp sys_getpgrp |
| 80 | 66 i386 setsid sys_setsid | 80 | 66 i386 setsid sys_setsid |
| 81 | 67 i386 sigaction sys_sigaction __compat_sys_ia32_sigaction | 81 | 67 i386 sigaction sys_sigaction __ia32_compat_sys_sigaction |
| 82 | 68 i386 sgetmask sys_sgetmask | 82 | 68 i386 sgetmask sys_sgetmask |
| 83 | 69 i386 ssetmask sys_ssetmask __ia32_sys_ssetmask | 83 | 69 i386 ssetmask sys_ssetmask __ia32_sys_ssetmask |
| 84 | 70 i386 setreuid sys_setreuid16 __ia32_sys_setreuid16 | 84 | 70 i386 setreuid sys_setreuid16 __ia32_sys_setreuid16 |
| 85 | 71 i386 setregid sys_setregid16 __ia32_sys_setregid16 | 85 | 71 i386 setregid sys_setregid16 __ia32_sys_setregid16 |
| 86 | 72 i386 sigsuspend sys_sigsuspend __ia32_sys_sigsuspend | 86 | 72 i386 sigsuspend sys_sigsuspend __ia32_sys_sigsuspend |
| 87 | 73 i386 sigpending sys_sigpending __compat_sys_ia32_sigpending | 87 | 73 i386 sigpending sys_sigpending __ia32_compat_sys_sigpending |
| 88 | 74 i386 sethostname sys_sethostname __ia32_sys_sethostname | 88 | 74 i386 sethostname sys_sethostname __ia32_sys_sethostname |
| 89 | 75 i386 setrlimit sys_setrlimit __compat_sys_ia32_setrlimit | 89 | 75 i386 setrlimit sys_setrlimit __ia32_compat_sys_setrlimit |
| 90 | 76 i386 getrlimit sys_old_getrlimit __compat_sys_ia32_old_getrlimit | 90 | 76 i386 getrlimit sys_old_getrlimit __ia32_compat_sys_old_getrlimit |
| 91 | 77 i386 getrusage sys_getrusage __compat_sys_ia32_getrusage | 91 | 77 i386 getrusage sys_getrusage __ia32_compat_sys_getrusage |
| 92 | 78 i386 gettimeofday sys_gettimeofday __compat_sys_ia32_gettimeofday | 92 | 78 i386 gettimeofday sys_gettimeofday __ia32_compat_sys_gettimeofday |
| 93 | 79 i386 settimeofday sys_settimeofday __compat_sys_ia32_settimeofday | 93 | 79 i386 settimeofday sys_settimeofday __ia32_compat_sys_settimeofday |
| 94 | 80 i386 getgroups sys_getgroups16 __ia32_sys_getgroups16 | 94 | 80 i386 getgroups sys_getgroups16 __ia32_sys_getgroups16 |
| 95 | 81 i386 setgroups sys_setgroups16 __ia32_sys_setgroups16 | 95 | 81 i386 setgroups sys_setgroups16 __ia32_sys_setgroups16 |
| 96 | 82 i386 select sys_old_select __compat_sys_ia32_old_select | 96 | 82 i386 select sys_old_select __ia32_compat_sys_old_select |
| 97 | 83 i386 symlink sys_symlink __ia32_sys_symlink | 97 | 83 i386 symlink sys_symlink __ia32_sys_symlink |
| 98 | 84 i386 oldlstat sys_lstat __ia32_sys_lstat | 98 | 84 i386 oldlstat sys_lstat __ia32_sys_lstat |
| 99 | 85 i386 readlink sys_readlink __ia32_sys_readlink | 99 | 85 i386 readlink sys_readlink __ia32_sys_readlink |
| 100 | 86 i386 uselib sys_uselib __ia32_sys_uselib | 100 | 86 i386 uselib sys_uselib __ia32_sys_uselib |
| 101 | 87 i386 swapon sys_swapon __ia32_sys_swapon | 101 | 87 i386 swapon sys_swapon __ia32_sys_swapon |
| 102 | 88 i386 reboot sys_reboot __ia32_sys_reboot | 102 | 88 i386 reboot sys_reboot __ia32_sys_reboot |
| 103 | 89 i386 readdir sys_old_readdir __compat_sys_ia32_old_readdir | 103 | 89 i386 readdir sys_old_readdir __ia32_compat_sys_old_readdir |
| 104 | 90 i386 mmap sys_old_mmap __compat_sys_ia32_x86_mmap | 104 | 90 i386 mmap sys_old_mmap __ia32_compat_sys_x86_mmap |
| 105 | 91 i386 munmap sys_munmap __ia32_sys_munmap | ||
