Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1517463 > unrolled thread
| Started by | Kyle Huey <me@kylehuey.com> |
|---|---|
| First post | 2016-11-08 19:50 +0100 |
| Last post | 2016-11-10 19:20 +0100 |
| Articles | 3 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH v10 1/7] x86/arch_prctl/64: Use SYSCALL_DEFINE2 to define sys_arch_prctl Kyle Huey <me@kylehuey.com> - 2016-11-08 19:50 +0100
Re: [PATCH v10 1/7] x86/arch_prctl/64: Use SYSCALL_DEFINE2 to define sys_arch_prctl Borislav Petkov <bp@suse.de> - 2016-11-09 10:50 +0100
Re: [PATCH v10 1/7] x86/arch_prctl/64: Use SYSCALL_DEFINE2 to define sys_arch_prctl Kyle Huey <me@kylehuey.com> - 2016-11-10 19:20 +0100
| From | Kyle Huey <me@kylehuey.com> |
|---|---|
| Date | 2016-11-08 19:50 +0100 |
| Subject | [PATCH v10 1/7] x86/arch_prctl/64: Use SYSCALL_DEFINE2 to define sys_arch_prctl |
| Message-ID | <sBjD3-4ES-9@gated-at.bofh.it> |
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: e3a00f68e426df24a5fb98956a1bd1b23943aa1e
--
2.10.2
[toc] | [next] | [standalone]
| From | Borislav Petkov <bp@suse.de> |
|---|---|
| Date | 2016-11-09 10:50 +0100 |
| Subject | Re: [PATCH v10 1/7] x86/arch_prctl/64: Use SYSCALL_DEFINE2 to define sys_arch_prctl |
| Message-ID | <sBxG1-5vt-9@gated-at.bofh.it> |
| In reply to | #1517463 |
On Tue, Nov 08, 2016 at 10:39:50AM -0800, Kyle Huey wrote:
<--- Add commit message here.
> 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(-)
...
> void arch_switch_to(struct task_struct *to)
> {
> if ((to->thread.arch.fs == 0) || (to->mm == NULL))
> return;
>
> base-commit: e3a00f68e426df24a5fb98956a1bd1b23943aa1e
This looks like some tracking thing. It gets ignored by tools though...
--
Regards/Gruss,
Boris.
SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg)
--
[toc] | [prev] | [next] | [standalone]
| From | Kyle Huey <me@kylehuey.com> |
|---|---|
| Date | 2016-11-10 19:20 +0100 |
| Message-ID | <sC279-1l5-41@gated-at.bofh.it> |
| In reply to | #1517866 |
On Wed, Nov 9, 2016 at 1:47 AM, Borislav Petkov <bp@suse.de> wrote:
> On Tue, Nov 08, 2016 at 10:39:50AM -0800, Kyle Huey wrote:
>
> <--- Add commit message here.
>
>> 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(-)
>
> ...
>
>> void arch_switch_to(struct task_struct *to)
>> {
>> if ((to->thread.arch.fs == 0) || (to->mm == NULL))
>> return;
>>
>> base-commit: e3a00f68e426df24a5fb98956a1bd1b23943aa1e
>
> This looks like some tracking thing. It gets ignored by tools though...
Yeah despite git format-patch generating it, git doesn't automatically
honor it when applying patches.
- Kyle
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web