diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2009-01-14 08:14:03 -0500 |
---|---|---|
committer | Heiko Carstens <heiko.carstens@de.ibm.com> | 2009-01-14 08:15:18 -0500 |
commit | 58fd3aa288939d3097fa04505b25c2f5e6e144d1 (patch) | |
tree | 73d65d8494f80884c765265d78496fba6ef00784 | |
parent | 6673e0c3fbeaed2cd08e2fd4a4aa97382d6fedb0 (diff) |
[CVE-2009-0029] System call wrappers part 01
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
-rw-r--r-- | kernel/hrtimer.c | 4 | ||||
-rw-r--r-- | kernel/sys.c | 2 | ||||
-rw-r--r-- | kernel/time.c | 14 | ||||
-rw-r--r-- | kernel/timer.c | 6 |
4 files changed, 13 insertions, 13 deletions
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/sys.c b/kernel/sys.c index 763c3c17ded3..37165e552331 100644 --- a/kernel/sys.c +++ b/kernel/sys.c | |||
@@ -919,7 +919,7 @@ void do_sys_times(struct tms *tms) | |||
919 | tms->tms_cstime = cputime_to_clock_t(cstime); | 919 | tms->tms_cstime = cputime_to_clock_t(cstime); |
920 | } | 920 | } |
921 | 921 | ||
922 | asmlinkage long sys_times(struct tms __user * tbuf) | 922 | SYSCALL_DEFINE1(times, struct tms __user *, tbuf) |
923 | { | 923 | { |
924 | if (tbuf) { | 924 | if (tbuf) { |
925 | struct tms tmp; | 925 | struct tms tmp; |
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 7b8697d7f04d..76041df06c57 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 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 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 | } |
@@ -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 | } |