aboutsummaryrefslogtreecommitdiffstats
path: root/arch/um/kernel/ptrace.c
diff options
context:
space:
mode:
authorJeff Dike <jdike@addtoit.com>2007-02-10 04:44:30 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-11 13:51:24 -0500
commit6e6d74cfac782a3a4cb5111bd9c25cd95d6b7c6c (patch)
treef63c0433740168f56916ece27793e9b69a40e072 /arch/um/kernel/ptrace.c
parentf355559cf78455ed6be103b020e4b800230c64eb (diff)
[PATCH] uml: x86_64 ptrace fixes
This patch fixes some missing ptrace bits on x86_64. PTRACE_ARCH_PRCTL is hooked up and implemented. This required generalizing arch_prctl_skas slightly to take a task_struct to modify. Previously, it always operated on current. Reading and writing the debug registers is also enabled by un-ifdefing the code that implements that. It turns out that x86_64 is identical to i386, so the same code can be used. Signed-off-by: Jeff Dike <jdike@addtoit.com> Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/um/kernel/ptrace.c')
-rw-r--r--arch/um/kernel/ptrace.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/um/kernel/ptrace.c b/arch/um/kernel/ptrace.c
index 9a77fb3c269..627742d8943 100644
--- a/arch/um/kernel/ptrace.c
+++ b/arch/um/kernel/ptrace.c
@@ -18,6 +18,7 @@
18#include "kern_util.h" 18#include "kern_util.h"
19#include "skas_ptrace.h" 19#include "skas_ptrace.h"
20#include "sysdep/ptrace.h" 20#include "sysdep/ptrace.h"
21#include "os.h"
21 22
22static inline void set_singlestepping(struct task_struct *child, int on) 23static inline void set_singlestepping(struct task_struct *child, int on)
23{ 24{
@@ -241,6 +242,12 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
241 break; 242 break;
242 } 243 }
243#endif 244#endif
245#ifdef PTRACE_ARCH_PRCTL
246 case PTRACE_ARCH_PRCTL:
247 /* XXX Calls ptrace on the host - needs some SMP thinking */
248 ret = arch_prctl_skas(child, data, (void *) addr);
249 break;
250#endif
244 default: 251 default:
245 ret = ptrace_request(child, request, addr, data); 252 ret = ptrace_request(child, request, addr, data);
246 break; 253 break;