diff options
108 files changed, 810 insertions, 659 deletions
diff --git a/arch/Kconfig b/arch/Kconfig index 2e13aa261929..550dab22daa1 100644 --- a/arch/Kconfig +++ b/arch/Kconfig | |||
@@ -62,6 +62,9 @@ config HAVE_EFFICIENT_UNALIGNED_ACCESS | |||
62 | See Documentation/unaligned-memory-access.txt for more | 62 | See Documentation/unaligned-memory-access.txt for more |
63 | information on the topic of unaligned memory accesses. | 63 | information on the topic of unaligned memory accesses. |
64 | 64 | ||
65 | config HAVE_SYSCALL_WRAPPERS | ||
66 | bool | ||
67 | |||
65 | config KRETPROBES | 68 | config KRETPROBES |
66 | def_bool y | 69 | def_bool y |
67 | depends on KPROBES && HAVE_KRETPROBES | 70 | depends on KPROBES && HAVE_KRETPROBES |
diff --git a/arch/alpha/kernel/entry.S b/arch/alpha/kernel/entry.S index f77345bc66a9..aa2e50cf9857 100644 --- a/arch/alpha/kernel/entry.S +++ b/arch/alpha/kernel/entry.S | |||
@@ -896,9 +896,9 @@ sys_getxpid: | |||
896 | .end sys_getxpid | 896 | .end sys_getxpid |
897 | 897 | ||
898 | .align 4 | 898 | .align 4 |
899 | .globl sys_pipe | 899 | .globl sys_alpha_pipe |
900 | .ent sys_pipe | 900 | .ent sys_alpha_pipe |
901 | sys_pipe: | 901 | sys_alpha_pipe: |
902 | lda $sp, -16($sp) | 902 | lda $sp, -16($sp) |
903 | stq $26, 0($sp) | 903 | stq $26, 0($sp) |
904 | .prologue 0 | 904 | .prologue 0 |
@@ -916,7 +916,7 @@ sys_pipe: | |||
916 | stq $1, 80+16($sp) | 916 | stq $1, 80+16($sp) |
917 | 1: lda $sp, 16($sp) | 917 | 1: lda $sp, 16($sp) |
918 | ret | 918 | ret |
919 | .end sys_pipe | 919 | .end sys_alpha_pipe |
920 | 920 | ||
921 | .align 4 | 921 | .align 4 |
922 | .globl sys_execve | 922 | .globl sys_execve |
diff --git a/arch/alpha/kernel/systbls.S b/arch/alpha/kernel/systbls.S index ba914af18c4f..9d9e3a98bb95 100644 --- a/arch/alpha/kernel/systbls.S +++ b/arch/alpha/kernel/systbls.S | |||
@@ -52,7 +52,7 @@ sys_call_table: | |||
52 | .quad sys_setpgid | 52 | .quad sys_setpgid |
53 | .quad alpha_ni_syscall /* 40 */ | 53 | .quad alpha_ni_syscall /* 40 */ |
54 | .quad sys_dup | 54 | .quad sys_dup |
55 | .quad sys_pipe | 55 | .quad sys_alpha_pipe |
56 | .quad osf_set_program_attributes | 56 | .quad osf_set_program_attributes |
57 | .quad alpha_ni_syscall | 57 | .quad alpha_ni_syscall |
58 | .quad sys_open /* 45 */ | 58 | .quad sys_open /* 45 */ |
diff --git a/arch/arm/kernel/calls.S b/arch/arm/kernel/calls.S index 09a061cb7838..9ca8d13f05f7 100644 --- a/arch/arm/kernel/calls.S +++ b/arch/arm/kernel/calls.S | |||
@@ -98,7 +98,7 @@ | |||
98 | CALL(sys_uselib) | 98 | CALL(sys_uselib) |
99 | CALL(sys_swapon) | 99 | CALL(sys_swapon) |
100 | CALL(sys_reboot) | 100 | CALL(sys_reboot) |
101 | CALL(OBSOLETE(old_readdir)) /* used by libc4 */ | 101 | CALL(OBSOLETE(sys_old_readdir)) /* used by libc4 */ |
102 | /* 90 */ CALL(OBSOLETE(old_mmap)) /* used by libc4 */ | 102 | /* 90 */ CALL(OBSOLETE(old_mmap)) /* used by libc4 */ |
103 | CALL(sys_munmap) | 103 | CALL(sys_munmap) |
104 | CALL(sys_truncate) | 104 | CALL(sys_truncate) |
diff --git a/arch/cris/arch-v10/kernel/entry.S b/arch/cris/arch-v10/kernel/entry.S index ed171d389e65..72f5cd319b97 100644 --- a/arch/cris/arch-v10/kernel/entry.S +++ b/arch/cris/arch-v10/kernel/entry.S | |||
@@ -691,7 +691,7 @@ sys_call_table: | |||
691 | .long sys_uselib | 691 | .long sys_uselib |
692 | .long sys_swapon | 692 | .long sys_swapon |
693 | .long sys_reboot | 693 | .long sys_reboot |
694 | .long old_readdir | 694 | .long sys_old_readdir |
695 | .long old_mmap /* 90 */ | 695 | .long old_mmap /* 90 */ |
696 | .long sys_munmap | 696 | .long sys_munmap |
697 | .long sys_truncate | 697 | .long sys_truncate |
diff --git a/arch/cris/arch-v32/kernel/entry.S b/arch/cris/arch-v32/kernel/entry.S index 7f6f93e6b70e..5e674c8f7c51 100644 --- a/arch/cris/arch-v32/kernel/entry.S +++ b/arch/cris/arch-v32/kernel/entry.S | |||
@@ -614,7 +614,7 @@ sys_call_table: | |||
614 | .long sys_uselib | 614 | .long sys_uselib |
615 | .long sys_swapon | 615 | .long sys_swapon |
616 | .long sys_reboot | 616 | .long sys_reboot |
617 | .long old_readdir | 617 | .long sys_old_readdir |
618 | .long old_mmap /* 90 */ | 618 | .long old_mmap /* 90 */ |
619 | .long sys_munmap | 619 | .long sys_munmap |
620 | .long sys_truncate | 620 | .long sys_truncate |
diff --git a/arch/h8300/kernel/syscalls.S b/arch/h8300/kernel/syscalls.S index 54e21c3f2057..4eb67faac633 100644 --- a/arch/h8300/kernel/syscalls.S +++ b/arch/h8300/kernel/syscalls.S | |||
@@ -103,7 +103,7 @@ SYMBOL_NAME_LABEL(sys_call_table) | |||
103 | .long SYMBOL_NAME(sys_uselib) | 103 | .long SYMBOL_NAME(sys_uselib) |
104 | .long SYMBOL_NAME(sys_swapon) | 104 | .long SYMBOL_NAME(sys_swapon) |
105 | .long SYMBOL_NAME(sys_reboot) | 105 | .long SYMBOL_NAME(sys_reboot) |
106 | .long SYMBOL_NAME(old_readdir) | 106 | .long SYMBOL_NAME(sys_old_readdir) |
107 | .long SYMBOL_NAME(old_mmap) /* 90 */ | 107 | .long SYMBOL_NAME(old_mmap) /* 90 */ |
108 | .long SYMBOL_NAME(sys_munmap) | 108 | .long SYMBOL_NAME(sys_munmap) |
109 | .long SYMBOL_NAME(sys_truncate) | 109 | .long SYMBOL_NAME(sys_truncate) |
diff --git a/arch/ia64/ia32/ia32_entry.S b/arch/ia64/ia32/ia32_entry.S index a8cf19958850..a46f8395e9a5 100644 --- a/arch/ia64/ia32/ia32_entry.S +++ b/arch/ia64/ia32/ia32_entry.S | |||
@@ -220,7 +220,7 @@ ia32_syscall_table: | |||
220 | data8 sys_mkdir | 220 | data8 sys_mkdir |
221 | data8 sys_rmdir /* 40 */ | 221 | data8 sys_rmdir /* 40 */ |
222 | data8 sys_dup | 222 | data8 sys_dup |
223 | data8 sys_pipe | 223 | data8 sys_ia64_pipe |
224 | data8 compat_sys_times | 224 | data8 compat_sys_times |
225 | data8 sys_ni_syscall /* old prof syscall holder */ | 225 | data8 sys_ni_syscall /* old prof syscall holder */ |
226 | data8 sys32_brk /* 45 */ | 226 | data8 sys32_brk /* 45 */ |
diff --git a/arch/ia64/include/asm/unistd.h b/arch/ia64/include/asm/unistd.h index f791576355ad..9015979ebe0f 100644 --- a/arch/ia64/include/asm/unistd.h +++ b/arch/ia64/include/asm/unistd.h | |||
@@ -364,7 +364,7 @@ struct pt_regs; | |||
364 | struct sigaction; | 364 | struct sigaction; |
365 | long sys_execve(char __user *filename, char __user * __user *argv, | 365 | long sys_execve(char __user *filename, char __user * __user *argv, |
366 | char __user * __user *envp, struct pt_regs *regs); | 366 | char __user * __user *envp, struct pt_regs *regs); |
367 | asmlinkage long sys_pipe(void); | 367 | asmlinkage long sys_ia64_pipe(void); |
368 | asmlinkage long sys_rt_sigaction(int sig, | 368 | asmlinkage long sys_rt_sigaction(int sig, |
369 | const struct sigaction __user *act, | 369 | const struct sigaction __user *act, |
370 | struct sigaction __user *oact, | 370 | struct sigaction __user *oact, |
diff --git a/arch/ia64/kernel/entry.S b/arch/ia64/kernel/entry.S index d435f4a7a96c..e5341e2c1175 100644 --- a/arch/ia64/kernel/entry.S +++ b/arch/ia64/kernel/entry.S | |||
@@ -1442,7 +1442,7 @@ sys_call_table: | |||
1442 | data8 sys_mkdir // 1055 | 1442 | data8 sys_mkdir // 1055 |
1443 | data8 sys_rmdir | 1443 | data8 sys_rmdir |
1444 | data8 sys_dup | 1444 | data8 sys_dup |
1445 | data8 sys_pipe | 1445 | data8 sys_ia64_pipe |
1446 | data8 sys_times | 1446 | data8 sys_times |
1447 | data8 ia64_brk // 1060 | 1447 | data8 ia64_brk // 1060 |
1448 | data8 sys_setgid | 1448 | data8 sys_setgid |
diff --git a/arch/ia64/kernel/sys_ia64.c b/arch/ia64/kernel/sys_ia64.c index bcbb6d8792d3..92ed83f34036 100644 --- a/arch/ia64/kernel/sys_ia64.c +++ b/arch/ia64/kernel/sys_ia64.c | |||
@@ -154,7 +154,7 @@ out: | |||
154 | * and r9) as this is faster than doing a copy_to_user(). | 154 | * and r9) as this is faster than doing a copy_to_user(). |
155 | */ | 155 | */ |
156 | asmlinkage long | 156 | asmlinkage long |
157 | sys_pipe (void) | 157 | sys_ia64_pipe (void) |
158 | { | 158 | { |
159 | struct pt_regs *regs = task_pt_regs(current); | 159 | struct pt_regs *regs = task_pt_regs(current); |
160 | int fd[2]; | 160 | int fd[2]; |
diff --git a/arch/m68k/kernel/entry.S b/arch/m68k/kernel/entry.S index 5b780826647c..5c332f2b9b83 100644 --- a/arch/m68k/kernel/entry.S +++ b/arch/m68k/kernel/entry.S | |||
@@ -513,7 +513,7 @@ sys_call_table: | |||
513 | .long sys_uselib | 513 | .long sys_uselib |
514 | .long sys_swapon | 514 | .long sys_swapon |
515 | .long sys_reboot | 515 | .long sys_reboot |
516 | .long old_readdir | 516 | .long sys_old_readdir |
517 | .long old_mmap /* 90 */ | 517 | .long old_mmap /* 90 */ |
518 | .long sys_munmap | 518 | .long sys_munmap |
519 | .long sys_truncate | 519 | .long sys_truncate |
diff --git a/arch/m68knommu/kernel/syscalltable.S b/arch/m68knommu/kernel/syscalltable.S index 812f8d8b7a85..5c3e3f62194a 100644 --- a/arch/m68knommu/kernel/syscalltable.S +++ b/arch/m68knommu/kernel/syscalltable.S | |||
@@ -107,7 +107,7 @@ ENTRY(sys_call_table) | |||
107 | .long sys_uselib | 107 | .long sys_uselib |
108 | .long sys_ni_syscall /* sys_swapon */ | 108 | .long sys_ni_syscall /* sys_swapon */ |
109 | .long sys_reboot | 109 | .long sys_reboot |
110 | .long old_readdir | 110 | .long sys_old_readdir |
111 | .long old_mmap /* 90 */ | 111 | .long old_mmap /* 90 */ |
112 | .long sys_munmap | 112 | .long sys_munmap |
113 | .long sys_truncate | 113 | .long sys_truncate |
diff --git a/arch/mips/kernel/scall32-o32.S b/arch/mips/kernel/scall32-o32.S index d0916a55cd77..51d1ba415b90 100644 --- a/arch/mips/kernel/scall32-o32.S +++ b/arch/mips/kernel/scall32-o32.S | |||
@@ -398,7 +398,7 @@ einval: li v0, -ENOSYS | |||
398 | sys sys_uselib 1 | 398 | sys sys_uselib 1 |
399 | sys sys_swapon 2 | 399 | sys sys_swapon 2 |
400 | sys sys_reboot 3 | 400 | sys sys_reboot 3 |
401 | sys old_readdir 3 | 401 | sys sys_old_readdir 3 |
402 | sys old_mmap 6 /* 4090 */ | 402 | sys old_mmap 6 /* 4090 */ |
403 | sys sys_munmap 2 | 403 | sys sys_munmap 2 |
404 | sys sys_truncate 2 | 404 | sys sys_truncate 2 |
diff --git a/arch/mn10300/kernel/entry.S b/arch/mn10300/kernel/entry.S index 62fba8aa9b6e..ceeaaaa359e2 100644 --- a/arch/mn10300/kernel/entry.S +++ b/arch/mn10300/kernel/entry.S | |||
@@ -478,7 +478,7 @@ ENTRY(sys_call_table) | |||
478 | .long sys_uselib | 478 | .long sys_uselib |
479 | .long sys_swapon | 479 | .long sys_swapon |
480 | .long sys_reboot | 480 | .long sys_reboot |
481 | .long old_readdir | 481 | .long sys_old_readdir |
482 | .long old_mmap /* 90 */ | 482 | .long old_mmap /* 90 */ |
483 | .long sys_munmap | 483 | .long sys_munmap |
484 | .long sys_truncate | 484 | .long sys_truncate |
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index 84b861316ce7..e39b73bc0ff8 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig | |||
@@ -123,6 +123,7 @@ config PPC | |||
123 | select HAVE_DMA_ATTRS if PPC64 | 123 | select HAVE_DMA_ATTRS if PPC64 |
124 | select USE_GENERIC_SMP_HELPERS if SMP | 124 | select USE_GENERIC_SMP_HELPERS if SMP |
125 | select HAVE_OPROFILE | 125 | select HAVE_OPROFILE |
126 | select HAVE_SYSCALL_WRAPPERS if PPC64 | ||
126 | 127 | ||
127 | config EARLY_PRINTK | 128 | config EARLY_PRINTK |
128 | bool | 129 | bool |
diff --git a/arch/powerpc/include/asm/systbl.h b/arch/powerpc/include/asm/systbl.h index 803def236654..72353f6070a4 100644 --- a/arch/powerpc/include/asm/systbl.h +++ b/arch/powerpc/include/asm/systbl.h | |||
@@ -92,7 +92,7 @@ COMPAT_SYS_SPU(readlink) | |||
92 | SYSCALL(uselib) | 92 | SYSCALL(uselib) |
93 | SYSCALL(swapon) | 93 | SYSCALL(swapon) |
94 | SYSCALL(reboot) | 94 | SYSCALL(reboot) |
95 | SYSX(sys_ni_syscall,compat_sys_old_readdir,old_readdir) | 95 | SYSX(sys_ni_syscall,compat_sys_old_readdir,sys_old_readdir) |
96 | SYSCALL_SPU(mmap) | 96 | SYSCALL_SPU(mmap) |
97 | SYSCALL_SPU(munmap) | 97 | SYSCALL_SPU(munmap) |
98 | SYSCALL_SPU(truncate) | 98 | SYSCALL_SPU(truncate) |
diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig index a94a3c3ae932..6b0a3538dc63 100644 --- a/arch/s390/Kconfig +++ b/arch/s390/Kconfig | |||
@@ -77,6 +77,7 @@ mainmenu "Linux Kernel Configuration" | |||
77 | config S390 | 77 | config S390 |
78 | def_bool y | 78 | def_bool y |
79 | select USE_GENERIC_SMP_HELPERS if SMP | 79 | select USE_GENERIC_SMP_HELPERS if SMP |
80 | select HAVE_SYSCALL_WRAPPERS | ||
80 | select HAVE_FUNCTION_TRACER | 81 | select HAVE_FUNCTION_TRACER |
81 | select HAVE_OPROFILE | 82 | select HAVE_OPROFILE |
82 | select HAVE_KPROBES | 83 | select HAVE_KPROBES |
diff --git a/arch/s390/kernel/compat_wrapper.S b/arch/s390/kernel/compat_wrapper.S index fc2c97197a53..6035cd20c7a7 100644 --- a/arch/s390/kernel/compat_wrapper.S +++ b/arch/s390/kernel/compat_wrapper.S | |||
@@ -547,7 +547,7 @@ sys32_setdomainname_wrapper: | |||
547 | .globl sys32_newuname_wrapper | 547 | .globl sys32_newuname_wrapper |
548 | sys32_newuname_wrapper: | 548 | sys32_newuname_wrapper: |
549 | llgtr %r2,%r2 # struct new_utsname * | 549 | llgtr %r2,%r2 # struct new_utsname * |
550 | jg s390x_newuname # branch to system call | 550 | jg sys_s390_newuname # branch to system call |
551 | 551 | ||
552 | .globl compat_sys_adjtimex_wrapper | 552 | .globl compat_sys_adjtimex_wrapper |
553 | compat_sys_adjtimex_wrapper: | 553 | compat_sys_adjtimex_wrapper: |
@@ -615,7 +615,7 @@ sys32_sysfs_wrapper: | |||
615 | .globl sys32_personality_wrapper | 615 | .globl sys32_personality_wrapper |
616 | sys32_personality_wrapper: | 616 | sys32_personality_wrapper: |
617 | llgfr %r2,%r2 # unsigned long | 617 | llgfr %r2,%r2 # unsigned long |
618 | jg s390x_personality # branch to system call | 618 | jg sys_s390_personality # branch to system call |
619 | 619 | ||
620 | .globl sys32_setfsuid16_wrapper | 620 | .globl sys32_setfsuid16_wrapper |
621 | sys32_setfsuid16_wrapper: | 621 | sys32_setfsuid16_wrapper: |
diff --git a/arch/s390/kernel/entry.h b/arch/s390/kernel/entry.h index a65afc91e8aa..950c59c6688b 100644 --- a/arch/s390/kernel/entry.h +++ b/arch/s390/kernel/entry.h | |||
@@ -30,23 +30,23 @@ struct fadvise64_64_args; | |||
30 | struct old_sigaction; | 30 | struct old_sigaction; |
31 | struct sel_arg_struct; | 31 | struct sel_arg_struct; |
32 | 32 | ||
33 | long sys_pipe(unsigned long __user *fildes); | ||
34 | long sys_mmap2(struct mmap_arg_struct __user *arg); | 33 | long sys_mmap2(struct mmap_arg_struct __user *arg); |
35 | long old_mmap(struct mmap_arg_struct __user *arg); | 34 | long sys_s390_old_mmap(struct mmap_arg_struct __user *arg); |
36 | long sys_ipc(uint call, int first, unsigned long second, | 35 | long sys_ipc(uint call, int first, unsigned long second, |
37 | unsigned long third, void __user *ptr); | 36 | unsigned long third, void __user *ptr); |
38 | long s390x_newuname(struct new_utsname __user *name); | 37 | long sys_s390_newuname(struct new_utsname __user *name); |
39 | long s390x_personality(unsigned long personality); | 38 | long sys_s390_personality(unsigned long personality); |
40 | long s390_fadvise64(int fd, u32 offset_high, u32 offset_low, | 39 | long sys_s390_fadvise64(int fd, u32 offset_high, u32 offset_low, |
41 | size_t len, int advice); | 40 | size_t len, int advice); |
42 | long s390_fadvise64_64(struct fadvise64_64_args __user *args); | 41 | long sys_s390_fadvise64_64(struct fadvise64_64_args __user *args); |
43 | long s390_fallocate(int fd, int mode, loff_t offset, u32 len_high, u32 len_low); | 42 | long sys_s390_fallocate(int fd, int mode, loff_t offset, u32 len_high, |
43 | u32 len_low); | ||
44 | long sys_fork(void); | 44 | long sys_fork(void); |
45 | long sys_clone(void); | 45 | long sys_clone(void); |
46 | long sys_vfork(void); | 46 | long sys_vfork(void); |
47 | void execve_tail(void); | 47 | void execve_tail(void); |
48 | long sys_execve(void); | 48 | long sys_execve(void); |
49 | int sys_sigsuspend(int history0, int history1, old_sigset_t mask); | 49 | long sys_sigsuspend(int history0, int history1, old_sigset_t mask); |
50 | long sys_sigaction(int sig, const struct old_sigaction __user *act, | 50 | long sys_sigaction(int sig, const struct old_sigaction __user *act, |
51 | struct old_sigaction __user *oact); | 51 | struct old_sigaction __user *oact); |
52 | long sys_sigaltstack(const stack_t __user *uss, stack_t __user *uoss); | 52 | long sys_sigaltstack(const stack_t __user *uss, stack_t __user *uoss); |
diff --git a/arch/s390/kernel/process.c b/arch/s390/kernel/process.c index b6110bdf8dc2..5cd38a90e64d 100644 --- a/arch/s390/kernel/process.c +++ b/arch/s390/kernel/process.c | |||
@@ -39,6 +39,7 @@ | |||
39 | #include <linux/tick.h> | 39 | #include <linux/tick.h> |
40 | #include <linux/elfcore.h> | 40 | #include <linux/elfcore.h> |
41 | #include <linux/kernel_stat.h> | 41 | #include <linux/kernel_stat.h> |
42 | #include <linux/syscalls.h> | ||
42 | #include <asm/uaccess.h> | 43 | #include <asm/uaccess.h> |
43 | #include <asm/pgtable.h> | 44 | #include <asm/pgtable.h> |
44 | #include <asm/system.h> | 45 | #include <asm/system.h> |
@@ -225,13 +226,13 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long new_stackp, | |||
225 | return 0; | 226 | return 0; |
226 | } | 227 | } |
227 | 228 | ||
228 | asmlinkage long sys_fork(void) | 229 | SYSCALL_DEFINE0(fork) |
229 | { | 230 | { |
230 | struct pt_regs *regs = task_pt_regs(current); | 231 | struct pt_regs *regs = task_pt_regs(current); |
231 | return do_fork(SIGCHLD, regs->gprs[15], regs, 0, NULL, NULL); | 232 | return do_fork(SIGCHLD, regs->gprs[15], regs, 0, NULL, NULL); |
232 | } | 233 | } |
233 | 234 | ||
234 | asmlinkage long sys_clone(void) | 235 | SYSCALL_DEFINE0(clone) |
235 | { | 236 | { |
236 | struct pt_regs *regs = task_pt_regs(current); | 237 | struct pt_regs *regs = task_pt_regs(current); |
237 | unsigned long clone_flags; | 238 | unsigned long clone_flags; |
@@ -258,7 +259,7 @@ asmlinkage long sys_clone(void) | |||
258 | * do not have enough call-clobbered registers to hold all | 259 | * do not have enough call-clobbered registers to hold all |
259 | * the information you need. | 260 | * the information you need. |
260 | */ | 261 | */ |
261 | asmlinkage long sys_vfork(void) | 262 | SYSCALL_DEFINE0(vfork) |
262 | { | 263 | { |
263 | struct pt_regs *regs = task_pt_regs(current); | 264 | struct pt_regs *regs = task_pt_regs(current); |
264 | return do_fork(CLONE_VFORK | CLONE_VM | SIGCHLD, | 265 | return do_fork(CLONE_VFORK | CLONE_VM | SIGCHLD, |
@@ -278,7 +279,7 @@ asmlinkage void execve_tail(void) | |||
278 | /* | 279 | /* |
279 | * sys_execve() executes a new program. | 280 | * sys_execve() executes a new program. |
280 | */ | 281 | */ |
281 | asmlinkage long sys_execve(void) | 282 | SYSCALL_DEFINE0(execve) |
282 | { | 283 | { |
283 | struct pt_regs *regs = task_pt_regs(current); | 284 | struct pt_regs *regs = task_pt_regs(current); |
284 | char *filename; | 285 | char *filename; |
diff --git a/arch/s390/kernel/signal.c b/arch/s390/kernel/signal.c index 8e6812a22670..3cf74c3ccb69 100644 --- a/arch/s390/kernel/signal.c +++ b/arch/s390/kernel/signal.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/personality.h> | 25 | #include <linux/personality.h> |
26 | #include <linux/binfmts.h> | 26 | #include <linux/binfmts.h> |
27 | #include <linux/tracehook.h> | 27 | #include <linux/tracehook.h> |
28 | #include <linux/syscalls.h> | ||
28 | #include <asm/ucontext.h> | 29 | #include <asm/ucontext.h> |
29 | #include <asm/uaccess.h> | 30 | #include <asm/uaccess.h> |
30 | #include <asm/lowcore.h> | 31 | #include <asm/lowcore.h> |
@@ -53,8 +54,7 @@ typedef struct | |||
53 | /* | 54 | /* |
54 | * Atomically swap in the new signal mask, and wait for a signal. | 55 | * Atomically swap in the new signal mask, and wait for a signal. |
55 | */ | 56 | */ |
56 | asmlinkage int | 57 | SYSCALL_DEFINE3(sigsuspend, int, history0, int, history1, old_sigset_t, mask) |
57 | sys_sigsuspend(int history0, int history1, old_sigset_t mask) | ||
58 | { | 58 | { |
59 | mask &= _BLOCKABLE; | 59 | mask &= _BLOCKABLE; |
60 | spin_lock_irq(¤t->sighand->siglock); | 60 | spin_lock_irq(¤t->sighand->siglock); |
@@ -70,9 +70,8 @@ sys_sigsuspend(int history0, int history1, old_sigset_t mask) | |||
70 | return -ERESTARTNOHAND; | 70 | return -ERESTARTNOHAND; |
71 | } | 71 | } |
72 | 72 | ||
73 | asmlinkage long | 73 | SYSCALL_DEFINE3(sigaction, int, sig, const struct old_sigaction __user *, act, |
74 | sys_sigaction(int sig, const struct old_sigaction __user *act, | 74 | struct old_sigaction __user *, oact) |
75 | struct old_sigaction __user *oact) | ||
76 | { | 75 | { |
77 | struct k_sigaction new_ka, old_ka; | 76 | struct k_sigaction new_ka, old_ka; |
78 | int ret; | 77 | int ret; |
@@ -102,15 +101,13 @@ sys_sigaction(int sig, const struct old_sigaction __user *act, | |||
102 | return ret; | 101 | return ret; |
103 | } | 102 | } |
104 | 103 | ||
105 | asmlinkage long | 104 | SYSCALL_DEFINE2(sigaltstack, const stack_t __user *, uss, |
106 | sys_sigaltstack(const stack_t __user *uss, stack_t __user *uoss) | 105 | stack_t __user *, uoss) |
107 | { | 106 | { |
108 | struct pt_regs *regs = task_pt_regs(current); | 107 | struct pt_regs *regs = task_pt_regs(current); |
109 | return do_sigaltstack(uss, uoss, regs->gprs[15]); | 108 | return do_sigaltstack(uss, uoss, regs->gprs[15]); |
110 | } | 109 | } |
111 | 110 | ||
112 | |||
113 | |||
114 | /* Returns non-zero on fault. */ | 111 | /* Returns non-zero on fault. */ |
115 | static int save_sigregs(struct pt_regs *regs, _sigregs __user *sregs) | 112 | static int save_sigregs(struct pt_regs *regs, _sigregs __user *sregs) |
116 | { | 113 | { |
@@ -164,7 +161,7 @@ static int restore_sigregs(struct pt_regs *regs, _sigregs __user *sregs) | |||
164 | return 0; | 161 | return 0; |
165 | } | 162 | } |
166 | 163 | ||
167 | asmlinkage long sys_sigreturn(void) | 164 | SYSCALL_DEFINE0(sigreturn) |
168 | { | 165 | { |
169 | struct pt_regs *regs = task_pt_regs(current); | 166 | struct pt_regs *regs = task_pt_regs(current); |
170 | sigframe __user *frame = (sigframe __user *)regs->gprs[15]; | 167 | sigframe __user *frame = (sigframe __user *)regs->gprs[15]; |
@@ -191,7 +188,7 @@ badframe: | |||
191 | return 0; | 188 | return 0; |
192 | } | 189 | } |
193 | 190 | ||
194 | asmlinkage long sys_rt_sigreturn(void) | 191 | SYSCALL_DEFINE0(rt_sigreturn) |
195 | { | 192 | { |
196 | struct pt_regs *regs = task_pt_regs(current); | 193 | struct pt_regs *regs = task_pt_regs(current); |
197 | rt_sigframe __user *frame = (rt_sigframe __user *)regs->gprs[15]; | 194 | rt_sigframe __user *frame = (rt_sigframe __user *)regs->gprs[15]; |
diff --git a/arch/s390/kernel/sys_s390.c b/arch/s390/kernel/sys_s390.c index c34be4568b80..c7ae4b17e0e3 100644 --- a/arch/s390/kernel/sys_s390.c +++ b/arch/s390/kernel/sys_s390.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <linux/personality.h> | 29 | #include <linux/personality.h> |
30 | #include <linux/unistd.h> | 30 | #include <linux/unistd.h> |
31 | #include <linux/ipc.h> | 31 | #include <linux/ipc.h> |
32 | #include <linux/syscalls.h> | ||
32 | #include <asm/uaccess.h> | 33 | #include <asm/uaccess.h> |
33 | #include "entry.h" | 34 | #include "entry.h" |
34 | 35 | ||
@@ -74,7 +75,7 @@ struct mmap_arg_struct { | |||
74 | unsigned long offset; | 75 | unsigned long offset; |
75 | }; | 76 | }; |
76 | 77 | ||
77 | asmlinkage long sys_mmap2(struct mmap_arg_struct __user *arg) | 78 | SYSCALL_DEFINE1(mmap2, struct mmap_arg_struct __user *, arg) |
78 | { | 79 | { |
79 | struct mmap_arg_struct a; | 80 | struct mmap_arg_struct a; |
80 | int error = -EFAULT; | 81 | int error = -EFAULT; |
@@ -86,7 +87,7 @@ out: | |||
86 | return error; | 87 | return error; |
87 | } | 88 | } |
88 | 89 | ||
89 | asmlinkage long old_mmap(struct mmap_arg_struct __user *arg) | 90 | SYSCALL_DEFINE1(s390_old_mmap, struct mmap_arg_struct __user *, arg) |
90 | { | 91 | { |
91 | struct mmap_arg_struct a; | 92 | struct mmap_arg_struct a; |
92 | long error = -EFAULT; | 93 | long error = -EFAULT; |
@@ -108,8 +109,8 @@ out: | |||
108 | * | 109 | * |
109 | * This is really horribly ugly. | 110 | * This is really horribly ugly. |
110 | */ | 111 | */ |
111 | asmlinkage long sys_ipc(uint call, int first, unsigned long second, | 112 | SYSCALL_DEFINE5(ipc, uint, call, int, first, unsigned long, second, |
112 | unsigned long third, void __user *ptr) | 113 | unsigned long, third, void __user *, ptr) |
113 | { | 114 | { |
114 | struct ipc_kludge tmp; | 115 | struct ipc_kludge tmp; |
115 | int ret; | 116 | int ret; |
@@ -175,7 +176,7 @@ asmlinkage long sys_ipc(uint call, int first, unsigned long second, | |||
175 | } | 176 | } |
176 | 177 | ||
177 | #ifdef CONFIG_64BIT | 178 | #ifdef CONFIG_64BIT |
178 | asmlinkage long s390x_newuname(struct new_utsname __user *name) | 179 | SYSCALL_DEFINE1(s390_newuname, struct new_utsname __user *, name) |
179 | { | 180 | { |
180 | int ret = sys_newuname(name); | 181 | int ret = sys_newuname(name); |
181 | 182 | ||
@@ -186,7 +187,7 @@ asmlinkage long s390x_newuname(struct new_utsname __user *name) | |||
186 | return ret; | 187 | return ret; |
187 | } | 188 | } |
188 | 189 | ||
189 | asmlinkage long s390x_personality(unsigned long personality) | 190 | SYSCALL_DEFINE1(s390_personality, unsigned long, personality) |
190 | { | 191 | { |
191 | int ret; | 192 | int ret; |
192 | 193 | ||
@@ -205,15 +206,13 @@ asmlinkage long s390x_personality(unsigned long personality) | |||
205 | */ | 206 | */ |
206 | #ifndef CONFIG_64BIT | 207 | #ifndef CONFIG_64BIT |
207 | 208 | ||
208 | asmlinkage long | 209 | SYSCALL_DEFINE5(s390_fadvise64, int, fd, u32, offset_high, u32, offset_low, |
209 | s390_fadvise64(int fd, u32 offset_high, u32 offset_low, size_t len, int advice) | 210 | size_t, len, int, advice) |
210 | { | 211 | { |
211 | return sys_fadvise64(fd, (u64) offset_high << 32 | offset_low, | 212 | return sys_fadvise64(fd, (u64) offset_high << 32 | offset_low, |
212 | len, advice); | 213 | len, advice); |
213 | } | 214 | } |
214 | 215 | ||
215 | #endif | ||
216 | |||
217 | struct fadvise64_64_args { | 216 | struct fadvise64_64_args { |
218 | int fd; | 217 | int fd; |
219 | long long offset; | 218 | long long offset; |
@@ -221,8 +220,7 @@ struct fadvise64_64_args { | |||
221 | int advice; | 220 | int advice; |
222 | }; | 221 | }; |
223 | 222 | ||
224 | asmlinkage long | 223 | SYSCALL_DEFINE1(s390_fadvise64_64, struct fadvise64_64_args __user *, args) |
225 | s390_fadvise64_64(struct fadvise64_64_args __user *args) | ||
226 | { | 224 | { |
227 | struct fadvise64_64_args a; | 225 | struct fadvise64_64_args a; |
228 | 226 | ||
@@ -231,7 +229,6 @@ s390_fadvise64_64(struct fadvise64_64_args __user *args) | |||
231 | return sys_fadvise64_64(a.fd, a.offset, a.len, a.advice); | 229 | return sys_fadvise64_64(a.fd, a.offset, a.len, a.advice); |
232 | } | 230 | } |
233 | 231 | ||
234 | #ifndef CONFIG_64BIT | ||
235 | /* | 232 | /* |
236 | * This is a wrapper to call sys_fallocate(). For 31 bit s390 the last | 233 | * This is a wrapper to call sys_fallocate(). For 31 bit s390 the last |
237 | * 64 bit argument "len" is split into the upper and lower 32 bits. The | 234 | * 64 bit argument "len" is split into the upper and lower 32 bits. The |
@@ -244,9 +241,19 @@ s390_fadvise64_64(struct fadvise64_64_args __user *args) | |||
244 | * to | 241 | * to |
245 | * %r2: fd, %r3: mode, %r4/%r5: offset, 96(%r15)-103(%r15): len | 242 | * %r2: fd, %r3: mode, %r4/%r5: offset, 96(%r15)-103(%r15): len |
246 | */ | 243 | */ |
247 | asmlinkage long s390_fallocate(int fd, int mode, loff_t offset, | 244 | SYSCALL_DEFINE(s390_fallocate)(int fd, int mode, loff_t offset, |
248 | u32 len_high, u32 len_low) | 245 | u32 len_high, u32 len_low) |
249 | { | 246 | { |
250 | return sys_fallocate(fd, mode, offset, ((u64)len_high << 32) | len_low); | 247 | return sys_fallocate(fd, mode, offset, ((u64)len_high << 32) | len_low); |
251 | } | 248 | } |
249 | #ifdef CONFIG_HAVE_SYSCALL_WRAPPERS | ||
250 | asmlinkage long SyS_s390_fallocate(long fd, long mode, loff_t offset, | ||
251 | long len_high, long len_low) | ||
252 | { | ||
253 | return SYSC_s390_fallocate((int) fd, (int) mode, offset, | ||
254 | (u32) len_high, (u32) len_low); | ||
255 | } | ||
256 | SYSCALL_ALIAS(sys_s390_fallocate, SyS_s390_fallocate); | ||
257 | #endif | ||
258 | |||
252 | #endif | 259 | #endif |
diff --git a/arch/s390/kernel/syscalls.S b/arch/s390/kernel/syscalls.S index 2d61787949d5..76d16e0140bb 100644 --- a/arch/s390/kernel/syscalls.S +++ b/arch/s390/kernel/syscalls.S | |||
@@ -98,7 +98,7 @@ SYSCALL(sys_uselib,sys_uselib,sys32_uselib_wrapper) | |||
98 | SYSCALL(sys_swapon,sys_swapon,sys32_swapon_wrapper) | 98 | SYSCALL(sys_swapon,sys_swapon,sys32_swapon_wrapper) |
99 | SYSCALL(sys_reboot,sys_reboot,sys32_reboot_wrapper) | 99 | SYSCALL(sys_reboot,sys_reboot,sys32_reboot_wrapper) |
100 | SYSCALL(sys_ni_syscall,sys_ni_syscall,old32_readdir_wrapper) /* old readdir syscall */ | 100 | SYSCALL(sys_ni_syscall,sys_ni_syscall,old32_readdir_wrapper) /* old readdir syscall */ |
101 | SYSCALL(old_mmap,old_mmap,old32_mmap_wrapper) /* 90 */ | 101 | SYSCALL(sys_s390_old_mmap,sys_s390_old_mmap,old32_mmap_wrapper) /* 90 */ |
102 | SYSCALL(sys_munmap,sys_munmap,sys32_munmap_wrapper) | 102 | SYSCALL(sys_munmap,sys_munmap,sys32_munmap_wrapper) |
103 | SYSCALL(sys_truncate,sys_truncate,sys32_truncate_wrapper) | 103 | SYSCALL(sys_truncate,sys_truncate,sys32_truncate_wrapper) |
104 | SYSCALL(sys_ftruncate,sys_ftruncate,sys32_ftruncate_wrapper) | 104 | SYSCALL(sys_ftruncate,sys_ftruncate,sys32_ftruncate_wrapper) |
@@ -130,7 +130,7 @@ SYSCALL(sys_fsync,sys_fsync,sys32_fsync_wrapper) | |||
130 | SYSCALL(sys_sigreturn,sys_sigreturn,sys32_sigreturn) | 130 | SYSCALL(sys_sigreturn,sys_sigreturn,sys32_sigreturn) |
131 | SYSCALL(sys_clone,sys_clone,sys32_clone) /* 120 */ | 131 | SYSCALL(sys_clone,sys_clone,sys32_clone) /* 120 */ |
132 | SYSCALL(sys_setdomainname,sys_setdomainname,sys32_setdomainname_wrapper) | 132 | SYSCALL(sys_setdomainname,sys_setdomainname,sys32_setdomainname_wrapper) |
133 | SYSCALL(sys_newuname,s390x_newuname,sys32_newuname_wrapper) | 133 | SYSCALL(sys_newuname,sys_s390_newuname,sys32_newuname_wrapper) |
134 | NI_SYSCALL /* modify_ldt for i386 */ | 134 | NI_SYSCALL /* modify_ldt for i386 */ |
135 | SYSCALL(sys_adjtimex,sys_adjtimex,compat_sys_adjtimex_wrapper) | 135 | SYSCALL(sys_adjtimex,sys_adjtimex,compat_sys_adjtimex_wrapper) |
136 | SYSCALL(sys_mprotect,sys_mprotect,sys32_mprotect_wrapper) /* 125 */ | 136 | SYSCALL(sys_mprotect,sys_mprotect,sys32_mprotect_wrapper) /* 125 */ |
@@ -144,7 +144,7 @@ SYSCALL(sys_getpgid,sys_getpgid,sys32_getpgid_wrapper) | |||
144 | SYSCALL(sys_fchdir,sys_fchdir,sys32_fchdir_wrapper) | 144 | SYSCALL(sys_fchdir,sys_fchdir,sys32_fchdir_wrapper) |
145 | SYSCALL(sys_bdflush,sys_bdflush,sys32_bdflush_wrapper) | 145 | SYSCALL(sys_bdflush,sys_bdflush,sys32_bdflush_wrapper) |
146 | SYSCALL(sys_sysfs,sys_sysfs,sys32_sysfs_wrapper) /* 135 */ | 146 | SYSCALL(sys_sysfs,sys_sysfs,sys32_sysfs_wrapper) /* 135 */ |
147 | SYSCALL(sys_personality,s390x_personality,sys32_personality_wrapper) | 147 | SYSCALL(sys_personality,sys_s390_personality,sys32_personality_wrapper) |
148 | NI_SYSCALL /* for afs_syscall */ | 148 | NI_SYSCALL /* for afs_syscall */ |
149 | SYSCALL(sys_setfsuid16,sys_ni_syscall,sys32_setfsuid16_wrapper) /* old setfsuid16 syscall */ | 149 | SYSCALL(sys_setfsuid16,sys_ni_syscall,sys32_setfsuid16_wrapper) /* old setfsuid16 syscall */ |
150 | SYSCALL(sys_setfsgid16,sys_ni_syscall,sys32_setfsgid16_wrapper) /* old setfsgid16 syscall */ | 150 | SYSCALL(sys_setfsgid16,sys_ni_syscall,sys32_setfsgid16_wrapper) /* old setfsgid16 syscall */ |
@@ -261,7 +261,7 @@ SYSCALL(sys_epoll_create,sys_epoll_create,sys_epoll_create_wrapper) | |||
261 | SYSCALL(sys_epoll_ctl,sys_epoll_ctl,sys_epoll_ctl_wrapper) /* 250 */ | 261 | SYSCALL(sys_epoll_ctl,sys_epoll_ctl,sys_epoll_ctl_wrapper) /* 250 */ |
262 | SYSCALL(sys_epoll_wait,sys_epoll_wait,sys_epoll_wait_wrapper) | 262 | SYSCALL(sys_epoll_wait,sys_epoll_wait,sys_epoll_wait_wrapper) |
263 | SYSCALL(sys_set_tid_address,sys_set_tid_address,sys32_set_tid_address_wrapper) | 263 | SYSCALL(sys_set_tid_address,sys_set_tid_address,sys32_set_tid_address_wrapper) |
264 | SYSCALL(s390_fadvise64,sys_fadvise64_64,sys32_fadvise64_wrapper) | 264 | SYSCALL(sys_s390_fadvise64,sys_fadvise64_64,sys32_fadvise64_wrapper) |
265 | SYSCALL(sys_timer_create,sys_timer_create,sys32_timer_create_wrapper) | 265 | SYSCALL(sys_timer_create,sys_timer_create,sys32_timer_create_wrapper) |
266 | SYSCALL(sys_timer_settime,sys_timer_settime,sys32_timer_settime_wrapper) /* 255 */ | 266 | SYSCALL(sys_timer_settime,sys_timer_settime,sys32_timer_settime_wrapper) /* 255 */ |
267 | SYSCALL(sys_timer_gettime,sys_timer_gettime,sys32_timer_gettime_wrapper) | 267 | SYSCALL(sys_timer_gettime,sys_timer_gettime,sys32_timer_gettime_wrapper) |
@@ -272,7 +272,7 @@ SYSCALL(sys_clock_gettime,sys_clock_gettime,sys32_clock_gettime_wrapper) /* 260 | |||
272 | SYSCALL(sys_clock_getres,sys_clock_getres,sys32_clock_getres_wrapper) | 272 | SYSCALL(sys_clock_getres,sys_clock_getres,sys32_clock_getres_wrapper) |
273 | SYSCALL(sys_clock_nanosleep,sys_clock_nanosleep,sys32_clock_nanosleep_wrapper) | 273 | SYSCALL(sys_clock_nanosleep,sys_clock_nanosleep,sys32_clock_nanosleep_wrapper) |
274 | NI_SYSCALL /* reserved for vserver */ | 274 | NI_SYSCALL /* reserved for vserver */ |
275 | SYSCALL(s390_fadvise64_64,sys_ni_syscall,sys32_fadvise64_64_wrapper) | 275 | SYSCALL(sys_s390_fadvise64_64,sys_ni_syscall,sys32_fadvise64_64_wrapper) |
276 | SYSCALL(sys_statfs64,sys_statfs64,compat_sys_statfs64_wrapper) | 276 | SYSCALL(sys_statfs64,sys_statfs64,compat_sys_statfs64_wrapper) |
277 | SYSCALL(sys_fstatfs64,sys_fstatfs64,compat_sys_fstatfs64_wrapper) | 277 | SYSCALL(sys_fstatfs64,sys_fstatfs64,compat_sys_fstatfs64_wrapper) |
278 | SYSCALL(sys_remap_file_pages,sys_remap_file_pages,sys32_remap_file_pages_wrapper) | 278 | SYSCALL(sys_remap_file_pages,sys_remap_file_pages,sys32_remap_file_pages_wrapper) |
@@ -322,7 +322,7 @@ NI_SYSCALL /* 310 sys_move_pages */ | |||
322 | SYSCALL(sys_getcpu,sys_getcpu,sys_getcpu_wrapper) | 322 | SYSCALL(sys_getcpu,sys_getcpu,sys_getcpu_wrapper) |
323 | SYSCALL(sys_epoll_pwait,sys_epoll_pwait,compat_sys_epoll_pwait_wrapper) | 323 | SYSCALL(sys_epoll_pwait,sys_epoll_pwait,compat_sys_epoll_pwait_wrapper) |
324 | SYSCALL(sys_utimes,sys_utimes,compat_sys_utimes_wrapper) | 324 | SYSCALL(sys_utimes,sys_utimes,compat_sys_utimes_wrapper) |
325 | SYSCALL(s390_fallocate,sys_fallocate,sys_fallocate_wrapper) | 325 | SYSCALL(sys_s390_fallocate,sys_fallocate,sys_fallocate_wrapper) |
326 | SYSCALL(sys_utimensat,sys_utimensat,compat_sys_utimensat_wrapper) /* 315 */ | 326 | SYSCALL(sys_utimensat,sys_utimensat,compat_sys_utimensat_wrapper) /* 315 */ |
327 | SYSCALL(sys_signalfd,sys_signalfd,compat_sys_signalfd_wrapper) | 327 | SYSCALL(sys_signalfd,sys_signalfd,compat_sys_signalfd_wrapper) |
328 | NI_SYSCALL /* 317 old sys_timer_fd */ | 328 | NI_SYSCALL /* 317 old sys_timer_fd */ |
diff --git a/arch/sh/include/asm/syscalls_32.h b/arch/sh/include/asm/syscalls_32.h index 104c5e686106..8b30200305c3 100644 --- a/arch/sh/include/asm/syscalls_32.h +++ b/arch/sh/include/asm/syscalls_32.h | |||
@@ -36,9 +36,9 @@ asmlinkage int sys_sigreturn(unsigned long r4, unsigned long r5, | |||
36 | asmlinkage int sys_rt_sigreturn(unsigned long r4, unsigned long r5, | 36 | asmlinkage int sys_rt_sigreturn(unsigned long r4, unsigned long r5, |
37 | unsigned long r6, unsigned long r7, | 37 | unsigned long r6, unsigned long r7, |
38 | struct pt_regs __regs); | 38 | struct pt_regs __regs); |
39 | asmlinkage int sys_pipe(unsigned long r4, unsigned long r5, | 39 | asmlinkage int sys_sh_pipe(unsigned long r4, unsigned long r5, |
40 | unsigned long r6, unsigned long r7, | 40 | unsigned long r6, unsigned long r7, |
41 | struct pt_regs __regs); | 41 | struct pt_regs __regs); |
42 | asmlinkage ssize_t sys_pread_wrapper(unsigned int fd, char __user *buf, | 42 | asmlinkage ssize_t sys_pread_wrapper(unsigned int fd, char __user *buf, |
43 | size_t count, long dummy, loff_t pos); | 43 | size_t count, long dummy, loff_t pos); |
44 | asmlinkage ssize_t sys_pwrite_wrapper(unsigned int fd, const char __user *buf, | 44 | asmlinkage ssize_t sys_pwrite_wrapper(unsigned int fd, const char __user *buf, |
diff --git a/arch/sh/kernel/sys_sh32.c b/arch/sh/kernel/sys_sh32.c index dbba1e1833d4..63ba12836eae 100644 --- a/arch/sh/kernel/sys_sh32.c +++ b/arch/sh/kernel/sys_sh32.c | |||
@@ -22,7 +22,7 @@ | |||
22 | * sys_pipe() is the normal C calling standard for creating | 22 | * sys_pipe() is the normal C calling standard for creating |
23 | * a pipe. It's not the way Unix traditionally does this, though. | 23 | * a pipe. It's not the way Unix traditionally does this, though. |
24 | */ | 24 | */ |
25 | asmlinkage int sys_pipe(unsigned long r4, unsigned long r5, | 25 | asmlinkage int sys_sh_pipe(unsigned long r4, unsigned long r5, |
26 | unsigned long r6, unsigned long r7, | 26 | unsigned long r6, unsigned long r7, |
27 | struct pt_regs __regs) | 27 | struct pt_regs __regs) |
28 | { | 28 | { |
diff --git a/arch/sh/kernel/syscalls_32.S b/arch/sh/kernel/syscalls_32.S index 0af693e65764..e67c1733e1b9 100644 --- a/arch/sh/kernel/syscalls_32.S +++ b/arch/sh/kernel/syscalls_32.S | |||
@@ -58,7 +58,7 @@ ENTRY(sys_call_table) | |||
58 | .long sys_mkdir | 58 | .long sys_mkdir |
59 | .long sys_rmdir /* 40 */ | 59 | .long sys_rmdir /* 40 */ |
60 | .long sys_dup | 60 | .long sys_dup |
61 | .long sys_pipe | 61 | .long sys_sh_pipe |
62 | .long sys_times | 62 | .long sys_times |
63 | .long sys_ni_syscall /* old prof syscall holder */ | 63 | .long sys_ni_syscall /* old prof syscall holder */ |
64 | .long sys_brk /* 45 */ | 64 | .long sys_brk /* 45 */ |
@@ -105,7 +105,7 @@ ENTRY(sys_call_table) | |||
105 | .long sys_uselib | 105 | .long sys_uselib |
106 | .long sys_swapon | 106 | .long sys_swapon |
107 | .long sys_reboot | 107 | .long sys_reboot |
108 | .long old_readdir | 108 | .long sys_old_readdir |
109 | .long old_mmap /* 90 */ | 109 | .long old_mmap /* 90 */ |
110 | .long sys_munmap | 110 | .long sys_munmap |
111 | .long sys_truncate | 111 | .long sys_truncate |
diff --git a/arch/sh/kernel/syscalls_64.S b/arch/sh/kernel/syscalls_64.S index 0b436aa3cad7..557cb91f5caf 100644 --- a/arch/sh/kernel/syscalls_64.S +++ b/arch/sh/kernel/syscalls_64.S | |||
@@ -109,7 +109,7 @@ sys_call_table: | |||
109 | .long sys_uselib | 109 | .long sys_uselib |
110 | .long sys_swapon | 110 | .long sys_swapon |
111 | .long sys_reboot | 111 | .long sys_reboot |
112 | .long old_readdir | 112 | .long sys_old_readdir |
113 | .long old_mmap /* 90 */ | 113 | .long old_mmap /* 90 */ |
114 | .long sys_munmap | 114 | .long sys_munmap |
115 | .long sys_truncate | 115 | .long sys_truncate |
diff --git a/arch/sparc/kernel/entry.S b/arch/sparc/kernel/entry.S index faf9ccd9ef5d..f41ecc5ac0b4 100644 --- a/arch/sparc/kernel/entry.S +++ b/arch/sparc/kernel/entry.S | |||
@@ -1088,8 +1088,8 @@ sunos_execv: | |||
1088 | ld [%sp + STACKFRAME_SZ + PT_I0], %o0 | 1088 | ld [%sp + STACKFRAME_SZ + PT_I0], %o0 |
1089 | 1089 | ||
1090 | .align 4 | 1090 | .align 4 |
1091 | .globl sys_pipe | 1091 | .globl sys_sparc_pipe |
1092 | sys_pipe: | 1092 | sys_sparc_pipe: |
1093 | mov %o7, %l5 | 1093 | mov %o7, %l5 |
1094 | add %sp, STACKFRAME_SZ, %o0 ! pt_regs *regs arg | 1094 | add %sp, STACKFRAME_SZ, %o0 ! pt_regs *regs arg |
1095 | call sparc_pipe | 1095 | call sparc_pipe |
diff --git a/arch/sparc/kernel/syscalls.S b/arch/sparc/kernel/syscalls.S index 7a6786a71363..87f5a3b8a253 100644 --- a/arch/sparc/kernel/syscalls.S +++ b/arch/sparc/kernel/syscalls.S | |||
@@ -20,7 +20,7 @@ execve_merge: | |||
20 | add %sp, PTREGS_OFF, %o0 | 20 | add %sp, PTREGS_OFF, %o0 |
21 | 21 | ||
22 | .align 32 | 22 | .align 32 |
23 | sys_pipe: | 23 | sys_sparc_pipe: |
24 | ba,pt %xcc, sparc_pipe | 24 | ba,pt %xcc, sparc_pipe |
25 | add %sp, PTREGS_OFF, %o0 | 25 | add %sp, PTREGS_OFF, %o0 |
26 | sys_nis_syscall: | 26 | sys_nis_syscall: |
diff --git a/arch/sparc/kernel/systbls_32.S b/arch/sparc/kernel/systbls_32.S index 7d0807586442..dccc95df0c7f 100644 --- a/arch/sparc/kernel/systbls_32.S +++ b/arch/sparc/kernel/systbls_32.S | |||
@@ -24,7 +24,7 @@ sys_call_table: | |||
24 | /*25*/ .long sys_vmsplice, sys_ptrace, sys_alarm, sys_sigaltstack, sys_pause | 24 | /*25*/ .long sys_vmsplice, sys_ptrace, sys_alarm, sys_sigaltstack, sys_pause |
25 | /*30*/ .long sys_utime, sys_lchown, sys_fchown, sys_access, sys_nice | 25 | /*30*/ .long sys_utime, sys_lchown, sys_fchown, sys_access, sys_nice |
26 | /*35*/ .long sys_chown, sys_sync, sys_kill, sys_newstat, sys_sendfile | 26 | /*35*/ .long sys_chown, sys_sync, sys_kill, sys_newstat, sys_sendfile |
27 | /*40*/ .long sys_newlstat, sys_dup, sys_pipe, sys_times, sys_getuid | 27 | /*40*/ .long sys_newlstat, sys_dup, sys_sparc_pipe, sys_times, sys_getuid |
28 | /*45*/ .long sys_umount, sys_setgid16, sys_getgid16, sys_signal, sys_geteuid16 | 28 | /*45*/ .long sys_umount, sys_setgid16, sys_getgid16, sys_signal, sys_geteuid16 |
29 | /*50*/ .long sys_getegid16, sys_acct, sys_nis_syscall, sys_getgid, sys_ioctl | 29 | /*50*/ .long sys_getegid16, sys_acct, sys_nis_syscall, sys_getgid, sys_ioctl |
30 | /*55*/ .long sys_reboot, sys_mmap2, sys_symlink, sys_readlink, sys_execve | 30 | /*55*/ .long sys_reboot, sys_mmap2, sys_symlink, sys_readlink, sys_execve |
@@ -56,7 +56,7 @@ sys_call_table: | |||
56 | /*185*/ .long sys_setpgid, sys_fremovexattr, sys_tkill, sys_exit_group, sys_newuname | 56 | /*185*/ .long sys_setpgid, sys_fremovexattr, sys_tkill, sys_exit_group, sys_newuname |
57 | /*190*/ .long sys_init_module, sys_personality, sparc_remap_file_pages, sys_epoll_create, sys_epoll_ctl | 57 | /*190*/ .long sys_init_module, sys_personality, sparc_remap_file_pages, sys_epoll_create, sys_epoll_ctl |
58 | /*195*/ .long sys_epoll_wait, sys_ioprio_set, sys_getppid, sparc_sigaction, sys_sgetmask | 58 | /*195*/ .long sys_epoll_wait, sys_ioprio_set, sys_getppid, sparc_sigaction, sys_sgetmask |
59 | /*200*/ .long sys_ssetmask, sys_sigsuspend, sys_newlstat, sys_uselib, old_readdir | 59 | /*200*/ .long sys_ssetmask, sys_sigsuspend, sys_newlstat, sys_uselib, sys_old_readdir |
60 | /*205*/ .long sys_readahead, sys_socketcall, sys_syslog, sys_lookup_dcookie, sys_fadvise64 | 60 | /*205*/ .long sys_readahead, sys_socketcall, sys_syslog, sys_lookup_dcookie, sys_fadvise64 |
61 | /*210*/ .long sys_fadvise64_64, sys_tgkill, sys_waitpid, sys_swapoff, sys_sysinfo | 61 | /*210*/ .long sys_fadvise64_64, sys_tgkill, sys_waitpid, sys_swapoff, sys_sysinfo |
62 | /*215*/ .long sys_ipc, sys_sigreturn, sys_clone, sys_ioprio_get, sys_adjtimex | 62 | /*215*/ .long sys_ipc, sys_sigreturn, sys_clone, sys_ioprio_get, sys_adjtimex |
diff --git a/arch/sparc/kernel/systbls_64.S b/arch/sparc/kernel/systbls_64.S index 9fc78cf354bd..e6007bb37046 100644 --- a/arch/sparc/kernel/systbls_64.S +++ b/arch/sparc/kernel/systbls_64.S | |||
@@ -26,7 +26,7 @@ sys_call_table32: | |||
26 | /*25*/ .word sys32_vmsplice, compat_sys_ptrace, sys_alarm, sys32_sigaltstack, sys_pause | 26 | /*25*/ .word sys32_vmsplice, compat_sys_ptrace, sys_alarm, sys32_sigaltstack, sys_pause |
27 | /*30*/ .word compat_sys_utime, sys_lchown, sys_fchown, sys32_access, sys32_nice | 27 | /*30*/ .word compat_sys_utime, sys_lchown, sys_fchown, sys32_access, sys32_nice |
28 | .word sys_chown, sys_sync, sys32_kill, compat_sys_newstat, sys32_sendfile | 28 | .word sys_chown, sys_sync, sys32_kill, compat_sys_newstat, sys32_sendfile |
29 | /*40*/ .word compat_sys_newlstat, sys_dup, sys_pipe, compat_sys_times, sys_getuid | 29 | /*40*/ .word compat_sys_newlstat, sys_dup, sys_sparc_pipe, compat_sys_times, sys_getuid |
30 | .word sys32_umount, sys_setgid16, sys_getgid16, sys32_signal, sys_geteuid16 | 30 | .word sys32_umount, sys_setgid16, sys_getgid16, sys32_signal, sys_geteuid16 |
31 | /*50*/ .word sys_getegid16, sys_acct, sys_nis_syscall, sys_getgid, compat_sys_ioctl | 31 | /*50*/ .word sys_getegid16, sys_acct, sys_nis_syscall, sys_getgid, compat_sys_ioctl |
32 | .word sys32_reboot, sys32_mmap2, sys_symlink, sys32_readlink, sys32_execve | 32 | .word sys32_reboot, sys32_mmap2, sys_symlink, sys32_readlink, sys32_execve |
@@ -100,7 +100,7 @@ sys_call_table: | |||
100 | /*25*/ .word sys_vmsplice, sys_ptrace, sys_alarm, sys_sigaltstack, sys_nis_syscall | 100 | /*25*/ .word sys_vmsplice, sys_ptrace, sys_alarm, sys_sigaltstack, sys_nis_syscall |
101 | /*30*/ .word sys_utime, sys_nis_syscall, sys_nis_syscall, sys_access, sys_nice | 101 | /*30*/ .word sys_utime, sys_nis_syscall, sys_nis_syscall, sys_access, sys_nice |
102 | .word sys_nis_syscall, sys_sync, sys_kill, sys_newstat, sys_sendfile64 | 102 | .word sys_nis_syscall, sys_sync, sys_kill, sys_newstat, sys_sendfile64 |
103 | /*40*/ .word sys_newlstat, sys_dup, sys_pipe, sys_times, sys_nis_syscall | 103 | /*40*/ .word sys_newlstat, sys_dup, sys_sparc_pipe, sys_times, sys_nis_syscall |
104 | .word sys_umount, sys_setgid, sys_getgid, sys_signal, sys_geteuid | 104 | .word sys_umount, sys_setgid, sys_getgid, sys_signal, sys_geteuid |
105 | /*50*/ .word sys_getegid, sys_acct, sys_memory_ordering, sys_nis_syscall, sys_ioctl | 105 | /*50*/ .word sys_getegid, sys_acct, sys_memory_ordering, sys_nis_syscall, sys_ioctl |
106 | .word sys_reboot, sys_nis_syscall, sys_symlink, sys_readlink, sys_execve | 106 | .word sys_reboot, sys_nis_syscall, sys_symlink, sys_readlink, sys_execve |
diff --git a/arch/x86/kernel/syscall_table_32.S b/arch/x86/kernel/syscall_table_32.S index d44395ff34c3..e2e86a08f31d 100644 --- a/arch/x86/kernel/syscall_table_32.S +++ b/arch/x86/kernel/syscall_table_32.S | |||
@@ -88,7 +88,7 @@ ENTRY(sys_call_table) | |||
88 | .long sys_uselib | 88 | .long sys_uselib |
89 | .long sys_swapon | 89 | .long sys_swapon |
90 | .long sys_reboot | 90 | .long sys_reboot |
91 | .long old_readdir | 91 | .long sys_old_readdir |
92 | .long old_mmap /* 90 */ | 92 | .long old_mmap /* 90 */ |
93 | .long sys_munmap | 93 | .long sys_munmap |
94 | .long sys_truncate | 94 | .long sys_truncate |
diff --git a/drivers/pci/syscall.c b/drivers/pci/syscall.c index 645d7a60e412..ec22284eed30 100644 --- a/drivers/pci/syscall.c +++ b/drivers/pci/syscall.c | |||
@@ -14,10 +14,8 @@ | |||
14 | #include <asm/uaccess.h> | 14 | #include <asm/uaccess.h> |
15 | #include "pci.h" | 15 | #include "pci.h" |
16 | 16 | ||
17 | asmlinkage long | 17 | SYSCALL_DEFINE5(pciconfig_read, unsigned long, bus, unsigned long, dfn, |
18 | sys_pciconfig_read(unsigned long bus, unsigned long dfn, | 18 | unsigned long, off, unsigned long, len, void __user *, buf) |
19 | unsigned long off, unsigned long len, | ||
20 | void __user *buf) | ||
21 | { | 19 | { |
22 | struct pci_dev *dev; | 20 | struct pci_dev *dev; |
23 | u8 byte; | 21 | u8 byte; |
@@ -86,10 +84,8 @@ error: | |||
86 | return err; | 84 | return err; |
87 | } | 85 | } |
88 | 86 | ||
89 | asmlinkage long | 87 | SYSCALL_DEFINE5(pciconfig_write, unsigned long, bus, unsigned long, dfn, |
90 | sys_pciconfig_write(unsigned long bus, unsigned long dfn, | 88 | unsigned long, off, unsigned long, len, void __user *, buf) |
91 | unsigned long off, unsigned long len, | ||
92 | void __user *buf) | ||
93 | { | 89 | { |
94 | struct pci_dev *dev; | 90 | struct pci_dev *dev; |
95 | u8 byte; | 91 | u8 byte; |
@@ -1270,7 +1270,7 @@ static void io_destroy(struct kioctx *ioctx) | |||
1270 | * pointer is passed for ctxp. Will fail with -ENOSYS if not | 1270 | * pointer is passed for ctxp. Will fail with -ENOSYS if not |
1271 | * implemented. | 1271 | * implemented. |
1272 | */ | 1272 | */ |
1273 | asmlinkage long sys_io_setup(unsigned nr_events, aio_context_t __user *ctxp) | 1273 | SYSCALL_DEFINE2(io_setup, unsigned, nr_events, aio_context_t __user *, ctxp) |
1274 | { | 1274 | { |
1275 | struct kioctx *ioctx = NULL; | 1275 | struct kioctx *ioctx = NULL; |
1276 | unsigned long ctx; | 1276 | unsigned long ctx; |
@@ -1308,7 +1308,7 @@ out: | |||
1308 | * implemented. May fail with -EFAULT if the context pointed to | 1308 | * implemented. May fail with -EFAULT if the context pointed to |
1309 | * is invalid. | 1309 | * is invalid. |
1310 | */ | 1310 | */ |
1311 | asmlinkage long sys_io_destroy(aio_context_t ctx) | 1311 | SYSCALL_DEFINE1(io_destroy, aio_context_t, ctx) |
1312 | { | 1312 | { |
1313 | struct kioctx *ioctx = lookup_ioctx(ctx); | 1313 | struct kioctx *ioctx = lookup_ioctx(ctx); |
1314 | if (likely(NULL != ioctx)) { | 1314 | if (likely(NULL != ioctx)) { |
@@ -1662,8 +1662,8 @@ out_put_req: | |||
1662 | * are available to queue any iocbs. Will return 0 if nr is 0. Will | 1662 | * are available to queue any iocbs. Will return 0 if nr is 0. Will |
1663 | * fail with -ENOSYS if not implemented. | 1663 | * fail with -ENOSYS if not implemented. |
1664 | */ | 1664 | */ |
1665 | asmlinkage long sys_io_submit(aio_context_t ctx_id, long nr, | 1665 | SYSCALL_DEFINE3(io_submit, aio_context_t, ctx_id, long, nr, |
1666 | struct iocb __user * __user *iocbpp) | 1666 | struct iocb __user * __user *, iocbpp) |
1667 | { | 1667 | { |
1668 | struct kioctx *ctx; | 1668 | struct kioctx *ctx; |
1669 | long ret = 0; | 1669 | long ret = 0; |
@@ -1737,8 +1737,8 @@ static struct kiocb *lookup_kiocb(struct kioctx *ctx, struct iocb __user *iocb, | |||
1737 | * invalid. May fail with -EAGAIN if the iocb specified was not | 1737 | * invalid. May fail with -EAGAIN if the iocb specified was not |
1738 | * cancelled. Will fail with -ENOSYS if not implemented. | 1738 | * cancelled. Will fail with -ENOSYS if not implemented. |
1739 | */ | 1739 | */ |
1740 | asmlinkage long sys_io_cancel(aio_context_t ctx_id, struct iocb __user *iocb, | 1740 | SYSCALL_DEFINE3(io_cancel, aio_context_t, ctx_id, struct iocb __user *, iocb, |
1741 | struct io_event __user *result) | 1741 | struct io_event __user *, result) |
1742 | { | 1742 | { |
1743 | int (*cancel)(struct kiocb *iocb, struct io_event *res); | 1743 | int (*cancel)(struct kiocb *iocb, struct io_event *res); |
1744 | struct kioctx *ctx; | 1744 | struct kioctx *ctx; |
@@ -1799,11 +1799,11 @@ asmlinkage long sys_io_cancel(aio_context_t ctx_id, struct iocb __user *iocb, | |||
1799 | * will be updated if not NULL and the operation blocks. Will fail | 1799 | * will be updated if not NULL and the operation blocks. Will fail |
1800 | * with -ENOSYS if not implemented. | 1800 | * with -ENOSYS if not implemented. |
1801 | */ | 1801 | */ |
1802 | asmlinkage long sys_io_getevents(aio_context_t ctx_id, | 1802 | SYSCALL_DEFINE5(io_getevents, aio_context_t, ctx_id, |
1803 | long min_nr, | 1803 | long, min_nr, |
1804 | long nr, | 1804 | long, nr, |
1805 | struct io_event __user *events, | 1805 | struct io_event __user *, events, |
1806 | struct timespec __user *timeout) | 1806 | struct timespec __user *, timeout) |
1807 | { | 1807 | { |
1808 | struct kioctx *ioctx = lookup_ioctx(ctx_id); | 1808 | struct kioctx *ioctx = lookup_ioctx(ctx_id); |
1809 | long ret = -EINVAL; | 1809 | long ret = -EINVAL; |
diff --git a/fs/buffer.c b/fs/buffer.c index b6e8b8632e2f..b58208f1640a 100644 --- a/fs/buffer.c +++ b/fs/buffer.c | |||
@@ -3243,7 +3243,7 @@ void block_sync_page(struct page *page) | |||
3243 | * Use of bdflush() is deprecated and will be removed in a future kernel. | 3243 | * Use of bdflush() is deprecated and will be removed in a future kernel. |
3244 | * The `pdflush' kernel threads fully replace bdflush daemons and this call. | 3244 | * The `pdflush' kernel threads fully replace bdflush daemons and this call. |
3245 | */ | 3245 | */ |
3246 | asmlinkage long sys_bdflush(int func, long data) | 3246 | SYSCALL_DEFINE2(bdflush, int, func, long, data) |
3247 | { | 3247 | { |
3248 | static int msg_count; | 3248 | static int msg_count; |
3249 | 3249 | ||
diff --git a/fs/compat.c b/fs/compat.c index 30f2faa22f5c..65a070e705ab 100644 --- a/fs/compat.c +++ b/fs/compat.c | |||
@@ -1709,7 +1709,7 @@ asmlinkage long compat_sys_select(int n, compat_ulong_t __user *inp, | |||
1709 | } | 1709 | } |
1710 | 1710 | ||
1711 | #ifdef HAVE_SET_RESTORE_SIGMASK | 1711 | #ifdef HAVE_SET_RESTORE_SIGMASK |
1712 | asmlinkage long compat_sys_pselect7(int n, compat_ulong_t __user *inp, | 1712 | static long do_compat_pselect(int n, compat_ulong_t __user *inp, |
1713 | compat_ulong_t __user *outp, compat_ulong_t __user *exp, | 1713 | compat_ulong_t __user *outp, compat_ulong_t __user *exp, |
1714 | struct compat_timespec __user *tsp, compat_sigset_t __user *sigmask, | 1714 | struct compat_timespec __user *tsp, compat_sigset_t __user *sigmask, |
1715 | compat_size_t sigsetsize) | 1715 | compat_size_t sigsetsize) |
@@ -1775,8 +1775,8 @@ asmlinkage long compat_sys_pselect6(int n, compat_ulong_t __user *inp, | |||
1775 | (compat_size_t __user *)(sig+sizeof(up)))) | 1775 | (compat_size_t __user *)(sig+sizeof(up)))) |
1776 | return -EFAULT; | 1776 | return -EFAULT; |
1777 | } | 1777 | } |
1778 | return compat_sys_pselect7(n, inp, outp, exp, tsp, compat_ptr(up), | 1778 | return do_compat_pselect(n, inp, outp, exp, tsp, compat_ptr(up), |
1779 | sigsetsize); | 1779 | sigsetsize); |
1780 | } | 1780 | } |
1781 | 1781 | ||
1782 | asmlinkage long compat_sys_ppoll(struct pollfd __user *ufds, | 1782 | asmlinkage long compat_sys_ppoll(struct pollfd __user *ufds, |
diff --git a/fs/dcache.c b/fs/dcache.c index 4547f66884a0..937df0fb0da5 100644 --- a/fs/dcache.c +++ b/fs/dcache.c | |||
@@ -2092,7 +2092,7 @@ Elong: | |||
2092 | * return NULL; | 2092 | * return NULL; |
2093 | * } | 2093 | * } |
2094 | */ | 2094 | */ |
2095 | asmlinkage long sys_getcwd(char __user *buf, unsigned long size) | 2095 | SYSCALL_DEFINE2(getcwd, char __user *, buf, unsigned long, size) |
2096 | { | 2096 | { |
2097 | int error; | 2097 | int error; |
2098 | struct path pwd, root; | 2098 | struct path pwd, root; |
diff --git a/fs/dcookies.c b/fs/dcookies.c index 180e9fec4ad8..a21cabdbd87b 100644 --- a/fs/dcookies.c +++ b/fs/dcookies.c | |||
@@ -145,7 +145,7 @@ out: | |||
145 | /* And here is where the userspace process can look up the cookie value | 145 | /* And here is where the userspace process can look up the cookie value |
146 | * to retrieve the path. | 146 | * to retrieve the path. |
147 | */ | 147 | */ |
148 | asmlinkage long sys_lookup_dcookie(u64 cookie64, char __user * buf, size_t len) | 148 | SYSCALL_DEFINE(lookup_dcookie)(u64 cookie64, char __user * buf, size_t len) |
149 | { | 149 | { |
150 | unsigned long cookie = (unsigned long)cookie64; | 150 | unsigned long cookie = (unsigned long)cookie64; |
151 | int err = -EINVAL; | 151 | int err = -EINVAL; |
@@ -198,7 +198,13 @@ out: | |||
198 | mutex_unlock(&dcookie_mutex); | 198 | mutex_unlock(&dcookie_mutex); |
199 | return err; | 199 | return err; |
200 | } | 200 | } |
201 | 201 | #ifdef CONFIG_HAVE_SYSCALL_WRAPPERS | |
202 | asmlinkage long SyS_lookup_dcookie(u64 cookie64, long buf, long len) | ||
203 | { | ||
204 | return SYSC_lookup_dcookie(cookie64, (char __user *) buf, (size_t) len); | ||
205 | } | ||
206 | SYSCALL_ALIAS(sys_lookup_dcookie, SyS_lookup_dcookie); | ||
207 | #endif | ||
202 | 208 | ||
203 | static int dcookie_init(void) | 209 | static int dcookie_init(void) |
204 | { | 210 | { |
diff --git a/fs/eventfd.c b/fs/eventfd.c index 08bf558d0408..5de2c2db3aa2 100644 --- a/fs/eventfd.c +++ b/fs/eventfd.c | |||
@@ -198,7 +198,7 @@ struct file *eventfd_fget(int fd) | |||
198 | return file; | 198 | return file; |
199 | } | 199 | } |
200 | 200 | ||
201 | asmlinkage long sys_eventfd2(unsigned int count, int flags) | 201 | SYSCALL_DEFINE2(eventfd2, unsigned int, count, int, flags) |
202 | { | 202 | { |
203 | int fd; | 203 | int fd; |
204 | struct eventfd_ctx *ctx; | 204 | struct eventfd_ctx *ctx; |
@@ -228,8 +228,7 @@ asmlinkage long sys_eventfd2(unsigned int count, int flags) | |||
228 | return fd; | 228 | return fd; |
229 | } | 229 | } |
230 | 230 | ||
231 | asmlinkage long sys_eventfd(unsigned int count) | 231 | SYSCALL_DEFINE1(eventfd, unsigned int, count) |
232 | { | 232 | { |
233 | return sys_eventfd2(count, 0); | 233 | return sys_eventfd2(count, 0); |
234 | } | 234 | } |
235 | |||
diff --git a/fs/eventpoll.c b/fs/eventpoll.c index 96355d505347..ba2f9ec71192 100644 --- a/fs/eventpoll.c +++ b/fs/eventpoll.c | |||
@@ -1110,7 +1110,7 @@ retry: | |||
1110 | /* | 1110 | /* |
1111 | * Open an eventpoll file descriptor. | 1111 | * Open an eventpoll file descriptor. |
1112 | */ | 1112 | */ |
1113 | asmlinkage long sys_epoll_create1(int flags) | 1113 | SYSCALL_DEFINE1(epoll_create1, int, flags) |
1114 | { | 1114 | { |
1115 | int error, fd = -1; | 1115 | int error, fd = -1; |
1116 | struct eventpoll *ep; | 1116 | struct eventpoll *ep; |
@@ -1150,7 +1150,7 @@ error_return: | |||
1150 | return fd; | 1150 | return fd; |
1151 | } | 1151 | } |
1152 | 1152 | ||
1153 | asmlinkage long sys_epoll_create(int size) | 1153 | SYSCALL_DEFINE1(epoll_create, int, size) |
1154 | { | 1154 | { |
1155 | if (size < 0) | 1155 | if (size < 0) |
1156 | return -EINVAL; | 1156 | return -EINVAL; |
@@ -1163,8 +1163,8 @@ asmlinkage long sys_epoll_create(int size) | |||
1163 | * the eventpoll file that enables the insertion/removal/change of | 1163 | * the eventpoll file that enables the insertion/removal/change of |
1164 | * file descriptors inside the interest set. | 1164 | * file descriptors inside the interest set. |
1165 | */ | 1165 | */ |
1166 | asmlinkage long sys_epoll_ctl(int epfd, int op, int fd, | 1166 | SYSCALL_DEFINE4(epoll_ctl, int, epfd, int, op, int, fd, |
1167 | struct epoll_event __user *event) | 1167 | struct epoll_event __user *, event) |
1168 | { | 1168 | { |
1169 | int error; | 1169 | int error; |
1170 | struct file *file, *tfile; | 1170 | struct file *file, *tfile; |
@@ -1261,8 +1261,8 @@ error_return: | |||
1261 | * Implement the event wait interface for the eventpoll file. It is the kernel | 1261 | * Implement the event wait interface for the eventpoll file. It is the kernel |
1262 | * part of the user space epoll_wait(2). | 1262 | * part of the user space epoll_wait(2). |
1263 | */ | 1263 | */ |
1264 | asmlinkage long sys_epoll_wait(int epfd, struct epoll_event __user *events, | 1264 | SYSCALL_DEFINE4(epoll_wait, int, epfd, struct epoll_event __user *, events, |
1265 | int maxevents, int timeout) | 1265 | int, maxevents, int, timeout) |
1266 | { | 1266 | { |
1267 | int error; | 1267 | int error; |
1268 | struct file *file; | 1268 | struct file *file; |
@@ -1319,9 +1319,9 @@ error_return: | |||
1319 | * Implement the event wait interface for the eventpoll file. It is the kernel | 1319 | * Implement the event wait interface for the eventpoll file. It is the kernel |
1320 | * part of the user space epoll_pwait(2). | 1320 | * part of the user space epoll_pwait(2). |
1321 | */ | 1321 | */ |
1322 | asmlinkage long sys_epoll_pwait(int epfd, struct epoll_event __user *events, | 1322 | SYSCALL_DEFINE6(epoll_pwait, int, epfd, struct epoll_event __user *, events, |
1323 | int maxevents, int timeout, const sigset_t __user *sigmask, | 1323 | int, maxevents, int, timeout, const sigset_t __user *, sigmask, |
1324 | size_t sigsetsize) | 1324 | size_t, sigsetsize) |
1325 | { | 1325 | { |
1326 | int error; | 1326 | int error; |
1327 | sigset_t ksigmask, sigsaved; | 1327 | sigset_t ksigmask, sigsaved; |
@@ -99,7 +99,7 @@ static inline void put_binfmt(struct linux_binfmt * fmt) | |||
99 | * | 99 | * |
100 | * Also note that we take the address to load from from the file itself. | 100 | * Also note that we take the address to load from from the file itself. |
101 | */ | 101 | */ |
102 | asmlinkage long sys_uselib(const char __user * library) | 102 | SYSCALL_DEFINE1(uselib, const char __user *, library) |
103 | { | 103 | { |
104 | struct file *file; | 104 | struct file *file; |
105 | struct nameidata nd; | 105 | struct nameidata nd; |
diff --git a/fs/fcntl.c b/fs/fcntl.c index cdc141946724..bd215cc791da 100644 --- a/fs/fcntl.c +++ b/fs/fcntl.c | |||
@@ -50,7 +50,7 @@ static int get_close_on_exec(unsigned int fd) | |||
50 | return res; | 50 | return res; |
51 | } | 51 | } |
52 | 52 | ||
53 | asmlinkage long sys_dup3(unsigned int oldfd, unsigned int newfd, int flags) | 53 | SYSCALL_DEFINE3(dup3, unsigned int, oldfd, unsigned int, newfd, int, flags) |
54 | { | 54 | { |
55 | int err = -EBADF; | 55 | int err = -EBADF; |
56 | struct file * file, *tofree; | 56 | struct file * file, *tofree; |
@@ -113,7 +113,7 @@ out_unlock: | |||
113 | return err; | 113 | return err; |
114 | } | 114 | } |
115 | 115 | ||
116 | asmlinkage long sys_dup2(unsigned int oldfd, unsigned int newfd) | 116 | SYSCALL_DEFINE2(dup2, unsigned int, oldfd, unsigned int, newfd) |
117 | { | 117 | { |
118 | if (unlikely(newfd == oldfd)) { /* corner case */ | 118 | if (unlikely(newfd == oldfd)) { /* corner case */ |
119 | struct files_struct *files = current->files; | 119 | struct files_struct *files = current->files; |
@@ -126,7 +126,7 @@ asmlinkage long sys_dup2(unsigned int oldfd, unsigned int newfd) | |||
126 | return sys_dup3(oldfd, newfd, 0); | 126 | return sys_dup3(oldfd, newfd, 0); |
127 | } | 127 | } |
128 | 128 | ||
129 | asmlinkage long sys_dup(unsigned int fildes) | 129 | SYSCALL_DEFINE1(dup, unsigned int, fildes) |
130 | { | 130 | { |
131 | int ret = -EBADF; | 131 | int ret = -EBADF; |
132 | struct file *file = fget(fildes); | 132 | struct file *file = fget(fildes); |
@@ -335,7 +335,7 @@ static long do_fcntl(int fd, unsigned int cmd, unsigned long arg, | |||
335 | return err; | 335 | return err; |
336 | } | 336 | } |
337 | 337 | ||
338 | asmlinkage long sys_fcntl(unsigned int fd, unsigned int cmd, unsigned long arg) | 338 | SYSCALL_DEFINE3(fcntl, unsigned int, fd, unsigned int, cmd, unsigned long, arg) |
339 | { | 339 | { |
340 | struct file *filp; | 340 | struct file *filp; |
341 | long err = -EBADF; | 341 | long err = -EBADF; |
@@ -358,7 +358,8 @@ out: | |||
358 | } | 358 | } |
359 | 359 | ||
360 | #if BITS_PER_LONG == 32 | 360 | #if BITS_PER_LONG == 32 |
361 | asmlinkage long sys_fcntl64(unsigned int fd, unsigned int cmd, unsigned long arg) | 361 | SYSCALL_DEFINE3(fcntl64, unsigned int, fd, unsigned int, cmd, |
362 | unsigned long, arg) | ||
362 | { | 363 | { |
363 | struct file * filp; | 364 | struct file * filp; |
364 | long err; | 365 | long err; |
diff --git a/fs/filesystems.c b/fs/filesystems.c index d488dcd7f2bb..1aa70260e6d1 100644 --- a/fs/filesystems.c +++ b/fs/filesystems.c | |||
@@ -179,7 +179,7 @@ static int fs_maxindex(void) | |||
179 | /* | 179 | /* |
180 | * Whee.. Weird sysv syscall. | 180 | * Whee.. Weird sysv syscall. |
181 | */ | 181 | */ |
182 | asmlinkage long sys_sysfs(int option, unsigned long arg1, unsigned long arg2) | 182 | SYSCALL_DEFINE3(sysfs, int, option, unsigned long, arg1, unsigned long, arg2) |
183 | { | 183 | { |
184 | int retval = -EINVAL; | 184 | int retval = -EINVAL; |
185 | 185 | ||
diff --git a/fs/ioctl.c b/fs/ioctl.c index 20b0a8a24c6b..240ec63984cb 100644 --- a/fs/ioctl.c +++ b/fs/ioctl.c | |||
@@ -542,7 +542,7 @@ int do_vfs_ioctl(struct file *filp, unsigned int fd, unsigned int cmd, | |||
542 | return error; | 542 | return error; |
543 | } | 543 | } |
544 | 544 | ||
545 | asmlinkage long sys_ioctl(unsigned int fd, unsigned int cmd, unsigned long arg) | 545 | SYSCALL_DEFINE3(ioctl, unsigned int, fd, unsigned int, cmd, unsigned long, arg) |
546 | { | 546 | { |
547 | struct file *filp; | 547 | struct file *filp; |
548 | int error = -EBADF; | 548 | int error = -EBADF; |
diff --git a/fs/ioprio.c b/fs/ioprio.c index 1a39ac370942..c7c0b28d7d21 100644 --- a/fs/ioprio.c +++ b/fs/ioprio.c | |||
@@ -72,7 +72,7 @@ int set_task_ioprio(struct task_struct *task, int ioprio) | |||
72 | } | 72 | } |
73 | EXPORT_SYMBOL_GPL(set_task_ioprio); | 73 | EXPORT_SYMBOL_GPL(set_task_ioprio); |
74 | 74 | ||
75 | asmlinkage long sys_ioprio_set(int which, int who, int ioprio) | 75 | SYSCALL_DEFINE3(ioprio_set, int, which, int, who, int, ioprio) |
76 | { | 76 | { |
77 | int class = IOPRIO_PRIO_CLASS(ioprio); | 77 | int class = IOPRIO_PRIO_CLASS(ioprio); |
78 | int data = IOPRIO_PRIO_DATA(ioprio); | 78 | int data = IOPRIO_PRIO_DATA(ioprio); |
@@ -188,7 +188,7 @@ int ioprio_best(unsigned short aprio, unsigned short bprio) | |||
188 | return aprio; | 188 | return aprio; |
189 | } | 189 | } |
190 | 190 | ||
191 | asmlinkage long sys_ioprio_get(int which, int who) | 191 | SYSCALL_DEFINE2(ioprio_get, int, which, int, who) |
192 | { | 192 | { |
193 | struct task_struct *g, *p; | 193 | struct task_struct *g, *p; |
194 | struct user_struct *user; | 194 | struct user_struct *user; |
@@ -252,4 +252,3 @@ asmlinkage long sys_ioprio_get(int which, int who) | |||
252 | read_unlock(&tasklist_lock); | 252 | read_unlock(&tasklist_lock); |
253 | return ret; | 253 | return ret; |
254 | } | 254 | } |
255 | |||
diff --git a/fs/locks.c b/fs/locks.c index 46a2e12f7d42..ec3deea29e37 100644 --- a/fs/locks.c +++ b/fs/locks.c | |||
@@ -1564,7 +1564,7 @@ EXPORT_SYMBOL(flock_lock_file_wait); | |||
1564 | * %LOCK_MAND can be combined with %LOCK_READ or %LOCK_WRITE to allow other | 1564 | * %LOCK_MAND can be combined with %LOCK_READ or %LOCK_WRITE to allow other |
1565 | * processes read and write access respectively. | 1565 | * processes read and write access respectively. |
1566 | */ | 1566 | */ |
1567 | asmlinkage long sys_flock(unsigned int fd, unsigned int cmd) | 1567 | SYSCALL_DEFINE2(flock, unsigned int, fd, unsigned int, cmd) |
1568 | { | 1568 | { |
1569 | struct file *filp; | 1569 | struct file *filp; |
1570 | struct file_lock *lock; | 1570 | struct file_lock *lock; |
diff --git a/fs/namei.c b/fs/namei.c index f05bed242422..bbc15c237558 100644 --- a/fs/namei.c +++ b/fs/namei.c | |||
@@ -1962,8 +1962,8 @@ static int may_mknod(mode_t mode) | |||
1962 | } | 1962 | } |
1963 | } | 1963 | } |
1964 | 1964 | ||
1965 | asmlinkage long sys_mknodat(int dfd, const char __user *filename, int mode, | 1965 | SYSCALL_DEFINE4(mknodat, int, dfd, const char __user *, filename, int, mode, |
1966 | unsigned dev) | 1966 | unsigned, dev) |
1967 | { | 1967 | { |
1968 | int error; | 1968 | int error; |
1969 | char *tmp; | 1969 | char *tmp; |
@@ -2017,7 +2017,7 @@ out_unlock: | |||
2017 | return error; | 2017 | return error; |
2018 | } | 2018 | } |
2019 | 2019 | ||
2020 | asmlinkage long sys_mknod(const char __user *filename, int mode, unsigned dev) | 2020 | SYSCALL_DEFINE3(mknod, const char __user *, filename, int, mode, unsigned, dev) |
2021 | { | 2021 | { |
2022 | return sys_mknodat(AT_FDCWD, filename, mode, dev); | 2022 | return sys_mknodat(AT_FDCWD, filename, mode, dev); |
2023 | } | 2023 | } |
@@ -2044,7 +2044,7 @@ int vfs_mkdir(struct inode *dir, struct dentry *dentry, int mode) | |||
2044 | return error; | 2044 | return error; |
2045 | } | 2045 | } |
2046 | 2046 | ||
2047 | asmlinkage long sys_mkdirat(int dfd, const char __user *pathname, int mode) | 2047 | SYSCALL_DEFINE3(mkdirat, int, dfd, const char __user *, pathname, int, mode) |
2048 | { | 2048 | { |
2049 | int error = 0; | 2049 | int error = 0; |
2050 | char * tmp; | 2050 | char * tmp; |
@@ -2081,7 +2081,7 @@ out_err: | |||
2081 | return error; | 2081 | return error; |
2082 | } | 2082 | } |
2083 | 2083 | ||
2084 | asmlinkage long sys_mkdir(const char __user *pathname, int mode) | 2084 | SYSCALL_DEFINE2(mkdir, const char __user *, pathname, int, mode) |
2085 | { | 2085 | { |
2086 | return sys_mkdirat(AT_FDCWD, pathname, mode); | 2086 | return sys_mkdirat(AT_FDCWD, pathname, mode); |
2087 | } | 2087 | } |
@@ -2195,7 +2195,7 @@ exit1: | |||
2195 | return error; | 2195 | return error; |
2196 | } | 2196 | } |
2197 | 2197 | ||
2198 | asmlinkage long sys_rmdir(const char __user *pathname) | 2198 | SYSCALL_DEFINE1(rmdir, const char __user *, pathname) |
2199 | { | 2199 | { |
2200 | return do_rmdir(AT_FDCWD, pathname); | 2200 | return do_rmdir(AT_FDCWD, pathname); |
2201 | } | 2201 | } |
@@ -2291,7 +2291,7 @@ slashes: | |||
2291 | goto exit2; | 2291 | goto exit2; |
2292 | } | 2292 | } |
2293 | 2293 | ||
2294 | asmlinkage long sys_unlinkat(int dfd, const char __user *pathname, int flag) | 2294 | SYSCALL_DEFINE3(unlinkat, int, dfd, const char __user *, pathname, int, flag) |
2295 | { | 2295 | { |
2296 | if ((flag & ~AT_REMOVEDIR) != 0) | 2296 | if ((flag & ~AT_REMOVEDIR) != 0) |
2297 | return -EINVAL; | 2297 | return -EINVAL; |
@@ -2302,7 +2302,7 @@ asmlinkage long sys_unlinkat(int dfd, const char __user *pathname, int flag) | |||
2302 | return do_unlinkat(dfd, pathname); | 2302 | return do_unlinkat(dfd, pathname); |
2303 | } | 2303 | } |
2304 | 2304 | ||
2305 | asmlinkage long sys_unlink(const char __user *pathname) | 2305 | SYSCALL_DEFINE1(unlink, const char __user *, pathname) |
2306 | { | 2306 | { |
2307 | return do_unlinkat(AT_FDCWD, pathname); | 2307 | return do_unlinkat(AT_FDCWD, pathname); |
2308 | } | 2308 | } |
@@ -2328,8 +2328,8 @@ int vfs_symlink(struct inode *dir, struct dentry *dentry, const char *oldname) | |||
2328 | return error; | 2328 | return error; |
2329 | } | 2329 | } |
2330 | 2330 | ||
2331 | asmlinkage long sys_symlinkat(const char __user *oldname, | 2331 | SYSCALL_DEFINE3(symlinkat, const char __user *, oldname, |
2332 | int newdfd, const char __user *newname) | 2332 | int, newdfd, const char __user *, newname) |
2333 | { | 2333 | { |
2334 | int error; | 2334 | int error; |
2335 | char *from; | 2335 | char *from; |
@@ -2370,7 +2370,7 @@ out_putname: | |||
2370 | return error; | 2370 | return error; |
2371 | } | 2371 | } |
2372 | 2372 | ||
2373 | asmlinkage long sys_symlink(const char __user *oldname, const char __user *newname) | 2373 | SYSCALL_DEFINE2(symlink, const char __user *, oldname, const char __user *, newname) |
2374 | { | 2374 | { |
2375 | return sys_symlinkat(oldname, AT_FDCWD, newname); | 2375 | return sys_symlinkat(oldname, AT_FDCWD, newname); |
2376 | } | 2376 | } |
@@ -2422,9 +2422,8 @@ int vfs_link(struct dentry *old_dentry, struct inode *dir, struct dentry *new_de | |||
2422 | * with linux 2.0, and to avoid hard-linking to directories | 2422 | * with linux 2.0, and to avoid hard-linking to directories |
2423 | * and other special files. --ADM | 2423 | * and other special files. --ADM |
2424 | */ | 2424 | */ |
2425 | asmlinkage long sys_linkat(int olddfd, const char __user *oldname, | 2425 | SYSCALL_DEFINE5(linkat, int, olddfd, const char __user *, oldname, |
2426 | int newdfd, const char __user *newname, | 2426 | int, newdfd, const char __user *, newname, int, flags) |
2427 | int flags) | ||
2428 | { | 2427 | { |
2429 | struct dentry *new_dentry; | 2428 | struct dentry *new_dentry; |
2430 | struct nameidata nd; | 2429 | struct nameidata nd; |
@@ -2473,7 +2472,7 @@ out: | |||
2473 | return error; | 2472 | return error; |
2474 | } | 2473 | } |
2475 | 2474 | ||
2476 | asmlinkage long sys_link(const char __user *oldname, const char __user *newname) | 2475 | SYSCALL_DEFINE2(link, const char __user *, oldname, const char __user *, newname) |
2477 | { | 2476 | { |
2478 | return sys_linkat(AT_FDCWD, oldname, AT_FDCWD, newname, 0); | 2477 | return sys_linkat(AT_FDCWD, oldname, AT_FDCWD, newname, 0); |
2479 | } | 2478 | } |
@@ -2624,8 +2623,8 @@ int vfs_rename(struct inode *old_dir, struct dentry *old_dentry, | |||
2624 | return error; | 2623 | return error; |
2625 | } | 2624 | } |
2626 | 2625 | ||
2627 | asmlinkage long sys_renameat(int olddfd, const char __user *oldname, | 2626 | SYSCALL_DEFINE4(renameat, int, olddfd, const char __user *, oldname, |
2628 | int newdfd, const char __user *newname) | 2627 | int, newdfd, const char __user *, newname) |
2629 | { | 2628 | { |
2630 | struct dentry *old_dir, *new_dir; | 2629 | struct dentry *old_dir, *new_dir; |
2631 | struct dentry *old_dentry, *new_dentry; | 2630 | struct dentry *old_dentry, *new_dentry; |
@@ -2718,7 +2717,7 @@ exit: | |||
2718 | return error; | 2717 | return error; |
2719 | } | 2718 | } |
2720 | 2719 | ||
2721 | asmlinkage long sys_rename(const char __user *oldname, const char __user *newname) | 2720 | SYSCALL_DEFINE2(rename, const char __user *, oldname, const char __user *, newname) |
2722 | { | 2721 | { |
2723 | return sys_renameat(AT_FDCWD, oldname, AT_FDCWD, newname); | 2722 | return sys_renameat(AT_FDCWD, oldname, AT_FDCWD, newname); |
2724 | } | 2723 | } |
diff --git a/fs/namespace.c b/fs/namespace.c index a40685d800a8..228d8c4bfd18 100644 --- a/fs/namespace.c +++ b/fs/namespace.c | |||
@@ -1128,7 +1128,7 @@ static int do_umount(struct vfsmount *mnt, int flags) | |||
1128 | * unixes. Our API is identical to OSF/1 to avoid making a mess of AMD | 1128 | * unixes. Our API is identical to OSF/1 to avoid making a mess of AMD |
1129 | */ | 1129 | */ |
1130 | 1130 | ||
1131 | asmlinkage long sys_umount(char __user * name, int flags) | 1131 | SYSCALL_DEFINE2(umount, char __user *, name, int, flags) |
1132 | { | 1132 | { |
1133 | struct path path; | 1133 | struct path path; |
1134 | int retval; | 1134 | int retval; |
@@ -1160,7 +1160,7 @@ out: | |||
1160 | /* | 1160 | /* |
1161 | * The 2.0 compatible umount. No flags. | 1161 | * The 2.0 compatible umount. No flags. |
1162 | */ | 1162 | */ |
1163 | asmlinkage long sys_oldumount(char __user * name) | 1163 | SYSCALL_DEFINE1(oldumount, char __user *, name) |
1164 | { | 1164 | { |
1165 | return sys_umount(name, 0); | 1165 | return sys_umount(name, 0); |
1166 | } | 1166 | } |
@@ -2045,9 +2045,8 @@ struct mnt_namespace *copy_mnt_ns(unsigned long flags, struct mnt_namespace *ns, | |||
2045 | return new_ns; | 2045 | return new_ns; |
2046 | } | 2046 | } |
2047 | 2047 | ||
2048 | asmlinkage long sys_mount(char __user * dev_name, char __user * dir_name, | 2048 | SYSCALL_DEFINE5(mount, char __user *, dev_name, char __user *, dir_name, |
2049 | char __user * type, unsigned long flags, | 2049 | char __user *, type, unsigned long, flags, void __user *, data) |
2050 | void __user * data) | ||
2051 | { | 2050 | { |
2052 | int retval; | 2051 | int retval; |
2053 | unsigned long data_page; | 2052 | unsigned long data_page; |
@@ -2172,8 +2171,8 @@ static void chroot_fs_refs(struct path *old_root, struct path *new_root) | |||
2172 | * though, so you may need to say mount --bind /nfs/my_root /nfs/my_root | 2171 | * though, so you may need to say mount --bind /nfs/my_root /nfs/my_root |
2173 | * first. | 2172 | * first. |
2174 | */ | 2173 | */ |
2175 | asmlinkage long sys_pivot_root(const char __user * new_root, | 2174 | SYSCALL_DEFINE2(pivot_root, const char __user *, new_root, |
2176 | const char __user * put_old) | 2175 | const char __user *, put_old) |
2177 | { | 2176 | { |
2178 | struct vfsmount *tmp; | 2177 | struct vfsmount *tmp; |
2179 | struct path new, old, parent_path, root_parent, root; | 2178 | struct path new, old, parent_path, root_parent, root; |
diff --git a/fs/nfsctl.c b/fs/nfsctl.c index b27451909dff..8f9a20556f79 100644 --- a/fs/nfsctl.c +++ b/fs/nfsctl.c | |||
@@ -86,8 +86,8 @@ static struct { | |||
86 | }, | 86 | }, |
87 | }; | 87 | }; |
88 | 88 | ||
89 | long | 89 | SYSCALL_DEFINE3(nfsservctl, int, cmd, struct nfsctl_arg __user *, arg, |
90 | asmlinkage sys_nfsservctl(int cmd, struct nfsctl_arg __user *arg, void __user *res) | 90 | void __user *, res) |
91 | { | 91 | { |
92 | struct file *file; | 92 | struct file *file; |
93 | void __user *p = &arg->u; | 93 | void __user *p = &arg->u; |
diff --git a/fs/notify/inotify/inotify_user.c b/fs/notify/inotify/inotify_user.c index 81b8644b0136..d53a1838d6e8 100644 --- a/fs/notify/inotify/inotify_user.c +++ b/fs/notify/inotify/inotify_user.c | |||
@@ -576,7 +576,7 @@ static const struct inotify_operations inotify_user_ops = { | |||
576 | .destroy_watch = free_inotify_user_watch, | 576 | .destroy_watch = free_inotify_user_watch, |
577 | }; | 577 | }; |
578 | 578 | ||
579 | asmlinkage long sys_inotify_init1(int flags) | 579 | SYSCALL_DEFINE1(inotify_init1, int, flags) |
580 | { | 580 | { |
581 | struct inotify_device *dev; | 581 | struct inotify_device *dev; |
582 | struct inotify_handle *ih; | 582 | struct inotify_handle *ih; |
@@ -655,12 +655,13 @@ out_put_fd: | |||
655 | return ret; | 655 | return ret; |
656 | } | 656 | } |
657 | 657 | ||
658 | asmlinkage long sys_inotify_init(void) | 658 | SYSCALL_DEFINE0(inotify_init) |
659 | { | 659 | { |
660 | return sys_inotify_init1(0); | 660 | return sys_inotify_init1(0); |
661 | } | 661 | } |
662 | 662 | ||
663 | asmlinkage long sys_inotify_add_watch(int fd, const char __user *pathname, u32 mask) | 663 | SYSCALL_DEFINE3(inotify_add_watch, int, fd, const char __user *, pathname, |
664 | u32, mask) | ||
664 | { | 665 | { |
665 | struct inode *inode; | 666 | struct inode *inode; |
666 | struct inotify_device *dev; | 667 | struct inotify_device *dev; |
@@ -704,7 +705,7 @@ fput_and_out: | |||
704 | return ret; | 705 | return ret; |
705 | } | 706 | } |
706 | 707 | ||
707 | asmlinkage long sys_inotify_rm_watch(int fd, __s32 wd) | 708 | SYSCALL_DEFINE2(inotify_rm_watch, int, fd, __s32, wd) |
708 | { | 709 | { |
709 | struct file *filp; | 710 | struct file *filp; |
710 | struct inotify_device *dev; | 711 | struct inotify_device *dev; |
@@ -122,7 +122,7 @@ static int vfs_statfs64(struct dentry *dentry, struct statfs64 *buf) | |||
122 | return 0; | 122 | return 0; |
123 | } | 123 | } |
124 | 124 | ||
125 | asmlinkage long sys_statfs(const char __user *pathname, struct statfs __user * buf) | 125 | SYSCALL_DEFINE2(statfs, const char __user *, pathname, struct statfs __user *, buf) |
126 | { | 126 | { |
127 | struct path path; | 127 | struct path path; |
128 | int error; | 128 | int error; |
@@ -138,8 +138,7 @@ asmlinkage long sys_statfs(const char __user *pathname, struct statfs __user * b | |||
138 | return error; | 138 | return error; |
139 | } | 139 | } |
140 | 140 | ||
141 | 141 | SYSCALL_DEFINE3(statfs64, const char __user *, pathname, size_t, sz, struct statfs64 __user *, buf) | |
142 | asmlinkage long sys_statfs64(const char __user *pathname, size_t sz, struct statfs64 __user *buf) | ||
143 | { | 142 | { |
144 | struct path path; | 143 | struct path path; |
145 | long error; | 144 | long error; |
@@ -157,8 +156,7 @@ asmlinkage long sys_statfs64(const char __user *pathname, size_t sz, struct stat | |||
157 | return error; | 156 | return error; |
158 | } | 157 | } |
159 | 158 | ||
160 | 159 | SYSCALL_DEFINE2(fstatfs, unsigned int, fd, struct statfs __user *, buf) | |
161 | asmlinkage long sys_fstatfs(unsigned int fd, struct statfs __user * buf) | ||
162 | { | 160 | { |
163 | struct file * file; | 161 | struct file * file; |
164 | struct statfs tmp; | 162 | struct statfs tmp; |
@@ -176,7 +174,7 @@ out: | |||
176 | return error; | 174 | return error; |
177 | } | 175 | } |
178 | 176 | ||
179 | asmlinkage long sys_fstatfs64(unsigned int fd, size_t sz, struct statfs64 __user *buf) | 177 | SYSCALL_DEFINE3(fstatfs64, unsigned int, fd, size_t, sz, struct statfs64 __user *, buf) |
180 | { | 178 | { |
181 | struct file * file; | 179 | struct file * file; |
182 | struct statfs64 tmp; | 180 | struct statfs64 tmp; |
@@ -289,7 +287,7 @@ out: | |||
289 | return error; | 287 | return error; |
290 | } | 288 | } |
291 | 289 | ||
292 | asmlinkage long sys_truncate(const char __user * path, unsigned long length) | 290 | SYSCALL_DEFINE2(truncate, const char __user *, path, unsigned long, length) |
293 | { | 291 | { |
294 | /* on 32-bit boxen it will cut the range 2^31--2^32-1 off */ | 292 | /* on 32-bit boxen it will cut the range 2^31--2^32-1 off */ |
295 | return do_sys_truncate(path, (long)length); | 293 | return do_sys_truncate(path, (long)length); |
@@ -341,7 +339,7 @@ out: | |||
341 | return error; | 339 | return error; |
342 | } | 340 | } |
343 | 341 | ||
344 | asmlinkage long sys_ftruncate(unsigned int fd, unsigned long length) | 342 | SYSCALL_DEFINE2(ftruncate, unsigned int, fd, unsigned long, length) |
345 | { | 343 | { |
346 | long ret = do_sys_ftruncate(fd, length, 1); | 344 | long ret = do_sys_ftruncate(fd, length, 1); |
347 | /* avoid REGPARM breakage on x86: */ | 345 | /* avoid REGPARM breakage on x86: */ |
@@ -351,21 +349,35 @@ asmlinkage long sys_ftruncate(unsigned int fd, unsigned long length) | |||
351 | 349 | ||
352 | /* LFS versions of truncate are only needed on 32 bit machines */ | 350 | /* LFS versions of truncate are only needed on 32 bit machines */ |
353 | #if BITS_PER_LONG == 32 | 351 | #if BITS_PER_LONG == 32 |
354 | asmlinkage long sys_truncate64(const char __user * path, loff_t length) | 352 | SYSCALL_DEFINE(truncate64)(const char __user * path, loff_t length) |
355 | { | 353 | { |
356 | return do_sys_truncate(path, length); | 354 | return do_sys_truncate(path, length); |
357 | } | 355 | } |
356 | #ifdef CONFIG_HAVE_SYSCALL_WRAPPERS | ||
357 | asmlinkage long SyS_truncate64(long path, loff_t length) | ||
358 | { | ||
359 | return SYSC_truncate64((const char __user *) path, length); | ||
360 | } | ||
361 | SYSCALL_ALIAS(sys_truncate64, SyS_truncate64); | ||
362 | #endif | ||
358 | 363 | ||
359 | asmlinkage long sys_ftruncate64(unsigned int fd, loff_t length) | 364 | SYSCALL_DEFINE(ftruncate64)(unsigned int fd, loff_t length) |
360 | { | 365 | { |
361 | long ret = do_sys_ftruncate(fd, length, 0); | 366 | long ret = do_sys_ftruncate(fd, length, 0); |
362 | /* avoid REGPARM breakage on x86: */ | 367 | /* avoid REGPARM breakage on x86: */ |
363 | asmlinkage_protect(2, ret, fd, length); | 368 | asmlinkage_protect(2, ret, fd, length); |
364 | return ret; | 369 | return ret; |
365 | } | 370 | } |
371 | #ifdef CONFIG_HAVE_SYSCALL_WRAPPERS | ||
372 | asmlinkage long SyS_ftruncate64(long fd, loff_t length) | ||
373 | { | ||
374 | return SYSC_ftruncate64((unsigned int) fd, length); | ||
375 | } | ||
376 | SYSCALL_ALIAS(sys_ftruncate64, SyS_ftruncate64); | ||
366 | #endif | 377 | #endif |
378 | #endif /* BITS_PER_LONG == 32 */ | ||
367 | 379 | ||
368 | asmlinkage long sys_fallocate(int fd, int mode, loff_t offset, loff_t len) | 380 | SYSCALL_DEFINE(fallocate)(int fd, int mode, loff_t offset, loff_t len) |
369 | { | 381 | { |
370 | struct file *file; | 382 | struct file *file; |
371 | struct inode *inode; | 383 | struct inode *inode; |
@@ -422,13 +434,20 @@ out_fput: | |||
422 | out: | 434 | out: |
423 | return ret; | 435 | return ret; |
424 | } | 436 | } |
437 | #ifdef CONFIG_HAVE_SYSCALL_WRAPPERS | ||
438 | asmlinkage long SyS_fallocate(long fd, long mode, loff_t offset, loff_t len) | ||
439 | { | ||
440 | return SYSC_fallocate((int)fd, (int)mode, offset, len); | ||
441 | } | ||
442 | SYSCALL_ALIAS(sys_fallocate, SyS_fallocate); | ||
443 | #endif | ||
425 | 444 | ||
426 | /* | 445 | /* |
427 | * access() needs to use the real uid/gid, not the effective uid/gid. | 446 | * access() needs to use the real uid/gid, not the effective uid/gid. |
428 | * We do this by temporarily clearing all FS-related capabilities and | 447 | * We do this by temporarily clearing all FS-related capabilities and |
429 | * switching the fsuid/fsgid around to the real ones. | 448 | * switching the fsuid/fsgid around to the real ones. |
430 | */ | 449 | */ |
431 | asmlinkage long sys_faccessat(int dfd, const char __user *filename, int mode) | 450 | SYSCALL_DEFINE3(faccessat, int, dfd, const char __user *, filename, int, mode) |
432 | { | 451 | { |
433 | const struct cred *old_cred; | 452 | const struct cred *old_cred; |
434 | struct cred *override_cred; | 453 | struct cred *override_cred; |
@@ -498,12 +517,12 @@ out: | |||
498 | return res; | 517 | return res; |
499 | } | 518 | } |
500 | 519 | ||
501 | asmlinkage long sys_access(const char __user *filename, int mode) | 520 | SYSCALL_DEFINE2(access, const char __user *, filename, int, mode) |
502 | { | 521 | { |
503 | return sys_faccessat(AT_FDCWD, filename, mode); | 522 | return sys_faccessat(AT_FDCWD, filename, mode); |
504 | } | 523 | } |
505 | 524 | ||
506 | asmlinkage long sys_chdir(const char __user * filename) | 525 | SYSCALL_DEFINE1(chdir, const char __user *, filename) |
507 | { | 526 | { |
508 | struct path path; | 527 | struct path path; |
509 | int error; | 528 | int error; |
@@ -524,7 +543,7 @@ out: | |||
524 | return error; | 543 | return error; |
525 | } | 544 | } |
526 | 545 | ||
527 | asmlinkage long sys_fchdir(unsigned int fd) | 546 | SYSCALL_DEFINE1(fchdir, unsigned int, fd) |
528 | { | 547 | { |
529 | struct file *file; | 548 | struct file *file; |
530 | struct inode *inode; | 549 | struct inode *inode; |
@@ -550,7 +569,7 @@ out: | |||
550 | return error; | 569 | return error; |
551 | } | 570 | } |
552 | 571 | ||
553 | asmlinkage long sys_chroot(const char __user * filename) | 572 | SYSCALL_DEFINE1(chroot, const char __user *, filename) |
554 | { | 573 | { |
555 | struct path path; | 574 | struct path path; |
556 | int error; | 575 | int error; |
@@ -575,7 +594,7 @@ out: | |||
575 | return error; | 594 | return error; |
576 | } | 595 | } |
577 | 596 | ||
578 | asmlinkage long sys_fchmod(unsigned int fd, mode_t mode) | 597 | SYSCALL_DEFINE2(fchmod, unsigned int, fd, mode_t, mode) |
579 | { | 598 | { |
580 | struct inode * inode; | 599 | struct inode * inode; |
581 | struct dentry * dentry; | 600 | struct dentry * dentry; |
@@ -609,8 +628,7 @@ out: | |||
609 | return err; | 628 | return err; |
610 | } | 629 | } |
611 | 630 | ||
612 | asmlinkage long sys_fchmodat(int dfd, const char __user *filename, | 631 | SYSCALL_DEFINE3(fchmodat, int, dfd, const char __user *, filename, mode_t, mode) |
613 | mode_t mode) | ||
614 | { | 632 | { |
615 | struct path path; | 633 | struct path path; |
616 | struct inode *inode; | 634 | struct inode *inode; |
@@ -639,7 +657,7 @@ out: | |||
639 | return error; | 657 | return error; |
640 | } | 658 | } |
641 | 659 | ||
642 | asmlinkage long sys_chmod(const char __user *filename, mode_t mode) | 660 | SYSCALL_DEFINE2(chmod, const char __user *, filename, mode_t, mode) |
643 | { | 661 | { |
644 | return sys_fchmodat(AT_FDCWD, filename, mode); | 662 | return sys_fchmodat(AT_FDCWD, filename, mode); |
645 | } | 663 | } |
@@ -669,7 +687,7 @@ static int chown_common(struct dentry * dentry, uid_t user, gid_t group) | |||
669 | return error; | 687 | return error; |
670 | } | 688 | } |
671 | 689 | ||
672 | asmlinkage long sys_chown(const char __user * filename, uid_t user, gid_t group) | 690 | SYSCALL_DEFINE3(chown, const char __user *, filename, uid_t, user, gid_t, group) |
673 | { | 691 | { |
674 | struct path path; | 692 | struct path path; |
675 | int error; | 693 | int error; |
@@ -688,8 +706,8 @@ out: | |||
688 | return error; | 706 | return error; |
689 | } | 707 | } |
690 | 708 | ||
691 | asmlinkage long sys_fchownat(int dfd, const char __user *filename, uid_t user, | 709 | SYSCALL_DEFINE5(fchownat, int, dfd, const char __user *, filename, uid_t, user, |
692 | gid_t group, int flag) | 710 | gid_t, group, int, flag) |
693 | { | 711 | { |
694 | struct path path; | 712 | struct path path; |
695 | int error = -EINVAL; | 713 | int error = -EINVAL; |
@@ -713,7 +731,7 @@ out: | |||
713 | return error; | 731 | return error; |
714 | } | 732 | } |
715 | 733 | ||
716 | asmlinkage long sys_lchown(const char __user * filename, uid_t user, gid_t group) | 734 | SYSCALL_DEFINE3(lchown, const char __user *, filename, uid_t, user, gid_t, group) |
717 | { | 735 | { |
718 | struct path path; | 736 | struct path path; |
719 | int error; | 737 | int error; |
@@ -732,8 +750,7 @@ out: | |||
732 | return error; | 750 | return error; |
733 | } | 751 | } |
734 | 752 | ||
735 | 753 | SYSCALL_DEFINE3(fchown, unsigned int, fd, uid_t, user, gid_t, group) | |
736 | asmlinkage long sys_fchown(unsigned int fd, uid_t user, gid_t group) | ||
737 | { | 754 | { |
738 | struct file * file; | 755 | struct file * file; |
739 | int error = -EBADF; | 756 | int error = -EBADF; |
@@ -1029,7 +1046,7 @@ long do_sys_open(int dfd, const char __user *filename, int flags, int mode) | |||
1029 | return fd; | 1046 | return fd; |
1030 | } | 1047 | } |
1031 | 1048 | ||
1032 | asmlinkage long sys_open(const char __user *filename, int flags, int mode) | 1049 | SYSCALL_DEFINE3(open, const char __user *, filename, int, flags, int, mode) |
1033 | { | 1050 | { |
1034 | long ret; | 1051 | long ret; |
1035 | 1052 | ||
@@ -1042,8 +1059,8 @@ asmlinkage long sys_open(const char __user *filename, int flags, int mode) | |||
1042 | return ret; | 1059 | return ret; |
1043 | } | 1060 | } |
1044 | 1061 | ||
1045 | asmlinkage long sys_openat(int dfd, const char __user *filename, int flags, | 1062 | SYSCALL_DEFINE4(openat, int, dfd, const char __user *, filename, int, flags, |
1046 | int mode) | 1063 | int, mode) |
1047 | { | 1064 | { |
1048 | long ret; | 1065 | long ret; |
1049 | 1066 | ||
@@ -1062,7 +1079,7 @@ asmlinkage long sys_openat(int dfd, const char __user *filename, int flags, | |||
1062 | * For backward compatibility? Maybe this should be moved | 1079 | * For backward compatibility? Maybe this should be moved |
1063 | * into arch/i386 instead? | 1080 | * into arch/i386 instead? |
1064 | */ | 1081 | */ |
1065 | asmlinkage long sys_creat(const char __user * pathname, int mode) | 1082 | SYSCALL_DEFINE2(creat, const char __user *, pathname, int, mode) |
1066 | { | 1083 | { |
1067 | return sys_open(pathname, O_CREAT | O_WRONLY | O_TRUNC, mode); | 1084 | return sys_open(pathname, O_CREAT | O_WRONLY | O_TRUNC, mode); |
1068 | } | 1085 | } |
@@ -1098,7 +1115,7 @@ EXPORT_SYMBOL(filp_close); | |||
1098 | * releasing the fd. This ensures that one clone task can't release | 1115 | * releasing the fd. This ensures that one clone task can't release |
1099 | * an fd while another clone is opening it. | 1116 | * an fd while another clone is opening it. |
1100 | */ | 1117 | */ |
1101 | asmlinkage long sys_close(unsigned int fd) | 1118 | SYSCALL_DEFINE1(close, unsigned int, fd) |
1102 | { | 1119 | { |
1103 | struct file * filp; | 1120 | struct file * filp; |
1104 | struct files_struct *files = current->files; | 1121 | struct files_struct *files = current->files; |
@@ -1131,14 +1148,13 @@ out_unlock: | |||
1131 | spin_unlock(&files->file_lock); | 1148 | spin_unlock(&files->file_lock); |
1132 | return -EBADF; | 1149 | return -EBADF; |
1133 | } | 1150 | } |
1134 | |||
1135 | EXPORT_SYMBOL(sys_close); | 1151 | EXPORT_SYMBOL(sys_close); |
1136 | 1152 | ||
1137 | /* | 1153 | /* |
1138 | * This routine simulates a hangup on the tty, to arrange that users | 1154 | * This routine simulates a hangup on the tty, to arrange that users |
1139 | * are given clean terminals at login time. | 1155 | * are given clean terminals at login time. |
1140 | */ | 1156 | */ |
1141 | asmlinkage long sys_vhangup(void) | 1157 | SYSCALL_DEFINE0(vhangup) |
1142 | { | 1158 | { |
1143 | if (capable(CAP_SYS_TTY_CONFIG)) { | 1159 | if (capable(CAP_SYS_TTY_CONFIG)) { |
1144 | tty_vhangup_self(); | 1160 | tty_vhangup_self(); |
@@ -1043,7 +1043,7 @@ int do_pipe(int *fd) | |||
1043 | * sys_pipe() is the normal C calling standard for creating | 1043 | * sys_pipe() is the normal C calling standard for creating |
1044 | * a pipe. It's not the way Unix traditionally does this, though. | 1044 | * a pipe. It's not the way Unix traditionally does this, though. |
1045 | */ | 1045 | */ |
1046 | asmlinkage long __weak sys_pipe2(int __user *fildes, int flags) | 1046 | SYSCALL_DEFINE2(pipe2, int __user *, fildes, int, flags) |
1047 | { | 1047 | { |
1048 | int fd[2]; | 1048 | int fd[2]; |
1049 | int error; | 1049 | int error; |
@@ -1059,7 +1059,7 @@ asmlinkage long __weak sys_pipe2(int __user *fildes, int flags) | |||
1059 | return error; | 1059 | return error; |
1060 | } | 1060 | } |
1061 | 1061 | ||
1062 | asmlinkage long __weak sys_pipe(int __user *fildes) | 1062 | SYSCALL_DEFINE1(pipe, int __user *, fildes) |
1063 | { | 1063 | { |
1064 | return sys_pipe2(fildes, 0); | 1064 | return sys_pipe2(fildes, 0); |
1065 | } | 1065 | } |
diff --git a/fs/quota.c b/fs/quota.c index 4a8c94f05f76..d76ada914f98 100644 --- a/fs/quota.c +++ b/fs/quota.c | |||
@@ -371,7 +371,8 @@ static inline struct super_block *quotactl_block(const char __user *special) | |||
371 | * calls. Maybe we need to add the process quotas etc. in the future, | 371 | * calls. Maybe we need to add the process quotas etc. in the future, |
372 | * but we probably should use rlimits for that. | 372 | * but we probably should use rlimits for that. |
373 | */ | 373 | */ |
374 | asmlinkage long sys_quotactl(unsigned int cmd, const char __user *special, qid_t id, void __user *addr) | 374 | SYSCALL_DEFINE4(quotactl, unsigned int, cmd, const char __user *, special, |
375 | qid_t, id, void __user *, addr) | ||
375 | { | 376 | { |
376 | uint cmds, type; | 377 | uint cmds, type; |
377 | struct super_block *sb = NULL; | 378 | struct super_block *sb = NULL; |
diff --git a/fs/read_write.c b/fs/read_write.c index 5cc6924eb158..400fe81c973e 100644 --- a/fs/read_write.c +++ b/fs/read_write.c | |||
@@ -147,7 +147,7 @@ loff_t vfs_llseek(struct file *file, loff_t offset, int origin) | |||
147 | } | 147 | } |
148 | EXPORT_SYMBOL(vfs_llseek); | 148 | EXPORT_SYMBOL(vfs_llseek); |
149 | 149 | ||
150 | asmlinkage off_t sys_lseek(unsigned int fd, off_t offset, unsigned int origin) | 150 | SYSCALL_DEFINE3(lseek, unsigned int, fd, off_t, offset, unsigned int, origin) |
151 | { | 151 | { |
152 | off_t retval; | 152 | off_t retval; |
153 | struct file * file; | 153 | struct file * file; |
@@ -171,9 +171,9 @@ bad: | |||
171 | } | 171 | } |
172 | 172 | ||
173 | #ifdef __ARCH_WANT_SYS_LLSEEK | 173 | #ifdef __ARCH_WANT_SYS_LLSEEK |
174 | asmlinkage long sys_llseek(unsigned int fd, unsigned long offset_high, | 174 | SYSCALL_DEFINE5(llseek, unsigned int, fd, unsigned long, offset_high, |
175 | unsigned long offset_low, loff_t __user * result, | 175 | unsigned long, offset_low, loff_t __user *, result, |
176 | unsigned int origin) | 176 | unsigned int, origin) |
177 | { | 177 | { |
178 | int retval; | 178 | int retval; |
179 | struct file * file; | 179 | struct file * file; |
@@ -369,7 +369,7 @@ static inline void file_pos_write(struct file *file, loff_t pos) | |||
369 | file->f_pos = pos; | 369 | file->f_pos = pos; |
370 | } | 370 | } |
371 | 371 | ||
372 | asmlinkage ssize_t sys_read(unsigned int fd, char __user * buf, size_t count) | 372 | SYSCALL_DEFINE3(read, unsigned int, fd, char __user *, buf, size_t, count) |
373 | { | 373 | { |
374 | struct file *file; | 374 | struct file *file; |
375 | ssize_t ret = -EBADF; | 375 | ssize_t ret = -EBADF; |
@@ -386,7 +386,8 @@ asmlinkage ssize_t sys_read(unsigned int fd, char __user * buf, size_t count) | |||
386 | return ret; | 386 | return ret; |
387 | } | 387 | } |
388 | 388 | ||
389 | asmlinkage ssize_t sys_write(unsigned int fd, const char __user * buf, size_t count) | 389 | SYSCALL_DEFINE3(write, unsigned int, fd, const char __user *, buf, |
390 | size_t, count) | ||
390 | { | 391 | { |
391 | struct file *file; | 392 | struct file *file; |
392 | ssize_t ret = -EBADF; | 393 | ssize_t ret = -EBADF; |
@@ -403,8 +404,8 @@ asmlinkage ssize_t sys_write(unsigned int fd, const char __user * buf, size_t co | |||
403 | return ret; | 404 | return ret; |
404 | } | 405 | } |
405 | 406 | ||
406 | asmlinkage ssize_t sys_pread64(unsigned int fd, char __user *buf, | 407 | SYSCALL_DEFINE(pread64)(unsigned int fd, char __user *buf, |
407 | size_t count, loff_t pos) | 408 | size_t count, loff_t pos) |
408 | { | 409 | { |
409 | struct file *file; | 410 | struct file *file; |
410 | ssize_t ret = -EBADF; | 411 | ssize_t ret = -EBADF; |
@@ -423,9 +424,17 @@ asmlinkage ssize_t sys_pread64(unsigned int fd, char __user *buf, | |||
423 | 424 | ||
424 | return ret; | 425 | return ret; |
425 | } | 426 | } |
427 | #ifdef CONFIG_HAVE_SYSCALL_WRAPPERS | ||
428 | asmlinkage long SyS_pread64(long fd, long buf, long count, loff_t pos) | ||
429 | { | ||
430 | return SYSC_pread64((unsigned int) fd, (char __user *) buf, | ||
431 | (size_t) count, pos); | ||
432 | } | ||
433 | SYSCALL_ALIAS(sys_pread64, SyS_pread64); | ||
434 | #endif | ||
426 | 435 | ||
427 | asmlinkage ssize_t sys_pwrite64(unsigned int fd, const char __user *buf, | 436 | SYSCALL_DEFINE(pwrite64)(unsigned int fd, const char __user *buf, |
428 | size_t count, loff_t pos) | 437 | size_t count, loff_t pos) |
429 | { | 438 | { |
430 | struct file *file; | 439 | struct file *file; |
431 | ssize_t ret = -EBADF; | 440 | ssize_t ret = -EBADF; |
@@ -444,6 +453,14 @@ asmlinkage ssize_t sys_pwrite64(unsigned int fd, const char __user *buf, | |||
444 | 453 | ||
445 | return ret; | 454 | return ret; |
446 | } | 455 | } |
456 | #ifdef CONFIG_HAVE_SYSCALL_WRAPPERS | ||
457 | asmlinkage long SyS_pwrite64(long fd, long buf, long count, loff_t pos) | ||
458 | { | ||
459 | return SYSC_pwrite64((unsigned int) fd, (const char __user *) buf, | ||
460 | (size_t) count, pos); | ||
461 | } | ||
462 | SYSCALL_ALIAS(sys_pwrite64, SyS_pwrite64); | ||
463 | #endif | ||
447 | 464 | ||
448 | /* | 465 | /* |
449 | * Reduce an iovec's length in-place. Return the resulting number of segments | 466 | * Reduce an iovec's length in-place. Return the resulting number of segments |
@@ -672,8 +689,8 @@ ssize_t vfs_writev(struct file *file, const struct iovec __user *vec, | |||
672 | 689 | ||
673 | EXPORT_SYMBOL(vfs_writev); | 690 | EXPORT_SYMBOL(vfs_writev); |
674 | 691 | ||
675 | asmlinkage ssize_t | 692 | SYSCALL_DEFINE3(readv, unsigned long, fd, const struct iovec __user *, vec, |
676 | sys_readv(unsigned long fd, const struct iovec __user *vec, unsigned long vlen) | 693 | unsigned long, vlen) |
677 | { | 694 | { |
678 | struct file *file; | 695 | struct file *file; |
679 | ssize_t ret = -EBADF; | 696 | ssize_t ret = -EBADF; |
@@ -693,8 +710,8 @@ sys_readv(unsigned long fd, const struct iovec __user *vec, unsigned long vlen) | |||
693 | return ret; | 710 | return ret; |
694 | } | 711 | } |
695 | 712 | ||
696 | asmlinkage ssize_t | 713 | SYSCALL_DEFINE3(writev, unsigned long, fd, const struct iovec __user *, vec, |
697 | sys_writev(unsigned long fd, const struct iovec __user *vec, unsigned long vlen) | 714 | unsigned long, vlen) |
698 | { | 715 | { |
699 | struct file *file; | 716 | struct file *file; |
700 | ssize_t ret = -EBADF; | 717 | ssize_t ret = -EBADF; |
@@ -812,7 +829,7 @@ out: | |||
812 | return retval; | 829 | return retval; |
813 | } | 830 | } |
814 | 831 | ||
815 | asmlinkage ssize_t sys_sendfile(int out_fd, int in_fd, off_t __user *offset, size_t count) | 832 | SYSCALL_DEFINE4(sendfile, int, out_fd, int, in_fd, off_t __user *, offset, size_t, count) |
816 | { | 833 | { |
817 | loff_t pos; | 834 | loff_t pos; |
818 | off_t off; | 835 | off_t off; |
@@ -831,7 +848,7 @@ asmlinkage ssize_t sys_sendfile(int out_fd, int in_fd, off_t __user *offset, siz | |||
831 | return do_sendfile(out_fd, in_fd, NULL, count, 0); | 848 | return do_sendfile(out_fd, in_fd, NULL, count, 0); |
832 | } | 849 | } |
833 | 850 | ||
834 | asmlinkage ssize_t sys_sendfile64(int out_fd, int in_fd, loff_t __user *offset, size_t count) | 851 | SYSCALL_DEFINE4(sendfile64, int, out_fd, int, in_fd, loff_t __user *, offset, size_t, count) |
835 | { | 852 | { |
836 | loff_t pos; | 853 | loff_t pos; |
837 | ssize_t ret; | 854 | ssize_t ret; |
diff --git a/fs/readdir.c b/fs/readdir.c index b318d9b5af2e..7723401f8d8b 100644 --- a/fs/readdir.c +++ b/fs/readdir.c | |||
@@ -102,7 +102,8 @@ efault: | |||
102 | return -EFAULT; | 102 | return -EFAULT; |
103 | } | 103 | } |
104 | 104 | ||
105 | asmlinkage long old_readdir(unsigned int fd, struct old_linux_dirent __user * dirent, unsigned int count) | 105 | SYSCALL_DEFINE3(old_readdir, unsigned int, fd, |
106 | struct old_linux_dirent __user *, dirent, unsigned int, count) | ||
106 | { | 107 | { |
107 | int error; | 108 | int error; |
108 | struct file * file; | 109 | struct file * file; |
@@ -187,7 +188,8 @@ efault: | |||
187 | return -EFAULT; | 188 | return -EFAULT; |
188 | } | 189 | } |
189 | 190 | ||
190 | asmlinkage long sys_getdents(unsigned int fd, struct linux_dirent __user * dirent, unsigned int count) | 191 | SYSCALL_DEFINE3(getdents, unsigned int, fd, |
192 | struct linux_dirent __user *, dirent, unsigned int, count) | ||
191 | { | 193 | { |
192 | struct file * file; | 194 | struct file * file; |
193 | struct linux_dirent __user * lastdirent; | 195 | struct linux_dirent __user * lastdirent; |
@@ -268,7 +270,8 @@ efault: | |||
268 | return -EFAULT; | 270 | return -EFAULT; |
269 | } | 271 | } |
270 | 272 | ||
271 | asmlinkage long sys_getdents64(unsigned int fd, struct linux_dirent64 __user * dirent, unsigned int count) | 273 | SYSCALL_DEFINE3(getdents64, unsigned int, fd, |
274 | struct linux_dirent64 __user *, dirent, unsigned int, count) | ||
272 | { | 275 | { |
273 | struct file * file; | 276 | struct file * file; |
274 | struct linux_dirent64 __user * lastdirent; | 277 | struct linux_dirent64 __user * lastdirent; |
diff --git a/fs/select.c b/fs/select.c index b0cf1f0896d9..0fe0e1469df3 100644 --- a/fs/select.c +++ b/fs/select.c | |||
@@ -557,8 +557,8 @@ out_nofds: | |||
557 | return ret; | 557 | return ret; |
558 | } | 558 | } |
559 | 559 | ||
560 | asmlinkage long sys_select(int n, fd_set __user *inp, fd_set __user *outp, | 560 | SYSCALL_DEFINE5(select, int, n, fd_set __user *, inp, fd_set __user *, outp, |
561 | fd_set __user *exp, struct timeval __user *tvp) | 561 | fd_set __user *, exp, struct timeval __user *, tvp) |
562 | { | 562 | { |
563 | struct timespec end_time, *to = NULL; | 563 | struct timespec end_time, *to = NULL; |
564 | struct timeval tv; | 564 | struct timeval tv; |
@@ -582,9 +582,9 @@ asmlinkage long sys_select(int n, fd_set __user *inp, fd_set __user *outp, | |||
582 | } | 582 | } |
583 | 583 | ||
584 | #ifdef HAVE_SET_RESTORE_SIGMASK | 584 | #ifdef HAVE_SET_RESTORE_SIGMASK |
585 | asmlinkage long sys_pselect7(int n, fd_set __user *inp, fd_set __user *outp, | 585 | static long do_pselect(int n, fd_set __user *inp, fd_set __user *outp, |
586 | fd_set __user *exp, struct timespec __user *tsp, | 586 | fd_set __user *exp, struct timespec __user *tsp, |
587 | const sigset_t __user *sigmask, size_t sigsetsize) | 587 | const sigset_t __user *sigmask, size_t sigsetsize) |
588 | { | 588 | { |
589 | sigset_t ksigmask, sigsaved; | 589 | sigset_t ksigmask, sigsaved; |
590 | struct timespec ts, end_time, *to = NULL; | 590 | struct timespec ts, end_time, *to = NULL; |
@@ -636,8 +636,9 @@ asmlinkage long sys_pselect7(int n, fd_set __user *inp, fd_set __user *outp, | |||
636 | * which has a pointer to the sigset_t itself followed by a size_t containing | 636 | * which has a pointer to the sigset_t itself followed by a size_t containing |
637 | * the sigset size. | 637 | * the sigset size. |
638 | */ | 638 | */ |
639 | asmlinkage long sys_pselect6(int n, fd_set __user *inp, fd_set __user *outp, | 639 | SYSCALL_DEFINE6(pselect6, int, n, fd_set __user *, inp, fd_set __user *, outp, |
640 | fd_set __user *exp, struct timespec __user *tsp, void __user *sig) | 640 | fd_set __user *, exp, struct timespec __user *, tsp, |
641 | void __user *, sig) | ||
641 | { | 642 | { |
642 | size_t sigsetsize = 0; | 643 | size_t sigsetsize = 0; |
643 | sigset_t __user *up = NULL; | 644 | sigset_t __user *up = NULL; |
@@ -650,7 +651,7 @@ asmlinkage long sys_pselect6(int n, fd_set __user *inp, fd_set __user *outp, | |||
650 | return -EFAULT; | 651 | return -EFAULT; |
651 | } | 652 | } |
652 | 653 | ||
653 | return sys_pselect7(n, inp, outp, exp, tsp, up, sigsetsize); | 654 | return do_pselect(n, inp, outp, exp, tsp, up, sigsetsize); |
654 | } | 655 | } |
655 | #endif /* HAVE_SET_RESTORE_SIGMASK */ | 656 | #endif /* HAVE_SET_RESTORE_SIGMASK */ |
656 | 657 | ||
@@ -854,8 +855,8 @@ static long do_restart_poll(struct restart_block *restart_block) | |||
854 | return ret; | 855 | return ret; |
855 | } | 856 | } |
856 | 857 | ||
857 | asmlinkage long sys_poll(struct pollfd __user *ufds, unsigned int nfds, | 858 | SYSCALL_DEFINE3(poll, struct pollfd __user *, ufds, unsigned int, nfds, |
858 | long timeout_msecs) | 859 | long, timeout_msecs) |
859 | { | 860 | { |
860 | struct timespec end_time, *to = NULL; | 861 | struct timespec end_time, *to = NULL; |
861 | int ret; | 862 | int ret; |
@@ -889,9 +890,9 @@ asmlinkage long sys_poll(struct pollfd __user *ufds, unsigned int nfds, | |||
889 | } | 890 | } |
890 | 891 | ||
891 | #ifdef HAVE_SET_RESTORE_SIGMASK | 892 | #ifdef HAVE_SET_RESTORE_SIGMASK |
892 | asmlinkage long sys_ppoll(struct pollfd __user *ufds, unsigned int nfds, | 893 | SYSCALL_DEFINE5(ppoll, struct pollfd __user *, ufds, unsigned int, nfds, |
893 | struct timespec __user *tsp, const sigset_t __user *sigmask, | 894 | struct timespec __user *, tsp, const sigset_t __user *, sigmask, |
894 | size_t sigsetsize) | 895 | size_t, sigsetsize) |
895 | { | 896 | { |
896 | sigset_t ksigmask, sigsaved; | 897 | sigset_t ksigmask, sigsaved; |
897 | struct timespec ts, end_time, *to = NULL; | 898 | struct timespec ts, end_time, *to = NULL; |
diff --git a/fs/signalfd.c b/fs/signalfd.c index 9c39bc7f8431..b07565c94386 100644 --- a/fs/signalfd.c +++ b/fs/signalfd.c | |||
@@ -205,8 +205,8 @@ static const struct file_operations signalfd_fops = { | |||
205 | .read = signalfd_read, | 205 | .read = signalfd_read, |
206 | }; | 206 | }; |
207 | 207 | ||
208 | asmlinkage long sys_signalfd4(int ufd, sigset_t __user *user_mask, | 208 | SYSCALL_DEFINE4(signalfd4, int, ufd, sigset_t __user *, user_mask, |
209 | size_t sizemask, int flags) | 209 | size_t, sizemask, int, flags) |
210 | { | 210 | { |
211 | sigset_t sigmask; | 211 | sigset_t sigmask; |
212 | struct signalfd_ctx *ctx; | 212 | struct signalfd_ctx *ctx; |
@@ -259,8 +259,8 @@ asmlinkage long sys_signalfd4(int ufd, sigset_t __user *user_mask, | |||
259 | return ufd; | 259 | return ufd; |
260 | } | 260 | } |
261 | 261 | ||
262 | asmlinkage long sys_signalfd(int ufd, sigset_t __user *user_mask, | 262 | SYSCALL_DEFINE3(signalfd, int, ufd, sigset_t __user *, user_mask, |
263 | size_t sizemask) | 263 | size_t, sizemask) |
264 | { | 264 | { |
265 | return sys_signalfd4(ufd, user_mask, sizemask, 0); | 265 | return sys_signalfd4(ufd, user_mask, sizemask, 0); |
266 | } | 266 | } |
diff --git a/fs/splice.c b/fs/splice.c index a54b3e3f10a7..4ed0ba44a966 100644 --- a/fs/splice.c +++ b/fs/splice.c | |||
@@ -1435,8 +1435,8 @@ static long vmsplice_to_pipe(struct file *file, const struct iovec __user *iov, | |||
1435 | * Currently we punt and implement it as a normal copy, see pipe_to_user(). | 1435 | * Currently we punt and implement it as a normal copy, see pipe_to_user(). |
1436 | * | 1436 | * |
1437 | */ | 1437 | */ |
1438 | asmlinkage long sys_vmsplice(int fd, const struct iovec __user *iov, | 1438 | SYSCALL_DEFINE4(vmsplice, int, fd, const struct iovec __user *, iov, |
1439 | unsigned long nr_segs, unsigned int flags) | 1439 | unsigned long, nr_segs, unsigned int, flags) |
1440 | { | 1440 | { |
1441 | struct file *file; | 1441 | struct file *file; |
1442 | long error; | 1442 | long error; |
@@ -1461,9 +1461,9 @@ asmlinkage long sys_vmsplice(int fd, const struct iovec __user *iov, | |||
1461 | return error; | 1461 | return error; |
1462 | } | 1462 | } |
1463 | 1463 | ||
1464 | asmlinkage long sys_splice(int fd_in, loff_t __user *off_in, | 1464 | SYSCALL_DEFINE6(splice, int, fd_in, loff_t __user *, off_in, |
1465 | int fd_out, loff_t __user *off_out, | 1465 | int, fd_out, loff_t __user *, off_out, |
1466 | size_t len, unsigned int flags) | 1466 | size_t, len, unsigned int, flags) |
1467 | { | 1467 | { |
1468 | long error; | 1468 | long error; |
1469 | struct file *in, *out; | 1469 | struct file *in, *out; |
@@ -1685,7 +1685,7 @@ static long do_tee(struct file *in, struct file *out, size_t len, | |||
1685 | return ret; | 1685 | return ret; |
1686 | } | 1686 | } |
1687 | 1687 | ||
1688 | asmlinkage long sys_tee(int fdin, int fdout, size_t len, unsigned int flags) | 1688 | SYSCALL_DEFINE4(tee, int, fdin, int, fdout, size_t, len, unsigned int, flags) |
1689 | { | 1689 | { |
1690 | struct file *in; | 1690 | struct file *in; |
1691 | int error, fput_in; | 1691 | int error, fput_in; |
@@ -152,7 +152,7 @@ static int cp_old_stat(struct kstat *stat, struct __old_kernel_stat __user * sta | |||
152 | return copy_to_user(statbuf,&tmp,sizeof(tmp)) ? -EFAULT : 0; | 152 | return copy_to_user(statbuf,&tmp,sizeof(tmp)) ? -EFAULT : 0; |
153 | } | 153 | } |
154 | 154 | ||
155 | asmlinkage long sys_stat(char __user * filename, struct __old_kernel_stat __user * statbuf) | 155 | SYSCALL_DEFINE2(stat, char __user *, filename, struct __old_kernel_stat __user *, statbuf) |
156 | { | 156 | { |
157 | struct kstat stat; | 157 | struct kstat stat; |
158 | int error = vfs_stat_fd(AT_FDCWD, filename, &stat); | 158 | int error = vfs_stat_fd(AT_FDCWD, filename, &stat); |
@@ -162,7 +162,8 @@ asmlinkage long sys_stat(char __user * filename, struct __old_kernel_stat __user | |||
162 | 162 | ||
163 | return error; | 163 | return error; |
164 | } | 164 | } |
165 | asmlinkage long sys_lstat(char __user * filename, struct __old_kernel_stat __user * statbuf) | 165 | |
166 | SYSCALL_DEFINE2(lstat, char __user *, filename, struct __old_kernel_stat __user *, statbuf) | ||
166 | { | 167 | { |
167 | struct kstat stat; | 168 | struct kstat stat; |
168 | int error = vfs_lstat_fd(AT_FDCWD, filename, &stat); | 169 | int error = vfs_lstat_fd(AT_FDCWD, filename, &stat); |
@@ -172,7 +173,8 @@ asmlinkage long sys_lstat(char __user * filename, struct __old_kernel_stat __use | |||
172 | 173 | ||
173 | return error; | 174 | return error; |
174 | } | 175 | } |
175 | asmlinkage long sys_fstat(unsigned int fd, struct __old_kernel_stat __user * statbuf) | 176 | |
177 | SYSCALL_DEFINE2(fstat, unsigned int, fd, struct __old_kernel_stat __user *, statbuf) | ||
176 | { | 178 | { |
177 | struct kstat stat; | 179 | struct kstat stat; |
178 | int error = vfs_fstat(fd, &stat); | 180 | int error = vfs_fstat(fd, &stat); |
@@ -235,7 +237,7 @@ static int cp_new_stat(struct kstat *stat, struct stat __user *statbuf) | |||
235 | return copy_to_user(statbuf,&tmp,sizeof(tmp)) ? -EFAULT : 0; | 237 | return copy_to_user(statbuf,&tmp,sizeof(tmp)) ? -EFAULT : 0; |
236 | } | 238 | } |
237 | 239 | ||
238 | asmlinkage long sys_newstat(char __user *filename, struct stat __user *statbuf) | 240 | SYSCALL_DEFINE2(newstat, char __user *, filename, struct stat __user *, statbuf) |
239 | { | 241 | { |
240 | struct kstat stat; | 242 | struct kstat stat; |
241 | int error = vfs_stat_fd(AT_FDCWD, filename, &stat); | 243 | int error = vfs_stat_fd(AT_FDCWD, filename, &stat); |
@@ -246,7 +248,7 @@ asmlinkage long sys_newstat(char __user *filename, struct stat __user *statbuf) | |||
246 | return error; | 248 | return error; |
247 | } | 249 | } |
248 | 250 | ||
249 | asmlinkage long sys_newlstat(char __user *filename, struct stat __user *statbuf) | 251 | SYSCALL_DEFINE2(newlstat, char __user *, filename, struct stat __user *, statbuf) |
250 | { | 252 | { |
251 | struct kstat stat; | 253 | struct kstat stat; |
252 | int error = vfs_lstat_fd(AT_FDCWD, filename, &stat); | 254 | int error = vfs_lstat_fd(AT_FDCWD, filename, &stat); |
@@ -258,8 +260,8 @@ asmlinkage long sys_newlstat(char __user *filename, struct stat __user *statbuf) | |||
258 | } | 260 | } |
259 | 261 | ||
260 | #if !defined(__ARCH_WANT_STAT64) || defined(__ARCH_WANT_SYS_NEWFSTATAT) | 262 | #if !defined(__ARCH_WANT_STAT64) || defined(__ARCH_WANT_SYS_NEWFSTATAT) |
261 | asmlinkage long sys_newfstatat(int dfd, char __user *filename, | 263 | SYSCALL_DEFINE4(newfstatat, int, dfd, char __user *, filename, |
262 | struct stat __user *statbuf, int flag) | 264 | struct stat __user *, statbuf, int, flag) |
263 | { | 265 | { |
264 | struct kstat stat; | 266 | struct kstat stat; |
265 | int error = -EINVAL; | 267 | int error = -EINVAL; |
@@ -280,7 +282,7 @@ out: | |||
280 | } | 282 | } |
281 | #endif | 283 | #endif |
282 | 284 | ||
283 | asmlinkage long sys_newfstat(unsigned int fd, struct stat __user *statbuf) | 285 | SYSCALL_DEFINE2(newfstat, unsigned int, fd, struct stat __user *, statbuf) |
284 | { | 286 | { |
285 | struct kstat stat; | 287 | struct kstat stat; |
286 | int error = vfs_fstat(fd, &stat); | 288 | int error = vfs_fstat(fd, &stat); |
@@ -291,8 +293,8 @@ asmlinkage long sys_newfstat(unsigned int fd, struct stat __user *statbuf) | |||
291 | return error; | 293 | return error; |
292 | } | 294 | } |
293 | 295 | ||
294 | asmlinkage long sys_readlinkat(int dfd, const char __user *pathname, | 296 | SYSCALL_DEFINE4(readlinkat, int, dfd, const char __user *, pathname, |
295 | char __user *buf, int bufsiz) | 297 | char __user *, buf, int, bufsiz) |
296 | { | 298 | { |
297 | struct path path; | 299 | struct path path; |
298 | int error; | 300 | int error; |
@@ -318,8 +320,8 @@ asmlinkage long sys_readlinkat(int dfd, const char __user *pathname, | |||
318 | return error; | 320 | return error; |
319 | } | 321 | } |
320 | 322 | ||
321 | asmlinkage long sys_readlink(const char __user *path, char __user *buf, | 323 | SYSCALL_DEFINE3(readlink, const char __user *, path, char __user *, buf, |
322 | int bufsiz) | 324 | int, bufsiz) |
323 | { | 325 | { |
324 | return sys_readlinkat(AT_FDCWD, path, buf, bufsiz); | 326 | return sys_readlinkat(AT_FDCWD, path, buf, bufsiz); |
325 | } | 327 | } |
@@ -365,7 +367,7 @@ static long cp_new_stat64(struct kstat *stat, struct stat64 __user *statbuf) | |||
365 | return copy_to_user(statbuf,&tmp,sizeof(tmp)) ? -EFAULT : 0; | 367 | return copy_to_user(statbuf,&tmp,sizeof(tmp)) ? -EFAULT : 0; |
366 | } | 368 | } |
367 | 369 | ||
368 | asmlinkage long sys_stat64(char __user * filename, struct stat64 __user * statbuf) | 370 | SYSCALL_DEFINE2(stat64, char __user *, filename, struct stat64 __user *, statbuf) |
369 | { | 371 | { |
370 | struct kstat stat; | 372 | struct kstat stat; |
371 | int error = vfs_stat(filename, &stat); | 373 | int error = vfs_stat(filename, &stat); |
@@ -375,7 +377,8 @@ asmlinkage long sys_stat64(char __user * filename, struct stat64 __user * statbu | |||
375 | 377 | ||
376 | return error; | 378 | return error; |
377 | } | 379 | } |
378 | asmlinkage long sys_lstat64(char __user * filename, struct stat64 __user * statbuf) | 380 | |
381 | SYSCALL_DEFINE2(lstat64, char __user *, filename, struct stat64 __user *, statbuf) | ||
379 | { | 382 | { |
380 | struct kstat stat; | 383 | struct kstat stat; |
381 | int error = vfs_lstat(filename, &stat); | 384 | int error = vfs_lstat(filename, &stat); |
@@ -385,7 +388,8 @@ asmlinkage long sys_lstat64(char __user * filename, struct stat64 __user * statb | |||
385 | 388 | ||
386 | return error; | 389 | return error; |
387 | } | 390 | } |
388 | asmlinkage long sys_fstat64(unsigned long fd, struct stat64 __user * statbuf) | 391 | |
392 | SYSCALL_DEFINE2(fstat64, unsigned long, fd, struct stat64 __user *, statbuf) | ||
389 | { | 393 | { |
390 | struct kstat stat; | 394 | struct kstat stat; |
391 | int error = vfs_fstat(fd, &stat); | 395 | int error = vfs_fstat(fd, &stat); |
@@ -396,8 +400,8 @@ asmlinkage long sys_fstat64(unsigned long fd, struct stat64 __user * statbuf) | |||
396 | return error; | 400 | return error; |
397 | } | 401 | } |
398 | 402 | ||
399 | asmlinkage long sys_fstatat64(int dfd, char __user *filename, | 403 | SYSCALL_DEFINE4(fstatat64, int, dfd, char __user *, filename, |
400 | struct stat64 __user *statbuf, int flag) | 404 | struct stat64 __user *, statbuf, int, flag) |
401 | { | 405 | { |
402 | struct kstat stat; | 406 | struct kstat stat; |
403 | int error = -EINVAL; | 407 | int error = -EINVAL; |
diff --git a/fs/super.c b/fs/super.c index ed080c417167..645e5403f2a0 100644 --- a/fs/super.c +++ b/fs/super.c | |||
@@ -544,7 +544,7 @@ rescan: | |||
544 | return NULL; | 544 | return NULL; |
545 | } | 545 | } |
546 | 546 | ||
547 | asmlinkage long sys_ustat(unsigned dev, struct ustat __user * ubuf) | 547 | SYSCALL_DEFINE2(ustat, unsigned, dev, struct ustat __user *, ubuf) |
548 | { | 548 | { |
549 | struct super_block *s; | 549 | struct super_block *s; |
550 | struct ustat tmp; | 550 | struct ustat tmp; |
@@ -36,7 +36,7 @@ static void do_sync(unsigned long wait) | |||
36 | laptop_sync_completion(); | 36 | laptop_sync_completion(); |
37 | } | 37 | } |
38 | 38 | ||
39 | asmlinkage long sys_sync(void) | 39 | SYSCALL_DEFINE0(sync) |
40 | { | 40 | { |
41 | do_sync(1); | 41 | do_sync(1); |
42 | return 0; | 42 | return 0; |
@@ -144,12 +144,12 @@ static int do_fsync(unsigned int fd, int datasync) | |||
144 | return ret; | 144 | return ret; |
145 | } | 145 | } |
146 | 146 | ||
147 | asmlinkage long sys_fsync(unsigned int fd) | 147 | SYSCALL_DEFINE1(fsync, unsigned int, fd) |
148 | { | 148 | { |
149 | return do_fsync(fd, 0); | 149 | return do_fsync(fd, 0); |
150 | } | 150 | } |
151 | 151 | ||
152 | asmlinkage long sys_fdatasync(unsigned int fd) | 152 | SYSCALL_DEFINE1(fdatasync, unsigned int, fd) |
153 | { | 153 | { |
154 | return do_fsync(fd, 1); | 154 | return do_fsync(fd, 1); |
155 | } | 155 | } |
@@ -201,8 +201,8 @@ asmlinkage long sys_fdatasync(unsigned int fd) | |||
201 | * already-instantiated disk blocks, there are no guarantees here that the data | 201 | * already-instantiated disk blocks, there are no guarantees here that the data |
202 | * will be available after a crash. | 202 | * will be available after a crash. |
203 | */ | 203 | */ |
204 | asmlinkage long sys_sync_file_range(int fd, loff_t offset, loff_t nbytes, | 204 | SYSCALL_DEFINE(sync_file_range)(int fd, loff_t offset, loff_t nbytes, |
205 | unsigned int flags) | 205 | unsigned int flags) |
206 | { | 206 | { |
207 | int ret; | 207 | int ret; |
208 | struct file *file; | 208 | struct file *file; |
@@ -262,14 +262,32 @@ out_put: | |||
262 | out: | 262 | out: |
263 | return ret; | 263 | return ret; |
264 | } | 264 | } |
265 | #ifdef CONFIG_HAVE_SYSCALL_WRAPPERS | ||
266 | asmlinkage long SyS_sync_file_range(long fd, loff_t offset, loff_t nbytes, | ||
267 | long flags) | ||
268 | { | ||
269 | return SYSC_sync_file_range((int) fd, offset, nbytes, | ||
270 | (unsigned int) flags); | ||
271 | } | ||
272 | SYSCALL_ALIAS(sys_sync_file_range, SyS_sync_file_range); | ||
273 | #endif | ||
265 | 274 | ||
266 | /* It would be nice if people remember that not all the world's an i386 | 275 | /* It would be nice if people remember that not all the world's an i386 |
267 | when they introduce new system calls */ | 276 | when they introduce new system calls */ |
268 | asmlinkage long sys_sync_file_range2(int fd, unsigned int flags, | 277 | SYSCALL_DEFINE(sync_file_range2)(int fd, unsigned int flags, |
269 | loff_t offset, loff_t nbytes) | 278 | loff_t offset, loff_t nbytes) |
270 | { | 279 | { |
271 | return sys_sync_file_range(fd, offset, nbytes, flags); | 280 | return sys_sync_file_range(fd, offset, nbytes, flags); |
272 | } | 281 | } |
282 | #ifdef CONFIG_HAVE_SYSCALL_WRAPPERS | ||
283 | asmlinkage long SyS_sync_file_range2(long fd, long flags, | ||
284 | loff_t offset, loff_t nbytes) | ||
285 | { | ||
286 | return SYSC_sync_file_range2((int) fd, (unsigned int) flags, | ||
287 | offset, nbytes); | ||
288 | } | ||
289 | SYSCALL_ALIAS(sys_sync_file_range2, SyS_sync_file_range2); | ||
290 | #endif | ||
273 | 291 | ||
274 | /* | 292 | /* |
275 | * `endbyte' is inclusive | 293 | * `endbyte' is inclusive |
diff --git a/fs/timerfd.c b/fs/timerfd.c index 0862f0e49d0c..6a123b8ff3f5 100644 --- a/fs/timerfd.c +++ b/fs/timerfd.c | |||
@@ -177,7 +177,7 @@ static struct file *timerfd_fget(int fd) | |||
177 | return file; | 177 | return file; |
178 | } | 178 | } |
179 | 179 | ||
180 | asmlinkage long sys_timerfd_create(int clockid, int flags) | 180 | SYSCALL_DEFINE2(timerfd_create, int, clockid, int, flags) |
181 | { | 181 | { |
182 | int ufd; | 182 | int ufd; |
183 | struct timerfd_ctx *ctx; | 183 | struct timerfd_ctx *ctx; |
@@ -208,9 +208,9 @@ asmlinkage long sys_timerfd_create(int clockid, int flags) | |||
208 | return ufd; | 208 | return ufd; |
209 | } | 209 | } |
210 | 210 | ||
211 | asmlinkage long sys_timerfd_settime(int ufd, int flags, | 211 | SYSCALL_DEFINE4(timerfd_settime, int, ufd, int, flags, |
212 | const struct itimerspec __user *utmr, | 212 | const struct itimerspec __user *, utmr, |
213 | struct itimerspec __user *otmr) | 213 | struct itimerspec __user *, otmr) |
214 | { | 214 | { |
215 | struct file *file; | 215 | struct file *file; |
216 | struct timerfd_ctx *ctx; | 216 | struct timerfd_ctx *ctx; |
@@ -265,7 +265,7 @@ asmlinkage long sys_timerfd_settime(int ufd, int flags, | |||
265 | return 0; | 265 | return 0; |
266 | } | 266 | } |
267 | 267 | ||
268 | asmlinkage long sys_timerfd_gettime(int ufd, struct itimerspec __user *otmr) | 268 | SYSCALL_DEFINE2(timerfd_gettime, int, ufd, struct itimerspec __user *, otmr) |
269 | { | 269 | { |
270 | struct file *file; | 270 | struct file *file; |
271 | struct timerfd_ctx *ctx; | 271 | struct timerfd_ctx *ctx; |
diff --git a/fs/utimes.c b/fs/utimes.c index 6929e3e91d05..e4c75db5d373 100644 --- a/fs/utimes.c +++ b/fs/utimes.c | |||
@@ -24,7 +24,7 @@ | |||
24 | * must be owner or have write permission. | 24 | * must be owner or have write permission. |
25 | * Else, update from *times, must be owner or super user. | 25 | * Else, update from *times, must be owner or super user. |
26 | */ | 26 | */ |
27 | asmlinkage long sys_utime(char __user *filename, struct utimbuf __user *times) | 27 | SYSCALL_DEFINE2(utime, char __user *, filename, struct utimbuf __user *, times) |
28 | { | 28 | { |
29 | struct timespec tv[2]; | 29 | struct timespec tv[2]; |
30 | 30 | ||
@@ -170,7 +170,8 @@ out: | |||
170 | return error; | 170 | return error; |
171 | } | 171 | } |
172 | 172 | ||
173 | asmlinkage long sys_utimensat(int dfd, char __user *filename, struct timespec __user *utimes, int flags) | 173 | SYSCALL_DEFINE4(utimensat, int, dfd, char __user *, filename, |
174 | struct timespec __user *, utimes, int, flags) | ||
174 | { | 175 | { |
175 | struct timespec tstimes[2]; | 176 | struct timespec tstimes[2]; |
176 | 177 | ||
@@ -187,7 +188,8 @@ asmlinkage long sys_utimensat(int dfd, char __user *filename, struct timespec __ | |||
187 | return do_utimes(dfd, filename, utimes ? tstimes : NULL, flags); | 188 | return do_utimes(dfd, filename, utimes ? tstimes : NULL, flags); |
188 | } | 189 | } |
189 | 190 | ||
190 | asmlinkage long sys_futimesat(int dfd, char __user *filename, struct timeval __user *utimes) | 191 | SYSCALL_DEFINE3(futimesat, int, dfd, char __user *, filename, |
192 | struct timeval __user *, utimes) | ||
191 | { | 193 | { |
192 | struct timeval times[2]; | 194 | struct timeval times[2]; |
193 | struct timespec tstimes[2]; | 195 | struct timespec tstimes[2]; |
@@ -214,7 +216,8 @@ asmlinkage long sys_futimesat(int dfd, char __user *filename, struct timeval __u | |||
214 | return do_utimes(dfd, filename, utimes ? tstimes : NULL, 0); | 216 | return do_utimes(dfd, filename, utimes ? tstimes : NULL, 0); |
215 | } | 217 | } |
216 | 218 | ||
217 | asmlinkage long sys_utimes(char __user *filename, struct timeval __user *utimes) | 219 | SYSCALL_DEFINE2(utimes, char __user *, filename, |
220 | struct timeval __user *, utimes) | ||
218 | { | 221 | { |
219 | return sys_futimesat(AT_FDCWD, filename, utimes); | 222 | return sys_futimesat(AT_FDCWD, filename, utimes); |
220 | } | 223 | } |
diff --git a/fs/xattr.c b/fs/xattr.c index 237804cd6b56..197c4fcac032 100644 --- a/fs/xattr.c +++ b/fs/xattr.c | |||
@@ -251,9 +251,9 @@ setxattr(struct dentry *d, const char __user *name, const void __user *value, | |||
251 | return error; | 251 | return error; |
252 | } | 252 | } |
253 | 253 | ||
254 | asmlinkage long | 254 | SYSCALL_DEFINE5(setxattr, const char __user *, pathname, |
255 | sys_setxattr(const char __user *pathname, const char __user *name, | 255 | const char __user *, name, const void __user *, value, |
256 | const void __user *value, size_t size, int flags) | 256 | size_t, size, int, flags) |
257 | { | 257 | { |
258 | struct path path; | 258 | struct path path; |
259 | int error; | 259 | int error; |
@@ -270,9 +270,9 @@ sys_setxattr(const char __user *pathname, const char __user *name, | |||
270 | return error; | 270 | return error; |
271 | } | 271 | } |
272 | 272 | ||
273 | asmlinkage long | 273 | SYSCALL_DEFINE5(lsetxattr, const char __user *, pathname, |
274 | sys_lsetxattr(const char __user *pathname, const char __user *name, | 274 | const char __user *, name, const void __user *, value, |
275 | const void __user *value, size_t size, int flags) | 275 | size_t, size, int, flags) |
276 | { | 276 | { |
277 | struct path path; | 277 | struct path path; |
278 | int error; | 278 | int error; |
@@ -289,9 +289,8 @@ sys_lsetxattr(const char __user *pathname, const char __user *name, | |||
289 | return error; | 289 | return error; |
290 | } | 290 | } |
291 | 291 | ||
292 | asmlinkage long | 292 | SYSCALL_DEFINE5(fsetxattr, int, fd, const char __user *, name, |
293 | sys_fsetxattr(int fd, const char __user *name, const void __user *value, | 293 | const void __user *,value, size_t, size, int, flags) |
294 | size_t size, int flags) | ||
295 | { | 294 | { |
296 | struct file *f; | 295 | struct file *f; |
297 | struct dentry *dentry; | 296 | struct dentry *dentry; |
@@ -349,9 +348,8 @@ getxattr(struct dentry *d, const char __user *name, void __user *value, | |||
349 | return error; | 348 | return error; |
350 | } | 349 | } |
351 | 350 | ||
352 | asmlinkage ssize_t | 351 | SYSCALL_DEFINE4(getxattr, const char __user *, pathname, |
353 | sys_getxattr(const char __user *pathname, const char __user *name, | 352 | const char __user *, name, void __user *, value, size_t, size) |
354 | void __user *value, size_t size) | ||
355 | { | 353 | { |
356 | struct path path; | 354 | struct path path; |
357 | ssize_t error; | 355 | ssize_t error; |
@@ -364,9 +362,8 @@ sys_getxattr(const char __user *pathname, const char __user *name, | |||
364 | return error; | 362 | return error; |
365 | } | 363 | } |
366 | 364 | ||
367 | asmlinkage ssize_t | 365 | SYSCALL_DEFINE4(lgetxattr, const char __user *, pathname, |
368 | sys_lgetxattr(const char __user *pathname, const char __user *name, void __user *value, | 366 | const char __user *, name, void __user *, value, size_t, size) |
369 | size_t size) | ||
370 | { | 367 | { |
371 | struct path path; | 368 | struct path path; |
372 | ssize_t error; | 369 | ssize_t error; |
@@ -379,8 +376,8 @@ sys_lgetxattr(const char __user *pathname, const char __user *name, void __user | |||
379 | return error; | 376 | return error; |
380 | } | 377 | } |
381 | 378 | ||
382 | asmlinkage ssize_t | 379 | SYSCALL_DEFINE4(fgetxattr, int, fd, const char __user *, name, |
383 | sys_fgetxattr(int fd, const char __user *name, void __user *value, size_t size) | 380 | void __user *, value, size_t, size) |
384 | { | 381 | { |
385 | struct file *f; | 382 | struct file *f; |
386 | ssize_t error = -EBADF; | 383 | ssize_t error = -EBADF; |
@@ -424,8 +421,8 @@ listxattr(struct dentry *d, char __user *list, size_t size) | |||
424 | return error; | 421 | return error; |
425 | } | 422 | } |
426 | 423 | ||
427 | asmlinkage ssize_t | 424 | SYSCALL_DEFINE3(listxattr, const char __user *, pathname, char __user *, list, |
428 | sys_listxattr(const char __user *pathname, char __user *list, size_t size) | 425 | size_t, size) |
429 | { | 426 | { |
430 | struct path path; | 427 | struct path path; |
431 | ssize_t error; | 428 | ssize_t error; |
@@ -438,8 +435,8 @@ sys_listxattr(const char __user *pathname, char __user *list, size_t size) | |||
438 | return error; | 435 | return error; |
439 | } | 436 | } |
440 | 437 | ||
441 | asmlinkage ssize_t | 438 | SYSCALL_DEFINE3(llistxattr, const char __user *, pathname, char __user *, list, |
442 | sys_llistxattr(const char __user *pathname, char __user *list, size_t size) | 439 | size_t, size) |
443 | { | 440 | { |
444 | struct path path; | 441 | struct path path; |
445 | ssize_t error; | 442 | ssize_t error; |
@@ -452,8 +449,7 @@ sys_llistxattr(const char __user *pathname, char __user *list, size_t size) | |||
452 | return error; | 449 | return error; |
453 | } | 450 | } |
454 | 451 | ||
455 | asmlinkage ssize_t | 452 | SYSCALL_DEFINE3(flistxattr, int, fd, char __user *, list, size_t, size) |
456 | sys_flistxattr(int fd, char __user *list, size_t size) | ||
457 | { | 453 | { |
458 | struct file *f; | 454 | struct file *f; |
459 | ssize_t error = -EBADF; | 455 | ssize_t error = -EBADF; |
@@ -485,8 +481,8 @@ removexattr(struct dentry *d, const char __user *name) | |||
485 | return vfs_removexattr(d, kname); | 481 | return vfs_removexattr(d, kname); |
486 | } | 482 | } |
487 | 483 | ||
488 | asmlinkage long | 484 | SYSCALL_DEFINE2(removexattr, const char __user *, pathname, |
489 | sys_removexattr(const char __user *pathname, const char __user *name) | 485 | const char __user *, name) |
490 | { | 486 | { |
491 | struct path path; | 487 | struct path path; |
492 | int error; | 488 | int error; |
@@ -503,8 +499,8 @@ sys_removexattr(const char __user *pathname, const char __user *name) | |||
503 | return error; | 499 | return error; |
504 | } | 500 | } |
505 | 501 | ||
506 | asmlinkage long | 502 | SYSCALL_DEFINE2(lremovexattr, const char __user *, pathname, |
507 | sys_lremovexattr(const char __user *pathname, const char __user *name) | 503 | const char __user *, name) |
508 | { | 504 | { |
509 | struct path path; | 505 | struct path path; |
510 | int error; | 506 | int error; |
@@ -521,8 +517,7 @@ sys_lremovexattr(const char __user *pathname, const char __user *name) | |||
521 | return error; | 517 | return error; |
522 | } | 518 | } |
523 | 519 | ||
524 | asmlinkage long | 520 | SYSCALL_DEFINE2(fremovexattr, int, fd, const char __user *, name) |
525 | sys_fremovexattr(int fd, const char __user *name) | ||
526 | { | 521 | { |
527 | struct file *f; | 522 | struct file *f; |
528 | struct dentry *dentry; | 523 | struct dentry *dentry; |
diff --git a/include/linux/compat.h b/include/linux/compat.h index e88f3ecf38b4..3fd2194ff573 100644 --- a/include/linux/compat.h +++ b/include/linux/compat.h | |||
@@ -280,5 +280,18 @@ asmlinkage long compat_sys_timerfd_settime(int ufd, int flags, | |||
280 | asmlinkage long compat_sys_timerfd_gettime(int ufd, | 280 | asmlinkage long compat_sys_timerfd_gettime(int ufd, |
281 | struct compat_itimerspec __user *otmr); | 281 | struct compat_itimerspec __user *otmr); |
282 | 282 | ||
283 | asmlinkage long compat_sys_move_pages(pid_t pid, unsigned long nr_page, | ||
284 | __u32 __user *pages, | ||
285 | const int __user *nodes, | ||
286 | int __user *status, | ||
287 | int flags); | ||
288 | asmlinkage long compat_sys_futimesat(unsigned int dfd, char __user *filename, | ||
289 | struct compat_timeval __user *t); | ||
290 | asmlinkage long compat_sys_newfstatat(unsigned int dfd, char __user * filename, | ||
291 | struct compat_stat __user *statbuf, | ||
292 | int flag); | ||
293 | asmlinkage long compat_sys_openat(unsigned int dfd, const char __user *filename, | ||
294 | int flags, int mode); | ||
295 | |||
283 | #endif /* CONFIG_COMPAT */ | 296 | #endif /* CONFIG_COMPAT */ |
284 | #endif /* _LINUX_COMPAT_H */ | 297 | #endif /* _LINUX_COMPAT_H */ |
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index 18d0a243a7b3..16875f89e6a7 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h | |||
@@ -54,6 +54,7 @@ struct compat_stat; | |||
54 | struct compat_timeval; | 54 | struct compat_timeval; |
55 | struct robust_list_head; | 55 | struct robust_list_head; |
56 | struct getcpu_cache; | 56 | struct getcpu_cache; |
57 | struct old_linux_dirent; | ||
57 | 58 | ||
58 | #include <linux/types.h> | 59 | #include <linux/types.h> |
59 | #include <linux/aio_abi.h> | 60 | #include <linux/aio_abi.h> |
@@ -65,6 +66,74 @@ struct getcpu_cache; | |||
65 | #include <linux/quota.h> | 66 | #include <linux/quota.h> |
66 | #include <linux/key.h> | 67 | #include <linux/key.h> |
67 | 68 | ||
69 | #define __SC_DECL1(t1, a1) t1 a1 | ||
70 | #define __SC_DECL2(t2, a2, ...) t2 a2, __SC_DECL1(__VA_ARGS__) | ||
71 | #define __SC_DECL3(t3, a3, ...) t3 a3, __SC_DECL2(__VA_ARGS__) | ||
72 | #define __SC_DECL4(t4, a4, ...) t4 a4, __SC_DECL3(__VA_ARGS__) | ||
73 | #define __SC_DECL5(t5, a5, ...) t5 a5, __SC_DECL4(__VA_ARGS__) | ||
74 | #define __SC_DECL6(t6, a6, ...) t6 a6, __SC_DECL5(__VA_ARGS__) | ||
75 | |||
76 | #define __SC_LONG1(t1, a1) long a1 | ||
77 | #define __SC_LONG2(t2, a2, ...) long a2, __SC_LONG1(__VA_ARGS__) | ||
78 | #define __SC_LONG3(t3, a3, ...) long a3, __SC_LONG2(__VA_ARGS__) | ||
79 | #define __SC_LONG4(t4, a4, ...) long a4, __SC_LONG3(__VA_ARGS__) | ||
80 | #define __SC_LONG5(t5, a5, ...) long a5, __SC_LONG4(__VA_ARGS__) | ||
81 | #define __SC_LONG6(t6, a6, ...) long a6, __SC_LONG5(__VA_ARGS__) | ||
82 | |||
83 | #define __SC_CAST1(t1, a1) (t1) a1 | ||
84 | #define __SC_CAST2(t2, a2, ...) (t2) a2, __SC_CAST1(__VA_ARGS__) | ||
85 | #define __SC_CAST3(t3, a3, ...) (t3) a3, __SC_CAST2(__VA_ARGS__) | ||
86 | #define __SC_CAST4(t4, a4, ...) (t4) a4, __SC_CAST3(__VA_ARGS__) | ||
87 | #define __SC_CAST5(t5, a5, ...) (t5) a5, __SC_CAST4(__VA_ARGS__) | ||
88 | #define __SC_CAST6(t6, a6, ...) (t6) a6, __SC_CAST5(__VA_ARGS__) | ||
89 | |||
90 | #define __SC_TEST(type) BUILD_BUG_ON(sizeof(type) > sizeof(long)) | ||
91 | #define __SC_TEST1(t1, a1) __SC_TEST(t1) | ||
92 | #define __SC_TEST2(t2, a2, ...) __SC_TEST(t2); __SC_TEST1(__VA_ARGS__) | ||
93 | #define __SC_TEST3(t3, a3, ...) __SC_TEST(t3); __SC_TEST2(__VA_ARGS__) | ||
94 | #define __SC_TEST4(t4, a4, ...) __SC_TEST(t4); __SC_TEST3(__VA_ARGS__) | ||
95 | #define __SC_TEST5(t5, a5, ...) __SC_TEST(t5); __SC_TEST4(__VA_ARGS__) | ||
96 | #define __SC_TEST6(t6, a6, ...) __SC_TEST(t6); __SC_TEST5(__VA_ARGS__) | ||
97 | |||
98 | #define SYSCALL_DEFINE0(name) asmlinkage long sys_##name(void) | ||
99 | #define SYSCALL_DEFINE1(...) SYSCALL_DEFINEx(1, __VA_ARGS__) | ||
100 | #define SYSCALL_DEFINE2(...) SYSCALL_DEFINEx(2, __VA_ARGS__) | ||
101 | #define SYSCALL_DEFINE3(...) SYSCALL_DEFINEx(3, __VA_ARGS__) | ||
102 | #define SYSCALL_DEFINE4(...) SYSCALL_DEFINEx(4, __VA_ARGS__) | ||
103 | #define SYSCALL_DEFINE5(...) SYSCALL_DEFINEx(5, __VA_ARGS__) | ||
104 | #define SYSCALL_DEFINE6(...) SYSCALL_DEFINEx(6, __VA_ARGS__) | ||
105 | |||
106 | #ifdef CONFIG_PPC64 | ||
107 | #define SYSCALL_ALIAS(alias, name) \ | ||
108 | asm ("\t.globl " #alias "\n\t.set " #alias ", " #name "\n" \ | ||
109 | "\t.globl ." #alias "\n\t.set ." #alias ", ." #name) | ||
110 | #else | ||
111 | #define SYSCALL_ALIAS(alias, name) \ | ||
112 | asm ("\t.globl " #alias "\n\t.set " #alias ", " #name) | ||
113 | #endif | ||
114 | |||
115 | #ifdef CONFIG_HAVE_SYSCALL_WRAPPERS | ||
116 | |||
117 | #define SYSCALL_DEFINE(name) static inline long SYSC_##name | ||
118 | #define SYSCALL_DEFINEx(x, name, ...) \ | ||
119 | asmlinkage long sys_##name(__SC_DECL##x(__VA_ARGS__)); \ | ||
120 | static inline long SYSC_##name(__SC_DECL##x(__VA_ARGS__)); \ | ||
121 | asmlinkage long SyS_##name(__SC_LONG##x(__VA_ARGS__)) \ | ||
122 | { \ | ||
123 | __SC_TEST##x(__VA_ARGS__); \ | ||
124 | return (long) SYSC_##name(__SC_CAST##x(__VA_ARGS__)); \ | ||
125 | } \ | ||
126 | SYSCALL_ALIAS(sys_##name, SyS_##name); \ | ||
127 | static inline long SYSC_##name(__SC_DECL##x(__VA_ARGS__)) | ||
128 | |||
129 | #else /* CONFIG_HAVE_SYSCALL_WRAPPERS */ | ||
130 | |||
131 | #define SYSCALL_DEFINE(name) asmlinkage long sys_##name | ||
132 | #define SYSCALL_DEFINEx(x, name, ...) \ | ||
133 | asmlinkage long sys_##name(__SC_DECL##x(__VA_ARGS__)) | ||
134 | |||
135 | #endif /* CONFIG_HAVE_SYSCALL_WRAPPERS */ | ||
136 | |||
68 | asmlinkage long sys_time(time_t __user *tloc); | 137 | asmlinkage long sys_time(time_t __user *tloc); |
69 | asmlinkage long sys_stime(time_t __user *tptr); | 138 | asmlinkage long sys_stime(time_t __user *tptr); |
70 | asmlinkage long sys_gettimeofday(struct timeval __user *tv, | 139 | asmlinkage long sys_gettimeofday(struct timeval __user *tv, |
@@ -77,7 +146,7 @@ asmlinkage long sys_times(struct tms __user *tbuf); | |||
77 | 146 | ||
78 | asmlinkage long sys_gettid(void); | 147 | asmlinkage long sys_gettid(void); |
79 | asmlinkage long sys_nanosleep(struct timespec __user *rqtp, struct timespec __user *rmtp); | 148 | asmlinkage long sys_nanosleep(struct timespec __user *rqtp, struct timespec __user *rmtp); |
80 | asmlinkage unsigned long sys_alarm(unsigned int seconds); | 149 | asmlinkage long sys_alarm(unsigned int seconds); |
81 | asmlinkage long sys_getpid(void); | 150 | asmlinkage long sys_getpid(void); |
82 | asmlinkage long sys_getppid(void); | 151 | asmlinkage long sys_getppid(void); |
83 | asmlinkage long sys_getuid(void); | 152 | asmlinkage long sys_getuid(void); |
@@ -166,7 +235,7 @@ asmlinkage long sys_kexec_load(unsigned long entry, unsigned long nr_segments, | |||
166 | unsigned long flags); | 235 | unsigned long flags); |
167 | 236 | ||
168 | asmlinkage long sys_exit(int error_code); | 237 | asmlinkage long sys_exit(int error_code); |
169 | asmlinkage void sys_exit_group(int error_code); | 238 | asmlinkage long sys_exit_group(int error_code); |
170 | asmlinkage long sys_wait4(pid_t pid, int __user *stat_addr, | 239 | asmlinkage long sys_wait4(pid_t pid, int __user *stat_addr, |
171 | int options, struct rusage __user *ru); | 240 | int options, struct rusage __user *ru); |
172 | asmlinkage long sys_waitid(int which, pid_t pid, | 241 | asmlinkage long sys_waitid(int which, pid_t pid, |
@@ -196,7 +265,7 @@ asmlinkage long sys_tkill(int pid, int sig); | |||
196 | asmlinkage long sys_rt_sigqueueinfo(int pid, int sig, siginfo_t __user *uinfo); | 265 | asmlinkage long sys_rt_sigqueueinfo(int pid, int sig, siginfo_t __user *uinfo); |
197 | asmlinkage long sys_sgetmask(void); | 266 | asmlinkage long sys_sgetmask(void); |
198 | asmlinkage long sys_ssetmask(int newmask); | 267 | asmlinkage long sys_ssetmask(int newmask); |
199 | asmlinkage unsigned long sys_signal(int sig, __sighandler_t handler); | 268 | asmlinkage long sys_signal(int sig, __sighandler_t handler); |
200 | asmlinkage long sys_pause(void); | 269 | asmlinkage long sys_pause(void); |
201 | 270 | ||
202 | asmlinkage long sys_sync(void); | 271 | asmlinkage long sys_sync(void); |
@@ -246,29 +315,29 @@ asmlinkage long sys_lsetxattr(const char __user *path, const char __user *name, | |||
246 | const void __user *value, size_t size, int flags); | 315 | const void __user *value, size_t size, int flags); |
247 | asmlinkage long sys_fsetxattr(int fd, const char __user *name, | 316 | asmlinkage long sys_fsetxattr(int fd, const char __user *name, |
248 | const void __user *value, size_t size, int flags); | 317 | const void __user *value, size_t size, int flags); |
249 | asmlinkage ssize_t sys_getxattr(const char __user *path, const char __user *name, | 318 | asmlinkage long sys_getxattr(const char __user *path, const char __user *name, |
250 | void __user *value, size_t size); | 319 | void __user *value, size_t size); |
251 | asmlinkage ssize_t sys_lgetxattr(const char __user *path, const char __user *name, | 320 | asmlinkage long sys_lgetxattr(const char __user *path, const char __user *name, |
252 | void __user *value, size_t size); | 321 | void __user *value, size_t size); |
253 | asmlinkage ssize_t sys_fgetxattr(int fd, const char __user *name, | 322 | asmlinkage long sys_fgetxattr(int fd, const char __user *name, |
254 | void __user *value, size_t size); | 323 | void __user *value, size_t size); |
255 | asmlinkage ssize_t sys_listxattr(const char __user *path, char __user *list, | 324 | asmlinkage long sys_listxattr(const char __user *path, char __user *list, |
256 | size_t size); | 325 | size_t size); |
257 | asmlinkage ssize_t sys_llistxattr(const char __user *path, char __user *list, | 326 | asmlinkage long sys_llistxattr(const char __user *path, char __user *list, |
258 | size_t size); | 327 | size_t size); |
259 | asmlinkage ssize_t sys_flistxattr(int fd, char __user *list, size_t size); | 328 | asmlinkage long sys_flistxattr(int fd, char __user *list, size_t size); |
260 | asmlinkage long sys_removexattr(const char __user *path, | 329 | asmlinkage long sys_removexattr(const char __user *path, |
261 | const char __user *name); | 330 | const char __user *name); |
262 | asmlinkage long sys_lremovexattr(const char __user *path, | 331 | asmlinkage long sys_lremovexattr(const char __user *path, |
263 | const char __user *name); | 332 | const char __user *name); |
264 | asmlinkage long sys_fremovexattr(int fd, const char __user *name); | 333 | asmlinkage long sys_fremovexattr(int fd, const char __user *name); |
265 | 334 | ||
266 | asmlinkage unsigned long sys_brk(unsigned long brk); | 335 | asmlinkage long sys_brk(unsigned long brk); |
267 | asmlinkage long sys_mprotect(unsigned long start, size_t len, | 336 | asmlinkage long sys_mprotect(unsigned long start, size_t len, |
268 | unsigned long prot); | 337 | unsigned long prot); |
269 | asmlinkage unsigned long sys_mremap(unsigned long addr, | 338 | asmlinkage long sys_mremap(unsigned long addr, |
270 | unsigned long old_len, unsigned long new_len, | 339 | unsigned long old_len, unsigned long new_len, |
271 | unsigned long flags, unsigned long new_addr); | 340 | unsigned long flags, unsigned long new_addr); |
272 | asmlinkage long sys_remap_file_pages(unsigned long start, unsigned long size, | 341 | asmlinkage long sys_remap_file_pages(unsigned long start, unsigned long size, |
273 | unsigned long prot, unsigned long pgoff, | 342 | unsigned long prot, unsigned long pgoff, |
274 | unsigned long flags); | 343 | unsigned long flags); |
@@ -321,10 +390,10 @@ asmlinkage long sys_io_submit(aio_context_t, long, | |||
321 | struct iocb __user * __user *); | 390 | struct iocb __user * __user *); |
322 | asmlinkage long sys_io_cancel(aio_context_t ctx_id, struct iocb __user *iocb, | 391 | asmlinkage long sys_io_cancel(aio_context_t ctx_id, struct iocb __user *iocb, |
323 | struct io_event __user *result); | 392 | struct io_event __user *result); |
324 | asmlinkage ssize_t sys_sendfile(int out_fd, int in_fd, | 393 | asmlinkage long sys_sendfile(int out_fd, int in_fd, |
325 | off_t __user *offset, size_t count); | 394 | off_t __user *offset, size_t count); |
326 | asmlinkage ssize_t sys_sendfile64(int out_fd, int in_fd, | 395 | asmlinkage long sys_sendfile64(int out_fd, int in_fd, |
327 | loff_t __user *offset, size_t count); | 396 | loff_t __user *offset, size_t count); |
328 | asmlinkage long sys_readlink(const char __user *path, | 397 | asmlinkage long sys_readlink(const char __user *path, |
329 | char __user *buf, int bufsiz); | 398 | char __user *buf, int bufsiz); |
330 | asmlinkage long sys_creat(const char __user *pathname, int mode); | 399 | asmlinkage long sys_creat(const char __user *pathname, int mode); |
@@ -368,26 +437,25 @@ asmlinkage long sys_utime(char __user *filename, | |||
368 | struct utimbuf __user *times); | 437 | struct utimbuf __user *times); |
369 | asmlinkage long sys_utimes(char __user *filename, | 438 | asmlinkage long sys_utimes(char __user *filename, |
370 | struct timeval __user *utimes); | 439 | struct timeval __user *utimes); |
371 | asmlinkage off_t sys_lseek(unsigned int fd, off_t offset, | 440 | asmlinkage long sys_lseek(unsigned int fd, off_t offset, |
372 | unsigned int origin); | 441 | unsigned int origin); |
373 | asmlinkage long sys_llseek(unsigned int fd, unsigned long offset_high, | 442 | asmlinkage long sys_llseek(unsigned int fd, unsigned long offset_high, |
374 | unsigned long offset_low, loff_t __user *result, | 443 | unsigned long offset_low, loff_t __user *result, |
375 | unsigned int origin); | 444 | unsigned int origin); |
376 | asmlinkage ssize_t sys_read(unsigned int fd, char __user *buf, | 445 | asmlinkage long sys_read(unsigned int fd, char __user *buf, size_t count); |
377 | size_t count); | 446 | asmlinkage long sys_readahead(int fd, loff_t offset, size_t count); |
378 | asmlinkage ssize_t sys_readahead(int fd, loff_t offset, size_t count); | 447 | asmlinkage long sys_readv(unsigned long fd, |
379 | asmlinkage ssize_t sys_readv(unsigned long fd, | 448 | const struct iovec __user *vec, |
380 | const struct iovec __user *vec, | 449 | unsigned long vlen); |
381 | unsigned long vlen); | 450 | asmlinkage long sys_write(unsigned int fd, const char __user *buf, |
382 | asmlinkage ssize_t sys_write(unsigned int fd, const char __user *buf, | 451 | size_t count); |
383 | size_t count); | 452 | asmlinkage long sys_writev(unsigned long fd, |
384 | asmlinkage ssize_t sys_writev(unsigned long fd, | 453 | const struct iovec __user *vec, |
385 | const struct iovec __user *vec, | 454 | unsigned long vlen); |
386 | unsigned long vlen); | 455 | asmlinkage long sys_pread64(unsigned int fd, char __user *buf, |
387 | asmlinkage ssize_t sys_pread64(unsigned int fd, char __user *buf, | 456 | size_t count, loff_t pos); |
388 | size_t count, loff_t pos); | 457 | asmlinkage long sys_pwrite64(unsigned int fd, const char __user *buf, |
389 | asmlinkage ssize_t sys_pwrite64(unsigned int fd, const char __user *buf, | 458 | size_t count, loff_t pos); |
390 | size_t count, loff_t pos); | ||
391 | asmlinkage long sys_getcwd(char __user *buf, unsigned long size); | 459 | asmlinkage long sys_getcwd(char __user *buf, unsigned long size); |
392 | asmlinkage long sys_mkdir(const char __user *pathname, int mode); | 460 | asmlinkage long sys_mkdir(const char __user *pathname, int mode); |
393 | asmlinkage long sys_chdir(const char __user *filename); | 461 | asmlinkage long sys_chdir(const char __user *filename); |
@@ -476,7 +544,7 @@ asmlinkage long sys_shmctl(int shmid, int cmd, struct shmid_ds __user *buf); | |||
476 | asmlinkage long sys_mq_open(const char __user *name, int oflag, mode_t mode, struct mq_attr __user *attr); | 544 | asmlinkage long sys_mq_open(const char __user *name, int oflag, mode_t mode, struct mq_attr __user *attr); |
477 | asmlinkage long sys_mq_unlink(const char __user *name); | 545 | asmlinkage long sys_mq_unlink(const char __user *name); |
478 | asmlinkage long sys_mq_timedsend(mqd_t mqdes, const char __user *msg_ptr, size_t msg_len, unsigned int msg_prio, const struct timespec __user *abs_timeout); | 546 | asmlinkage long sys_mq_timedsend(mqd_t mqdes, const char __user *msg_ptr, size_t msg_len, unsigned int msg_prio, const struct timespec __user *abs_timeout); |
479 | asmlinkage ssize_t sys_mq_timedreceive(mqd_t mqdes, char __user *msg_ptr, size_t msg_len, unsigned int __user *msg_prio, const struct timespec __user *abs_timeout); | 547 | asmlinkage long sys_mq_timedreceive(mqd_t mqdes, char __user *msg_ptr, size_t msg_len, unsigned int __user *msg_prio, const struct timespec __user *abs_timeout); |
480 | asmlinkage long sys_mq_notify(mqd_t mqdes, const struct sigevent __user *notification); | 548 | asmlinkage long sys_mq_notify(mqd_t mqdes, const struct sigevent __user *notification); |
481 | asmlinkage long sys_mq_getsetattr(mqd_t mqdes, const struct mq_attr __user *mqstat, struct mq_attr __user *omqstat); | 549 | asmlinkage long sys_mq_getsetattr(mqd_t mqdes, const struct mq_attr __user *mqstat, struct mq_attr __user *omqstat); |
482 | 550 | ||
@@ -530,11 +598,6 @@ asmlinkage long sys_move_pages(pid_t pid, unsigned long nr_pages, | |||
530 | const int __user *nodes, | 598 | const int __user *nodes, |
531 | int __user *status, | 599 | int __user *status, |
532 | int flags); | 600 | int flags); |
533 | asmlinkage long compat_sys_move_pages(pid_t pid, unsigned long nr_page, | ||
534 | __u32 __user *pages, | ||
535 | const int __user *nodes, | ||
536 | int __user *status, | ||
537 | int flags); | ||
538 | asmlinkage long sys_mbind(unsigned long start, unsigned long len, | 601 | asmlinkage long sys_mbind(unsigned long start, unsigned long len, |
539 | unsigned long mode, | 602 | unsigned long mode, |
540 | unsigned long __user *nmask, | 603 | unsigned long __user *nmask, |
@@ -583,13 +646,6 @@ asmlinkage long sys_readlinkat(int dfd, const char __user *path, char __user *bu | |||
583 | int bufsiz); | 646 | int bufsiz); |
584 | asmlinkage long sys_utimensat(int dfd, char __user *filename, | 647 | asmlinkage long sys_utimensat(int dfd, char __user *filename, |
585 | struct timespec __user *utimes, int flags); | 648 | struct timespec __user *utimes, int flags); |
586 | asmlinkage long compat_sys_futimesat(unsigned int dfd, char __user *filename, | ||
587 | struct compat_timeval __user *t); | ||
588 | asmlinkage long compat_sys_newfstatat(unsigned int dfd, char __user * filename, | ||
589 | struct compat_stat __user *statbuf, | ||
590 | int flag); | ||
591 | asmlinkage long compat_sys_openat(unsigned int dfd, const char __user *filename, | ||
592 | int flags, int mode); | ||
593 | asmlinkage long sys_unshare(unsigned long unshare_flags); | 649 | asmlinkage long sys_unshare(unsigned long unshare_flags); |
594 | 650 | ||
595 | asmlinkage long sys_splice(int fd_in, loff_t __user *off_in, | 651 | asmlinkage long sys_splice(int fd_in, loff_t __user *off_in, |
@@ -621,6 +677,15 @@ asmlinkage long sys_timerfd_gettime(int ufd, struct itimerspec __user *otmr); | |||
621 | asmlinkage long sys_eventfd(unsigned int count); | 677 | asmlinkage long sys_eventfd(unsigned int count); |
622 | asmlinkage long sys_eventfd2(unsigned int count, int flags); | 678 | asmlinkage long sys_eventfd2(unsigned int count, int flags); |
623 | asmlinkage long sys_fallocate(int fd, int mode, loff_t offset, loff_t len); | 679 | asmlinkage long sys_fallocate(int fd, int mode, loff_t offset, loff_t len); |
680 | asmlinkage long sys_old_readdir(unsigned int, struct old_linux_dirent __user *, unsigned int); | ||
681 | asmlinkage long sys_pselect6(int, fd_set __user *, fd_set __user *, | ||
682 | fd_set __user *, struct timespec __user *, | ||
683 | void __user *); | ||
684 | asmlinkage long sys_ppoll(struct pollfd __user *, unsigned int, | ||
685 | struct timespec __user *, const sigset_t __user *, | ||
686 | size_t); | ||
687 | asmlinkage long sys_pipe2(int __user *, int); | ||
688 | asmlinkage long sys_pipe(int __user *); | ||
624 | 689 | ||
625 | int kernel_execve(const char *filename, char *const argv[], char *const envp[]); | 690 | int kernel_execve(const char *filename, char *const argv[], char *const envp[]); |
626 | 691 | ||
diff --git a/ipc/mqueue.c b/ipc/mqueue.c index 23fdb8492b8e..54b4077fed79 100644 --- a/ipc/mqueue.c +++ b/ipc/mqueue.c | |||
@@ -650,8 +650,8 @@ static struct file *do_open(struct dentry *dentry, int oflag) | |||
650 | return dentry_open(dentry, mqueue_mnt, oflag, cred); | 650 | return dentry_open(dentry, mqueue_mnt, oflag, cred); |
651 | } | 651 | } |
652 | 652 | ||
653 | asmlinkage long sys_mq_open(const char __user *u_name, int oflag, mode_t mode, | 653 | SYSCALL_DEFINE4(mq_open, const char __user *, u_name, int, oflag, mode_t, mode, |
654 | struct mq_attr __user *u_attr) | 654 | struct mq_attr __user *, u_attr) |
655 | { | 655 | { |
656 | struct dentry *dentry; | 656 | struct dentry *dentry; |
657 | struct file *filp; | 657 | struct file *filp; |
@@ -721,7 +721,7 @@ out_putname: | |||
721 | return fd; | 721 | return fd; |
722 | } | 722 | } |
723 | 723 | ||
724 | asmlinkage long sys_mq_unlink(const char __user *u_name) | 724 | SYSCALL_DEFINE1(mq_unlink, const char __user *, u_name) |
725 | { | 725 | { |
726 | int err; | 726 | int err; |
727 | char *name; | 727 | char *name; |
@@ -814,9 +814,9 @@ static inline void pipelined_receive(struct mqueue_inode_info *info) | |||
814 | sender->state = STATE_READY; | 814 | sender->state = STATE_READY; |
815 | } | 815 | } |
816 | 816 | ||
817 | asmlinkage long sys_mq_timedsend(mqd_t mqdes, const char __user *u_msg_ptr, | 817 | SYSCALL_DEFINE5(mq_timedsend, mqd_t, mqdes, const char __user *, u_msg_ptr, |
818 | size_t msg_len, unsigned int msg_prio, | 818 | size_t, msg_len, unsigned int, msg_prio, |
819 | const struct timespec __user *u_abs_timeout) | 819 | const struct timespec __user *, u_abs_timeout) |
820 | { | 820 | { |
821 | struct file *filp; | 821 | struct file *filp; |
822 | struct inode *inode; | 822 | struct inode *inode; |
@@ -907,9 +907,9 @@ out: | |||
907 | return ret; | 907 | return ret; |
908 | } | 908 | } |
909 | 909 | ||
910 | asmlinkage ssize_t sys_mq_timedreceive(mqd_t mqdes, char __user *u_msg_ptr, | 910 | SYSCALL_DEFINE5(mq_timedreceive, mqd_t, mqdes, char __user *, u_msg_ptr, |
911 | size_t msg_len, unsigned int __user *u_msg_prio, | 911 | size_t, msg_len, unsigned int __user *, u_msg_prio, |
912 | const struct timespec __user *u_abs_timeout) | 912 | const struct timespec __user *, u_abs_timeout) |
913 | { | 913 | { |
914 | long timeout; | 914 | long timeout; |
915 | ssize_t ret; | 915 | ssize_t ret; |
@@ -997,8 +997,8 @@ out: | |||
997 | * and he isn't currently owner of notification, will be silently discarded. | 997 | * and he isn't currently owner of notification, will be silently discarded. |
998 | * It isn't explicitly defined in the POSIX. | 998 | * It isn't explicitly defined in the POSIX. |
999 | */ | 999 | */ |
1000 | asmlinkage long sys_mq_notify(mqd_t mqdes, | 1000 | SYSCALL_DEFINE2(mq_notify, mqd_t, mqdes, |
1001 | const struct sigevent __user *u_notification) | 1001 | const struct sigevent __user *, u_notification) |
1002 | { | 1002 | { |
1003 | int ret; | 1003 | int ret; |
1004 | struct file *filp; | 1004 | struct file *filp; |
@@ -1123,9 +1123,9 @@ out: | |||
1123 | return ret; | 1123 | return ret; |
1124 | } | 1124 | } |
1125 | 1125 | ||
1126 | asmlinkage long sys_mq_getsetattr(mqd_t mqdes, | 1126 | SYSCALL_DEFINE3(mq_getsetattr, mqd_t, mqdes, |
1127 | const struct mq_attr __user *u_mqstat, | 1127 | const struct mq_attr __user *, u_mqstat, |
1128 | struct mq_attr __user *u_omqstat) | 1128 | struct mq_attr __user *, u_omqstat) |
1129 | { | 1129 | { |
1130 | int ret; | 1130 | int ret; |
1131 | struct mq_attr mqstat, omqstat; | 1131 | struct mq_attr mqstat, omqstat; |
@@ -309,7 +309,7 @@ static inline int msg_security(struct kern_ipc_perm *ipcp, int msgflg) | |||
309 | return security_msg_queue_associate(msq, msgflg); | 309 | return security_msg_queue_associate(msq, msgflg); |
310 | } | 310 | } |
311 | 311 | ||
312 | asmlinkage long sys_msgget(key_t key, int msgflg) | 312 | SYSCALL_DEFINE2(msgget, key_t, key, int, msgflg) |
313 | { | 313 | { |
314 | struct ipc_namespace *ns; | 314 | struct ipc_namespace *ns; |
315 | struct ipc_ops msg_ops; | 315 | struct ipc_ops msg_ops; |
@@ -466,7 +466,7 @@ out_up: | |||
466 | return err; | 466 | return err; |
467 | } | 467 | } |
468 | 468 | ||
469 | asmlinkage long sys_msgctl(int msqid, int cmd, struct msqid_ds __user *buf) | 469 | SYSCALL_DEFINE3(msgctl, int, msqid, int, cmd, struct msqid_ds __user *, buf) |
470 | { | 470 | { |
471 | struct msg_queue *msq; | 471 | struct msg_queue *msq; |
472 | int err, version; | 472 | int err, version; |
@@ -723,8 +723,8 @@ out_free: | |||
723 | return err; | 723 | return err; |
724 | } | 724 | } |
725 | 725 | ||
726 | asmlinkage long | 726 | SYSCALL_DEFINE4(msgsnd, int, msqid, struct msgbuf __user *, msgp, size_t, msgsz, |
727 | sys_msgsnd(int msqid, struct msgbuf __user *msgp, size_t msgsz, int msgflg) | 727 | int, msgflg) |
728 | { | 728 | { |
729 | long mtype; | 729 | long mtype; |
730 | 730 | ||
@@ -904,8 +904,8 @@ out_unlock: | |||
904 | return msgsz; | 904 | return msgsz; |
905 | } | 905 | } |
906 | 906 | ||
907 | asmlinkage long sys_msgrcv(int msqid, struct msgbuf __user *msgp, size_t msgsz, | 907 | SYSCALL_DEFINE5(msgrcv, int, msqid, struct msgbuf __user *, msgp, size_t, msgsz, |
908 | long msgtyp, int msgflg) | 908 | long, msgtyp, int, msgflg) |
909 | { | 909 | { |
910 | long err, mtype; | 910 | long err, mtype; |
911 | 911 | ||
@@ -308,7 +308,7 @@ static inline int sem_more_checks(struct kern_ipc_perm *ipcp, | |||
308 | return 0; | 308 | return 0; |
309 | } | 309 | } |
310 | 310 | ||
311 | asmlinkage long sys_semget(key_t key, int nsems, int semflg) | 311 | SYSCALL_DEFINE3(semget, key_t, key, int, nsems, int, semflg) |
312 | { | 312 | { |
313 | struct ipc_namespace *ns; | 313 | struct ipc_namespace *ns; |
314 | struct ipc_ops sem_ops; | 314 | struct ipc_ops sem_ops; |
@@ -887,7 +887,7 @@ out_up: | |||
887 | return err; | 887 | return err; |
888 | } | 888 | } |
889 | 889 | ||
890 | asmlinkage long sys_semctl (int semid, int semnum, int cmd, union semun arg) | 890 | SYSCALL_DEFINE(semctl)(int semid, int semnum, int cmd, union semun arg) |
891 | { | 891 | { |
892 | int err = -EINVAL; | 892 | int err = -EINVAL; |
893 | int version; | 893 | int version; |
@@ -923,6 +923,13 @@ asmlinkage long sys_semctl (int semid, int semnum, int cmd, union semun arg) | |||
923 | return -EINVAL; | 923 | return -EINVAL; |
924 | } | 924 | } |
925 | } | 925 | } |
926 | #ifdef CONFIG_HAVE_SYSCALL_WRAPPERS | ||
927 | asmlinkage long SyS_semctl(int semid, int semnum, int cmd, union semun arg) | ||
928 | { | ||
929 | return SYSC_semctl((int) semid, (int) semnum, (int) cmd, arg); | ||
930 | } | ||
931 | SYSCALL_ALIAS(sys_semctl, SyS_semctl); | ||
932 | #endif | ||
926 | 933 | ||
927 | /* If the task doesn't already have a undo_list, then allocate one | 934 | /* If the task doesn't already have a undo_list, then allocate one |
928 | * here. We guarantee there is only one thread using this undo list, | 935 | * here. We guarantee there is only one thread using this undo list, |
@@ -1048,8 +1055,8 @@ out: | |||
1048 | return un; | 1055 | return un; |
1049 | } | 1056 | } |
1050 | 1057 | ||
1051 | asmlinkage long sys_semtimedop(int semid, struct sembuf __user *tsops, | 1058 | SYSCALL_DEFINE4(semtimedop, int, semid, struct sembuf __user *, tsops, |
1052 | unsigned nsops, const struct timespec __user *timeout) | 1059 | unsigned, nsops, const struct timespec __user *, timeout) |
1053 | { | 1060 | { |
1054 | int error = -EINVAL; | 1061 | int error = -EINVAL; |
1055 | struct sem_array *sma; | 1062 | struct sem_array *sma; |
@@ -1225,7 +1232,8 @@ out_free: | |||
1225 | return error; | 1232 | return error; |
1226 | } | 1233 | } |
1227 | 1234 | ||
1228 | asmlinkage long sys_semop (int semid, struct sembuf __user *tsops, unsigned nsops) | 1235 | SYSCALL_DEFINE3(semop, int, semid, struct sembuf __user *, tsops, |
1236 | unsigned, nsops) | ||
1229 | { | 1237 | { |
1230 | return sys_semtimedop(semid, tsops, nsops, NULL); | 1238 | return sys_semtimedop(semid, tsops, nsops, NULL); |
1231 | } | 1239 | } |
@@ -440,7 +440,7 @@ static inline int shm_more_checks(struct kern_ipc_perm *ipcp, | |||
440 | return 0; | 440 | return 0; |
441 | } | 441 | } |
442 | 442 | ||
443 | asmlinkage long sys_shmget (key_t key, size_t size, int shmflg) | 443 | SYSCALL_DEFINE3(shmget, key_t, key, size_t, size, int, shmflg) |
444 | { | 444 | { |
445 | struct ipc_namespace *ns; | 445 | struct ipc_namespace *ns; |
446 | struct ipc_ops shm_ops; | 446 | struct ipc_ops shm_ops; |
@@ -621,7 +621,7 @@ out_up: | |||
621 | return err; | 621 | return err; |
622 | } | 622 | } |
623 | 623 | ||
624 | asmlinkage long sys_shmctl(int shmid, int cmd, struct shmid_ds __user *buf) | 624 | SYSCALL_DEFINE3(shmctl, int, shmid, int, cmd, struct shmid_ds __user *, buf) |
625 | { | 625 | { |
626 | struct shmid_kernel *shp; | 626 | struct shmid_kernel *shp; |
627 | int err, version; | 627 | int err, version; |
@@ -939,7 +939,7 @@ out_put_dentry: | |||
939 | goto out_nattch; | 939 | goto out_nattch; |
940 | } | 940 | } |
941 | 941 | ||
942 | asmlinkage long sys_shmat(int shmid, char __user *shmaddr, int shmflg) | 942 | SYSCALL_DEFINE3(shmat, int, shmid, char __user *, shmaddr, int, shmflg) |
943 | { | 943 | { |
944 | unsigned long ret; | 944 | unsigned long ret; |
945 | long err; | 945 | long err; |
@@ -955,7 +955,7 @@ asmlinkage long sys_shmat(int shmid, char __user *shmaddr, int shmflg) | |||
955 | * detach and kill segment if marked destroyed. | 955 | * detach and kill segment if marked destroyed. |
956 | * The work is done in shm_close. | 956 | * The work is done in shm_close. |
957 | */ | 957 | */ |
958 | asmlinkage long sys_shmdt(char __user *shmaddr) | 958 | SYSCALL_DEFINE1(shmdt, char __user *, shmaddr) |
959 | { | 959 | { |
960 | struct mm_struct *mm = current->mm; | 960 | struct mm_struct *mm = current->mm; |
961 | struct vm_area_struct *vma, *next; | 961 | struct vm_area_struct *vma, *next; |
diff --git a/kernel/acct.c b/kernel/acct.c index d57b7cbb98b6..7afa31564162 100644 --- a/kernel/acct.c +++ b/kernel/acct.c | |||
@@ -277,7 +277,7 @@ static int acct_on(char *name) | |||
277 | * should be written. If the filename is NULL, accounting will be | 277 | * should be written. If the filename is NULL, accounting will be |
278 | * shutdown. | 278 | * shutdown. |
279 | */ | 279 | */ |
280 | asmlinkage long sys_acct(const char __user *name) | 280 | SYSCALL_DEFINE1(acct, const char __user *, name) |
281 | { | 281 | { |
282 | int error; | 282 | int error; |
283 | 283 | ||
diff --git a/kernel/capability.c b/kernel/capability.c index 688926e496be..4e17041963f5 100644 --- a/kernel/capability.c +++ b/kernel/capability.c | |||
@@ -161,7 +161,7 @@ static inline int cap_get_target_pid(pid_t pid, kernel_cap_t *pEp, | |||
161 | * | 161 | * |
162 | * Returns 0 on success and < 0 on error. | 162 | * Returns 0 on success and < 0 on error. |
163 | */ | 163 | */ |
164 | asmlinkage long sys_capget(cap_user_header_t header, cap_user_data_t dataptr) | 164 | SYSCALL_DEFINE2(capget, cap_user_header_t, header, cap_user_data_t, dataptr) |
165 | { | 165 | { |
166 | int ret = 0; | 166 | int ret = 0; |
167 | pid_t pid; | 167 | pid_t pid; |
@@ -235,7 +235,7 @@ asmlinkage long sys_capget(cap_user_header_t header, cap_user_data_t dataptr) | |||
235 | * | 235 | * |
236 | * Returns 0 on success and < 0 on error. | 236 | * Returns 0 on success and < 0 on error. |
237 | */ | 237 | */ |
238 | asmlinkage long sys_capset(cap_user_header_t header, const cap_user_data_t data) | 238 | SYSCALL_DEFINE2(capset, cap_user_header_t, header, const cap_user_data_t, data) |
239 | { | 239 | { |
240 | struct __user_cap_data_struct kdata[_KERNEL_CAPABILITY_U32S]; | 240 | struct __user_cap_data_struct kdata[_KERNEL_CAPABILITY_U32S]; |
241 | unsigned i, tocopy; | 241 | unsigned i, tocopy; |
diff --git a/kernel/exec_domain.c b/kernel/exec_domain.c index 0511716e9424..667c841c2952 100644 --- a/kernel/exec_domain.c +++ b/kernel/exec_domain.c | |||
@@ -209,8 +209,7 @@ static int __init proc_execdomains_init(void) | |||
209 | module_init(proc_execdomains_init); | 209 | module_init(proc_execdomains_init); |
210 | #endif | 210 | #endif |
211 | 211 | ||
212 | asmlinkage long | 212 | SYSCALL_DEFINE1(personality, u_long, personality) |
213 | sys_personality(u_long personality) | ||
214 | { | 213 | { |
215 | u_long old = current->personality; | 214 | u_long old = current->personality; |
216 | 215 | ||
diff --git a/kernel/exit.c b/kernel/exit.c index c7740fa3252c..f80dec3f1875 100644 --- a/kernel/exit.c +++ b/kernel/exit.c | |||
@@ -1141,7 +1141,7 @@ NORET_TYPE void complete_and_exit(struct completion *comp, long code) | |||
1141 | 1141 | ||
1142 | EXPORT_SYMBOL(complete_and_exit); | 1142 | EXPORT_SYMBOL(complete_and_exit); |
1143 | 1143 | ||
1144 | asmlinkage long sys_exit(int error_code) | 1144 | SYSCALL_DEFINE1(exit, int, error_code) |
1145 | { | 1145 | { |
1146 | do_exit((error_code&0xff)<<8); | 1146 | do_exit((error_code&0xff)<<8); |
1147 | } | 1147 | } |
@@ -1182,9 +1182,11 @@ do_group_exit(int exit_code) | |||
1182 | * wait4()-ing process will get the correct exit code - even if this | 1182 | * wait4()-ing process will get the correct exit code - even if this |
1183 | * thread is not the thread group leader. | 1183 | * thread is not the thread group leader. |
1184 | */ | 1184 | */ |
1185 | asmlinkage void sys_exit_group(int error_code) | 1185 | SYSCALL_DEFINE1(exit_group, int, error_code) |
1186 | { | 1186 | { |
1187 | do_group_exit((error_code & 0xff) << 8); | 1187 | do_group_exit((error_code & 0xff) << 8); |
1188 | /* NOTREACHED */ | ||
1189 | return 0; | ||
1188 | } | 1190 | } |
1189 | 1191 | ||
1190 | static struct pid *task_pid_type(struct task_struct *task, enum pid_type type) | 1192 | static struct pid *task_pid_type(struct task_struct *task, enum pid_type type) |
@@ -1752,9 +1754,8 @@ end: | |||
1752 | return retval; | 1754 | return retval; |
1753 | } | 1755 | } |
1754 | 1756 | ||
1755 | asmlinkage long sys_waitid(int which, pid_t upid, | 1757 | SYSCALL_DEFINE5(waitid, int, which, pid_t, upid, struct siginfo __user *, |
1756 | struct siginfo __user *infop, int options, | 1758 | infop, int, options, struct rusage __user *, ru) |
1757 | struct rusage __user *ru) | ||
1758 | { | 1759 | { |
1759 | struct pid *pid = NULL; | 1760 | struct pid *pid = NULL; |
1760 | enum pid_type type; | 1761 | enum pid_type type; |
@@ -1793,8 +1794,8 @@ asmlinkage long sys_waitid(int which, pid_t upid, | |||
1793 | return ret; | 1794 | return ret; |
1794 | } | 1795 | } |
1795 | 1796 | ||
1796 | asmlinkage long sys_wait4(pid_t upid, int __user *stat_addr, | 1797 | SYSCALL_DEFINE4(wait4, pid_t, upid, int __user *, stat_addr, |
1797 | int options, struct rusage __user *ru) | 1798 | int, options, struct rusage __user *, ru) |
1798 | { | 1799 | { |
1799 | struct pid *pid = NULL; | 1800 | struct pid *pid = NULL; |
1800 | enum pid_type type; | 1801 | enum pid_type type; |
@@ -1831,7 +1832,7 @@ asmlinkage long sys_wait4(pid_t upid, int __user *stat_addr, | |||
1831 | * sys_waitpid() remains for compatibility. waitpid() should be | 1832 | * sys_waitpid() remains for compatibility. waitpid() should be |
1832 | * implemented by calling sys_wait4() from libc.a. | 1833 | * implemented by calling sys_wait4() from libc.a. |
1833 | */ | 1834 | */ |
1834 | asmlinkage long sys_waitpid(pid_t pid, int __user *stat_addr, int options) | 1835 | SYSCALL_DEFINE3(waitpid, pid_t, pid, int __user *, stat_addr, int, options) |
1835 | { | 1836 | { |
1836 | return sys_wait4(pid, stat_addr, options, NULL); | 1837 | return sys_wait4(pid, stat_addr, options, NULL); |
1837 | } | 1838 | } |
diff --git a/kernel/fork.c b/kernel/fork.c index 1d68f1255dd8..bf0cef8bbdf2 100644 --- a/kernel/fork.c +++ b/kernel/fork.c | |||
@@ -901,7 +901,7 @@ static void copy_flags(unsigned long clone_flags, struct task_struct *p) | |||
901 | clear_freeze_flag(p); | 901 | clear_freeze_flag(p); |
902 | } | 902 | } |
903 | 903 | ||
904 | asmlinkage long sys_set_tid_address(int __user *tidptr) | 904 | SYSCALL_DEFINE1(set_tid_address, int __user *, tidptr) |
905 | { | 905 | { |
906 | current->clear_child_tid = tidptr; | 906 | current->clear_child_tid = tidptr; |
907 | 907 | ||
@@ -1603,7 +1603,7 @@ static int unshare_fd(unsigned long unshare_flags, struct files_struct **new_fdp | |||
1603 | * constructed. Here we are modifying the current, active, | 1603 | * constructed. Here we are modifying the current, active, |
1604 | * task_struct. | 1604 | * task_struct. |
1605 | */ | 1605 | */ |
1606 | asmlinkage long sys_unshare(unsigned long unshare_flags) | 1606 | SYSCALL_DEFINE1(unshare, unsigned long, unshare_flags) |
1607 | { | 1607 | { |
1608 | int err = 0; | 1608 | int err = 0; |
1609 | struct fs_struct *fs, *new_fs = NULL; | 1609 | struct fs_struct *fs, *new_fs = NULL; |
diff --git a/kernel/futex.c b/kernel/futex.c index 002aa189eb09..f89d373a9c6d 100644 --- a/kernel/futex.c +++ b/kernel/futex.c | |||
@@ -1733,9 +1733,8 @@ pi_faulted: | |||
1733 | * @head: pointer to the list-head | 1733 | * @head: pointer to the list-head |
1734 | * @len: length of the list-head, as userspace expects | 1734 | * @len: length of the list-head, as userspace expects |
1735 | */ | 1735 | */ |
1736 | asmlinkage long | 1736 | SYSCALL_DEFINE2(set_robust_list, struct robust_list_head __user *, head, |
1737 | sys_set_robust_list(struct robust_list_head __user *head, | 1737 | size_t, len) |
1738 | size_t len) | ||
1739 | { | 1738 | { |
1740 | if (!futex_cmpxchg_enabled) | 1739 | if (!futex_cmpxchg_enabled) |
1741 | return -ENOSYS; | 1740 | return -ENOSYS; |
@@ -1756,9 +1755,9 @@ sys_set_robust_list(struct robust_list_head __user *head, | |||
1756 | * @head_ptr: pointer to a list-head pointer, the kernel fills it in | 1755 | * @head_ptr: pointer to a list-head pointer, the kernel fills it in |
1757 | * @len_ptr: pointer to a length field, the kernel fills in the header size | 1756 | * @len_ptr: pointer to a length field, the kernel fills in the header size |
1758 | */ | 1757 | */ |
1759 | asmlinkage long | 1758 | SYSCALL_DEFINE3(get_robust_list, int, pid, |
1760 | sys_get_robust_list(int pid, struct robust_list_head __user * __user *head_ptr, | 1759 | struct robust_list_head __user * __user *, head_ptr, |
1761 | size_t __user *len_ptr) | 1760 | size_t __user *, len_ptr) |
1762 | { | 1761 | { |
1763 | struct robust_list_head __user *head; | 1762 | struct robust_list_head __user *head; |
1764 | unsigned long ret; | 1763 | unsigned long ret; |
@@ -1978,9 +1977,9 @@ long do_futex(u32 __user *uaddr, int op, u32 val, ktime_t *timeout, | |||
1978 | } | 1977 | } |
1979 | 1978 | ||
1980 | 1979 | ||
1981 | asmlinkage long sys_futex(u32 __user *uaddr, int op, u32 val, | 1980 | SYSCALL_DEFINE6(futex, u32 __user *, uaddr, int, op, u32, val, |
1982 | struct timespec __user *utime, u32 __user *uaddr2, | 1981 | struct timespec __user *, utime, u32 __user *, uaddr2, |
1983 | u32 val3) | 1982 | u32, val3) |
1984 | { | 1983 | { |
1985 | struct timespec ts; | 1984 | struct timespec ts; |
1986 | ktime_t t, *tp = NULL; | 1985 | ktime_t t, *tp = NULL; |
diff --git a/kernel/hrtimer.c b/kernel/hrtimer.c index 1455b7651b6b..2dc30c59c5fd 100644 --- a/kernel/hrtimer.c +++ b/kernel/hrtimer.c | |||
@@ -1467,8 +1467,8 @@ out: | |||
1467 | return ret; | 1467 | return ret; |
1468 | } | 1468 | } |
1469 | 1469 | ||
1470 | asmlinkage long | 1470 | SYSCALL_DEFINE2(nanosleep, struct timespec __user *, rqtp, |
1471 | sys_nanosleep(struct timespec __user *rqtp, struct timespec __user *rmtp) | 1471 | struct timespec __user *, rmtp) |
1472 | { | 1472 | { |
1473 | struct timespec tu; | 1473 | struct timespec tu; |
1474 | 1474 | ||
diff --git a/kernel/itimer.c b/kernel/itimer.c index db7c358b9a02..6a5fe93dd8bd 100644 --- a/kernel/itimer.c +++ b/kernel/itimer.c | |||
@@ -100,7 +100,7 @@ int do_getitimer(int which, struct itimerval *value) | |||
100 | return 0; | 100 | return 0; |
101 | } | 101 | } |
102 | 102 | ||
103 | asmlinkage long sys_getitimer(int which, struct itimerval __user *value) | 103 | SYSCALL_DEFINE2(getitimer, int, which, struct itimerval __user *, value) |
104 | { | 104 | { |
105 | int error = -EFAULT; | 105 | int error = -EFAULT; |
106 | struct itimerval get_buffer; | 106 | struct itimerval get_buffer; |
@@ -260,9 +260,8 @@ unsigned int alarm_setitimer(unsigned int seconds) | |||
260 | return it_old.it_value.tv_sec; | 260 | return it_old.it_value.tv_sec; |
261 | } | 261 | } |
262 | 262 | ||
263 | asmlinkage long sys_setitimer(int which, | 263 | SYSCALL_DEFINE3(setitimer, int, which, struct itimerval __user *, value, |
264 | struct itimerval __user *value, | 264 | struct itimerval __user *, ovalue) |
265 | struct itimerval __user *ovalue) | ||
266 | { | 265 | { |
267 | struct itimerval set_buffer, get_buffer; | 266 | struct itimerval set_buffer, get_buffer; |
268 | int error; | 267 | int error; |
diff --git a/kernel/kexec.c b/kernel/kexec.c index 3fb855ad6aa0..8a6d7b08864e 100644 --- a/kernel/kexec.c +++ b/kernel/kexec.c | |||
@@ -934,9 +934,8 @@ struct kimage *kexec_crash_image; | |||
934 | 934 | ||
935 | static DEFINE_MUTEX(kexec_mutex); | 935 | static DEFINE_MUTEX(kexec_mutex); |
936 | 936 | ||
937 | asmlinkage long sys_kexec_load(unsigned long entry, unsigned long nr_segments, | 937 | SYSCALL_DEFINE4(kexec_load, unsigned long, entry, unsigned long, nr_segments, |
938 | struct kexec_segment __user *segments, | 938 | struct kexec_segment __user *, segments, unsigned long, flags) |
939 | unsigned long flags) | ||
940 | { | 939 | { |
941 | struct kimage **dest_image, *image; | 940 | struct kimage **dest_image, *image; |
942 | int result; | 941 | int result; |
diff --git a/kernel/module.c b/kernel/module.c index c9332c90d5a0..e8b51d41dd72 100644 --- a/kernel/module.c +++ b/kernel/module.c | |||
@@ -743,8 +743,8 @@ static void wait_for_zero_refcount(struct module *mod) | |||
743 | mutex_lock(&module_mutex); | 743 | mutex_lock(&module_mutex); |
744 | } | 744 | } |
745 | 745 | ||
746 | asmlinkage long | 746 | SYSCALL_DEFINE2(delete_module, const char __user *, name_user, |
747 | sys_delete_module(const char __user *name_user, unsigned int flags) | 747 | unsigned int, flags) |
748 | { | 748 | { |
749 | struct module *mod; | 749 | struct module *mod; |
750 | char name[MODULE_NAME_LEN]; | 750 | char name[MODULE_NAME_LEN]; |
@@ -2296,10 +2296,8 @@ static noinline struct module *load_module(void __user *umod, | |||
2296 | } | 2296 | } |
2297 | 2297 | ||
2298 | /* This is where the real work happens */ | 2298 | /* This is where the real work happens */ |
2299 | asmlinkage long | 2299 | SYSCALL_DEFINE3(init_module, void __user *, umod, |
2300 | sys_init_module(void __user *umod, | 2300 | unsigned long, len, const char __user *, uargs) |
2301 | unsigned long len, | ||
2302 | const char __user *uargs) | ||
2303 | { | 2301 | { |
2304 | struct module *mod; | 2302 | struct module *mod; |
2305 | int ret = 0; | 2303 | int ret = 0; |
diff --git a/kernel/posix-timers.c b/kernel/posix-timers.c index 887c63787de6..052ec4d195c7 100644 --- a/kernel/posix-timers.c +++ b/kernel/posix-timers.c | |||
@@ -477,10 +477,9 @@ static void release_posix_timer(struct k_itimer *tmr, int it_id_set) | |||
477 | 477 | ||
478 | /* Create a POSIX.1b interval timer. */ | 478 | /* Create a POSIX.1b interval timer. */ |
479 | 479 | ||
480 | asmlinkage long | 480 | SYSCALL_DEFINE3(timer_create, const clockid_t, which_clock, |
481 | sys_timer_create(const clockid_t which_clock, | 481 | struct sigevent __user *, timer_event_spec, |
482 | struct sigevent __user *timer_event_spec, | 482 | timer_t __user *, created_timer_id) |
483 | timer_t __user * created_timer_id) | ||
484 | { | 483 | { |
485 | struct k_itimer *new_timer; | 484 | struct k_itimer *new_timer; |
486 | int error, new_timer_id; | 485 | int error, new_timer_id; |
@@ -661,8 +660,8 @@ common_timer_get(struct k_itimer *timr, struct itimerspec *cur_setting) | |||
661 | } | 660 | } |
662 | 661 | ||
663 | /* Get the time remaining on a POSIX.1b interval timer. */ | 662 | /* Get the time remaining on a POSIX.1b interval timer. */ |
664 | asmlinkage long | 663 | SYSCALL_DEFINE2(timer_gettime, timer_t, timer_id, |
665 | sys_timer_gettime(timer_t timer_id, struct itimerspec __user *setting) | 664 | struct itimerspec __user *, setting) |
666 | { | 665 | { |
667 | struct k_itimer *timr; | 666 | struct k_itimer *timr; |
668 | struct itimerspec cur_setting; | 667 | struct itimerspec cur_setting; |
@@ -691,8 +690,7 @@ sys_timer_gettime(timer_t timer_id, struct itimerspec __user *setting) | |||
691 | * the call back to do_schedule_next_timer(). So all we need to do is | 690 | * the call back to do_schedule_next_timer(). So all we need to do is |
692 | * to pick up the frozen overrun. | 691 | * to pick up the frozen overrun. |
693 | */ | 692 | */ |
694 | asmlinkage long | 693 | SYSCALL_DEFINE1(timer_getoverrun, timer_t, timer_id) |
695 | sys_timer_getoverrun(timer_t timer_id) | ||
696 | { | 694 | { |
697 | struct k_itimer *timr; | 695 | struct k_itimer *timr; |
698 | int overrun; | 696 | int overrun; |
@@ -760,10 +758,9 @@ common_timer_set(struct k_itimer *timr, int flags, | |||
760 | } | 758 | } |
761 | 759 | ||
762 | /* Set a POSIX.1b interval timer */ | 760 | /* Set a POSIX.1b interval timer */ |
763 | asmlinkage long | 761 | SYSCALL_DEFINE4(timer_settime, timer_t, timer_id, int, flags, |
764 | sys_timer_settime(timer_t timer_id, int flags, | 762 | const struct itimerspec __user *, new_setting, |
765 | const struct itimerspec __user *new_setting, | 763 | struct itimerspec __user *, old_setting) |
766 | struct itimerspec __user *old_setting) | ||
767 | { | 764 | { |
768 | struct k_itimer *timr; | 765 | struct k_itimer *timr; |
769 | struct itimerspec new_spec, old_spec; | 766 | struct itimerspec new_spec, old_spec; |
@@ -816,8 +813,7 @@ static inline int timer_delete_hook(struct k_itimer *timer) | |||
816 | } | 813 | } |
817 | 814 | ||
818 | /* Delete a POSIX.1b interval timer. */ | 815 | /* Delete a POSIX.1b interval timer. */ |
819 | asmlinkage long | 816 | SYSCALL_DEFINE1(timer_delete, timer_t, timer_id) |
820 | sys_timer_delete(timer_t timer_id) | ||
821 | { | 817 | { |
822 | struct k_itimer *timer; | 818 | struct k_itimer *timer; |
823 | unsigned long flags; | 819 | unsigned long flags; |
@@ -903,8 +899,8 @@ int do_posix_clock_nonanosleep(const clockid_t clock, int flags, | |||
903 | } | 899 | } |
904 | EXPORT_SYMBOL_GPL(do_posix_clock_nonanosleep); | 900 | EXPORT_SYMBOL_GPL(do_posix_clock_nonanosleep); |
905 | 901 | ||
906 | asmlinkage long sys_clock_settime(const clockid_t which_clock, | 902 | SYSCALL_DEFINE2(clock_settime, const clockid_t, which_clock, |
907 | const struct timespec __user *tp) | 903 | const struct timespec __user *, tp) |
908 | { | 904 | { |
909 | struct timespec new_tp; | 905 | struct timespec new_tp; |
910 | 906 | ||
@@ -916,8 +912,8 @@ asmlinkage long sys_clock_settime(const clockid_t which_clock, | |||
916 | return CLOCK_DISPATCH(which_clock, clock_set, (which_clock, &new_tp)); | 912 | return CLOCK_DISPATCH(which_clock, clock_set, (which_clock, &new_tp)); |
917 | } | 913 | } |
918 | 914 | ||
919 | asmlinkage long | 915 | SYSCALL_DEFINE2(clock_gettime, const clockid_t, which_clock, |
920 | sys_clock_gettime(const clockid_t which_clock, struct timespec __user *tp) | 916 | struct timespec __user *,tp) |
921 | { | 917 | { |
922 | struct timespec kernel_tp; | 918 | struct timespec kernel_tp; |
923 | int error; | 919 | int error; |
@@ -933,8 +929,8 @@ sys_clock_gettime(const clockid_t which_clock, struct timespec __user *tp) | |||
933 | 929 | ||
934 | } | 930 | } |
935 | 931 | ||
936 | asmlinkage long | 932 | SYSCALL_DEFINE2(clock_getres, const clockid_t, which_clock, |
937 | sys_clock_getres(const clockid_t which_clock, struct timespec __user *tp) | 933 | struct timespec __user *, tp) |
938 | { | 934 | { |
939 | struct timespec rtn_tp; | 935 | struct timespec rtn_tp; |
940 | int error; | 936 | int error; |
@@ -963,10 +959,9 @@ static int common_nsleep(const clockid_t which_clock, int flags, | |||
963 | which_clock); | 959 | which_clock); |
964 | } | 960 | } |
965 | 961 | ||
966 | asmlinkage long | 962 | SYSCALL_DEFINE4(clock_nanosleep, const clockid_t, which_clock, int, flags, |
967 | sys_clock_nanosleep(const clockid_t which_clock, int flags, | 963 | const struct timespec __user *, rqtp, |
968 | const struct timespec __user *rqtp, | 964 | struct timespec __user *, rmtp) |
969 | struct timespec __user *rmtp) | ||
970 | { | 965 | { |
971 | struct timespec t; | 966 | struct timespec t; |
972 | 967 | ||
diff --git a/kernel/printk.c b/kernel/printk.c index 7015733793e8..69188f226a93 100644 --- a/kernel/printk.c +++ b/kernel/printk.c | |||
@@ -382,7 +382,7 @@ out: | |||
382 | return error; | 382 | return error; |
383 | } | 383 | } |
384 | 384 | ||
385 | asmlinkage long sys_syslog(int type, char __user *buf, int len) | 385 | SYSCALL_DEFINE3(syslog, int, type, char __user *, buf, int, len) |
386 | { | 386 | { |
387 | return do_syslog(type, buf, len); | 387 | return do_syslog(type, buf, len); |
388 | } | 388 | } |
@@ -742,11 +742,6 @@ EXPORT_SYMBOL(vprintk); | |||
742 | 742 | ||
743 | #else | 743 | #else |
744 | 744 | ||
745 | asmlinkage long sys_syslog(int type, char __user *buf, int len) | ||
746 | { | ||
747 | return -ENOSYS; | ||
748 | } | ||
749 | |||
750 | static void call_console_drivers(unsigned start, unsigned end) | 745 | static void call_console_drivers(unsigned start, unsigned end) |
751 | { | 746 | { |
752 | } | 747 | } |
diff --git a/kernel/ptrace.c b/kernel/ptrace.c index 29dc700e198c..c9cf48b21f05 100644 --- a/kernel/ptrace.c +++ b/kernel/ptrace.c | |||
@@ -574,7 +574,7 @@ struct task_struct *ptrace_get_task_struct(pid_t pid) | |||
574 | #define arch_ptrace_attach(child) do { } while (0) | 574 | #define arch_ptrace_attach(child) do { } while (0) |
575 | #endif | 575 | #endif |
576 | 576 | ||
577 | asmlinkage long sys_ptrace(long request, long pid, long addr, long data) | 577 | SYSCALL_DEFINE4(ptrace, long, request, long, pid, long, addr, long, data) |
578 | { | 578 | { |
579 | struct task_struct *child; | 579 | struct task_struct *child; |
580 | long ret; | 580 | long ret; |
diff --git a/kernel/sched.c b/kernel/sched.c index 8be2c13b50d0..eb1931eef587 100644 --- a/kernel/sched.c +++ b/kernel/sched.c | |||
@@ -5126,7 +5126,7 @@ int can_nice(const struct task_struct *p, const int nice) | |||
5126 | * sys_setpriority is a more generic, but much slower function that | 5126 | * sys_setpriority is a more generic, but much slower function that |
5127 | * does similar things. | 5127 | * does similar things. |
5128 | */ | 5128 | */ |
5129 | asmlinkage long sys_nice(int increment) | 5129 | SYSCALL_DEFINE1(nice, int, increment) |
5130 | { | 5130 | { |
5131 | long nice, retval; | 5131 | long nice, retval; |
5132 | 5132 | ||
@@ -5433,8 +5433,8 @@ do_sched_setscheduler(pid_t pid, int policy, struct sched_param __user *param) | |||
5433 | * @policy: new policy. | 5433 | * @policy: new policy. |
5434 | * @param: structure containing the new RT priority. | 5434 | * @param: structure containing the new RT priority. |
5435 | */ | 5435 | */ |
5436 | asmlinkage long | 5436 | SYSCALL_DEFINE3(sched_setscheduler, pid_t, pid, int, policy, |
5437 | sys_sched_setscheduler(pid_t pid, int policy, struct sched_param __user *param) | 5437 | struct sched_param __user *, param) |
5438 | { | 5438 | { |
5439 | /* negative values for policy are not valid */ | 5439 | /* negative values for policy are not valid */ |
5440 | if (policy < 0) | 5440 | if (policy < 0) |
@@ -5448,7 +5448,7 @@ sys_sched_setscheduler(pid_t pid, int policy, struct sched_param __user *param) | |||
5448 | * @pid: the pid in question. | 5448 | * @pid: the pid in question. |
5449 | * @param: structure containing the new RT priority. | 5449 | * @param: structure containing the new RT priority. |
5450 | */ | 5450 | */ |
5451 | asmlinkage long sys_sched_setparam(pid_t pid, struct sched_param __user *param) | 5451 | SYSCALL_DEFINE2(sched_setparam, pid_t, pid, struct sched_param __user *, param) |
5452 | { | 5452 | { |
5453 | return do_sched_setscheduler(pid, -1, param); | 5453 | return do_sched_setscheduler(pid, -1, param); |
5454 | } | 5454 | } |
@@ -5457,7 +5457,7 @@ asmlinkage long sys_sched_setparam(pid_t pid, struct sched_param __user *param) | |||
5457 | * sys_sched_getscheduler - get the policy (scheduling class) of a thread | 5457 | * sys_sched_getscheduler - get the policy (scheduling class) of a thread |
5458 | * @pid: the pid in question. | 5458 | * @pid: the pid in question. |
5459 | */ | 5459 | */ |
5460 | asmlinkage long sys_sched_getscheduler(pid_t pid) | 5460 | SYSCALL_DEFINE1(sched_getscheduler, pid_t, pid) |
5461 | { | 5461 | { |
5462 | struct task_struct *p; | 5462 | struct task_struct *p; |
5463 | int retval; | 5463 | int retval; |
@@ -5482,7 +5482,7 @@ asmlinkage long sys_sched_getscheduler(pid_t pid) | |||
5482 | * @pid: the pid in question. | 5482 | * @pid: the pid in question. |
5483 | * @param: structure containing the RT priority. | 5483 | * @param: structure containing the RT priority. |
5484 | */ | 5484 | */ |
5485 | asmlinkage long sys_sched_getparam(pid_t pid, struct sched_param __user *param) | 5485 | SYSCALL_DEFINE2(sched_getparam, pid_t, pid, struct sched_param __user *, param) |
5486 | { | 5486 | { |
5487 | struct sched_param lp; | 5487 | struct sched_param lp; |
5488 | struct task_struct *p; | 5488 | struct task_struct *p; |
@@ -5600,8 +5600,8 @@ static int get_user_cpu_mask(unsigned long __user *user_mask_ptr, unsigned len, | |||
5600 | * @len: length in bytes of the bitmask pointed to by user_mask_ptr | 5600 | * @len: length in bytes of the bitmask pointed to by user_mask_ptr |
5601 | * @user_mask_ptr: user-space pointer to the new cpu mask | 5601 | * @user_mask_ptr: user-space pointer to the new cpu mask |
5602 | */ | 5602 | */ |
5603 | asmlinkage long sys_sched_setaffinity(pid_t pid, unsigned int len, | 5603 | SYSCALL_DEFINE3(sched_setaffinity, pid_t, pid, unsigned int, len, |
5604 | unsigned long __user *user_mask_ptr) | 5604 | unsigned long __user *, user_mask_ptr) |
5605 | { | 5605 | { |
5606 | cpumask_var_t new_mask; | 5606 | cpumask_var_t new_mask; |
5607 | int retval; | 5607 | int retval; |
@@ -5648,8 +5648,8 @@ out_unlock: | |||
5648 | * @len: length in bytes of the bitmask pointed to by user_mask_ptr | 5648 | * @len: length in bytes of the bitmask pointed to by user_mask_ptr |
5649 | * @user_mask_ptr: user-space pointer to hold the current cpu mask | 5649 | * @user_mask_ptr: user-space pointer to hold the current cpu mask |
5650 | */ | 5650 | */ |
5651 | asmlinkage long sys_sched_getaffinity(pid_t pid, unsigned int len, | 5651 | SYSCALL_DEFINE3(sched_getaffinity, pid_t, pid, unsigned int, len, |
5652 | unsigned long __user *user_mask_ptr) | 5652 | unsigned long __user *, user_mask_ptr) |
5653 | { | 5653 | { |
5654 | int ret; | 5654 | int ret; |
5655 | cpumask_var_t mask; | 5655 | cpumask_var_t mask; |
@@ -5678,7 +5678,7 @@ asmlinkage long sys_sched_getaffinity(pid_t pid, unsigned int len, | |||
5678 | * This function yields the current CPU to other tasks. If there are no | 5678 | * This function yields the current CPU to other tasks. If there are no |
5679 | * other threads running on this CPU then this function will return. | 5679 | * other threads running on this CPU then this function will return. |
5680 | */ | 5680 | */ |
5681 | asmlinkage long sys_sched_yield(void) | 5681 | SYSCALL_DEFINE0(sched_yield) |
5682 | { | 5682 | { |
5683 | struct rq *rq = this_rq_lock(); | 5683 | struct rq *rq = this_rq_lock(); |
5684 | 5684 | ||
@@ -5819,7 +5819,7 @@ long __sched io_schedule_timeout(long timeout) | |||
5819 | * this syscall returns the maximum rt_priority that can be used | 5819 | * this syscall returns the maximum rt_priority that can be used |
5820 | * by a given scheduling class. | 5820 | * by a given scheduling class. |
5821 | */ | 5821 | */ |
5822 | asmlinkage long sys_sched_get_priority_max(int policy) | 5822 | SYSCALL_DEFINE1(sched_get_priority_max, int, policy) |
5823 | { | 5823 | { |
5824 | int ret = -EINVAL; | 5824 | int ret = -EINVAL; |
5825 | 5825 | ||
@@ -5844,7 +5844,7 @@ asmlinkage long sys_sched_get_priority_max(int policy) | |||
5844 | * this syscall returns the minimum rt_priority that can be used | 5844 | * this syscall returns the minimum rt_priority that can be used |
5845 | * by a given scheduling class. | 5845 | * by a given scheduling class. |
5846 | */ | 5846 | */ |
5847 | asmlinkage long sys_sched_get_priority_min(int policy) | 5847 | SYSCALL_DEFINE1(sched_get_priority_min, int, policy) |
5848 | { | 5848 | { |
5849 | int ret = -EINVAL; | 5849 | int ret = -EINVAL; |
5850 | 5850 | ||
@@ -5869,8 +5869,8 @@ asmlinkage long sys_sched_get_priority_min(int policy) | |||
5869 | * this syscall writes the default timeslice value of a given process | 5869 | * this syscall writes the default timeslice value of a given process |
5870 | * into the user-space timespec buffer. A value of '0' means infinity. | 5870 | * into the user-space timespec buffer. A value of '0' means infinity. |
5871 | */ | 5871 | */ |
5872 | asmlinkage | 5872 | SYSCALL_DEFINE2(sched_rr_get_interval, pid_t, pid, |
5873 | long sys_sched_rr_get_interval(pid_t pid, struct timespec __user *interval) | 5873 | struct timespec __user *, interval) |
5874 | { | 5874 | { |
5875 | struct task_struct *p; | 5875 | struct task_struct *p; |
5876 | unsigned int time_slice; | 5876 | unsigned int time_slice; |
diff --git a/kernel/signal.c b/kernel/signal.c index 3152ac3b62e2..e73759783dc8 100644 --- a/kernel/signal.c +++ b/kernel/signal.c | |||
@@ -1961,7 +1961,7 @@ EXPORT_SYMBOL(unblock_all_signals); | |||
1961 | * System call entry points. | 1961 | * System call entry points. |
1962 | */ | 1962 | */ |
1963 | 1963 | ||
1964 | asmlinkage long sys_restart_syscall(void) | 1964 | SYSCALL_DEFINE0(restart_syscall) |
1965 | { | 1965 | { |
1966 | struct restart_block *restart = ¤t_thread_info()->restart_block; | 1966 | struct restart_block *restart = ¤t_thread_info()->restart_block; |
1967 | return restart->fn(restart); | 1967 | return restart->fn(restart); |
@@ -2014,8 +2014,8 @@ int sigprocmask(int how, sigset_t *set, sigset_t *oldset) | |||
2014 | return error; | 2014 | return error; |
2015 | } | 2015 | } |
2016 | 2016 | ||
2017 | asmlinkage long | 2017 | SYSCALL_DEFINE4(rt_sigprocmask, int, how, sigset_t __user *, set, |
2018 | sys_rt_sigprocmask(int how, sigset_t __user *set, sigset_t __user *oset, size_t sigsetsize) | 2018 | sigset_t __user *, oset, size_t, sigsetsize) |
2019 | { | 2019 | { |
2020 | int error = -EINVAL; | 2020 | int error = -EINVAL; |
2021 | sigset_t old_set, new_set; | 2021 | sigset_t old_set, new_set; |
@@ -2074,8 +2074,7 @@ out: | |||
2074 | return error; | 2074 | return error; |
2075 | } | 2075 | } |
2076 | 2076 | ||
2077 | asmlinkage long | 2077 | SYSCALL_DEFINE2(rt_sigpending, sigset_t __user *, set, size_t, sigsetsize) |
2078 | sys_rt_sigpending(sigset_t __user *set, size_t sigsetsize) | ||
2079 | { | 2078 | { |
2080 | return do_sigpending(set, sigsetsize); | 2079 | return do_sigpending(set, sigsetsize); |
2081 | } | 2080 | } |
@@ -2146,11 +2145,9 @@ int copy_siginfo_to_user(siginfo_t __user *to, siginfo_t *from) | |||
2146 | 2145 | ||
2147 | #endif | 2146 | #endif |
2148 | 2147 | ||
2149 | asmlinkage long | 2148 | SYSCALL_DEFINE4(rt_sigtimedwait, const sigset_t __user *, uthese, |
2150 | sys_rt_sigtimedwait(const sigset_t __user *uthese, | 2149 | siginfo_t __user *, uinfo, const struct timespec __user *, uts, |
2151 | siginfo_t __user *uinfo, | 2150 | size_t, sigsetsize) |
2152 | const struct timespec __user *uts, | ||
2153 | size_t sigsetsize) | ||
2154 | { | 2151 | { |
2155 | int ret, sig; | 2152 | int ret, sig; |
2156 | sigset_t these; | 2153 | sigset_t these; |
@@ -2223,8 +2220,7 @@ sys_rt_sigtimedwait(const sigset_t __user *uthese, | |||
2223 | return ret; | 2220 | return ret; |
2224 | } | 2221 | } |
2225 | 2222 | ||
2226 | asmlinkage long | 2223 | SYSCALL_DEFINE2(kill, pid_t, pid, int, sig) |
2227 | sys_kill(pid_t pid, int sig) | ||
2228 | { | 2224 | { |
2229 | struct siginfo info; | 2225 | struct siginfo info; |
2230 | 2226 | ||
@@ -2283,7 +2279,7 @@ static int do_tkill(pid_t tgid, pid_t pid, int sig) | |||
2283 | * exists but it's not belonging to the target process anymore. This | 2279 | * exists but it's not belonging to the target process anymore. This |
2284 | * method solves the problem of threads exiting and PIDs getting reused. | 2280 | * method solves the problem of threads exiting and PIDs getting reused. |
2285 | */ | 2281 | */ |
2286 | asmlinkage long sys_tgkill(pid_t tgid, pid_t pid, int sig) | 2282 | SYSCALL_DEFINE3(tgkill, pid_t, tgid, pid_t, pid, int, sig) |
2287 | { | 2283 | { |
2288 | /* This is only valid for single tasks */ | 2284 | /* This is only valid for single tasks */ |
2289 | if (pid <= 0 || tgid <= 0) | 2285 | if (pid <= 0 || tgid <= 0) |
@@ -2295,8 +2291,7 @@ asmlinkage long sys_tgkill(pid_t tgid, pid_t pid, int sig) | |||
2295 | /* | 2291 | /* |
2296 | * Send a signal to only one task, even if it's a CLONE_THREAD task. | 2292 | * Send a signal to only one task, even if it's a CLONE_THREAD task. |
2297 | */ | 2293 | */ |
2298 | asmlinkage long | 2294 | SYSCALL_DEFINE2(tkill, pid_t, pid, int, sig) |
2299 | sys_tkill(pid_t pid, int sig) | ||
2300 | { | 2295 | { |
2301 | /* This is only valid for single tasks */ | 2296 | /* This is only valid for single tasks */ |
2302 | if (pid <= 0) | 2297 | if (pid <= 0) |
@@ -2305,8 +2300,8 @@ sys_tkill(pid_t pid, int sig) | |||
2305 | return do_tkill(0, pid, sig); | 2300 | return do_tkill(0, pid, sig); |
2306 | } | 2301 | } |
2307 | 2302 | ||
2308 | asmlinkage long | 2303 | SYSCALL_DEFINE3(rt_sigqueueinfo, pid_t, pid, int, sig, |
2309 | sys_rt_sigqueueinfo(pid_t pid, int sig, siginfo_t __user *uinfo) | 2304 | siginfo_t __user *, uinfo) |
2310 | { | 2305 | { |
2311 | siginfo_t info; | 2306 | siginfo_t info; |
2312 | 2307 | ||
@@ -2434,8 +2429,7 @@ out: | |||
2434 | 2429 | ||
2435 | #ifdef __ARCH_WANT_SYS_SIGPENDING | 2430 | #ifdef __ARCH_WANT_SYS_SIGPENDING |
2436 | 2431 | ||
2437 | asmlinkage long | 2432 | SYSCALL_DEFINE1(sigpending, old_sigset_t __user *, set) |
2438 | sys_sigpending(old_sigset_t __user *set) | ||
2439 | { | 2433 | { |
2440 | return do_sigpending(set, sizeof(*set)); | 2434 | return do_sigpending(set, sizeof(*set)); |
2441 | } | 2435 | } |
@@ -2446,8 +2440,8 @@ sys_sigpending(old_sigset_t __user *set) | |||
2446 | /* Some platforms have their own version with special arguments others | 2440 | /* Some platforms have their own version with special arguments others |
2447 | support only sys_rt_sigprocmask. */ | 2441 | support only sys_rt_sigprocmask. */ |
2448 | 2442 | ||
2449 | asmlinkage long | 2443 | SYSCALL_DEFINE3(sigprocmask, int, how, old_sigset_t __user *, set, |
2450 | sys_sigprocmask(int how, old_sigset_t __user *set, old_sigset_t __user *oset) | 2444 | old_sigset_t __user *, oset) |
2451 | { | 2445 | { |
2452 | int error; | 2446 | int error; |
2453 | old_sigset_t old_set, new_set; | 2447 | old_sigset_t old_set, new_set; |
@@ -2497,11 +2491,10 @@ out: | |||
2497 | #endif /* __ARCH_WANT_SYS_SIGPROCMASK */ | 2491 | #endif /* __ARCH_WANT_SYS_SIGPROCMASK */ |
2498 | 2492 | ||
2499 | #ifdef __ARCH_WANT_SYS_RT_SIGACTION | 2493 | #ifdef __ARCH_WANT_SYS_RT_SIGACTION |
2500 | asmlinkage long | 2494 | SYSCALL_DEFINE4(rt_sigaction, int, sig, |
2501 | sys_rt_sigaction(int sig, | 2495 | const struct sigaction __user *, act, |
2502 | const struct sigaction __user *act, | 2496 | struct sigaction __user *, oact, |
2503 | struct sigaction __user *oact, | 2497 | size_t, sigsetsize) |
2504 | size_t sigsetsize) | ||
2505 | { | 2498 | { |
2506 | struct k_sigaction new_sa, old_sa; | 2499 | struct k_sigaction new_sa, old_sa; |
2507 | int ret = -EINVAL; | 2500 | int ret = -EINVAL; |
@@ -2531,15 +2524,13 @@ out: | |||
2531 | /* | 2524 | /* |
2532 | * For backwards compatibility. Functionality superseded by sigprocmask. | 2525 | * For backwards compatibility. Functionality superseded by sigprocmask. |
2533 | */ | 2526 | */ |
2534 | asmlinkage long | 2527 | SYSCALL_DEFINE0(sgetmask) |
2535 | sys_sgetmask(void) | ||
2536 | { | 2528 | { |
2537 | /* SMP safe */ | 2529 | /* SMP safe */ |
2538 | return current->blocked.sig[0]; | 2530 | return current->blocked.sig[0]; |
2539 | } | 2531 | } |
2540 | 2532 | ||
2541 | asmlinkage long | 2533 | SYSCALL_DEFINE1(ssetmask, int, newmask) |
2542 | sys_ssetmask(int newmask) | ||
2543 | { | 2534 | { |
2544 | int old; | 2535 | int old; |
2545 | 2536 | ||
@@ -2559,8 +2550,7 @@ sys_ssetmask(int newmask) | |||
2559 | /* | 2550 | /* |
2560 | * For backwards compatibility. Functionality superseded by sigaction. | 2551 | * For backwards compatibility. Functionality superseded by sigaction. |
2561 | */ | 2552 | */ |
2562 | asmlinkage unsigned long | 2553 | SYSCALL_DEFINE2(signal, int, sig, __sighandler_t, handler) |
2563 | sys_signal(int sig, __sighandler_t handler) | ||
2564 | { | 2554 | { |
2565 | struct k_sigaction new_sa, old_sa; | 2555 | struct k_sigaction new_sa, old_sa; |
2566 | int ret; | 2556 | int ret; |
@@ -2577,8 +2567,7 @@ sys_signal(int sig, __sighandler_t handler) | |||
2577 | 2567 | ||
2578 | #ifdef __ARCH_WANT_SYS_PAUSE | 2568 | #ifdef __ARCH_WANT_SYS_PAUSE |
2579 | 2569 | ||
2580 | asmlinkage long | 2570 | SYSCALL_DEFINE0(pause) |
2581 | sys_pause(void) | ||
2582 | { | 2571 | { |
2583 | current->state = TASK_INTERRUPTIBLE; | 2572 | current->state = TASK_INTERRUPTIBLE; |
2584 | schedule(); | 2573 | schedule(); |
@@ -2588,7 +2577,7 @@ sys_pause(void) | |||
2588 | #endif | 2577 | #endif |
2589 | 2578 | ||
2590 | #ifdef __ARCH_WANT_SYS_RT_SIGSUSPEND | 2579 | #ifdef __ARCH_WANT_SYS_RT_SIGSUSPEND |
2591 | asmlinkage long sys_rt_sigsuspend(sigset_t __user *unewset, size_t sigsetsize) | 2580 | SYSCALL_DEFINE2(rt_sigsuspend, sigset_t __user *, unewset, size_t, sigsetsize) |
2592 | { | 2581 | { |
2593 | sigset_t newset; | 2582 | sigset_t newset; |
2594 | 2583 | ||
diff --git a/kernel/sys.c b/kernel/sys.c index 763c3c17ded3..e7dc0e10a485 100644 --- a/kernel/sys.c +++ b/kernel/sys.c | |||
@@ -143,7 +143,7 @@ out: | |||
143 | return error; | 143 | return error; |
144 | } | 144 | } |
145 | 145 | ||
146 | asmlinkage long sys_setpriority(int which, int who, int niceval) | 146 | SYSCALL_DEFINE3(setpriority, int, which, int, who, int, niceval) |
147 | { | 147 | { |
148 | struct task_struct *g, *p; | 148 | struct task_struct *g, *p; |
149 | struct user_struct *user; | 149 | struct user_struct *user; |
@@ -208,7 +208,7 @@ out: | |||
208 | * has been offset by 20 (ie it returns 40..1 instead of -20..19) | 208 | * has been offset by 20 (ie it returns 40..1 instead of -20..19) |
209 | * to stay compatible. | 209 | * to stay compatible. |
210 | */ | 210 | */ |
211 | asmlinkage long sys_getpriority(int which, int who) | 211 | SYSCALL_DEFINE2(getpriority, int, which, int, who) |
212 | { | 212 | { |
213 | struct task_struct *g, *p; | 213 | struct task_struct *g, *p; |
214 | struct user_struct *user; | 214 | struct user_struct *user; |
@@ -355,7 +355,8 @@ EXPORT_SYMBOL_GPL(kernel_power_off); | |||
355 | * | 355 | * |
356 | * reboot doesn't sync: do that yourself before calling this. | 356 | * reboot doesn't sync: do that yourself before calling this. |
357 | */ | 357 | */ |
358 | asmlinkage long sys_reboot(int magic1, int magic2, unsigned int cmd, void __user * arg) | 358 | SYSCALL_DEFINE4(reboot, int, magic1, int, magic2, unsigned int, cmd, |
359 | void __user *, arg) | ||
359 | { | 360 | { |
360 | char buffer[256]; | 361 | char buffer[256]; |
361 | 362 | ||
@@ -478,7 +479,7 @@ void ctrl_alt_del(void) | |||
478 | * SMP: There are not races, the GIDs are checked only by filesystem | 479 | * SMP: There are not races, the GIDs are checked only by filesystem |
479 | * operations (as far as semantic preservation is concerned). | 480 | * operations (as far as semantic preservation is concerned). |
480 | */ | 481 | */ |
481 | asmlinkage long sys_setregid(gid_t rgid, gid_t egid) | 482 | SYSCALL_DEFINE2(setregid, gid_t, rgid, gid_t, egid) |
482 | { | 483 | { |
483 | const struct cred *old; | 484 | const struct cred *old; |
484 | struct cred *new; | 485 | struct cred *new; |
@@ -529,7 +530,7 @@ error: | |||
529 | * | 530 | * |
530 | * SMP: Same implicit races as above. | 531 | * SMP: Same implicit races as above. |
531 | */ | 532 | */ |
532 | asmlinkage long sys_setgid(gid_t gid) | 533 | SYSCALL_DEFINE1(setgid, gid_t, gid) |
533 | { | 534 | { |
534 | const struct cred *old; | 535 | const struct cred *old; |
535 | struct cred *new; | 536 | struct cred *new; |
@@ -597,7 +598,7 @@ static int set_user(struct cred *new) | |||
597 | * 100% compatible with BSD. A program which uses just setuid() will be | 598 | * 100% compatible with BSD. A program which uses just setuid() will be |
598 | * 100% compatible with POSIX with saved IDs. | 599 | * 100% compatible with POSIX with saved IDs. |
599 | */ | 600 | */ |
600 | asmlinkage long sys_setreuid(uid_t ruid, uid_t euid) | 601 | SYSCALL_DEFINE2(setreuid, uid_t, ruid, uid_t, euid) |
601 | { | 602 | { |
602 | const struct cred *old; | 603 | const struct cred *old; |
603 | struct cred *new; | 604 | struct cred *new; |
@@ -661,7 +662,7 @@ error: | |||
661 | * will allow a root program to temporarily drop privileges and be able to | 662 | * will allow a root program to temporarily drop privileges and be able to |
662 | * regain them by swapping the real and effective uid. | 663 | * regain them by swapping the real and effective uid. |
663 | */ | 664 | */ |
664 | asmlinkage long sys_setuid(uid_t uid) | 665 | SYSCALL_DEFINE1(setuid, uid_t, uid) |
665 | { | 666 | { |
666 | const struct cred *old; | 667 | const struct cred *old; |
667 | struct cred *new; | 668 | struct cred *new; |
@@ -705,7 +706,7 @@ error: | |||
705 | * This function implements a generic ability to update ruid, euid, | 706 | * This function implements a generic ability to update ruid, euid, |
706 | * and suid. This allows you to implement the 4.4 compatible seteuid(). | 707 | * and suid. This allows you to implement the 4.4 compatible seteuid(). |
707 | */ | 708 | */ |
708 | asmlinkage long sys_setresuid(uid_t ruid, uid_t euid, uid_t suid) | 709 | SYSCALL_DEFINE3(setresuid, uid_t, ruid, uid_t, euid, uid_t, suid) |
709 | { | 710 | { |
710 | const struct cred *old; | 711 | const struct cred *old; |
711 | struct cred *new; | 712 | struct cred *new; |
@@ -756,7 +757,7 @@ error: | |||
756 | return retval; | 757 | return retval; |
757 | } | 758 | } |
758 | 759 | ||
759 | asmlinkage long sys_getresuid(uid_t __user *ruid, uid_t __user *euid, uid_t __user *suid) | 760 | SYSCALL_DEFINE3(getresuid, uid_t __user *, ruid, uid_t __user *, euid, uid_t __user *, suid) |
760 | { | 761 | { |
761 | const struct cred *cred = current_cred(); | 762 | const struct cred *cred = current_cred(); |
762 | int retval; | 763 | int retval; |
@@ -771,7 +772,7 @@ asmlinkage long sys_getresuid(uid_t __user *ruid, uid_t __user *euid, uid_t __us | |||
771 | /* | 772 | /* |
772 | * Same as above, but for rgid, egid, sgid. | 773 | * Same as above, but for rgid, egid, sgid. |
773 | */ | 774 | */ |
774 | asmlinkage long sys_setresgid(gid_t rgid, gid_t egid, gid_t sgid) | 775 | SYSCALL_DEFINE3(setresgid, gid_t, rgid, gid_t, egid, gid_t, sgid) |
775 | { | 776 | { |
776 | const struct cred *old; | 777 | const struct cred *old; |
777 | struct cred *new; | 778 | struct cred *new; |
@@ -814,7 +815,7 @@ error: | |||
814 | return retval; | 815 | return retval; |
815 | } | 816 | } |
816 | 817 | ||
817 | asmlinkage long sys_getresgid(gid_t __user *rgid, gid_t __user *egid, gid_t __user *sgid) | 818 | SYSCALL_DEFINE3(getresgid, gid_t __user *, rgid, gid_t __user *, egid, gid_t __user *, sgid) |
818 | { | 819 | { |
819 | const struct cred *cred = current_cred(); | 820 | const struct cred *cred = current_cred(); |
820 | int retval; | 821 | int retval; |
@@ -833,7 +834,7 @@ asmlinkage long sys_getresgid(gid_t __user *rgid, gid_t __user *egid, gid_t __us | |||
833 | * whatever uid it wants to). It normally shadows "euid", except when | 834 | * whatever uid it wants to). It normally shadows "euid", except when |
834 | * explicitly set by setfsuid() or for access.. | 835 | * explicitly set by setfsuid() or for access.. |
835 | */ | 836 | */ |
836 | asmlinkage long sys_setfsuid(uid_t uid) | 837 | SYSCALL_DEFINE1(setfsuid, uid_t, uid) |
837 | { | 838 | { |
838 | const struct cred *old; | 839 | const struct cred *old; |
839 | struct cred *new; | 840 | struct cred *new; |
@@ -870,7 +871,7 @@ change_okay: | |||
870 | /* | 871 | /* |
871 | * Samma på svenska.. | 872 | * Samma på svenska.. |
872 | */ | 873 | */ |
873 | asmlinkage long sys_setfsgid(gid_t gid) | 874 | SYSCALL_DEFINE1(setfsgid, gid_t, gid) |
874 | { | 875 | { |
875 | const struct cred *old; | 876 | const struct cred *old; |
876 | struct cred *new; | 877 | struct cred *new; |
@@ -919,7 +920,7 @@ void do_sys_times(struct tms *tms) | |||
919 | tms->tms_cstime = cputime_to_clock_t(cstime); | 920 | tms->tms_cstime = cputime_to_clock_t(cstime); |
920 | } | 921 | } |
921 | 922 | ||
922 | asmlinkage long sys_times(struct tms __user * tbuf) | 923 | SYSCALL_DEFINE1(times, struct tms __user *, tbuf) |
923 | { | 924 | { |
924 | if (tbuf) { | 925 | if (tbuf) { |
925 | struct tms tmp; | 926 | struct tms tmp; |
@@ -944,7 +945,7 @@ asmlinkage long sys_times(struct tms __user * tbuf) | |||
944 | * Auch. Had to add the 'did_exec' flag to conform completely to POSIX. | 945 | * Auch. Had to add the 'did_exec' flag to conform completely to POSIX. |
945 | * LBT 04.03.94 | 946 | * LBT 04.03.94 |
946 | */ | 947 | */ |
947 | asmlinkage long sys_setpgid(pid_t pid, pid_t pgid) | 948 | SYSCALL_DEFINE2(setpgid, pid_t, pid, pid_t, pgid) |
948 | { | 949 | { |
949 | struct task_struct *p; | 950 | struct task_struct *p; |
950 | struct task_struct *group_leader = current->group_leader; | 951 | struct task_struct *group_leader = current->group_leader; |
@@ -1015,7 +1016,7 @@ out: | |||
1015 | return err; | 1016 | return err; |
1016 | } | 1017 | } |
1017 | 1018 | ||
1018 | asmlinkage long sys_getpgid(pid_t pid) | 1019 | SYSCALL_DEFINE1(getpgid, pid_t, pid) |
1019 | { | 1020 | { |
1020 | struct task_struct *p; | 1021 | struct task_struct *p; |
1021 | struct pid *grp; | 1022 | struct pid *grp; |
@@ -1045,14 +1046,14 @@ out: | |||
1045 | 1046 | ||
1046 | #ifdef __ARCH_WANT_SYS_GETPGRP | 1047 | #ifdef __ARCH_WANT_SYS_GETPGRP |
1047 | 1048 | ||
1048 | asmlinkage long sys_getpgrp(void) | 1049 | SYSCALL_DEFINE0(getpgrp) |
1049 | { | 1050 | { |
1050 | return sys_getpgid(0); | 1051 | return sys_getpgid(0); |
1051 | } | 1052 | } |
1052 | 1053 | ||
1053 | #endif | 1054 | #endif |
1054 | 1055 | ||
1055 | asmlinkage long sys_getsid(pid_t pid) | 1056 | SYSCALL_DEFINE1(getsid, pid_t, pid) |
1056 | { | 1057 | { |
1057 | struct task_struct *p; | 1058 | struct task_struct *p; |
1058 | struct pid *sid; | 1059 | struct pid *sid; |
@@ -1080,7 +1081,7 @@ out: | |||
1080 | return retval; | 1081 | return retval; |
1081 | } | 1082 | } |
1082 | 1083 | ||
1083 | asmlinkage long sys_setsid(void) | 1084 | SYSCALL_DEFINE0(setsid) |
1084 | { | 1085 | { |
1085 | struct task_struct *group_leader = current->group_leader; | 1086 | struct task_struct *group_leader = current->group_leader; |
1086 | struct pid *sid = task_pid(group_leader); | 1087 | struct pid *sid = task_pid(group_leader); |
@@ -1311,7 +1312,7 @@ int set_current_groups(struct group_info *group_info) | |||
1311 | 1312 | ||
1312 | EXPORT_SYMBOL(set_current_groups); | 1313 | EXPORT_SYMBOL(set_current_groups); |
1313 | 1314 | ||
1314 | asmlinkage long sys_getgroups(int gidsetsize, gid_t __user *grouplist) | 1315 | SYSCALL_DEFINE2(getgroups, int, gidsetsize, gid_t __user *, grouplist) |
1315 | { | 1316 | { |
1316 | const struct cred *cred = current_cred(); | 1317 | const struct cred *cred = current_cred(); |
1317 | int i; | 1318 | int i; |
@@ -1340,7 +1341,7 @@ out: | |||
1340 | * without another task interfering. | 1341 | * without another task interfering. |
1341 | */ | 1342 | */ |
1342 | 1343 | ||
1343 | asmlinkage long sys_setgroups(int gidsetsize, gid_t __user *grouplist) | 1344 | SYSCALL_DEFINE2(setgroups, int, gidsetsize, gid_t __user *, grouplist) |
1344 | { | 1345 | { |
1345 | struct group_info *group_info; | 1346 | struct group_info *group_info; |
1346 | int retval; | 1347 | int retval; |
@@ -1394,7 +1395,7 @@ EXPORT_SYMBOL(in_egroup_p); | |||
1394 | 1395 | ||
1395 | DECLARE_RWSEM(uts_sem); | 1396 | DECLARE_RWSEM(uts_sem); |
1396 | 1397 | ||
1397 | asmlinkage long sys_newuname(struct new_utsname __user * name) | 1398 | SYSCALL_DEFINE1(newuname, struct new_utsname __user *, name) |
1398 | { | 1399 | { |
1399 | int errno = 0; | 1400 | int errno = 0; |
1400 | 1401 | ||
@@ -1405,7 +1406,7 @@ asmlinkage long sys_newuname(struct new_utsname __user * name) | |||
1405 | return errno; | 1406 | return errno; |
1406 | } | 1407 | } |
1407 | 1408 | ||
1408 | asmlinkage long sys_sethostname(char __user *name, int len) | 1409 | SYSCALL_DEFINE2(sethostname, char __user *, name, int, len) |
1409 | { | 1410 | { |
1410 | int errno; | 1411 | int errno; |
1411 | char tmp[__NEW_UTS_LEN]; | 1412 | char tmp[__NEW_UTS_LEN]; |
@@ -1429,7 +1430,7 @@ asmlinkage long sys_sethostname(char __user *name, int len) | |||
1429 | 1430 | ||
1430 | #ifdef __ARCH_WANT_SYS_GETHOSTNAME | 1431 | #ifdef __ARCH_WANT_SYS_GETHOSTNAME |
1431 | 1432 | ||
1432 | asmlinkage long sys_gethostname(char __user *name, int len) | 1433 | SYSCALL_DEFINE2(gethostname, char __user *, name, int, len) |
1433 | { | 1434 | { |
1434 | int i, errno; | 1435 | int i, errno; |
1435 | struct new_utsname *u; | 1436 | struct new_utsname *u; |
@@ -1454,7 +1455,7 @@ asmlinkage long sys_gethostname(char __user *name, int len) | |||
1454 | * Only setdomainname; getdomainname can be implemented by calling | 1455 | * Only setdomainname; getdomainname can be implemented by calling |
1455 | * uname() | 1456 | * uname() |
1456 | */ | 1457 | */ |
1457 | asmlinkage long sys_setdomainname(char __user *name, int len) | 1458 | SYSCALL_DEFINE2(setdomainname, char __user *, name, int, len) |
1458 | { | 1459 | { |
1459 | int errno; | 1460 | int errno; |
1460 | char tmp[__NEW_UTS_LEN]; | 1461 | char tmp[__NEW_UTS_LEN]; |
@@ -1477,7 +1478,7 @@ asmlinkage long sys_setdomainname(char __user *name, int len) | |||
1477 | return errno; | 1478 | return errno; |
1478 | } | 1479 | } |
1479 | 1480 | ||
1480 | asmlinkage long sys_getrlimit(unsigned int resource, struct rlimit __user *rlim) | 1481 | SYSCALL_DEFINE2(getrlimit, unsigned int, resource, struct rlimit __user *, rlim) |
1481 | { | 1482 | { |
1482 | if (resource >= RLIM_NLIMITS) | 1483 | if (resource >= RLIM_NLIMITS) |
1483 | return -EINVAL; | 1484 | return -EINVAL; |
@@ -1496,7 +1497,8 @@ asmlinkage long sys_getrlimit(unsigned int resource, struct rlimit __user *rlim) | |||
1496 | * Back compatibility for getrlimit. Needed for some apps. | 1497 | * Back compatibility for getrlimit. Needed for some apps. |
1497 | */ | 1498 | */ |
1498 | 1499 | ||
1499 | asmlinkage long sys_old_getrlimit(unsigned int resource, struct rlimit __user *rlim) | 1500 | SYSCALL_DEFINE2(old_getrlimit, unsigned int, resource, |
1501 | struct rlimit __user *, rlim) | ||
1500 | { | 1502 | { |
1501 | struct rlimit x; | 1503 | struct rlimit x; |
1502 | if (resource >= RLIM_NLIMITS) | 1504 | if (resource >= RLIM_NLIMITS) |
@@ -1514,7 +1516,7 @@ asmlinkage long sys_old_getrlimit(unsigned int resource, struct rlimit __user *r | |||
1514 | 1516 | ||
1515 | #endif | 1517 | #endif |
1516 | 1518 | ||
1517 | asmlinkage long sys_setrlimit(unsigned int resource, struct rlimit __user *rlim) | 1519 | SYSCALL_DEFINE2(setrlimit, unsigned int, resource, struct rlimit __user *, rlim) |
1518 | { | 1520 | { |
1519 | struct rlimit new_rlim, *old_rlim; | 1521 | struct rlimit new_rlim, *old_rlim; |
1520 | int retval; | 1522 | int retval; |
@@ -1687,7 +1689,7 @@ int getrusage(struct task_struct *p, int who, struct rusage __user *ru) | |||
1687 | return copy_to_user(ru, &r, sizeof(r)) ? -EFAULT : 0; | 1689 | return copy_to_user(ru, &r, sizeof(r)) ? -EFAULT : 0; |
1688 | } | 1690 | } |
1689 | 1691 | ||
1690 | asmlinkage long sys_getrusage(int who, struct rusage __user *ru) | 1692 | SYSCALL_DEFINE2(getrusage, int, who, struct rusage __user *, ru) |
1691 | { | 1693 | { |
1692 | if (who != RUSAGE_SELF && who != RUSAGE_CHILDREN && | 1694 | if (who != RUSAGE_SELF && who != RUSAGE_CHILDREN && |
1693 | who != RUSAGE_THREAD) | 1695 | who != RUSAGE_THREAD) |
@@ -1695,14 +1697,14 @@ asmlinkage long sys_getrusage(int who, struct rusage __user *ru) | |||
1695 | return getrusage(current, who, ru); | 1697 | return getrusage(current, who, ru); |
1696 | } | 1698 | } |
1697 | 1699 | ||
1698 | asmlinkage long sys_umask(int mask) | 1700 | SYSCALL_DEFINE1(umask, int, mask) |
1699 | { | 1701 | { |
1700 | mask = xchg(¤t->fs->umask, mask & S_IRWXUGO); | 1702 | mask = xchg(¤t->fs->umask, mask & S_IRWXUGO); |
1701 | return mask; | 1703 | return mask; |
1702 | } | 1704 | } |
1703 | 1705 | ||
1704 | asmlinkage long sys_prctl(int option, unsigned long arg2, unsigned long arg3, | 1706 | SYSCALL_DEFINE5(prctl, int, option, unsigned long, arg2, unsigned long, arg3, |
1705 | unsigned long arg4, unsigned long arg5) | 1707 | unsigned long, arg4, unsigned long, arg5) |
1706 | { | 1708 | { |
1707 | struct task_struct *me = current; | 1709 | struct task_struct *me = current; |
1708 | unsigned char comm[sizeof(me->comm)]; | 1710 | unsigned char comm[sizeof(me->comm)]; |
@@ -1815,8 +1817,8 @@ asmlinkage long sys_prctl(int option, unsigned long arg2, unsigned long arg3, | |||
1815 | return error; | 1817 | return error; |
1816 | } | 1818 | } |
1817 | 1819 | ||
1818 | asmlinkage long sys_getcpu(unsigned __user *cpup, unsigned __user *nodep, | 1820 | SYSCALL_DEFINE3(getcpu, unsigned __user *, cpup, unsigned __user *, nodep, |
1819 | struct getcpu_cache __user *unused) | 1821 | struct getcpu_cache __user *, unused) |
1820 | { | 1822 | { |
1821 | int err = 0; | 1823 | int err = 0; |
1822 | int cpu = raw_smp_processor_id(); | 1824 | int cpu = raw_smp_processor_id(); |
diff --git a/kernel/sys_ni.c b/kernel/sys_ni.c index e14a23281707..27dad2967387 100644 --- a/kernel/sys_ni.c +++ b/kernel/sys_ni.c | |||
@@ -131,6 +131,7 @@ cond_syscall(sys_io_destroy); | |||
131 | cond_syscall(sys_io_submit); | 131 | cond_syscall(sys_io_submit); |
132 | cond_syscall(sys_io_cancel); | 132 | cond_syscall(sys_io_cancel); |
133 | cond_syscall(sys_io_getevents); | 133 | cond_syscall(sys_io_getevents); |
134 | cond_syscall(sys_syslog); | ||
134 | 135 | ||
135 | /* arch-specific weak syscall entries */ | 136 | /* arch-specific weak syscall entries */ |
136 | cond_syscall(sys_pciconfig_read); | 137 | cond_syscall(sys_pciconfig_read); |
diff --git a/kernel/sysctl.c b/kernel/sysctl.c index 89d74436318c..3e38b74b6124 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c | |||
@@ -1688,7 +1688,7 @@ int do_sysctl(int __user *name, int nlen, void __user *oldval, size_t __user *ol | |||
1688 | return error; | 1688 | return error; |
1689 | } | 1689 | } |
1690 | 1690 | ||
1691 | asmlinkage long sys_sysctl(struct __sysctl_args __user *args) | 1691 | SYSCALL_DEFINE1(sysctl, struct __sysctl_args __user *, args) |
1692 | { | 1692 | { |
1693 | struct __sysctl_args tmp; | 1693 | struct __sysctl_args tmp; |
1694 | int error; | 1694 | int error; |
@@ -2989,7 +2989,7 @@ int sysctl_ms_jiffies(struct ctl_table *table, | |||
2989 | #else /* CONFIG_SYSCTL_SYSCALL */ | 2989 | #else /* CONFIG_SYSCTL_SYSCALL */ |
2990 | 2990 | ||
2991 | 2991 | ||
2992 | asmlinkage long sys_sysctl(struct __sysctl_args __user *args) | 2992 | SYSCALL_DEFINE1(sysctl, struct __sysctl_args __user *, args) |
2993 | { | 2993 | { |
2994 | struct __sysctl_args tmp; | 2994 | struct __sysctl_args tmp; |
2995 | int error; | 2995 | int error; |
diff --git a/kernel/time.c b/kernel/time.c index 4886e3ce83a4..29511943871a 100644 --- a/kernel/time.c +++ b/kernel/time.c | |||
@@ -60,7 +60,7 @@ EXPORT_SYMBOL(sys_tz); | |||
60 | * why not move it into the appropriate arch directory (for those | 60 | * why not move it into the appropriate arch directory (for those |
61 | * architectures that need it). | 61 | * architectures that need it). |
62 | */ | 62 | */ |
63 | asmlinkage long sys_time(time_t __user * tloc) | 63 | SYSCALL_DEFINE1(time, time_t __user *, tloc) |
64 | { | 64 | { |
65 | time_t i = get_seconds(); | 65 | time_t i = get_seconds(); |
66 | 66 | ||
@@ -79,7 +79,7 @@ asmlinkage long sys_time(time_t __user * tloc) | |||
79 | * architectures that need it). | 79 | * architectures that need it). |
80 | */ | 80 | */ |
81 | 81 | ||
82 | asmlinkage long sys_stime(time_t __user *tptr) | 82 | SYSCALL_DEFINE1(stime, time_t __user *, tptr) |
83 | { | 83 | { |
84 | struct timespec tv; | 84 | struct timespec tv; |
85 | int err; | 85 | int err; |
@@ -99,8 +99,8 @@ asmlinkage long sys_stime(time_t __user *tptr) | |||
99 | 99 | ||
100 | #endif /* __ARCH_WANT_SYS_TIME */ | 100 | #endif /* __ARCH_WANT_SYS_TIME */ |
101 | 101 | ||
102 | asmlinkage long sys_gettimeofday(struct timeval __user *tv, | 102 | SYSCALL_DEFINE2(gettimeofday, struct timeval __user *, tv, |
103 | struct timezone __user *tz) | 103 | struct timezone __user *, tz) |
104 | { | 104 | { |
105 | if (likely(tv != NULL)) { | 105 | if (likely(tv != NULL)) { |
106 | struct timeval ktv; | 106 | struct timeval ktv; |
@@ -184,8 +184,8 @@ int do_sys_settimeofday(struct timespec *tv, struct timezone *tz) | |||
184 | return 0; | 184 | return 0; |
185 | } | 185 | } |
186 | 186 | ||
187 | asmlinkage long sys_settimeofday(struct timeval __user *tv, | 187 | SYSCALL_DEFINE2(settimeofday, struct timeval __user *, tv, |
188 | struct timezone __user *tz) | 188 | struct timezone __user *, tz) |
189 | { | 189 | { |
190 | struct timeval user_tv; | 190 | struct timeval user_tv; |
191 | struct timespec new_ts; | 191 | struct timespec new_ts; |
@@ -205,7 +205,7 @@ asmlinkage long sys_settimeofday(struct timeval __user *tv, | |||
205 | return do_sys_settimeofday(tv ? &new_ts : NULL, tz ? &new_tz : NULL); | 205 | return do_sys_settimeofday(tv ? &new_ts : NULL, tz ? &new_tz : NULL); |
206 | } | 206 | } |
207 | 207 | ||
208 | asmlinkage long sys_adjtimex(struct timex __user *txc_p) | 208 | SYSCALL_DEFINE1(adjtimex, struct timex __user *, txc_p) |
209 | { | 209 | { |
210 | struct timex txc; /* Local copy of parameter */ | 210 | struct timex txc; /* Local copy of parameter */ |
211 | int ret; | 211 | int ret; |
diff --git a/kernel/timer.c b/kernel/timer.c index dee3f641a7a7..13dd64fe143d 100644 --- a/kernel/timer.c +++ b/kernel/timer.c | |||
@@ -1129,7 +1129,7 @@ void do_timer(unsigned long ticks) | |||
1129 | * For backwards compatibility? This can be done in libc so Alpha | 1129 | * For backwards compatibility? This can be done in libc so Alpha |
1130 | * and all newer ports shouldn't need it. | 1130 | * and all newer ports shouldn't need it. |
1131 | */ | 1131 | */ |
1132 | asmlinkage unsigned long sys_alarm(unsigned int seconds) | 1132 | SYSCALL_DEFINE1(alarm, unsigned int, seconds) |
1133 | { | 1133 | { |
1134 | return alarm_setitimer(seconds); | 1134 | return alarm_setitimer(seconds); |
1135 | } | 1135 | } |
@@ -1152,7 +1152,7 @@ asmlinkage unsigned long sys_alarm(unsigned int seconds) | |||
1152 | * | 1152 | * |
1153 | * This is SMP safe as current->tgid does not change. | 1153 | * This is SMP safe as current->tgid does not change. |
1154 | */ | 1154 | */ |
1155 | asmlinkage long sys_getpid(void) | 1155 | SYSCALL_DEFINE0(getpid) |
1156 | { | 1156 | { |
1157 | return task_tgid_vnr(current); | 1157 | return task_tgid_vnr(current); |
1158 | } | 1158 | } |
@@ -1163,7 +1163,7 @@ asmlinkage long sys_getpid(void) | |||
1163 | * value of ->real_parent under rcu_read_lock(), see | 1163 | * value of ->real_parent under rcu_read_lock(), see |
1164 | * release_task()->call_rcu(delayed_put_task_struct). | 1164 | * release_task()->call_rcu(delayed_put_task_struct). |
1165 | */ | 1165 | */ |
1166 | asmlinkage long sys_getppid(void) | 1166 | SYSCALL_DEFINE0(getppid) |
1167 | { | 1167 | { |
1168 | int pid; | 1168 | int pid; |
1169 | 1169 | ||
@@ -1174,25 +1174,25 @@ asmlinkage long sys_getppid(void) | |||
1174 | return pid; | 1174 | return pid; |
1175 | } | 1175 | } |
1176 | 1176 | ||
1177 | asmlinkage long sys_getuid(void) | 1177 | SYSCALL_DEFINE0(getuid) |
1178 | { | 1178 | { |
1179 | /* Only we change this so SMP safe */ | 1179 | /* Only we change this so SMP safe */ |
1180 | return current_uid(); | 1180 | return current_uid(); |
1181 | } | 1181 | } |
1182 | 1182 | ||
1183 | asmlinkage long sys_geteuid(void) | 1183 | SYSCALL_DEFINE0(geteuid) |
1184 | { | 1184 | { |
1185 | /* Only we change this so SMP safe */ | 1185 | /* Only we change this so SMP safe */ |
1186 | return current_euid(); | 1186 | return current_euid(); |
1187 | } | 1187 | } |
1188 | 1188 | ||
1189 | asmlinkage long sys_getgid(void) | 1189 | SYSCALL_DEFINE0(getgid) |
1190 | { | 1190 | { |
1191 | /* Only we change this so SMP safe */ | 1191 | /* Only we change this so SMP safe */ |
1192 | return current_gid(); | 1192 | return current_gid(); |
1193 | } | 1193 | } |
1194 | 1194 | ||
1195 | asmlinkage long sys_getegid(void) | 1195 | SYSCALL_DEFINE0(getegid) |
1196 | { | 1196 | { |
1197 | /* Only we change this so SMP safe */ | 1197 | /* Only we change this so SMP safe */ |
1198 | return current_egid(); | 1198 | return current_egid(); |
@@ -1308,7 +1308,7 @@ signed long __sched schedule_timeout_uninterruptible(signed long timeout) | |||
1308 | EXPORT_SYMBOL(schedule_timeout_uninterruptible); | 1308 | EXPORT_SYMBOL(schedule_timeout_uninterruptible); |
1309 | 1309 | ||
1310 | /* Thread ID - the internal kernel "pid" */ | 1310 | /* Thread ID - the internal kernel "pid" */ |
1311 | asmlinkage long sys_gettid(void) | 1311 | SYSCALL_DEFINE0(gettid) |
1312 | { | 1312 | { |
1313 | return task_pid_vnr(current); | 1313 | return task_pid_vnr(current); |
1314 | } | 1314 | } |
@@ -1400,7 +1400,7 @@ out: | |||
1400 | return 0; | 1400 | return 0; |
1401 | } | 1401 | } |
1402 | 1402 | ||
1403 | asmlinkage long sys_sysinfo(struct sysinfo __user *info) | 1403 | SYSCALL_DEFINE1(sysinfo, struct sysinfo __user *, info) |
1404 | { | 1404 | { |
1405 | struct sysinfo val; | 1405 | struct sysinfo val; |
1406 | 1406 | ||
diff --git a/kernel/uid16.c b/kernel/uid16.c index 2460c3199b5a..0314501688b9 100644 --- a/kernel/uid16.c +++ b/kernel/uid16.c | |||
@@ -17,7 +17,7 @@ | |||
17 | 17 | ||
18 | #include <asm/uaccess.h> | 18 | #include <asm/uaccess.h> |
19 | 19 | ||
20 | asmlinkage long sys_chown16(const char __user * filename, old_uid_t user, old_gid_t group) | 20 | SYSCALL_DEFINE3(chown16, const char __user *, filename, old_uid_t, user, old_gid_t, group) |
21 | { | 21 | { |
22 | long ret = sys_chown(filename, low2highuid(user), low2highgid(group)); | 22 | long ret = sys_chown(filename, low2highuid(user), low2highgid(group)); |
23 | /* avoid REGPARM breakage on x86: */ | 23 | /* avoid REGPARM breakage on x86: */ |
@@ -25,7 +25,7 @@ asmlinkage long sys_chown16(const char __user * filename, old_uid_t user, old_gi | |||
25 | return ret; | 25 | return ret; |
26 | } | 26 | } |
27 | 27 | ||
28 | asmlinkage long sys_lchown16(const char __user * filename, old_uid_t user, old_gid_t group) | 28 | SYSCALL_DEFINE3(lchown16, const char __user *, filename, old_uid_t, user, old_gid_t, group) |
29 | { | 29 | { |
30 | long ret = sys_lchown(filename, low2highuid(user), low2highgid(group)); | 30 | long ret = sys_lchown(filename, low2highuid(user), low2highgid(group)); |
31 | /* avoid REGPARM breakage on x86: */ | 31 | /* avoid REGPARM breakage on x86: */ |
@@ -33,7 +33,7 @@ asmlinkage long sys_lchown16(const char __user * filename, old_uid_t user, old_g | |||
33 | return ret; | 33 | return ret; |
34 | } | 34 | } |
35 | 35 | ||
36 | asmlinkage long sys_fchown16(unsigned int fd, old_uid_t user, old_gid_t group) | 36 | SYSCALL_DEFINE3(fchown16, unsigned int, fd, old_uid_t, user, old_gid_t, group) |
37 | { | 37 | { |
38 | long ret = sys_fchown(fd, low2highuid(user), low2highgid(group)); | 38 | long ret = sys_fchown(fd, low2highuid(user), low2highgid(group)); |
39 | /* avoid REGPARM breakage on x86: */ | 39 | /* avoid REGPARM breakage on x86: */ |
@@ -41,7 +41,7 @@ asmlinkage long sys_fchown16(unsigned int fd, old_uid_t user, old_gid_t group) | |||
41 | return ret; | 41 | return ret; |
42 | } | 42 | } |
43 | 43 | ||
44 | asmlinkage long sys_setregid16(old_gid_t rgid, old_gid_t egid) | 44 | SYSCALL_DEFINE2(setregid16, old_gid_t, rgid, old_gid_t, egid) |
45 | { | 45 | { |
46 | long ret = sys_setregid(low2highgid(rgid), low2highgid(egid)); | 46 | long ret = sys_setregid(low2highgid(rgid), low2highgid(egid)); |
47 | /* avoid REGPARM breakage on x86: */ | 47 | /* avoid REGPARM breakage on x86: */ |
@@ -49,7 +49,7 @@ asmlinkage long sys_setregid16(old_gid_t rgid, old_gid_t egid) | |||
49 | return ret; | 49 | return ret; |
50 | } | 50 | } |
51 | 51 | ||
52 | asmlinkage long sys_setgid16(old_gid_t gid) | 52 | SYSCALL_DEFINE1(setgid16, old_gid_t, gid) |
53 | { | 53 | { |
54 | long ret = sys_setgid(low2highgid(gid)); | 54 | long ret = sys_setgid(low2highgid(gid)); |
55 | /* avoid REGPARM breakage on x86: */ | 55 | /* avoid REGPARM breakage on x86: */ |
@@ -57,7 +57,7 @@ asmlinkage long sys_setgid16(old_gid_t gid) | |||
57 | return ret; | 57 | return ret; |
58 | } | 58 | } |
59 | 59 | ||
60 | asmlinkage long sys_setreuid16(old_uid_t ruid, old_uid_t euid) | 60 | SYSCALL_DEFINE2(setreuid16, old_uid_t, ruid, old_uid_t, euid) |
61 | { | 61 | { |
62 | long ret = sys_setreuid(low2highuid(ruid), low2highuid(euid)); | 62 | long ret = sys_setreuid(low2highuid(ruid), low2highuid(euid)); |
63 | /* avoid REGPARM breakage on x86: */ | 63 | /* avoid REGPARM breakage on x86: */ |
@@ -65,7 +65,7 @@ asmlinkage long sys_setreuid16(old_uid_t ruid, old_uid_t euid) | |||
65 | return ret; | 65 | return ret; |
66 | } | 66 | } |
67 | 67 | ||
68 | asmlinkage long sys_setuid16(old_uid_t uid) | 68 | SYSCALL_DEFINE1(setuid16, old_uid_t, uid) |
69 | { | 69 | { |
70 | long ret = sys_setuid(low2highuid(uid)); | 70 | long ret = sys_setuid(low2highuid(uid)); |
71 | /* avoid REGPARM breakage on x86: */ | 71 | /* avoid REGPARM breakage on x86: */ |
@@ -73,7 +73,7 @@ asmlinkage long sys_setuid16(old_uid_t uid) | |||
73 | return ret; | 73 | return ret; |
74 | } | 74 | } |
75 | 75 | ||
76 | asmlinkage long sys_setresuid16(old_uid_t ruid, old_uid_t euid, old_uid_t suid) | 76 | SYSCALL_DEFINE3(setresuid16, old_uid_t, ruid, old_uid_t, euid, old_uid_t, suid) |
77 | { | 77 | { |
78 | long ret = sys_setresuid(low2highuid(ruid), low2highuid(euid), | 78 | long ret = sys_setresuid(low2highuid(ruid), low2highuid(euid), |
79 | low2highuid(suid)); | 79 | low2highuid(suid)); |
@@ -82,7 +82,7 @@ asmlinkage long sys_setresuid16(old_uid_t ruid, old_uid_t euid, old_uid_t suid) | |||
82 | return ret; | 82 | return ret; |
83 | } | 83 | } |
84 | 84 | ||
85 | asmlinkage long sys_getresuid16(old_uid_t __user *ruid, old_uid_t __user *euid, old_uid_t __user *suid) | 85 | SYSCALL_DEFINE3(getresuid16, old_uid_t __user *, ruid, old_uid_t __user *, euid, old_uid_t __user *, suid) |
86 | { | 86 | { |
87 | const struct cred *cred = current_cred(); | 87 | const struct cred *cred = current_cred(); |
88 | int retval; | 88 | int retval; |
@@ -94,7 +94,7 @@ asmlinkage long sys_getresuid16(old_uid_t __user *ruid, old_uid_t __user *euid, | |||
94 | return retval; | 94 | return retval; |
95 | } | 95 | } |
96 | 96 | ||
97 | asmlinkage long sys_setresgid16(old_gid_t rgid, old_gid_t egid, old_gid_t sgid) | 97 | SYSCALL_DEFINE3(setresgid16, old_gid_t, rgid, old_gid_t, egid, old_gid_t, sgid) |
98 | { | 98 | { |
99 | long ret = sys_setresgid(low2highgid(rgid), low2highgid(egid), | 99 | long ret = sys_setresgid(low2highgid(rgid), low2highgid(egid), |
100 | low2highgid(sgid)); | 100 | low2highgid(sgid)); |
@@ -103,7 +103,8 @@ asmlinkage long sys_setresgid16(old_gid_t rgid, old_gid_t egid, old_gid_t sgid) | |||
103 | return ret; | 103 | return ret; |
104 | } | 104 | } |
105 | 105 | ||
106 | asmlinkage long sys_getresgid16(old_gid_t __user *rgid, old_gid_t __user *egid, old_gid_t __user *sgid) | 106 | |
107 | SYSCALL_DEFINE3(getresgid16, old_gid_t __user *, rgid, old_gid_t __user *, egid, old_gid_t __user *, sgid) | ||
107 | { | 108 | { |
108 | const struct cred *cred = current_cred(); | 109 | const struct cred *cred = current_cred(); |
109 | int retval; | 110 | int retval; |
@@ -115,7 +116,7 @@ asmlinkage long sys_getresgid16(old_gid_t __user *rgid, old_gid_t __user *egid, | |||
115 | return retval; | 116 | return retval; |
116 | } | 117 | } |
117 | 118 | ||
118 | asmlinkage long sys_setfsuid16(old_uid_t uid) | 119 | SYSCALL_DEFINE1(setfsuid16, old_uid_t, uid) |
119 | { | 120 | { |
120 | long ret = sys_setfsuid(low2highuid(uid)); | 121 | long ret = sys_setfsuid(low2highuid(uid)); |
121 | /* avoid REGPARM breakage on x86: */ | 122 | /* avoid REGPARM breakage on x86: */ |
@@ -123,7 +124,7 @@ asmlinkage long sys_setfsuid16(old_uid_t uid) | |||
123 | return ret; | 124 | return ret; |
124 | } | 125 | } |
125 | 126 | ||
126 | asmlinkage long sys_setfsgid16(old_gid_t gid) | 127 | SYSCALL_DEFINE1(setfsgid16, old_gid_t, gid) |
127 | { | 128 | { |
128 | long ret = sys_setfsgid(low2highgid(gid)); | 129 | long ret = sys_setfsgid(low2highgid(gid)); |
129 | /* avoid REGPARM breakage on x86: */ | 130 | /* avoid REGPARM breakage on x86: */ |
@@ -161,7 +162,7 @@ static int groups16_from_user(struct group_info *group_info, | |||
161 | return 0; | 162 | return 0; |
162 | } | 163 | } |
163 | 164 | ||
164 | asmlinkage long sys_getgroups16(int gidsetsize, old_gid_t __user *grouplist) | 165 | SYSCALL_DEFINE2(getgroups16, int, gidsetsize, old_gid_t __user *, grouplist) |
165 | { | 166 | { |
166 | const struct cred *cred = current_cred(); | 167 | const struct cred *cred = current_cred(); |
167 | int i; | 168 | int i; |
@@ -184,7 +185,7 @@ out: | |||
184 | return i; | 185 | return i; |
185 | } | 186 | } |
186 | 187 | ||
187 | asmlinkage long sys_setgroups16(int gidsetsize, old_gid_t __user *grouplist) | 188 | SYSCALL_DEFINE2(setgroups16, int, gidsetsize, old_gid_t __user *, grouplist) |
188 | { | 189 | { |
189 | struct group_info *group_info; | 190 | struct group_info *group_info; |
190 | int retval; | 191 | int retval; |
@@ -209,22 +210,22 @@ asmlinkage long sys_setgroups16(int gidsetsize, old_gid_t __user *grouplist) | |||
209 | return retval; | 210 | return retval; |
210 | } | 211 | } |
211 | 212 | ||
212 | asmlinkage long sys_getuid16(void) | 213 | SYSCALL_DEFINE0(getuid16) |
213 | { | 214 | { |
214 | return high2lowuid(current_uid()); | 215 | return high2lowuid(current_uid()); |
215 | } | 216 | } |
216 | 217 | ||
217 | asmlinkage long sys_geteuid16(void) | 218 | SYSCALL_DEFINE0(geteuid16) |
218 | { | 219 | { |
219 | return high2lowuid(current_euid()); | 220 | return high2lowuid(current_euid()); |
220 | } | 221 | } |
221 | 222 | ||
222 | asmlinkage long sys_getgid16(void) | 223 | SYSCALL_DEFINE0(getgid16) |
223 | { | 224 | { |
224 | return high2lowgid(current_gid()); | 225 | return high2lowgid(current_gid()); |
225 | } | 226 | } |
226 | 227 | ||
227 | asmlinkage long sys_getegid16(void) | 228 | SYSCALL_DEFINE0(getegid16) |
228 | { | 229 | { |
229 | return high2lowgid(current_egid()); | 230 | return high2lowgid(current_egid()); |
230 | } | 231 | } |
diff --git a/mm/fadvise.c b/mm/fadvise.c index a1da969bd980..54a0f8040afa 100644 --- a/mm/fadvise.c +++ b/mm/fadvise.c | |||
@@ -24,7 +24,7 @@ | |||
24 | * POSIX_FADV_WILLNEED could set PG_Referenced, and POSIX_FADV_NOREUSE could | 24 | * POSIX_FADV_WILLNEED could set PG_Referenced, and POSIX_FADV_NOREUSE could |
25 | * deactivate the pages and clear PG_Referenced. | 25 | * deactivate the pages and clear PG_Referenced. |
26 | */ | 26 | */ |
27 | asmlinkage long sys_fadvise64_64(int fd, loff_t offset, loff_t len, int advice) | 27 | SYSCALL_DEFINE(fadvise64_64)(int fd, loff_t offset, loff_t len, int advice) |
28 | { | 28 | { |
29 | struct file *file = fget(fd); | 29 | struct file *file = fget(fd); |
30 | struct address_space *mapping; | 30 | struct address_space *mapping; |
@@ -126,12 +126,26 @@ out: | |||
126 | fput(file); | 126 | fput(file); |
127 | return ret; | 127 | return ret; |
128 | } | 128 | } |
129 | #ifdef CONFIG_HAVE_SYSCALL_WRAPPERS | ||
130 | asmlinkage long SyS_fadvise64_64(long fd, loff_t offset, loff_t len, long advice) | ||
131 | { | ||
132 | return SYSC_fadvise64_64((int) fd, offset, len, (int) advice); | ||
133 | } | ||
134 | SYSCALL_ALIAS(sys_fadvise64_64, SyS_fadvise64_64); | ||
135 | #endif | ||
129 | 136 | ||
130 | #ifdef __ARCH_WANT_SYS_FADVISE64 | 137 | #ifdef __ARCH_WANT_SYS_FADVISE64 |
131 | 138 | ||
132 | asmlinkage long sys_fadvise64(int fd, loff_t offset, size_t len, int advice) | 139 | SYSCALL_DEFINE(fadvise64)(int fd, loff_t offset, size_t len, int advice) |
133 | { | 140 | { |
134 | return sys_fadvise64_64(fd, offset, len, advice); | 141 | return sys_fadvise64_64(fd, offset, len, advice); |
135 | } | 142 | } |
143 | #ifdef CONFIG_HAVE_SYSCALL_WRAPPERS | ||
144 | asmlinkage long SyS_fadvise64(long fd, loff_t offset, long len, long advice) | ||
145 | { | ||
146 | return SYSC_fadvise64((int) fd, offset, (size_t)len, (int)advice); | ||
147 | } | ||
148 | SYSCALL_ALIAS(sys_fadvise64, SyS_fadvise64); | ||
149 | #endif | ||
136 | 150 | ||
137 | #endif | 151 | #endif |
diff --git a/mm/filemap.c b/mm/filemap.c index ceba0bd03662..23acefe51808 100644 --- a/mm/filemap.c +++ b/mm/filemap.c | |||
@@ -1374,7 +1374,7 @@ do_readahead(struct address_space *mapping, struct file *filp, | |||
1374 | return 0; | 1374 | return 0; |
1375 | } | 1375 | } |
1376 | 1376 | ||
1377 | asmlinkage ssize_t sys_readahead(int fd, loff_t offset, size_t count) | 1377 | SYSCALL_DEFINE(readahead)(int fd, loff_t offset, size_t count) |
1378 | { | 1378 | { |
1379 | ssize_t ret; | 1379 | ssize_t ret; |
1380 | struct file *file; | 1380 | struct file *file; |
@@ -1393,6 +1393,13 @@ asmlinkage ssize_t sys_readahead(int fd, loff_t offset, size_t count) | |||
1393 | } | 1393 | } |
1394 | return ret; | 1394 | return ret; |
1395 | } | 1395 | } |
1396 | #ifdef CONFIG_HAVE_SYSCALL_WRAPPERS | ||
1397 | asmlinkage long SyS_readahead(long fd, loff_t offset, long count) | ||
1398 | { | ||
1399 | return SYSC_readahead((int) fd, offset, (size_t) count); | ||
1400 | } | ||
1401 | SYSCALL_ALIAS(sys_readahead, SyS_readahead); | ||
1402 | #endif | ||
1396 | 1403 | ||
1397 | #ifdef CONFIG_MMU | 1404 | #ifdef CONFIG_MMU |
1398 | /** | 1405 | /** |
diff --git a/mm/fremap.c b/mm/fremap.c index 62d5bbda921a..736ba7f3306a 100644 --- a/mm/fremap.c +++ b/mm/fremap.c | |||
@@ -120,8 +120,8 @@ static int populate_range(struct mm_struct *mm, struct vm_area_struct *vma, | |||
120 | * and the vma's default protection is used. Arbitrary protections | 120 | * and the vma's default protection is used. Arbitrary protections |
121 | * might be implemented in the future. | 121 | * might be implemented in the future. |
122 | */ | 122 | */ |
123 | asmlinkage long sys_remap_file_pages(unsigned long start, unsigned long size, | 123 | SYSCALL_DEFINE5(remap_file_pages, unsigned long, start, unsigned long, size, |
124 | unsigned long prot, unsigned long pgoff, unsigned long flags) | 124 | unsigned long, prot, unsigned long, pgoff, unsigned long, flags) |
125 | { | 125 | { |
126 | struct mm_struct *mm = current->mm; | 126 | struct mm_struct *mm = current->mm; |
127 | struct address_space *mapping; | 127 | struct address_space *mapping; |
diff --git a/mm/madvise.c b/mm/madvise.c index f9349c18a1b5..b9ce574827c8 100644 --- a/mm/madvise.c +++ b/mm/madvise.c | |||
@@ -281,7 +281,7 @@ madvise_vma(struct vm_area_struct *vma, struct vm_area_struct **prev, | |||
281 | * -EBADF - map exists, but area maps something that isn't a file. | 281 | * -EBADF - map exists, but area maps something that isn't a file. |
282 | * -EAGAIN - a kernel resource was temporarily unavailable. | 282 | * -EAGAIN - a kernel resource was temporarily unavailable. |
283 | */ | 283 | */ |
284 | asmlinkage long sys_madvise(unsigned long start, size_t len_in, int behavior) | 284 | SYSCALL_DEFINE3(madvise, unsigned long, start, size_t, len_in, int, behavior) |
285 | { | 285 | { |
286 | unsigned long end, tmp; | 286 | unsigned long end, tmp; |
287 | struct vm_area_struct * vma, *prev; | 287 | struct vm_area_struct * vma, *prev; |
diff --git a/mm/mempolicy.c b/mm/mempolicy.c index e412ffa8e52e..3eb4a6fdc043 100644 --- a/mm/mempolicy.c +++ b/mm/mempolicy.c | |||
@@ -1068,10 +1068,9 @@ static int copy_nodes_to_user(unsigned long __user *mask, unsigned long maxnode, | |||
1068 | return copy_to_user(mask, nodes_addr(*nodes), copy) ? -EFAULT : 0; | 1068 | return copy_to_user(mask, nodes_addr(*nodes), copy) ? -EFAULT : 0; |
1069 | } | 1069 | } |
1070 | 1070 | ||
1071 | asmlinkage long sys_mbind(unsigned long start, unsigned long len, | 1071 | SYSCALL_DEFINE6(mbind, unsigned long, start, unsigned long, len, |
1072 | unsigned long mode, | 1072 | unsigned long, mode, unsigned long __user *, nmask, |
1073 | unsigned long __user *nmask, unsigned long maxnode, | 1073 | unsigned long, maxnode, unsigned, flags) |
1074 | unsigned flags) | ||
1075 | { | 1074 | { |
1076 | nodemask_t nodes; | 1075 | nodemask_t nodes; |
1077 | int err; | 1076 | int err; |
@@ -1091,8 +1090,8 @@ asmlinkage long sys_mbind(unsigned long start, unsigned long len, | |||
1091 | } | 1090 | } |
1092 | 1091 | ||
1093 | /* Set the process memory policy */ | 1092 | /* Set the process memory policy */ |
1094 | asmlinkage long sys_set_mempolicy(int mode, unsigned long __user *nmask, | 1093 | SYSCALL_DEFINE3(set_mempolicy, int, mode, unsigned long __user *, nmask, |
1095 | unsigned long maxnode) | 1094 | unsigned long, maxnode) |
1096 | { | 1095 | { |
1097 | int err; | 1096 | int err; |
1098 | nodemask_t nodes; | 1097 | nodemask_t nodes; |
@@ -1110,9 +1109,9 @@ asmlinkage long sys_set_mempolicy(int mode, unsigned long __user *nmask, | |||
1110 | return do_set_mempolicy(mode, flags, &nodes); | 1109 | return do_set_mempolicy(mode, flags, &nodes); |
1111 | } | 1110 | } |
1112 | 1111 | ||
1113 | asmlinkage long sys_migrate_pages(pid_t pid, unsigned long maxnode, | 1112 | SYSCALL_DEFINE4(migrate_pages, pid_t, pid, unsigned long, maxnode, |
1114 | const unsigned long __user *old_nodes, | 1113 | const unsigned long __user *, old_nodes, |
1115 | const unsigned long __user *new_nodes) | 1114 | const unsigned long __user *, new_nodes) |
1116 | { | 1115 | { |
1117 | const struct cred *cred = current_cred(), *tcred; | 1116 | const struct cred *cred = current_cred(), *tcred; |
1118 | struct mm_struct *mm; | 1117 | struct mm_struct *mm; |
@@ -1185,10 +1184,9 @@ out: | |||
1185 | 1184 | ||
1186 | 1185 | ||
1187 | /* Retrieve NUMA policy */ | 1186 | /* Retrieve NUMA policy */ |
1188 | asmlinkage long sys_get_mempolicy(int __user *policy, | 1187 | SYSCALL_DEFINE5(get_mempolicy, int __user *, policy, |
1189 | unsigned long __user *nmask, | 1188 | unsigned long __user *, nmask, unsigned long, maxnode, |
1190 | unsigned long maxnode, | 1189 | unsigned long, addr, unsigned long, flags) |
1191 | unsigned long addr, unsigned long flags) | ||
1192 | { | 1190 | { |
1193 | int err; | 1191 | int err; |
1194 | int uninitialized_var(pval); | 1192 | int uninitialized_var(pval); |
diff --git a/mm/migrate.c b/mm/migrate.c index a30ea5fcf9f1..2bb4e1d63520 100644 --- a/mm/migrate.c +++ b/mm/migrate.c | |||
@@ -1055,10 +1055,10 @@ out: | |||
1055 | * Move a list of pages in the address space of the currently executing | 1055 | * Move a list of pages in the address space of the currently executing |
1056 | * process. | 1056 | * process. |
1057 | */ | 1057 | */ |
1058 | asmlinkage long sys_move_pages(pid_t pid, unsigned long nr_pages, | 1058 | SYSCALL_DEFINE6(move_pages, pid_t, pid, unsigned long, nr_pages, |
1059 | const void __user * __user *pages, | 1059 | const void __user * __user *, pages, |
1060 | const int __user *nodes, | 1060 | const int __user *, nodes, |
1061 | int __user *status, int flags) | 1061 | int __user *, status, int, flags) |
1062 | { | 1062 | { |
1063 | const struct cred *cred = current_cred(), *tcred; | 1063 | const struct cred *cred = current_cred(), *tcred; |
1064 | struct task_struct *task; | 1064 | struct task_struct *task; |
diff --git a/mm/mincore.c b/mm/mincore.c index 5178800bc129..8cb508f84ea4 100644 --- a/mm/mincore.c +++ b/mm/mincore.c | |||
@@ -177,8 +177,8 @@ none_mapped: | |||
177 | * mapped | 177 | * mapped |
178 | * -EAGAIN - A kernel resource was temporarily unavailable. | 178 | * -EAGAIN - A kernel resource was temporarily unavailable. |
179 | */ | 179 | */ |
180 | asmlinkage long sys_mincore(unsigned long start, size_t len, | 180 | SYSCALL_DEFINE3(mincore, unsigned long, start, size_t, len, |
181 | unsigned char __user * vec) | 181 | unsigned char __user *, vec) |
182 | { | 182 | { |
183 | long retval; | 183 | long retval; |
184 | unsigned long pages; | 184 | unsigned long pages; |
diff --git a/mm/mlock.c b/mm/mlock.c index e125156c664e..2904a347e476 100644 --- a/mm/mlock.c +++ b/mm/mlock.c | |||
@@ -530,7 +530,7 @@ static int do_mlock(unsigned long start, size_t len, int on) | |||
530 | return error; | 530 | return error; |
531 | } | 531 | } |
532 | 532 | ||
533 | asmlinkage long sys_mlock(unsigned long start, size_t len) | 533 | SYSCALL_DEFINE2(mlock, unsigned long, start, size_t, len) |
534 | { | 534 | { |
535 | unsigned long locked; | 535 | unsigned long locked; |
536 | unsigned long lock_limit; | 536 | unsigned long lock_limit; |
@@ -558,7 +558,7 @@ asmlinkage long sys_mlock(unsigned long start, size_t len) | |||
558 | return error; | 558 | return error; |
559 | } | 559 | } |
560 | 560 | ||
561 | asmlinkage long sys_munlock(unsigned long start, size_t len) | 561 | SYSCALL_DEFINE2(munlock, unsigned long, start, size_t, len) |
562 | { | 562 | { |
563 | int ret; | 563 | int ret; |
564 | 564 | ||
@@ -595,7 +595,7 @@ out: | |||
595 | return 0; | 595 | return 0; |
596 | } | 596 | } |
597 | 597 | ||
598 | asmlinkage long sys_mlockall(int flags) | 598 | SYSCALL_DEFINE1(mlockall, int, flags) |
599 | { | 599 | { |
600 | unsigned long lock_limit; | 600 | unsigned long lock_limit; |
601 | int ret = -EINVAL; | 601 | int ret = -EINVAL; |
@@ -623,7 +623,7 @@ out: | |||
623 | return ret; | 623 | return ret; |
624 | } | 624 | } |
625 | 625 | ||
626 | asmlinkage long sys_munlockall(void) | 626 | SYSCALL_DEFINE0(munlockall) |
627 | { | 627 | { |
628 | int ret; | 628 | int ret; |
629 | 629 | ||
@@ -245,7 +245,7 @@ static struct vm_area_struct *remove_vma(struct vm_area_struct *vma) | |||
245 | return next; | 245 | return next; |
246 | } | 246 | } |
247 | 247 | ||
248 | asmlinkage unsigned long sys_brk(unsigned long brk) | 248 | SYSCALL_DEFINE1(brk, unsigned long, brk) |
249 | { | 249 | { |
250 | unsigned long rlim, retval; | 250 | unsigned long rlim, retval; |
251 | unsigned long newbrk, oldbrk; | 251 | unsigned long newbrk, oldbrk; |
@@ -1948,7 +1948,7 @@ int do_munmap(struct mm_struct *mm, unsigned long start, size_t len) | |||
1948 | 1948 | ||
1949 | EXPORT_SYMBOL(do_munmap); | 1949 | EXPORT_SYMBOL(do_munmap); |
1950 | 1950 | ||
1951 | asmlinkage long sys_munmap(unsigned long addr, size_t len) | 1951 | SYSCALL_DEFINE2(munmap, unsigned long, addr, size_t, len) |
1952 | { | 1952 | { |
1953 | int ret; | 1953 | int ret; |
1954 | struct mm_struct *mm = current->mm; | 1954 | struct mm_struct *mm = current->mm; |
diff --git a/mm/mprotect.c b/mm/mprotect.c index d0f6e7ce09f1..abe2694e13f4 100644 --- a/mm/mprotect.c +++ b/mm/mprotect.c | |||
@@ -217,8 +217,8 @@ fail: | |||
217 | return error; | 217 | return error; |
218 | } | 218 | } |
219 | 219 | ||
220 | asmlinkage long | 220 | SYSCALL_DEFINE3(mprotect, unsigned long, start, size_t, len, |
221 | sys_mprotect(unsigned long start, size_t len, unsigned long prot) | 221 | unsigned long, prot) |
222 | { | 222 | { |
223 | unsigned long vm_flags, nstart, end, tmp, reqprot; | 223 | unsigned long vm_flags, nstart, end, tmp, reqprot; |
224 | struct vm_area_struct *vma, *prev; | 224 | struct vm_area_struct *vma, *prev; |
diff --git a/mm/mremap.c b/mm/mremap.c index 646de959aa58..a39b7b91be46 100644 --- a/mm/mremap.c +++ b/mm/mremap.c | |||
@@ -420,9 +420,9 @@ out_nc: | |||
420 | return ret; | 420 | return ret; |
421 | } | 421 | } |
422 | 422 | ||
423 | asmlinkage unsigned long sys_mremap(unsigned long addr, | 423 | SYSCALL_DEFINE5(mremap, unsigned long, addr, unsigned long, old_len, |
424 | unsigned long old_len, unsigned long new_len, | 424 | unsigned long, new_len, unsigned long, flags, |
425 | unsigned long flags, unsigned long new_addr) | 425 | unsigned long, new_addr) |
426 | { | 426 | { |
427 | unsigned long ret; | 427 | unsigned long ret; |
428 | 428 | ||
diff --git a/mm/msync.c b/mm/msync.c index 07dae08cf31c..4083209b7f02 100644 --- a/mm/msync.c +++ b/mm/msync.c | |||
@@ -28,7 +28,7 @@ | |||
28 | * So by _not_ starting I/O in MS_ASYNC we provide complete flexibility to | 28 | * So by _not_ starting I/O in MS_ASYNC we provide complete flexibility to |
29 | * applications. | 29 | * applications. |
30 | */ | 30 | */ |
31 | asmlinkage long sys_msync(unsigned long start, size_t len, int flags) | 31 | SYSCALL_DEFINE3(msync, unsigned long, start, size_t, len, int, flags) |
32 | { | 32 | { |
33 | unsigned long end; | 33 | unsigned long end; |
34 | struct mm_struct *mm = current->mm; | 34 | struct mm_struct *mm = current->mm; |
diff --git a/mm/nommu.c b/mm/nommu.c index 60ed8375c986..8cee8c8ff0f2 100644 --- a/mm/nommu.c +++ b/mm/nommu.c | |||
@@ -416,7 +416,7 @@ EXPORT_SYMBOL(vm_insert_page); | |||
416 | * to a regular file. in this case, the unmapping will need | 416 | * to a regular file. in this case, the unmapping will need |
417 | * to invoke file system routines that need the global lock. | 417 | * to invoke file system routines that need the global lock. |
418 | */ | 418 | */ |
419 | asmlinkage unsigned long sys_brk(unsigned long brk) | 419 | SYSCALL_DEFINE1(brk, unsigned long, brk) |
420 | { | 420 | { |
421 | struct mm_struct *mm = current->mm; | 421 | struct mm_struct *mm = current->mm; |
422 | 422 | ||
@@ -1573,7 +1573,7 @@ erase_whole_vma: | |||
1573 | } | 1573 | } |
1574 | EXPORT_SYMBOL(do_munmap); | 1574 | EXPORT_SYMBOL(do_munmap); |
1575 | 1575 | ||
1576 | asmlinkage long sys_munmap(unsigned long addr, size_t len) | 1576 | SYSCALL_DEFINE2(munmap, unsigned long, addr, size_t, len) |
1577 | { | 1577 | { |
1578 | int ret; | 1578 | int ret; |
1579 | struct mm_struct *mm = current->mm; | 1579 | struct mm_struct *mm = current->mm; |
@@ -1657,10 +1657,9 @@ unsigned long do_mremap(unsigned long addr, | |||
1657 | } | 1657 | } |
1658 | EXPORT_SYMBOL(do_mremap); | 1658 | EXPORT_SYMBOL(do_mremap); |
1659 | 1659 | ||
1660 | asmlinkage | 1660 | SYSCALL_DEFINE5(mremap, unsigned long, addr, unsigned long, old_len, |
1661 | unsigned long sys_mremap(unsigned long addr, | 1661 | unsigned long, new_len, unsigned long, flags, |
1662 | unsigned long old_len, unsigned long new_len, | 1662 | unsigned long, new_addr) |
1663 | unsigned long flags, unsigned long new_addr) | ||
1664 | { | 1663 | { |
1665 | unsigned long ret; | 1664 | unsigned long ret; |
1666 | 1665 | ||
diff --git a/mm/swapfile.c b/mm/swapfile.c index da422c47e2ee..f48b831e5e5c 100644 --- a/mm/swapfile.c +++ b/mm/swapfile.c | |||
@@ -1377,7 +1377,7 @@ out: | |||
1377 | return ret; | 1377 | return ret; |
1378 | } | 1378 | } |
1379 | 1379 | ||
1380 | asmlinkage long sys_swapoff(const char __user * specialfile) | 1380 | SYSCALL_DEFINE1(swapoff, const char __user *, specialfile) |
1381 | { | 1381 | { |
1382 | struct swap_info_struct * p = NULL; | 1382 | struct swap_info_struct * p = NULL; |
1383 | unsigned short *swap_map; | 1383 | unsigned short *swap_map; |
@@ -1633,7 +1633,7 @@ late_initcall(max_swapfiles_check); | |||
1633 | * | 1633 | * |
1634 | * The swapon system call | 1634 | * The swapon system call |
1635 | */ | 1635 | */ |
1636 | asmlinkage long sys_swapon(const char __user * specialfile, int swap_flags) | 1636 | SYSCALL_DEFINE2(swapon, const char __user *, specialfile, int, swap_flags) |
1637 | { | 1637 | { |
1638 | struct swap_info_struct * p; | 1638 | struct swap_info_struct * p; |
1639 | char *name = NULL; | 1639 | char *name = NULL; |
diff --git a/net/socket.c b/net/socket.c index 06603d73c411..35dd7371752a 100644 --- a/net/socket.c +++ b/net/socket.c | |||
@@ -1214,7 +1214,7 @@ int sock_create_kern(int family, int type, int protocol, struct socket **res) | |||
1214 | return __sock_create(&init_net, family, type, protocol, res, 1); | 1214 | return __sock_create(&init_net, family, type, protocol, res, 1); |
1215 | } | 1215 | } |
1216 | 1216 | ||
1217 | asmlinkage long sys_socket(int family, int type, int protocol) | 1217 | SYSCALL_DEFINE3(socket, int, family, int, type, int, protocol) |
1218 | { | 1218 | { |
1219 | int retval; | 1219 | int retval; |
1220 | struct socket *sock; | 1220 | struct socket *sock; |
@@ -1255,8 +1255,8 @@ out_release: | |||
1255 | * Create a pair of connected sockets. | 1255 | * Create a pair of connected sockets. |
1256 | */ | 1256 | */ |
1257 | 1257 | ||
1258 | asmlinkage long sys_socketpair(int family, int type, int protocol, | 1258 | SYSCALL_DEFINE4(socketpair, int, family, int, type, int, protocol, |
1259 | int __user *usockvec) | 1259 | int __user *, usockvec) |
1260 | { | 1260 | { |
1261 | struct socket *sock1, *sock2; | 1261 | struct socket *sock1, *sock2; |
1262 | int fd1, fd2, err; | 1262 | int fd1, fd2, err; |
@@ -1356,7 +1356,7 @@ out_fd1: | |||
1356 | * the protocol layer (having also checked the address is ok). | 1356 | * the protocol layer (having also checked the address is ok). |
1357 | */ | 1357 | */ |
1358 | 1358 | ||
1359 | asmlinkage long sys_bind(int fd, struct sockaddr __user *umyaddr, int addrlen) | 1359 | SYSCALL_DEFINE3(bind, int, fd, struct sockaddr __user *, umyaddr, int, addrlen) |
1360 | { | 1360 | { |
1361 | struct socket *sock; | 1361 | struct socket *sock; |
1362 | struct sockaddr_storage address; | 1362 | struct sockaddr_storage address; |
@@ -1385,7 +1385,7 @@ asmlinkage long sys_bind(int fd, struct sockaddr __user *umyaddr, int addrlen) | |||
1385 | * ready for listening. | 1385 | * ready for listening. |
1386 | */ | 1386 | */ |
1387 | 1387 | ||
1388 | asmlinkage long sys_listen(int fd, int backlog) | 1388 | SYSCALL_DEFINE2(listen, int, fd, int, backlog) |
1389 | { | 1389 | { |
1390 | struct socket *sock; | 1390 | struct socket *sock; |
1391 | int err, fput_needed; | 1391 | int err, fput_needed; |
@@ -1418,8 +1418,8 @@ asmlinkage long sys_listen(int fd, int backlog) | |||
1418 | * clean when we restucture accept also. | 1418 | * clean when we restucture accept also. |
1419 | */ | 1419 | */ |
1420 | 1420 | ||
1421 | asmlinkage long sys_accept4(int fd, struct sockaddr __user *upeer_sockaddr, | 1421 | SYSCALL_DEFINE4(accept4, int, fd, struct sockaddr __user *, upeer_sockaddr, |
1422 | int __user *upeer_addrlen, int flags) | 1422 | int __user *, upeer_addrlen, int, flags) |
1423 | { | 1423 | { |
1424 | struct socket *sock, *newsock; | 1424 | struct socket *sock, *newsock; |
1425 | struct file *newfile; | 1425 | struct file *newfile; |
@@ -1502,8 +1502,8 @@ out_fd: | |||
1502 | goto out_put; | 1502 | goto out_put; |
1503 | } | 1503 | } |
1504 | 1504 | ||
1505 | asmlinkage long sys_accept(int fd, struct sockaddr __user *upeer_sockaddr, | 1505 | SYSCALL_DEFINE3(accept, int, fd, struct sockaddr __user *, upeer_sockaddr, |
1506 | int __user *upeer_addrlen) | 1506 | int __user *, upeer_addrlen) |
1507 | { | 1507 | { |
1508 | return sys_accept4(fd, upeer_sockaddr, upeer_addrlen, 0); | 1508 | return sys_accept4(fd, upeer_sockaddr, upeer_addrlen, 0); |
1509 | } | 1509 | } |
@@ -1520,8 +1520,8 @@ asmlinkage long sys_accept(int fd, struct sockaddr __user *upeer_sockaddr, | |||
1520 | * include the -EINPROGRESS status for such sockets. | 1520 | * include the -EINPROGRESS status for such sockets. |
1521 | */ | 1521 | */ |
1522 | 1522 | ||
1523 | asmlinkage long sys_connect(int fd, struct sockaddr __user *uservaddr, | 1523 | SYSCALL_DEFINE3(connect, int, fd, struct sockaddr __user *, uservaddr, |
1524 | int addrlen) | 1524 | int, addrlen) |
1525 | { | 1525 | { |
1526 | struct socket *sock; | 1526 | struct socket *sock; |
1527 | struct sockaddr_storage address; | 1527 | struct sockaddr_storage address; |
@@ -1552,8 +1552,8 @@ out: | |||
1552 | * name to user space. | 1552 | * name to user space. |
1553 | */ | 1553 | */ |
1554 | 1554 | ||
1555 | asmlinkage long sys_getsockname(int fd, struct sockaddr __user *usockaddr, | 1555 | SYSCALL_DEFINE3(getsockname, int, fd, struct sockaddr __user *, usockaddr, |
1556 | int __user *usockaddr_len) | 1556 | int __user *, usockaddr_len) |
1557 | { | 1557 | { |
1558 | struct socket *sock; | 1558 | struct socket *sock; |
1559 | struct sockaddr_storage address; | 1559 | struct sockaddr_storage address; |
@@ -1583,8 +1583,8 @@ out: | |||
1583 | * name to user space. | 1583 | * name to user space. |
1584 | */ | 1584 | */ |
1585 | 1585 | ||
1586 | asmlinkage long sys_getpeername(int fd, struct sockaddr __user *usockaddr, | 1586 | SYSCALL_DEFINE3(getpeername, int, fd, struct sockaddr __user *, usockaddr, |
1587 | int __user *usockaddr_len) | 1587 | int __user *, usockaddr_len) |
1588 | { | 1588 | { |
1589 | struct socket *sock; | 1589 | struct socket *sock; |
1590 | struct sockaddr_storage address; | 1590 | struct sockaddr_storage address; |
@@ -1615,9 +1615,9 @@ asmlinkage long sys_getpeername(int fd, struct sockaddr __user *usockaddr, | |||
1615 | * the protocol. | 1615 | * the protocol. |
1616 | */ | 1616 | */ |
1617 | 1617 | ||
1618 | asmlinkage long sys_sendto(int fd, void __user *buff, size_t len, | 1618 | SYSCALL_DEFINE6(sendto, int, fd, void __user *, buff, size_t, len, |
1619 | unsigned flags, struct sockaddr __user *addr, | 1619 | unsigned, flags, struct sockaddr __user *, addr, |
1620 | int addr_len) | 1620 | int, addr_len) |
1621 | { | 1621 | { |
1622 | struct socket *sock; | 1622 | struct socket *sock; |
1623 | struct sockaddr_storage address; | 1623 | struct sockaddr_storage address; |
@@ -1660,7 +1660,8 @@ out: | |||
1660 | * Send a datagram down a socket. | 1660 | * Send a datagram down a socket. |
1661 | */ | 1661 | */ |
1662 | 1662 | ||
1663 | asmlinkage long sys_send(int fd, void __user *buff, size_t len, unsigned flags) | 1663 | SYSCALL_DEFINE4(send, int, fd, void __user *, buff, size_t, len, |
1664 | unsigned, flags) | ||
1664 | { | 1665 | { |
1665 | return sys_sendto(fd, buff, len, flags, NULL, 0); | 1666 | return sys_sendto(fd, buff, len, flags, NULL, 0); |
1666 | } | 1667 | } |
@@ -1671,9 +1672,9 @@ asmlinkage long sys_send(int fd, void __user *buff, size_t len, unsigned flags) | |||
1671 | * sender address from kernel to user space. | 1672 | * sender address from kernel to user space. |
1672 | */ | 1673 | */ |
1673 | 1674 | ||
1674 | asmlinkage long sys_recvfrom(int fd, void __user *ubuf, size_t size, | 1675 | SYSCALL_DEFINE6(recvfrom, int, fd, void __user *, ubuf, size_t, size, |
1675 | unsigned flags, struct sockaddr __user *addr, | 1676 | unsigned, flags, struct sockaddr __user *, addr, |
1676 | int __user *addr_len) | 1677 | int __user *, addr_len) |
1677 | { | 1678 | { |
1678 | struct socket *sock; | 1679 | struct socket *sock; |
1679 | struct iovec iov; | 1680 | struct iovec iov; |
@@ -1725,8 +1726,8 @@ asmlinkage long sys_recv(int fd, void __user *ubuf, size_t size, | |||
1725 | * to pass the user mode parameter for the protocols to sort out. | 1726 | * to pass the user mode parameter for the protocols to sort out. |
1726 | */ | 1727 | */ |
1727 | 1728 | ||
1728 | asmlinkage long sys_setsockopt(int fd, int level, int optname, | 1729 | SYSCALL_DEFINE5(setsockopt, int, fd, int, level, int, optname, |
1729 | char __user *optval, int optlen) | 1730 | char __user *, optval, int, optlen) |
1730 | { | 1731 | { |
1731 | int err, fput_needed; | 1732 | int err, fput_needed; |
1732 | struct socket *sock; | 1733 | struct socket *sock; |
@@ -1759,8 +1760,8 @@ out_put: | |||
1759 | * to pass a user mode parameter for the protocols to sort out. | 1760 | * to pass a user mode parameter for the protocols to sort out. |
1760 | */ | 1761 | */ |
1761 | 1762 | ||
1762 | asmlinkage long sys_getsockopt(int fd, int level, int optname, | 1763 | SYSCALL_DEFINE5(getsockopt, int, fd, int, level, int, optname, |
1763 | char __user *optval, int __user *optlen) | 1764 | char __user *, optval, int __user *, optlen) |
1764 | { | 1765 | { |
1765 | int err, fput_needed; | 1766 | int err, fput_needed; |
1766 | struct socket *sock; | 1767 | struct socket *sock; |
@@ -1789,7 +1790,7 @@ out_put: | |||
1789 | * Shutdown a socket. | 1790 | * Shutdown a socket. |
1790 | */ | 1791 | */ |
1791 | 1792 | ||
1792 | asmlinkage long sys_shutdown(int fd, int how) | 1793 | SYSCALL_DEFINE2(shutdown, int, fd, int, how) |
1793 | { | 1794 | { |
1794 | int err, fput_needed; | 1795 | int err, fput_needed; |
1795 | struct socket *sock; | 1796 | struct socket *sock; |
@@ -1815,7 +1816,7 @@ asmlinkage long sys_shutdown(int fd, int how) | |||
1815 | * BSD sendmsg interface | 1816 | * BSD sendmsg interface |
1816 | */ | 1817 | */ |
1817 | 1818 | ||
1818 | asmlinkage long sys_sendmsg(int fd, struct msghdr __user *msg, unsigned flags) | 1819 | SYSCALL_DEFINE3(sendmsg, int, fd, struct msghdr __user *, msg, unsigned, flags) |
1819 | { | 1820 | { |
1820 | struct compat_msghdr __user *msg_compat = | 1821 | struct compat_msghdr __user *msg_compat = |
1821 | (struct compat_msghdr __user *)msg; | 1822 | (struct compat_msghdr __user *)msg; |
@@ -1921,8 +1922,8 @@ out: | |||
1921 | * BSD recvmsg interface | 1922 | * BSD recvmsg interface |
1922 | */ | 1923 | */ |
1923 | 1924 | ||
1924 | asmlinkage long sys_recvmsg(int fd, struct msghdr __user *msg, | 1925 | SYSCALL_DEFINE3(recvmsg, int, fd, struct msghdr __user *, msg, |
1925 | unsigned int flags) | 1926 | unsigned int, flags) |
1926 | { | 1927 | { |
1927 | struct compat_msghdr __user *msg_compat = | 1928 | struct compat_msghdr __user *msg_compat = |
1928 | (struct compat_msghdr __user *)msg; | 1929 | (struct compat_msghdr __user *)msg; |
@@ -2045,7 +2046,7 @@ static const unsigned char nargs[19]={ | |||
2045 | * it is set by the callees. | 2046 | * it is set by the callees. |
2046 | */ | 2047 | */ |
2047 | 2048 | ||
2048 | asmlinkage long sys_socketcall(int call, unsigned long __user *args) | 2049 | SYSCALL_DEFINE2(socketcall, int, call, unsigned long __user *, args) |
2049 | { | 2050 | { |
2050 | unsigned long a[6]; | 2051 | unsigned long a[6]; |
2051 | unsigned long a0, a1; | 2052 | unsigned long a0, a1; |
diff --git a/security/keys/keyctl.c b/security/keys/keyctl.c index 09796797d122..e9335e1c6cf5 100644 --- a/security/keys/keyctl.c +++ b/security/keys/keyctl.c | |||
@@ -54,11 +54,11 @@ static int key_get_type_from_user(char *type, | |||
54 | * - returns the new key's serial number | 54 | * - returns the new key's serial number |
55 | * - implements add_key() | 55 | * - implements add_key() |
56 | */ | 56 | */ |
57 | asmlinkage long sys_add_key(const char __user *_type, | 57 | SYSCALL_DEFINE5(add_key, const char __user *, _type, |
58 | const char __user *_description, | 58 | const char __user *, _description, |
59 | const void __user *_payload, | 59 | const void __user *, _payload, |
60 | size_t plen, | 60 | size_t, plen, |
61 | key_serial_t ringid) | 61 | key_serial_t, ringid) |
62 | { | 62 | { |
63 | key_ref_t keyring_ref, key_ref; | 63 | key_ref_t keyring_ref, key_ref; |
64 | char type[32], *description; | 64 | char type[32], *description; |
@@ -146,10 +146,10 @@ asmlinkage long sys_add_key(const char __user *_type, | |||
146 | * - if the _callout_info string is empty, it will be rendered as "-" | 146 | * - if the _callout_info string is empty, it will be rendered as "-" |
147 | * - implements request_key() | 147 | * - implements request_key() |
148 | */ | 148 | */ |
149 | asmlinkage long sys_request_key(const char __user *_type, | 149 | SYSCALL_DEFINE4(request_key, const char __user *, _type, |
150 | const char __user *_description, | 150 | const char __user *, _description, |
151 | const char __user *_callout_info, | 151 | const char __user *, _callout_info, |
152 | key_serial_t destringid) | 152 | key_serial_t, destringid) |
153 | { | 153 | { |
154 | struct key_type *ktype; | 154 | struct key_type *ktype; |
155 | struct key *key; | 155 | struct key *key; |
@@ -1216,8 +1216,8 @@ long keyctl_get_security(key_serial_t keyid, | |||
1216 | /* | 1216 | /* |
1217 | * the key control system call | 1217 | * the key control system call |
1218 | */ | 1218 | */ |
1219 | asmlinkage long sys_keyctl(int option, unsigned long arg2, unsigned long arg3, | 1219 | SYSCALL_DEFINE5(keyctl, int, option, unsigned long, arg2, unsigned long, arg3, |
1220 | unsigned long arg4, unsigned long arg5) | 1220 | unsigned long, arg4, unsigned long, arg5) |
1221 | { | 1221 | { |
1222 | switch (option) { | 1222 | switch (option) { |
1223 | case KEYCTL_GET_KEYRING_ID: | 1223 | case KEYCTL_GET_KEYRING_ID: |