[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>
This commit is contained in:

committed by
Linus Torvalds

parent
f355559cf7
commit
6e6d74cfac
@@ -18,6 +18,7 @@
|
||||
#include "kern_util.h"
|
||||
#include "skas_ptrace.h"
|
||||
#include "sysdep/ptrace.h"
|
||||
#include "os.h"
|
||||
|
||||
static inline void set_singlestepping(struct task_struct *child, int on)
|
||||
{
|
||||
@@ -240,6 +241,12 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
|
||||
ret = 0;
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
#ifdef PTRACE_ARCH_PRCTL
|
||||
case PTRACE_ARCH_PRCTL:
|
||||
/* XXX Calls ptrace on the host - needs some SMP thinking */
|
||||
ret = arch_prctl_skas(child, data, (void *) addr);
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
ret = ptrace_request(child, request, addr, data);
|
||||
|
Reference in New Issue
Block a user