Commit ff3f097e authored by Kyle Huey's avatar Kyle Huey Committed by Thomas Gleixner

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: default avatarKyle 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.comSigned-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
parent dd93938a
...@@ -37,6 +37,7 @@ ...@@ -37,6 +37,7 @@
#include <linux/uaccess.h> #include <linux/uaccess.h>
#include <linux/io.h> #include <linux/io.h>
#include <linux/ftrace.h> #include <linux/ftrace.h>
#include <linux/syscalls.h>
#include <asm/pgtable.h> #include <asm/pgtable.h>
#include <asm/processor.h> #include <asm/processor.h>
...@@ -621,7 +622,7 @@ long do_arch_prctl(struct task_struct *task, int option, unsigned long addr) ...@@ -621,7 +622,7 @@ long do_arch_prctl(struct task_struct *task, int option, unsigned long addr)
return ret; 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); return do_arch_prctl(current, option, addr);
} }
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
#include <linux/sched.h> #include <linux/sched.h>
#include <linux/sched/mm.h> #include <linux/sched/mm.h>
#include <linux/syscalls.h>
#include <linux/uaccess.h> #include <linux/uaccess.h>
#include <asm/prctl.h> /* XXX This should get the constants from libc */ #include <asm/prctl.h> /* XXX This should get the constants from libc */
#include <os.h> #include <os.h>
...@@ -74,7 +75,7 @@ long arch_prctl(struct task_struct *task, int option ...@@ -74,7 +75,7 @@ long arch_prctl(struct task_struct *task, int option
return ret; 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); return arch_prctl(current, option, (unsigned long __user *) addr);
} }
......
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