summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2018-02-27 12:39:30 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2018-02-27 13:25:49 -0800
commitde25c71cf6b4d9bb49937f96485c8a35c577d567 (patch)
treedef1214020b866244ef90ed3784d899b35b1a346 /kernel
parent3621644dbcd549dd5b7759d4eb25943699aa3c62 (diff)
downloadlinux-WIP-syscall.tar.bz2
Broken, but working, ptregs system call conversion for x86-64WIP-syscall
Not-yet-signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/sched/core.c11
-rw-r--r--kernel/signal.c14
-rw-r--r--kernel/sys_ni.c4
3 files changed, 22 insertions, 7 deletions
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index e7c535eee0a6..67805f87ce5c 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -4885,14 +4885,14 @@ SYSCALL_DEFINE3(sched_getaffinity, pid_t, pid, unsigned int, len,
}
/**
- * sys_sched_yield - yield the current processor to other threads.
+ * sched_yield - yield the current processor to other threads.
*
* This function yields the current CPU to other tasks. If there are no
* other threads running on this CPU then this function will return.
*
* Return: 0.
*/
-SYSCALL_DEFINE0(sched_yield)
+static long sched_yield(void)
{
struct rq_flags rf;
struct rq *rq;
@@ -4917,6 +4917,11 @@ SYSCALL_DEFINE0(sched_yield)
return 0;
}
+SYSCALL_DEFINE0(sched_yield)
+{
+ return sched_yield();
+}
+
#ifndef CONFIG_PREEMPT
int __sched _cond_resched(void)
{
@@ -4997,7 +5002,7 @@ EXPORT_SYMBOL(__cond_resched_softirq);
void __sched yield(void)
{
set_current_state(TASK_RUNNING);
- sys_sched_yield();
+ sched_yield();
}
EXPORT_SYMBOL(yield);
diff --git a/kernel/signal.c b/kernel/signal.c
index c6e4c83dc090..7b7906b7ce75 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -3573,9 +3573,8 @@ int __save_altstack(stack_t __user *uss, unsigned long sp)
}
#ifdef CONFIG_COMPAT
-COMPAT_SYSCALL_DEFINE2(sigaltstack,
- const compat_stack_t __user *, uss_ptr,
- compat_stack_t __user *, uoss_ptr)
+static long do_compat_sigaltstack(const compat_stack_t __user *uss_ptr,
+ compat_stack_t __user *uoss_ptr)
{
stack_t uss, uoss;
int ret;
@@ -3602,9 +3601,16 @@ COMPAT_SYSCALL_DEFINE2(sigaltstack,
return ret;
}
+COMPAT_SYSCALL_DEFINE2(sigaltstack,
+ const compat_stack_t __user *, uss_ptr,
+ compat_stack_t __user *, uoss_ptr)
+{
+ return do_compat_sigaltstack(uss_ptr, uoss_ptr);
+}
+
int compat_restore_altstack(const compat_stack_t __user *uss)
{
- int err = compat_sys_sigaltstack(uss, NULL);
+ int err = do_compat_sigaltstack(uss, NULL);
/* squash all but -EFAULT for now */
return err == -EFAULT ? err : 0;
}
diff --git a/kernel/sys_ni.c b/kernel/sys_ni.c
index b5189762d275..bef378c25a19 100644
--- a/kernel/sys_ni.c
+++ b/kernel/sys_ni.c
@@ -17,6 +17,10 @@ asmlinkage long sys_ni_syscall(void)
return -ENOSYS;
}
+cond_syscall(sys_x64_kcmp);
+cond_syscall(sys_i86_uselib);
+cond_syscall(sys_i86_kcmp);
+
cond_syscall(sys_quotactl);
cond_syscall(sys32_quotactl);
cond_syscall(sys_acct);