[PATCH] uml: allow host capability usage to be disabled
authorBodo Stroesser <bstroesser@fujitsu-siemens.com>
Sat, 3 Sep 2005 22:57:51 +0000 (15:57 -0700)
committerLinus Torvalds <torvalds@evo.osdl.org>
Mon, 5 Sep 2005 07:06:24 +0000 (00:06 -0700)
Add new cmdline setups:
  - noprocmm
  - noptracefaultinfo
In case of testing, they can be used to switch off usage of
/proc/mm and PTRACE_FAULTINFO independently.

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>
arch/um/os-Linux/start_up.c

index a3eab25f3791613b4a2e229bd46b08e51a331140..a8b5b9d9c6ee22b088ea650ce2e4778a44c9b070 100644 (file)
@@ -275,6 +275,30 @@ void os_early_checks(void)
        check_ptrace();
 }
 
+static int __init noprocmm_cmd_param(char *str, int* add)
+{
+       proc_mm = 0;
+       return 0;
+}
+
+__uml_setup("noprocmm", noprocmm_cmd_param,
+"noprocmm\n"
+"    Turns off usage of /proc/mm, even if host supports it.\n"
+"    To support /proc/mm, the host needs to be patched using\n"
+"    the current skas3 patch.\n\n");
+
+static int __init noptracefaultinfo_cmd_param(char *str, int* add)
+{
+       ptrace_faultinfo = 0;
+       return 0;
+}
+
+__uml_setup("noptracefaultinfo", noptracefaultinfo_cmd_param,
+"noptracefaultinfo\n"
+"    Turns off usage of PTRACE_FAULTINFO, even if host supports\n"
+"    it. To support PTRACE_FAULTINFO, the host needs to be patched\n"
+"    using the current skas3 patch.\n\n");
+
 #ifdef UML_CONFIG_MODE_SKAS
 static inline void check_skas3_ptrace_support(void)
 {