Skip to contentSkip to conversation

UML - Fix a ptrace call

PATCH In review Jeff Dike 1 participant 1 message May 1, 2005 User-mode Linux (UML)

lore
Share & tools
lore

Jeff Dike

author
#0 lore raw

PATCH 10/22 UML - Fix a ptrace call

This fixes write_ldt_entry to treat userspace_pid as an array.

arch/um/sys-i386/ldt.c +3 -2
Index: linux-2.6.11/arch/um/sys-i386/ldt.c
===================================================================
@@ -25,7 +25,7 @@
 #endif
 
 #ifdef CONFIG_MODE_SKAS
-extern int userspace_pid;
+extern int userspace_pid[];
 
 #include "skas_ptrace.h"
 
@@ -56,7 +56,8 @@
 	ldt = ((struct ptrace_ldt) { .func	= func,
 				     .ptr	= buf,
 				     .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)
 		goto out;