Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1513042
| From | Kyle Huey <me@kylehuey.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH v8 1/7] x86/arch_prctl/64: Use SYSCALL_DEFINE2 to define sys_arch_prctl |
| Date | 2016-11-01 02:50 +0100 |
| Message-ID | <sywn8-1UJ-7@gated-at.bofh.it> (permalink) |
| References | <sywdr-1Rv-15@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Signed-off-by: Kyle Huey <khuey@kylehuey.com>
---
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 b3760b3..2718cf9 100644
--- a/arch/x86/kernel/process_64.c
+++ b/arch/x86/kernel/process_64.c
@@ -30,16 +30,17 @@
#include <linux/ptrace.h>
#include <linux/notifier.h>
#include <linux/kprobes.h>
#include <linux/kdebug.h>
#include <linux/prctl.h>
#include <linux/uaccess.h>
#include <linux/io.h>
#include <linux/ftrace.h>
+#include <linux/syscalls.h>
#include <asm/pgtable.h>
#include <asm/processor.h>
#include <asm/fpu/internal.h>
#include <asm/mmu_context.h>
#include <asm/prctl.h>
#include <asm/desc.h>
#include <asm/proto.h>
@@ -607,17 +608,17 @@ long do_arch_prctl(struct task_struct *task, int code, unsigned long addr)
default:
ret = -EINVAL;
break;
}
return ret;
}
-long sys_arch_prctl(int code, unsigned long addr)
+SYSCALL_DEFINE2(arch_prctl, int, code, unsigned long, addr)
{
return do_arch_prctl(current, code, addr);
}
unsigned long KSTK_ESP(struct task_struct *task)
{
return task_pt_regs(task)->sp;
}
diff --git a/arch/x86/um/syscalls_64.c b/arch/x86/um/syscalls_64.c
index e655227..ab3f7f4 100644
--- a/arch/x86/um/syscalls_64.c
+++ b/arch/x86/um/syscalls_64.c
@@ -1,16 +1,17 @@
/*
* Copyright (C) 2003 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
* Copyright 2003 PathScale, Inc.
*
* Licensed under the GPL
*/
#include <linux/sched.h>
+#include <linux/syscalls.h>
#include <linux/uaccess.h>
#include <asm/prctl.h> /* XXX This should get the constants from libc */
#include <os.h>
long arch_prctl(struct task_struct *task, int code, unsigned long __user *addr)
{
unsigned long *ptr = addr, tmp;
long ret;
@@ -67,17 +68,17 @@ long arch_prctl(struct task_struct *task, int code, unsigned long __user *addr)
case ARCH_GET_GS:
ret = put_user(tmp, addr);
break;
}
return ret;
}
-long sys_arch_prctl(int code, unsigned long addr)
+SYSCALL_DEFINE2(arch_prctl, int, code, unsigned long, addr)
{
return arch_prctl(current, code, (unsigned long __user *) addr);
}
void arch_switch_to(struct task_struct *to)
{
if ((to->thread.arch.fs == 0) || (to->mm == NULL))
return;
base-commit: 0c183d92b20b5c84ca655b45ef57b3318b83eb9e
--
2.10.2
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v8 0/7] x86/arch_prctl Add ARCH_[GET|SET]_CPUID for controlling the CPUID instruction Kyle Huey <me@kylehuey.com> - 2016-11-01 02:40 +0100
[PATCH v8 5/7] x86/cpufeature: Detect CPUID faulting support Kyle Huey <me@kylehuey.com> - 2016-11-01 02:40 +0100
[PATCH v8 7/7] KVM: x86: virtualize cpuid faulting Kyle Huey <me@kylehuey.com> - 2016-11-01 02:40 +0100
Re: [PATCH v8 7/7] KVM: x86: virtualize cpuid faulting Paolo Bonzini <pbonzini@redhat.com> - 2016-11-01 15:30 +0100
Re: [PATCH v8 7/7] KVM: x86: virtualize cpuid faulting Thomas Gleixner <tglx@linutronix.de> - 2016-11-01 19:40 +0100
Re: [PATCH v8 7/7] KVM: x86: virtualize cpuid faulting Paolo Bonzini <pbonzini@redhat.com> - 2016-11-02 00:00 +0100
Re: [PATCH v8 7/7] KVM: x86: virtualize cpuid faulting David Matlack <dmatlack@google.com> - 2016-11-04 21:40 +0100
Re: [PATCH v8 7/7] KVM: x86: virtualize cpuid faulting Paolo Bonzini <pbonzini@redhat.com> - 2016-11-04 23:00 +0100
Re: [PATCH v8 7/7] KVM: x86: virtualize cpuid faulting David Matlack <dmatlack@google.com> - 2016-11-05 01:10 +0100
Re: [PATCH v8 7/7] KVM: x86: virtualize cpuid faulting Kyle Huey <me@kylehuey.com> - 2016-11-06 22:00 +0100
Re: [PATCH v8 7/7] KVM: x86: virtualize cpuid faulting Eduardo Habkost <ehabkost@redhat.com> - 2016-11-07 19:40 +0100
[PATCH v8 6/7] x86/arch_prctl: Add ARCH_[GET|SET]_CPUID Kyle Huey <me@kylehuey.com> - 2016-11-01 02:50 +0100
[PATCH v8 1/7] x86/arch_prctl/64: Use SYSCALL_DEFINE2 to define sys_arch_prctl Kyle Huey <me@kylehuey.com> - 2016-11-01 02:50 +0100
[PATCH v8 3/7] x86/arch_prctl: Add do_arch_prctl_common Kyle Huey <me@kylehuey.com> - 2016-11-01 02:50 +0100
[PATCH v8 4/7] x86/syscalls/32: Wire up arch_prctl on x86-32 Kyle Huey <me@kylehuey.com> - 2016-11-01 02:50 +0100
[PATCH v8 2/7] x86/arch_prctl/64: Rename do_arch_prctl to do_arch_prctl_64 Kyle Huey <me@kylehuey.com> - 2016-11-01 02:50 +0100
csiph-web