aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKyle Huey <me@kylehuey.com>2017-03-20 04:16:21 -0400
committerThomas Gleixner <tglx@linutronix.de>2017-03-20 11:10:32 -0400
commitff3f097eef30151f5ee250859e0fe8a0ec02c160 (patch)
tree39b16fef958c82a1bfa643a40318438e477a24d7
parentdd93938a92dc067aba70c401bdf2e50ed58083db (diff)
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@kylehuey.com> Cc: Grzegorz Andrejczuk <grzegorz.andrejczuk@intel.com> Cc: kvm@vger.kernel.org Cc: Radim Krčmář <rkrcmar@redhat.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Dave Hansen <dave.hansen@linux.intel.com> Cc: Andi Kleen <andi@firstfloor.org> Cc: linux-kselftest@vger.kernel.org Cc: Nadav Amit <nadav.amit@gmail.com> Cc: Robert O'Callahan <robert@ocallahan.org> Cc: Richard Weinberger <richard@nod.at> Cc: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com> Cc: Borislav Petkov <bp@suse.de> Cc: Andy Lutomirski <luto@kernel.org> Cc: Len Brown <len.brown@intel.com> Cc: Shuah Khan <shuah@kernel.org> Cc: user-mode-linux-devel@lists.sourceforge.net Cc: Jeff Dike <jdike@addtoit.com> Cc: Alexander Viro <viro@zeniv.linux.org.uk> Cc: user-mode-linux-user@lists.sourceforge.net Cc: David Matlack <dmatlack@google.com> Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com> Cc: Dmitry Safonov <dsafonov@virtuozzo.com> Cc: linux-fsdevel@vger.kernel.org Cc: Paolo Bonzini <pbonzini@redhat.com> Link: http://lkml.kernel.org/r/20170320081628.18952-4-khuey@kylehuey.com Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
-rw-r--r--arch/x86/kernel/process_64.c3
-rw-r--r--arch/x86/um/syscalls_64.c3
2 files changed, 4 insertions, 2 deletions
diff --git a/arch/x86/kernel/process_64.c b/arch/x86/kernel/process_64.c
index 4377cfe8e449..bf9d7b6c0223 100644
--- a/arch/x86/kernel/process_64.c
+++ b/arch/x86/kernel/process_64.c
@@ -37,6 +37,7 @@
37#include <linux/uaccess.h> 37#include <linux/uaccess.h>
38#include <linux/io.h> 38#include <linux/io.h>
39#include <linux/ftrace.h> 39#include <linux/ftrace.h>
40#include <linux/syscalls.h>
40 41
41#include <asm/pgtable.h> 42#include <asm/pgtable.h>
42#include <asm/processor.h> 43#include <asm/processor.h>
@@ -621,7 +622,7 @@ long do_arch_prctl(struct task_struct *task, int option, unsigned long addr)
621 return ret; 622 return ret;
622} 623}
623 624
624long sys_arch_prctl(int option, unsigned long addr) 625SYSCALL_DEFINE2(arch_prctl, int, option, unsigned long, addr)
625{ 626{
626 return do_arch_prctl(current, option, addr); 627 return do_arch_prctl(current, option, addr);
627} 628}
diff --git a/arch/x86/um/syscalls_64.c b/arch/x86/um/syscalls_64.c
index 3c2dd8768992..42369fa5421f 100644
--- a/arch/x86/um/syscalls_64.c
+++ b/arch/x86/um/syscalls_64.c
@@ -7,6 +7,7 @@
7 7
8#include <linux/sched.h> 8#include <linux/sched.h>
9#include <linux/sched/mm.h> 9#include <linux/sched/mm.h>
10#include <linux/syscalls.h>
10#include <linux/uaccess.h> 11#include <linux/uaccess.h>
11#include <asm/prctl.h> /* XXX This should get the constants from libc */ 12#include <asm/prctl.h> /* XXX This should get the constants from libc */
12#include <os.h> 13#include <os.h>
@@ -74,7 +75,7 @@ long arch_prctl(struct task_struct *task, int option
74 return ret; 75 return ret;
75} 76}
76 77
77long sys_arch_prctl(int option, unsigned long addr) 78SYSCALL_DEFINE2(arch_prctl, int, option, unsigned long, addr)
78{ 79{
79 return arch_prctl(current, option, (unsigned long __user *) addr); 80 return arch_prctl(current, option, (unsigned long __user *) addr);
80} 81}