[tip:x86/process] x86/arch_prctl/64: Use SYSCALL_DEFINE2 to define sys_arch_prctl()

From: tip-bot for Kyle Huey
Date: Mon Mar 20 2017 - 12:35:29 EST


Commit-ID: ff3f097eef30151f5ee250859e0fe8a0ec02c160
Gitweb: http://git.kernel.org/tip/ff3f097eef30151f5ee250859e0fe8a0ec02c160
Author: Kyle Huey <me@xxxxxxxxxxxx>
AuthorDate: Mon, 20 Mar 2017 01:16:21 -0700
Committer: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
CommitDate: Mon, 20 Mar 2017 16:10:32 +0100

x86/arch_prctl/64: Use SYSCALL_DEFINE2 to define sys_arch_prctl()

Use the SYSCALL_DEFINE2 macro instead of manually defining it.

Signed-off-by: Kyle Huey <khuey@xxxxxxxxxxxx>
Cc: Grzegorz Andrejczuk <grzegorz.andrejczuk@xxxxxxxxx>
Cc: kvm@xxxxxxxxxxxxxxx
Cc: Radim KrÄmÃÅ <rkrcmar@xxxxxxxxxx>
Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
Cc: Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx>
Cc: Andi Kleen <andi@xxxxxxxxxxxxxx>
Cc: linux-kselftest@xxxxxxxxxxxxxxx
Cc: Nadav Amit <nadav.amit@xxxxxxxxx>
Cc: Robert O'Callahan <robert@xxxxxxxxxxxxx>
Cc: Richard Weinberger <richard@xxxxxx>
Cc: "Rafael J. Wysocki" <rafael.j.wysocki@xxxxxxxxx>
Cc: Borislav Petkov <bp@xxxxxxx>
Cc: Andy Lutomirski <luto@xxxxxxxxxx>
Cc: Len Brown <len.brown@xxxxxxxxx>
Cc: Shuah Khan <shuah@xxxxxxxxxx>
Cc: user-mode-linux-devel@xxxxxxxxxxxxxxxxxxxxx
Cc: Jeff Dike <jdike@xxxxxxxxxxx>
Cc: Alexander Viro <viro@xxxxxxxxxxxxxxxxxx>
Cc: user-mode-linux-user@xxxxxxxxxxxxxxxxxxxxx
Cc: David Matlack <dmatlack@xxxxxxxxxx>
Cc: Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>
Cc: Dmitry Safonov <dsafonov@xxxxxxxxxxxxx>
Cc: linux-fsdevel@xxxxxxxxxxxxxxx
Cc: Paolo Bonzini <pbonzini@xxxxxxxxxx>
Link: http://lkml.kernel.org/r/20170320081628.18952-4-khuey@xxxxxxxxxxxx
Signed-off-by: Thomas Gleixner <tglx@xxxxxxxxxxxxx>

---
arch/x86/kernel/process_64.c | 3 ++-
arch/x86/um/syscalls_64.c | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/arch/x86/kernel/process_64.c b/arch/x86/kernel/process_64.c
index 4377cfe..bf9d7b6 100644
--- a/arch/x86/kernel/process_64.c
+++ b/arch/x86/kernel/process_64.c
@@ -37,6 +37,7 @@
#include <linux/uaccess.h>
#include <linux/io.h>
#include <linux/ftrace.h>
+#include <linux/syscalls.h>

#include <asm/pgtable.h>
#include <asm/processor.h>
@@ -621,7 +622,7 @@ long do_arch_prctl(struct task_struct *task, int option, unsigned long addr)
return ret;
}

-long sys_arch_prctl(int option, unsigned long addr)
+SYSCALL_DEFINE2(arch_prctl, int, option, unsigned long, addr)
{
return do_arch_prctl(current, option, addr);
}
diff --git a/arch/x86/um/syscalls_64.c b/arch/x86/um/syscalls_64.c
index 3c2dd87..42369fa 100644
--- a/arch/x86/um/syscalls_64.c
+++ b/arch/x86/um/syscalls_64.c
@@ -7,6 +7,7 @@

#include <linux/sched.h>
#include <linux/sched/mm.h>
+#include <linux/syscalls.h>
#include <linux/uaccess.h>
#include <asm/prctl.h> /* XXX This should get the constants from libc */
#include <os.h>
@@ -74,7 +75,7 @@ long arch_prctl(struct task_struct *task, int option
return ret;
}

-long sys_arch_prctl(int option, unsigned long addr)
+SYSCALL_DEFINE2(arch_prctl, int, option, unsigned long, addr)
{
return arch_prctl(current, option, (unsigned long __user *) addr);
}