[PATCH] uml: increase granularity of host capability checking
This change enables SKAS0/SKAS3 to work with all combinations of /proc/mm and PTRACE_FAULTINFO being available or not. Also it changes the initialization of proc_mm and ptrace_faultinfo slightly, to ease forcing SKAS0 on a patched host. Forcing UML to run without /proc/mm or PTRACE_FAULTINFO by cmdline parameter can be implemented with a setup resetting the related variable. Signed-off-by: Bodo Stroesser <bstroesser@fujitsu-siemens.com> Signed-off-by: Jeff Dike <jdike@addtoit.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
committed by
Linus Torvalds
parent
60d339f6fe
commit
8b51304ed3
@ -129,7 +129,9 @@ int copy_thread_skas(int nr, unsigned long clone_flags, unsigned long sp,
|
||||
return(0);
|
||||
}
|
||||
|
||||
int new_mm(int from)
|
||||
extern void map_stub_pages(int fd, unsigned long code,
|
||||
unsigned long data, unsigned long stack);
|
||||
int new_mm(int from, unsigned long stack)
|
||||
{
|
||||
struct proc_mm_op copy;
|
||||
int n, fd;
|
||||
@ -148,6 +150,9 @@ int new_mm(int from)
|
||||
"err = %d\n", -n);
|
||||
}
|
||||
|
||||
if(!ptrace_faultinfo)
|
||||
map_stub_pages(fd, CONFIG_STUB_CODE, CONFIG_STUB_DATA, stack);
|
||||
|
||||
return(fd);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user