Commit a5f8fa9e authored by Heiko Carstens's avatar Heiko Carstens

[CVE-2009-0029] System call wrappers part 09

Signed-off-by: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
parent 17da2bd9
...@@ -36,7 +36,7 @@ static void do_sync(unsigned long wait) ...@@ -36,7 +36,7 @@ static void do_sync(unsigned long wait)
laptop_sync_completion(); laptop_sync_completion();
} }
asmlinkage long sys_sync(void) SYSCALL_DEFINE0(sync)
{ {
do_sync(1); do_sync(1);
return 0; return 0;
...@@ -144,12 +144,12 @@ static int do_fsync(unsigned int fd, int datasync) ...@@ -144,12 +144,12 @@ static int do_fsync(unsigned int fd, int datasync)
return ret; return ret;
} }
asmlinkage long sys_fsync(unsigned int fd) SYSCALL_DEFINE1(fsync, unsigned int, fd)
{ {
return do_fsync(fd, 0); return do_fsync(fd, 0);
} }
asmlinkage long sys_fdatasync(unsigned int fd) SYSCALL_DEFINE1(fdatasync, unsigned int, fd)
{ {
return do_fsync(fd, 1); return do_fsync(fd, 1);
} }
......
...@@ -2279,7 +2279,7 @@ static int do_tkill(pid_t tgid, pid_t pid, int sig) ...@@ -2279,7 +2279,7 @@ static int do_tkill(pid_t tgid, pid_t pid, int sig)
* exists but it's not belonging to the target process anymore. This * exists but it's not belonging to the target process anymore. This
* method solves the problem of threads exiting and PIDs getting reused. * method solves the problem of threads exiting and PIDs getting reused.
*/ */
asmlinkage long sys_tgkill(pid_t tgid, pid_t pid, int sig) SYSCALL_DEFINE3(tgkill, pid_t, tgid, pid_t, pid, int, sig)
{ {
/* This is only valid for single tasks */ /* This is only valid for single tasks */
if (pid <= 0 || tgid <= 0) if (pid <= 0 || tgid <= 0)
...@@ -2291,8 +2291,7 @@ asmlinkage long sys_tgkill(pid_t tgid, pid_t pid, int sig) ...@@ -2291,8 +2291,7 @@ asmlinkage long sys_tgkill(pid_t tgid, pid_t pid, int sig)
/* /*
* Send a signal to only one task, even if it's a CLONE_THREAD task. * Send a signal to only one task, even if it's a CLONE_THREAD task.
*/ */
asmlinkage long SYSCALL_DEFINE2(tkill, pid_t, pid, int, sig)
sys_tkill(pid_t pid, int sig)
{ {
/* This is only valid for single tasks */ /* This is only valid for single tasks */
if (pid <= 0) if (pid <= 0)
...@@ -2301,8 +2300,8 @@ sys_tkill(pid_t pid, int sig) ...@@ -2301,8 +2300,8 @@ sys_tkill(pid_t pid, int sig)
return do_tkill(0, pid, sig); return do_tkill(0, pid, sig);
} }
asmlinkage long SYSCALL_DEFINE3(rt_sigqueueinfo, pid_t, pid, int, sig,
sys_rt_sigqueueinfo(pid_t pid, int sig, siginfo_t __user *uinfo) siginfo_t __user *, uinfo)
{ {
siginfo_t info; siginfo_t info;
...@@ -2526,15 +2525,13 @@ sys_rt_sigaction(int sig, ...@@ -2526,15 +2525,13 @@ sys_rt_sigaction(int sig,
/* /*
* For backwards compatibility. Functionality superseded by sigprocmask. * For backwards compatibility. Functionality superseded by sigprocmask.
*/ */
asmlinkage long SYSCALL_DEFINE0(sgetmask)
sys_sgetmask(void)
{ {
/* SMP safe */ /* SMP safe */
return current->blocked.sig[0]; return current->blocked.sig[0];
} }
asmlinkage long SYSCALL_DEFINE1(ssetmask, int, newmask)
sys_ssetmask(int newmask)
{ {
int old; int old;
...@@ -2554,8 +2551,7 @@ sys_ssetmask(int newmask) ...@@ -2554,8 +2551,7 @@ sys_ssetmask(int newmask)
/* /*
* For backwards compatibility. Functionality superseded by sigaction. * For backwards compatibility. Functionality superseded by sigaction.
*/ */
asmlinkage long SYSCALL_DEFINE2(signal, int, sig, __sighandler_t, handler)
sys_signal(int sig, __sighandler_t handler)
{ {
struct k_sigaction new_sa, old_sa; struct k_sigaction new_sa, old_sa;
int ret; int ret;
...@@ -2572,8 +2568,7 @@ sys_signal(int sig, __sighandler_t handler) ...@@ -2572,8 +2568,7 @@ sys_signal(int sig, __sighandler_t handler)
#ifdef __ARCH_WANT_SYS_PAUSE #ifdef __ARCH_WANT_SYS_PAUSE
asmlinkage long SYSCALL_DEFINE0(pause)
sys_pause(void)
{ {
current->state = TASK_INTERRUPTIBLE; current->state = TASK_INTERRUPTIBLE;
schedule(); schedule();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment