diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-01-21 04:39:51 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-01-21 04:39:51 -0500 |
commit | 198030782cedf25391e67e7c88b04f87a5eb6563 (patch) | |
tree | 5b7368c6bf052bcb4bb273497a57900720d36f51 /kernel | |
parent | 4ec71fa2d2c3f1040348f2604f4b8ccc833d1c2e (diff) | |
parent | 92181f190b649f7ef2b79cbf5c00f26ccc66da2a (diff) |
Merge branch 'x86/mm' into core/percpu
Conflicts:
arch/x86/mm/fault.c
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/Makefile | 5 | ||||
-rw-r--r-- | kernel/acct.c | 2 | ||||
-rw-r--r-- | kernel/capability.c | 4 | ||||
-rw-r--r-- | kernel/cpuset.c | 2 | ||||
-rw-r--r-- | kernel/exec_domain.c | 3 | ||||
-rw-r--r-- | kernel/exit.c | 17 | ||||
-rw-r--r-- | kernel/fork.c | 4 | ||||
-rw-r--r-- | kernel/futex.c | 17 | ||||
-rw-r--r-- | kernel/hrtimer.c | 4 | ||||
-rw-r--r-- | kernel/itimer.c | 7 | ||||
-rw-r--r-- | kernel/kexec.c | 5 | ||||
-rw-r--r-- | kernel/kprobes.c | 2 | ||||
-rw-r--r-- | kernel/module.c | 10 | ||||
-rw-r--r-- | kernel/posix-timers.c | 43 | ||||
-rw-r--r-- | kernel/power/Makefile | 3 | ||||
-rw-r--r-- | kernel/printk.c | 7 | ||||
-rw-r--r-- | kernel/ptrace.c | 2 | ||||
-rw-r--r-- | kernel/resource.c | 1 | ||||
-rw-r--r-- | kernel/sched.c | 43 | ||||
-rw-r--r-- | kernel/sched_fair.c | 37 | ||||
-rw-r--r-- | kernel/signal.c | 59 | ||||
-rw-r--r-- | kernel/sys.c | 70 | ||||
-rw-r--r-- | kernel/sys_ni.c | 1 | ||||
-rw-r--r-- | kernel/sysctl.c | 13 | ||||
-rw-r--r-- | kernel/time.c | 14 | ||||
-rw-r--r-- | kernel/timer.c | 18 | ||||
-rw-r--r-- | kernel/uid16.c | 39 |
27 files changed, 222 insertions, 210 deletions
diff --git a/kernel/Makefile b/kernel/Makefile index 2aebc4cd7878..170a9213c1b6 100644 --- a/kernel/Makefile +++ b/kernel/Makefile | |||
@@ -40,9 +40,8 @@ obj-$(CONFIG_RT_MUTEXES) += rtmutex.o | |||
40 | obj-$(CONFIG_DEBUG_RT_MUTEXES) += rtmutex-debug.o | 40 | obj-$(CONFIG_DEBUG_RT_MUTEXES) += rtmutex-debug.o |
41 | obj-$(CONFIG_RT_MUTEX_TESTER) += rtmutex-tester.o | 41 | obj-$(CONFIG_RT_MUTEX_TESTER) += rtmutex-tester.o |
42 | obj-$(CONFIG_GENERIC_ISA_DMA) += dma.o | 42 | obj-$(CONFIG_GENERIC_ISA_DMA) += dma.o |
43 | ifeq ($(CONFIG_USE_GENERIC_SMP_HELPERS),y) | 43 | obj-$(CONFIG_USE_GENERIC_SMP_HELPERS) += smp.o |
44 | obj-y += smp.o | 44 | ifneq ($(CONFIG_SMP),y) |
45 | else | ||
46 | obj-y += up.o | 45 | obj-y += up.o |
47 | endif | 46 | endif |
48 | obj-$(CONFIG_SMP) += spinlock.o | 47 | obj-$(CONFIG_SMP) += spinlock.o |
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/cpuset.c b/kernel/cpuset.c index 647c77a88fcb..a85678865c5e 100644 --- a/kernel/cpuset.c +++ b/kernel/cpuset.c | |||
@@ -568,7 +568,7 @@ update_domain_attr_tree(struct sched_domain_attr *dattr, struct cpuset *c) | |||
568 | * load balancing domains (sched domains) as specified by that partial | 568 | * load balancing domains (sched domains) as specified by that partial |
569 | * partition. | 569 | * partition. |
570 | * | 570 | * |
571 | * See "What is sched_load_balance" in Documentation/cpusets.txt | 571 | * See "What is sched_load_balance" in Documentation/cgroups/cpusets.txt |
572 | * for a background explanation of this. | 572 | * for a background explanation of this. |
573 | * | 573 | * |
574 | * Does not return errors, on the theory that the callers of this | 574 | * Does not return errors, on the theory that the callers of this |
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 2a803c28df9e..70612c19ac96 100644 --- a/kernel/exit.c +++ b/kernel/exit.c | |||
@@ -1138,7 +1138,7 @@ NORET_TYPE void complete_and_exit(struct completion *comp, long code) | |||
1138 | 1138 | ||
1139 | EXPORT_SYMBOL(complete_and_exit); | 1139 | EXPORT_SYMBOL(complete_and_exit); |
1140 | 1140 | ||
1141 | asmlinkage long sys_exit(int error_code) | 1141 | SYSCALL_DEFINE1(exit, int, error_code) |
1142 | { | 1142 | { |
1143 | do_exit((error_code&0xff)<<8); | 1143 | do_exit((error_code&0xff)<<8); |
1144 | } | 1144 | } |
@@ -1179,9 +1179,11 @@ do_group_exit(int exit_code) | |||
1179 | * wait4()-ing process will get the correct exit code - even if this | 1179 | * wait4()-ing process will get the correct exit code - even if this |
1180 | * thread is not the thread group leader. | 1180 | * thread is not the thread group leader. |
1181 | */ | 1181 | */ |
1182 | asmlinkage void sys_exit_group(int error_code) | 1182 | SYSCALL_DEFINE1(exit_group, int, error_code) |
1183 | { | 1183 | { |
1184 | do_group_exit((error_code & 0xff) << 8); | 1184 | do_group_exit((error_code & 0xff) << 8); |
1185 | /* NOTREACHED */ | ||
1186 | return 0; | ||
1185 | } | 1187 | } |
1186 | 1188 | ||
1187 | static struct pid *task_pid_type(struct task_struct *task, enum pid_type type) | 1189 | static struct pid *task_pid_type(struct task_struct *task, enum pid_type type) |
@@ -1749,9 +1751,8 @@ end: | |||
1749 | return retval; | 1751 | return retval; |
1750 | } | 1752 | } |
1751 | 1753 | ||
1752 | asmlinkage long sys_waitid(int which, pid_t upid, | 1754 | SYSCALL_DEFINE5(waitid, int, which, pid_t, upid, struct siginfo __user *, |
1753 | struct siginfo __user *infop, int options, | 1755 | infop, int, options, struct rusage __user *, ru) |
1754 | struct rusage __user *ru) | ||
1755 | { | 1756 | { |
1756 | struct pid *pid = NULL; | 1757 | struct pid *pid = NULL; |
1757 | enum pid_type type; | 1758 | enum pid_type type; |
@@ -1790,8 +1791,8 @@ asmlinkage long sys_waitid(int which, pid_t upid, | |||
1790 | return ret; | 1791 | return ret; |
1791 | } | 1792 | } |
1792 | 1793 | ||
1793 | asmlinkage long sys_wait4(pid_t upid, int __user *stat_addr, | 1794 | SYSCALL_DEFINE4(wait4, pid_t, upid, int __user *, stat_addr, |
1794 | int options, struct rusage __user *ru) | 1795 | int, options, struct rusage __user *, ru) |
1795 | { | 1796 | { |
1796 | struct pid *pid = NULL; | 1797 | struct pid *pid = NULL; |
1797 | enum pid_type type; | 1798 | enum pid_type type; |
@@ -1828,7 +1829,7 @@ asmlinkage long sys_wait4(pid_t upid, int __user *stat_addr, | |||
1828 | * sys_waitpid() remains for compatibility. waitpid() should be | 1829 | * sys_waitpid() remains for compatibility. waitpid() should be |
1829 | * implemented by calling sys_wait4() from libc.a. | 1830 | * implemented by calling sys_wait4() from libc.a. |
1830 | */ | 1831 | */ |
1831 | asmlinkage long sys_waitpid(pid_t pid, int __user *stat_addr, int options) | 1832 | SYSCALL_DEFINE3(waitpid, pid_t, pid, int __user *, stat_addr, int, options) |
1832 | { | 1833 | { |
1833 | return sys_wait4(pid, stat_addr, options, NULL); | 1834 | return sys_wait4(pid, stat_addr, options, NULL); |
1834 | } | 1835 | } |
diff --git a/kernel/fork.c b/kernel/fork.c index 4a9b318dad0d..5ba5f5d24899 100644 --- a/kernel/fork.c +++ b/kernel/fork.c | |||
@@ -906,7 +906,7 @@ static void copy_flags(unsigned long clone_flags, struct task_struct *p) | |||
906 | clear_freeze_flag(p); | 906 | clear_freeze_flag(p); |
907 | } | 907 | } |
908 | 908 | ||
909 | asmlinkage long sys_set_tid_address(int __user *tidptr) | 909 | SYSCALL_DEFINE1(set_tid_address, int __user *, tidptr) |
910 | { | 910 | { |
911 | current->clear_child_tid = tidptr; | 911 | current->clear_child_tid = tidptr; |
912 | 912 | ||
@@ -1608,7 +1608,7 @@ static int unshare_fd(unsigned long unshare_flags, struct files_struct **new_fdp | |||
1608 | * constructed. Here we are modifying the current, active, | 1608 | * constructed. Here we are modifying the current, active, |
1609 | * task_struct. | 1609 | * task_struct. |
1610 | */ | 1610 | */ |
1611 | asmlinkage long sys_unshare(unsigned long unshare_flags) | 1611 | SYSCALL_DEFINE1(unshare, unsigned long, unshare_flags) |
1612 | { | 1612 | { |
1613 | int err = 0; | 1613 | int err = 0; |
1614 | struct fs_struct *fs, *new_fs = NULL; | 1614 | 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/kprobes.c b/kernel/kprobes.c index 1b9cbdc0127a..7ba8cd9845cb 100644 --- a/kernel/kprobes.c +++ b/kernel/kprobes.c | |||
@@ -123,7 +123,7 @@ static int collect_garbage_slots(void); | |||
123 | static int __kprobes check_safety(void) | 123 | static int __kprobes check_safety(void) |
124 | { | 124 | { |
125 | int ret = 0; | 125 | int ret = 0; |
126 | #if defined(CONFIG_PREEMPT) && defined(CONFIG_PM) | 126 | #if defined(CONFIG_PREEMPT) && defined(CONFIG_FREEZER) |
127 | ret = freeze_processes(); | 127 | ret = freeze_processes(); |
128 | if (ret == 0) { | 128 | if (ret == 0) { |
129 | struct task_struct *p, *q; | 129 | struct task_struct *p, *q; |
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/power/Makefile b/kernel/power/Makefile index 597823b5b700..d7a10167a25b 100644 --- a/kernel/power/Makefile +++ b/kernel/power/Makefile | |||
@@ -4,7 +4,8 @@ EXTRA_CFLAGS += -DDEBUG | |||
4 | endif | 4 | endif |
5 | 5 | ||
6 | obj-y := main.o | 6 | obj-y := main.o |
7 | obj-$(CONFIG_PM_SLEEP) += process.o console.o | 7 | obj-$(CONFIG_PM_SLEEP) += console.o |
8 | obj-$(CONFIG_FREEZER) += process.o | ||
8 | obj-$(CONFIG_HIBERNATION) += swsusp.o disk.o snapshot.o swap.o user.o | 9 | obj-$(CONFIG_HIBERNATION) += swsusp.o disk.o snapshot.o swap.o user.o |
9 | 10 | ||
10 | obj-$(CONFIG_MAGIC_SYSRQ) += poweroff.o | 11 | obj-$(CONFIG_MAGIC_SYSRQ) += poweroff.o |
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/resource.c b/kernel/resource.c index ca6a1536b205..fd5d7d574bb9 100644 --- a/kernel/resource.c +++ b/kernel/resource.c | |||
@@ -620,6 +620,7 @@ resource_size_t resource_alignment(struct resource *res) | |||
620 | * @start: resource start address | 620 | * @start: resource start address |
621 | * @n: resource region size | 621 | * @n: resource region size |
622 | * @name: reserving caller's ID string | 622 | * @name: reserving caller's ID string |
623 | * @flags: IO resource flags | ||
623 | */ | 624 | */ |
624 | struct resource * __request_region(struct resource *parent, | 625 | struct resource * __request_region(struct resource *parent, |
625 | resource_size_t start, resource_size_t n, | 626 | resource_size_t start, resource_size_t n, |
diff --git a/kernel/sched.c b/kernel/sched.c index 1d2909067040..c71d7d501edb 100644 --- a/kernel/sched.c +++ b/kernel/sched.c | |||
@@ -1323,8 +1323,8 @@ static inline void update_load_sub(struct load_weight *lw, unsigned long dec) | |||
1323 | * slice expiry etc. | 1323 | * slice expiry etc. |
1324 | */ | 1324 | */ |
1325 | 1325 | ||
1326 | #define WEIGHT_IDLEPRIO 2 | 1326 | #define WEIGHT_IDLEPRIO 3 |
1327 | #define WMULT_IDLEPRIO (1 << 31) | 1327 | #define WMULT_IDLEPRIO 1431655765 |
1328 | 1328 | ||
1329 | /* | 1329 | /* |
1330 | * Nice levels are multiplicative, with a gentle 10% change for every | 1330 | * Nice levels are multiplicative, with a gentle 10% change for every |
@@ -4440,7 +4440,7 @@ void __kprobes sub_preempt_count(int val) | |||
4440 | /* | 4440 | /* |
4441 | * Underflow? | 4441 | * Underflow? |
4442 | */ | 4442 | */ |
4443 | if (DEBUG_LOCKS_WARN_ON(val > preempt_count() - (!!kernel_locked()))) | 4443 | if (DEBUG_LOCKS_WARN_ON(val > preempt_count())) |
4444 | return; | 4444 | return; |
4445 | /* | 4445 | /* |
4446 | * Is the spinlock portion underflowing? | 4446 | * Is the spinlock portion underflowing? |
@@ -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; |
@@ -9045,6 +9045,13 @@ static int tg_schedulable(struct task_group *tg, void *data) | |||
9045 | runtime = d->rt_runtime; | 9045 | runtime = d->rt_runtime; |
9046 | } | 9046 | } |
9047 | 9047 | ||
9048 | #ifdef CONFIG_USER_SCHED | ||
9049 | if (tg == &root_task_group) { | ||
9050 | period = global_rt_period(); | ||
9051 | runtime = global_rt_runtime(); | ||
9052 | } | ||
9053 | #endif | ||
9054 | |||
9048 | /* | 9055 | /* |
9049 | * Cannot have more runtime than the period. | 9056 | * Cannot have more runtime than the period. |
9050 | */ | 9057 | */ |
diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c index 8e1352c75557..5cc1c162044f 100644 --- a/kernel/sched_fair.c +++ b/kernel/sched_fair.c | |||
@@ -283,7 +283,7 @@ static void update_min_vruntime(struct cfs_rq *cfs_rq) | |||
283 | struct sched_entity, | 283 | struct sched_entity, |
284 | run_node); | 284 | run_node); |
285 | 285 | ||
286 | if (vruntime == cfs_rq->min_vruntime) | 286 | if (!cfs_rq->curr) |
287 | vruntime = se->vruntime; | 287 | vruntime = se->vruntime; |
288 | else | 288 | else |
289 | vruntime = min_vruntime(vruntime, se->vruntime); | 289 | vruntime = min_vruntime(vruntime, se->vruntime); |
@@ -429,7 +429,10 @@ static u64 sched_slice(struct cfs_rq *cfs_rq, struct sched_entity *se) | |||
429 | u64 slice = __sched_period(cfs_rq->nr_running + !se->on_rq); | 429 | u64 slice = __sched_period(cfs_rq->nr_running + !se->on_rq); |
430 | 430 | ||
431 | for_each_sched_entity(se) { | 431 | for_each_sched_entity(se) { |
432 | struct load_weight *load = &cfs_rq->load; | 432 | struct load_weight *load; |
433 | |||
434 | cfs_rq = cfs_rq_of(se); | ||
435 | load = &cfs_rq->load; | ||
433 | 436 | ||
434 | if (unlikely(!se->on_rq)) { | 437 | if (unlikely(!se->on_rq)) { |
435 | struct load_weight lw = cfs_rq->load; | 438 | struct load_weight lw = cfs_rq->load; |
@@ -677,9 +680,13 @@ place_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int initial) | |||
677 | unsigned long thresh = sysctl_sched_latency; | 680 | unsigned long thresh = sysctl_sched_latency; |
678 | 681 | ||
679 | /* | 682 | /* |
680 | * convert the sleeper threshold into virtual time | 683 | * Convert the sleeper threshold into virtual time. |
684 | * SCHED_IDLE is a special sub-class. We care about | ||
685 | * fairness only relative to other SCHED_IDLE tasks, | ||
686 | * all of which have the same weight. | ||
681 | */ | 687 | */ |
682 | if (sched_feat(NORMALIZED_SLEEPER)) | 688 | if (sched_feat(NORMALIZED_SLEEPER) && |
689 | task_of(se)->policy != SCHED_IDLE) | ||
683 | thresh = calc_delta_fair(thresh, se); | 690 | thresh = calc_delta_fair(thresh, se); |
684 | 691 | ||
685 | vruntime -= thresh; | 692 | vruntime -= thresh; |
@@ -1340,14 +1347,18 @@ wakeup_preempt_entity(struct sched_entity *curr, struct sched_entity *se) | |||
1340 | 1347 | ||
1341 | static void set_last_buddy(struct sched_entity *se) | 1348 | static void set_last_buddy(struct sched_entity *se) |
1342 | { | 1349 | { |
1343 | for_each_sched_entity(se) | 1350 | if (likely(task_of(se)->policy != SCHED_IDLE)) { |
1344 | cfs_rq_of(se)->last = se; | 1351 | for_each_sched_entity(se) |
1352 | cfs_rq_of(se)->last = se; | ||
1353 | } | ||
1345 | } | 1354 | } |
1346 | 1355 | ||
1347 | static void set_next_buddy(struct sched_entity *se) | 1356 | static void set_next_buddy(struct sched_entity *se) |
1348 | { | 1357 | { |
1349 | for_each_sched_entity(se) | 1358 | if (likely(task_of(se)->policy != SCHED_IDLE)) { |
1350 | cfs_rq_of(se)->next = se; | 1359 | for_each_sched_entity(se) |
1360 | cfs_rq_of(se)->next = se; | ||
1361 | } | ||
1351 | } | 1362 | } |
1352 | 1363 | ||
1353 | /* | 1364 | /* |
@@ -1393,12 +1404,18 @@ static void check_preempt_wakeup(struct rq *rq, struct task_struct *p, int sync) | |||
1393 | return; | 1404 | return; |
1394 | 1405 | ||
1395 | /* | 1406 | /* |
1396 | * Batch tasks do not preempt (their preemption is driven by | 1407 | * Batch and idle tasks do not preempt (their preemption is driven by |
1397 | * the tick): | 1408 | * the tick): |
1398 | */ | 1409 | */ |
1399 | if (unlikely(p->policy == SCHED_BATCH)) | 1410 | if (unlikely(p->policy != SCHED_NORMAL)) |
1400 | return; | 1411 | return; |
1401 | 1412 | ||
1413 | /* Idle tasks are by definition preempted by everybody. */ | ||
1414 | if (unlikely(curr->policy == SCHED_IDLE)) { | ||
1415 | resched_task(curr); | ||
1416 | return; | ||
1417 | } | ||
1418 | |||
1402 | if (!sched_feat(WAKEUP_PREEMPT)) | 1419 | if (!sched_feat(WAKEUP_PREEMPT)) |
1403 | return; | 1420 | return; |
1404 | 1421 | ||
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..368d1638ee78 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c | |||
@@ -144,6 +144,7 @@ extern int acct_parm[]; | |||
144 | 144 | ||
145 | #ifdef CONFIG_IA64 | 145 | #ifdef CONFIG_IA64 |
146 | extern int no_unaligned_warning; | 146 | extern int no_unaligned_warning; |
147 | extern int unaligned_dump_stack; | ||
147 | #endif | 148 | #endif |
148 | 149 | ||
149 | #ifdef CONFIG_RT_MUTEXES | 150 | #ifdef CONFIG_RT_MUTEXES |
@@ -781,6 +782,14 @@ static struct ctl_table kern_table[] = { | |||
781 | .mode = 0644, | 782 | .mode = 0644, |
782 | .proc_handler = &proc_dointvec, | 783 | .proc_handler = &proc_dointvec, |
783 | }, | 784 | }, |
785 | { | ||
786 | .ctl_name = CTL_UNNUMBERED, | ||
787 | .procname = "unaligned-dump-stack", | ||
788 | .data = &unaligned_dump_stack, | ||
789 | .maxlen = sizeof (int), | ||
790 | .mode = 0644, | ||
791 | .proc_handler = &proc_dointvec, | ||
792 | }, | ||
784 | #endif | 793 | #endif |
785 | #ifdef CONFIG_DETECT_SOFTLOCKUP | 794 | #ifdef CONFIG_DETECT_SOFTLOCKUP |
786 | { | 795 | { |
@@ -1688,7 +1697,7 @@ int do_sysctl(int __user *name, int nlen, void __user *oldval, size_t __user *ol | |||
1688 | return error; | 1697 | return error; |
1689 | } | 1698 | } |
1690 | 1699 | ||
1691 | asmlinkage long sys_sysctl(struct __sysctl_args __user *args) | 1700 | SYSCALL_DEFINE1(sysctl, struct __sysctl_args __user *, args) |
1692 | { | 1701 | { |
1693 | struct __sysctl_args tmp; | 1702 | struct __sysctl_args tmp; |
1694 | int error; | 1703 | int error; |
@@ -2989,7 +2998,7 @@ int sysctl_ms_jiffies(struct ctl_table *table, | |||
2989 | #else /* CONFIG_SYSCTL_SYSCALL */ | 2998 | #else /* CONFIG_SYSCTL_SYSCALL */ |
2990 | 2999 | ||
2991 | 3000 | ||
2992 | asmlinkage long sys_sysctl(struct __sysctl_args __user *args) | 3001 | SYSCALL_DEFINE1(sysctl, struct __sysctl_args __user *, args) |
2993 | { | 3002 | { |
2994 | struct __sysctl_args tmp; | 3003 | struct __sysctl_args tmp; |
2995 | int error; | 3004 | 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 | } |