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

[PATCH] uml: Remove mm_indirect reference in modify_ldt

Spotted by Al Viro, there was some bogosity in the UML/x86_64 modify_ltd.
Signed-off-by: default avatarJeff Dike <jdike@addtoit.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 0b8733dc
...@@ -36,15 +36,11 @@ long sys_modify_ldt_tt(int func, void *ptr, unsigned long bytecount) ...@@ -36,15 +36,11 @@ long sys_modify_ldt_tt(int func, void *ptr, unsigned long bytecount)
#endif #endif
#ifdef CONFIG_MODE_SKAS #ifdef CONFIG_MODE_SKAS
extern int userspace_pid; extern int userspace_pid[];
#ifndef __NR_mm_indirect
#define __NR_mm_indirect 241
#endif
long sys_modify_ldt_skas(int func, void *ptr, unsigned long bytecount) long sys_modify_ldt_skas(int func, void *ptr, unsigned long bytecount)
{ {
unsigned long args[6]; struct ptrace_ldt ldt;
void *buf; void *buf;
int res, n; int res, n;
...@@ -66,12 +62,11 @@ long sys_modify_ldt_skas(int func, void *ptr, unsigned long bytecount) ...@@ -66,12 +62,11 @@ long sys_modify_ldt_skas(int func, void *ptr, unsigned long bytecount)
goto out; goto out;
} }
args[0] = func; ldt = ((struct ptrace_ldt) { .func = func,
args[1] = (unsigned long) buf; .ptr = buf,
args[2] = bytecount; .bytecount = bytecount });
res = syscall(__NR_mm_indirect, &current->mm->context.u, #warning Need to look up userspace_pid by cpu
__NR_modify_ldt, args); 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