[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1303960136-14298-6-git-send-email-wad@chromium.org>
Date: Wed, 27 Apr 2011 22:08:51 -0500
From: Will Drewry <wad@...omium.org>
To: linux-kernel@...r.kernel.org
Cc: kees.cook@...onical.com, eparis@...hat.com, agl@...omium.org,
mingo@...e.hu, jmorris@...ei.org, rostedt@...dmis.org,
Will Drewry <wad@...omium.org>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>,
"H. Peter Anvin" <hpa@...or.com>
Subject: [PATCH 7/7] arch/x86: hook int returning system calls
Using the newly specified __SYSCALL_DEFINEx helpers, redefine
int-returning system calls with the macro to enable ftrace access.
Signed-off-by: Will Drewry <wad@...omium.org>
---
arch/x86/kernel/ldt.c | 5 +++--
arch/x86/kernel/tls.c | 7 +++++--
2 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/arch/x86/kernel/ldt.c b/arch/x86/kernel/ldt.c
index ea69726..3f1160c 100644
--- a/arch/x86/kernel/ldt.c
+++ b/arch/x86/kernel/ldt.c
@@ -10,6 +10,7 @@
#include <linux/gfp.h>
#include <linux/sched.h>
#include <linux/string.h>
+#include <linux/syscalls.h>
#include <linux/mm.h>
#include <linux/smp.h>
#include <linux/vmalloc.h>
@@ -245,8 +246,8 @@ out:
return error;
}
-asmlinkage int sys_modify_ldt(int func, void __user *ptr,
- unsigned long bytecount)
+__SYSCALL_DEFINEx(asmlinkage, int, 3, _modify_ldt,
+ int, func, void __user *, ptr, unsigned long, bytecount)
{
int ret = -ENOSYS;
diff --git a/arch/x86/kernel/tls.c b/arch/x86/kernel/tls.c
index 6bb7b85..0f27a6b 100644
--- a/arch/x86/kernel/tls.c
+++ b/arch/x86/kernel/tls.c
@@ -1,6 +1,7 @@
#include <linux/kernel.h>
#include <linux/errno.h>
#include <linux/sched.h>
+#include <linux/syscalls.h>
#include <linux/user.h>
#include <linux/regset.h>
@@ -90,7 +91,8 @@ int do_set_thread_area(struct task_struct *p, int idx,
return 0;
}
-asmlinkage int sys_set_thread_area(struct user_desc __user *u_info)
+__SYSCALL_DEFINEx(asmlinkage, int, 1, _set_thread_area,
+ struct user_desc __user *, u_info)
{
int ret = do_set_thread_area(current, -1, u_info, 1);
asmlinkage_protect(1, ret, u_info);
@@ -140,7 +142,8 @@ int do_get_thread_area(struct task_struct *p, int idx,
return 0;
}
-asmlinkage int sys_get_thread_area(struct user_desc __user *u_info)
+__SYSCALL_DEFINEx(asmlinkage, int, 1, _get_thread_area,
+ struct user_desc __user *, u_info)
{
int ret = do_get_thread_area(current, -1, u_info);
asmlinkage_protect(1, ret, u_info);
--
1.7.0.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists