From: "Ryan Finnie" <ryan@finnie.org>
To: user-mode-linux-devel@lists.sourceforge.net
Subject: [uml-devel] [PATCH] SKAS4 - Add noswitchmm, noptraceswitchmm and mode=skas3 switches
Date: 14 Apr 2008 17:16:28 -0700 [thread overview]
Message-ID: <20080415001628.1141.qmail@dev2.reno.12h> (raw)
The SKAS4 patch that eventually hits mainline will almost certainly be
incompatible with the current working SKAS4 patchset. To that end, add
mode=skas3, so current SKAS4 guests can be run in SKAS3 mode if/when
future SKAS4 hosts are incompatible. At current time, if a SKAS4 check
fails, it falls back directly to SKAS0.
This can also let one force SKAS3 mode (for whatever reason) on hybrid
SKAS3/SKAS4 hosts. If mode=skas3 is specified and the SKAS3 patch has
not been applied, the guest will fall back to SKAS0.
Also are included are individual "noswitchmm" and "noptraceswitchmm"
switches for good measure, as "noptracefaultinfo", "noptraceldt", and
"noprocmm" (SKAS3), and "nogetsiginfo" (SKAS4) are already available.
diff -ruN linux-2.6.24.orig/arch/um/os-Linux/start_up.c linux-2.6.24/arch/um/os-Linux/start_up.c
--- linux-2.6.24.orig/arch/um/os-Linux/start_up.c 2008-04-14 16:21:37.000000000 -0700
+++ linux-2.6.24/arch/um/os-Linux/start_up.c 2008-04-14 16:41:56.000000000 -0700
@@ -192,6 +192,24 @@
"mode=skas0\n"
" Disables SKAS3 and SKAS4 usage, so that SKAS0 is used.\n\n");
+static int __init mode_skas3_cmd_param(char *str, int* add)
+{
+ disable_ptrace_faultinfo = 0;
+ disable_ptrace_ldt = 0;
+ disable_proc_mm = 0;
+
+ disable_switch_mm = 1;
+ disable_siginfo_segv = 1;
+ disable_ptrace_switch_mm = 1;
+
+ return 0;
+}
+
+__uml_setup("mode=skas3", mode_skas3_cmd_param,
+"mode=skas3\n"
+" Disables SKAS4 usage, so that SKAS3 is used, or SKAS0 if SKAS3 is\n"
+" not available.\n\n");
+
/* Changed only during early boot */
static int force_sysemu_disabled = 0;
@@ -559,6 +577,17 @@
return n;
}
+static int __init noswitchmm_cmd_param(char *str, int *add)
+{
+ disable_switch_mm = 1;
+ return 0;
+}
+
+__uml_setup("noswitchmm", noswitchmm_cmd_param,
+"noswitchmm\n"
+" Turns off usage of SKAS4 switch_mm (and new_mm), even if the host\n"
+" supports it.\n\n");
+
static int __init nogetsiginfo_cmd_param(char *str, int *add)
{
disable_siginfo_segv = 1;
@@ -570,6 +599,17 @@
" Turns off usage of PTRACE_GETSIGINFO to read page fault information\n"
" from a child process, even if the host supports it.\n\n");
+static int __init noptraceswitchmm_cmd_param(char *str, int *add)
+{
+ disable_ptrace_switch_mm = 1;
+ return 0;
+}
+
+__uml_setup("noptraceswitchmm", noptraceswitchmm_cmd_param,
+"noptraceswitchmm\n"
+" Turns off PTRACE_SWITCH_MM support, even if the host supports "
+"it.\n\n");
+
#ifndef PTRACE_GETSIGINFO
#define PTRACE_GETSIGINFO 0x4202
#endif
@@ -817,7 +857,8 @@
void can_do_skas(void)
{
- if (!can_do_skas4())
+ can_do_skas4();
+ if (!have_switch_mm)
can_do_skas3();
}
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
next reply other threads:[~2008-04-15 0:16 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-15 0:16 Ryan Finnie [this message]
-- strict thread matches above, loose matches on Subject: below --
2008-04-28 17:28 [uml-devel] [PATCH] SKAS4 - Clean up command line disable output Jeff Dike
2008-04-28 22:15 ` [uml-devel] [PATCH] SKAS4 - Add noswitchmm, noptraceswitchmm and mode=skas3 switches Ryan Finnie
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080415001628.1141.qmail@dev2.reno.12h \
--to=ryan@finnie.org \
--cc=user-mode-linux-devel@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox