SKAS4 - Clean up command line disable output
PATCH 1/1 SKAS4 - Clean up command line disable output
The PTRACE_GETSIGINFO notice was missing a linefeed. In addition, tab and wrap each SKAS4 "disabled" message in parens so it doesn't break up the indendation within the switch_mm check block.
arch/um/os-Linux/start_up.c +5 -5
@@ -623,8 +623,8 @@non_fatal ("Failed\n" );if (disable_siginfo_segv) -non_fatal ("Extended PTRACE_GETSIGINFO disabled on command " -"line" ); +non_fatal ("\t(Extended PTRACE_GETSIGINFO disabled on " +"command line)\n" );else have_siginfo_segv =1 ;
@@ -688,7 +688,7 @@close (there);if (disable_switch_mm) -non_fatal ("switch_mm support disabled on command line\n" ); +non_fatal ("\t(switch_mm support disabled on command line)\n" );else have_switch_mm =1 ;
@@ -782,8 +782,8 @@else non_fatal ("OK\n" );if (disable_ptrace_switch_mm) -non_fatal ("PTRACE_SWITCH_MM support disabled on command " -"line\n" ); +non_fatal ("\t(PTRACE_SWITCH_MM support disabled on command " +"line)\n" );else have_ptrace_switch_mm =1 ;
-------------------------------------------------------------------------
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 [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
Quoted 3 lines · Ryan Finnie
The
PTRACE_GETSIGINFOnotice was missing a linefeed. In addition, tab and wrap each SKAS4 "disabled" message in parens so it doesn't break up the indendation within theswitch_mmcheck block.
Looks good, but I'm going to want a Signed-off-by from you on these...
Jeff
Signature · 11 lines
Work email - jdike at linux dot intel dot com ------------------------------------------------------------------------- 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 [email protected] https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
PATCH 1/1 SKAS4 - Clean up command line disable output
The PTRACE_GETSIGINFO notice was missing a linefeed. In addition, tab and wrap each SKAS4 "disabled" message in parens so it doesn't break up the indendation within the switch_mm check block.
---
start_up.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-)
arch/um/os-Linux/start_up.c +5 -5
@@ -623,8 +623,8 @@non_fatal ("Failed\n" );if (disable_siginfo_segv) -non_fatal ("Extended PTRACE_GETSIGINFO disabled on command " -"line" ); +non_fatal ("\t(Extended PTRACE_GETSIGINFO disabled on " +"command line)\n" );else have_siginfo_segv =1 ;
@@ -688,7 +688,7 @@close (there);if (disable_switch_mm) -non_fatal ("switch_mm support disabled on command line\n" ); +non_fatal ("\t(switch_mm support disabled on command line)\n" );else have_switch_mm =1 ;
@@ -782,8 +782,8 @@else non_fatal ("OK\n" );if (disable_ptrace_switch_mm) -non_fatal ("PTRACE_SWITCH_MM support disabled on command " -"line\n" ); +non_fatal ("\t(PTRACE_SWITCH_MM support disabled on command " +"line)\n" );else have_ptrace_switch_mm =1 ;
-------------------------------------------------------------------------
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 [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
PATCH 1/1 SKAS4 - Add noswitchmm, noptraceswitchmm and mode=skas3 switches
In reply to Jeff DikeThe 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.
---
start_up.c | 44 ++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 42 insertions(+), 2 deletions(-)
arch/um/os-Linux/start_up.c +42 -1
@@ -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 [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel