Commit 5add95d4 authored by Heiko Carstens's avatar Heiko Carstens

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

Signed-off-by: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
parent 362e9c07
...@@ -5126,7 +5126,7 @@ int can_nice(const struct task_struct *p, const int nice) ...@@ -5126,7 +5126,7 @@ int can_nice(const struct task_struct *p, const int nice)
* sys_setpriority is a more generic, but much slower function that * sys_setpriority is a more generic, but much slower function that
* does similar things. * does similar things.
*/ */
asmlinkage long sys_nice(int increment) SYSCALL_DEFINE1(nice, int, increment)
{ {
long nice, retval; long nice, retval;
...@@ -5433,8 +5433,8 @@ do_sched_setscheduler(pid_t pid, int policy, struct sched_param __user *param) ...@@ -5433,8 +5433,8 @@ do_sched_setscheduler(pid_t pid, int policy, struct sched_param __user *param)
* @policy: new policy. * @policy: new policy.
* @param: structure containing the new RT priority. * @param: structure containing the new RT priority.
*/ */
asmlinkage long SYSCALL_DEFINE3(sched_setscheduler, pid_t, pid, int, policy,
sys_sched_setscheduler(pid_t pid, int policy, struct sched_param __user *param) struct sched_param __user *, param)
{ {
/* negative values for policy are not valid */ /* negative values for policy are not valid */
if (policy < 0) if (policy < 0)
...@@ -5448,7 +5448,7 @@ sys_sched_setscheduler(pid_t pid, int policy, struct sched_param __user *param) ...@@ -5448,7 +5448,7 @@ sys_sched_setscheduler(pid_t pid, int policy, struct sched_param __user *param)
* @pid: the pid in question. * @pid: the pid in question.
* @param: structure containing the new RT priority. * @param: structure containing the new RT priority.
*/ */
asmlinkage long sys_sched_setparam(pid_t pid, struct sched_param __user *param) SYSCALL_DEFINE2(sched_setparam, pid_t, pid, struct sched_param __user *, param)
{ {
return do_sched_setscheduler(pid, -1, param); return do_sched_setscheduler(pid, -1, param);
} }
...@@ -5457,7 +5457,7 @@ asmlinkage long sys_sched_setparam(pid_t pid, struct sched_param __user *param) ...@@ -5457,7 +5457,7 @@ asmlinkage long sys_sched_setparam(pid_t pid, struct sched_param __user *param)
* sys_sched_getscheduler - get the policy (scheduling class) of a thread * sys_sched_getscheduler - get the policy (scheduling class) of a thread
* @pid: the pid in question. * @pid: the pid in question.
*/ */
asmlinkage long sys_sched_getscheduler(pid_t pid) SYSCALL_DEFINE1(sched_getscheduler, pid_t, pid)
{ {
struct task_struct *p; struct task_struct *p;
int retval; int retval;
...@@ -5482,7 +5482,7 @@ asmlinkage long sys_sched_getscheduler(pid_t pid) ...@@ -5482,7 +5482,7 @@ asmlinkage long sys_sched_getscheduler(pid_t pid)
* @pid: the pid in question. * @pid: the pid in question.
* @param: structure containing the RT priority. * @param: structure containing the RT priority.
*/ */
asmlinkage long sys_sched_getparam(pid_t pid, struct sched_param __user *param) SYSCALL_DEFINE2(sched_getparam, pid_t, pid, struct sched_param __user *, param)
{ {
struct sched_param lp; struct sched_param lp;
struct task_struct *p; struct task_struct *p;
...@@ -5600,8 +5600,8 @@ static int get_user_cpu_mask(unsigned long __user *user_mask_ptr, unsigned len, ...@@ -5600,8 +5600,8 @@ static int get_user_cpu_mask(unsigned long __user *user_mask_ptr, unsigned len,
* @len: length in bytes of the bitmask pointed to by user_mask_ptr * @len: length in bytes of the bitmask pointed to by user_mask_ptr
* @user_mask_ptr: user-space pointer to the new cpu mask * @user_mask_ptr: user-space pointer to the new cpu mask
*/ */
asmlinkage long sys_sched_setaffinity(pid_t pid, unsigned int len, SYSCALL_DEFINE3(sched_setaffinity, pid_t, pid, unsigned int, len,
unsigned long __user *user_mask_ptr) unsigned long __user *, user_mask_ptr)
{ {
cpumask_var_t new_mask; cpumask_var_t new_mask;
int retval; int retval;
...@@ -5648,8 +5648,8 @@ long sched_getaffinity(pid_t pid, struct cpumask *mask) ...@@ -5648,8 +5648,8 @@ long sched_getaffinity(pid_t pid, struct cpumask *mask)
* @len: length in bytes of the bitmask pointed to by user_mask_ptr * @len: length in bytes of the bitmask pointed to by user_mask_ptr
* @user_mask_ptr: user-space pointer to hold the current cpu mask * @user_mask_ptr: user-space pointer to hold the current cpu mask
*/ */
asmlinkage long sys_sched_getaffinity(pid_t pid, unsigned int len, SYSCALL_DEFINE3(sched_getaffinity, pid_t, pid, unsigned int, len,
unsigned long __user *user_mask_ptr) unsigned long __user *, user_mask_ptr)
{ {
int ret; int ret;
cpumask_var_t mask; cpumask_var_t mask;
...@@ -5678,7 +5678,7 @@ asmlinkage long sys_sched_getaffinity(pid_t pid, unsigned int len, ...@@ -5678,7 +5678,7 @@ asmlinkage long sys_sched_getaffinity(pid_t pid, unsigned int len,
* This function yields the current CPU to other tasks. If there are no * This function yields the current CPU to other tasks. If there are no
* other threads running on this CPU then this function will return. * other threads running on this CPU then this function will return.
*/ */
asmlinkage long sys_sched_yield(void) SYSCALL_DEFINE0(sched_yield)
{ {
struct rq *rq = this_rq_lock(); struct rq *rq = this_rq_lock();
...@@ -5819,7 +5819,7 @@ long __sched io_schedule_timeout(long timeout) ...@@ -5819,7 +5819,7 @@ long __sched io_schedule_timeout(long timeout)
* this syscall returns the maximum rt_priority that can be used * this syscall returns the maximum rt_priority that can be used
* by a given scheduling class. * by a given scheduling class.
*/ */
asmlinkage long sys_sched_get_priority_max(int policy) SYSCALL_DEFINE1(sched_get_priority_max, int, policy)
{ {
int ret = -EINVAL; int ret = -EINVAL;
...@@ -5844,7 +5844,7 @@ asmlinkage long sys_sched_get_priority_max(int policy) ...@@ -5844,7 +5844,7 @@ asmlinkage long sys_sched_get_priority_max(int policy)
* this syscall returns the minimum rt_priority that can be used * this syscall returns the minimum rt_priority that can be used
* by a given scheduling class. * by a given scheduling class.
*/ */
asmlinkage long sys_sched_get_priority_min(int policy) SYSCALL_DEFINE1(sched_get_priority_min, int, policy)
{ {
int ret = -EINVAL; int ret = -EINVAL;
......
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