Commit ea66e8a3 authored by Jeff Dike's avatar Jeff Dike Committed by Linus Torvalds

[PATCH] uml: fix a ptrace call

This fixes write_ldt_entry to treat userspace_pid as an array.
Signed-off-by: default avatarJeff Dike <jdike@addtoit.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent fd7aab9c
...@@ -25,7 +25,7 @@ int sys_modify_ldt_tt(int func, void __user *ptr, unsigned long bytecount) ...@@ -25,7 +25,7 @@ int sys_modify_ldt_tt(int func, void __user *ptr, unsigned long bytecount)
#endif #endif
#ifdef CONFIG_MODE_SKAS #ifdef CONFIG_MODE_SKAS
extern int userspace_pid; extern int userspace_pid[];
#include "skas_ptrace.h" #include "skas_ptrace.h"
...@@ -56,7 +56,8 @@ int sys_modify_ldt_skas(int func, void __user *ptr, unsigned long bytecount) ...@@ -56,7 +56,8 @@ int sys_modify_ldt_skas(int func, void __user *ptr, unsigned long bytecount)
ldt = ((struct ptrace_ldt) { .func = func, ldt = ((struct ptrace_ldt) { .func = func,
.ptr = buf, .ptr = buf,
.bytecount = bytecount }); .bytecount = bytecount });
res = ptrace(PTRACE_LDT, userspace_pid, 0, (unsigned long) &ldt); #warning Need to look up userspace_pid by cpu
res = ptrace(PTRACE_LDT, userspace_pid[0], 0, (unsigned long) &ldt);
if(res < 0) if(res < 0)
goto out; goto out;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment