### flask
> `= permissive | enforcing | late | disabled`
-> Default: `permissive`
+> Default: `enforcing`
Specify how the FLASK security server should be configured. This option is only
available if the hypervisor was compiled with XSM support (which can be enabled
This command must be rerun on each boot or after any policy reload.
-The example policy was only tested with simple domain creation and may be
-missing rules allowing accesses by dom0 or domU when a number of hypervisor
-features are used. When first loading or writing a policy, you should run FLASK
-in permissive mode (the default) and check the Xen logs (xl dmesg) for AVC
-denials before using it in enforcing mode (flask_enforcing=1 on the command
-line, or xl setenforce).
+When first loading or writing a policy, you should run FLASK in permissive mode
+(flask=permissive on the command line) and check the Xen logs (xl dmesg) for AVC
+denials before using it in enforcing mode (the default value of the boot
+parameter, which can also be changed using xl setenforce). When using the
+default types for domains (domU_t), the example policy shipped with Xen should
+allow the same operations on or between domains as when not using FLASK.
MLS/MCS policy
#define _copy_to_guest copy_to_guest
#define _copy_from_guest copy_from_guest
-enum flask_bootparam_t __read_mostly flask_bootparam = FLASK_BOOTPARAM_PERMISSIVE;
+enum flask_bootparam_t __read_mostly flask_bootparam = FLASK_BOOTPARAM_ENFORCING;
static void parse_flask_param(char *s);
custom_param("flask", parse_flask_param);
-bool_t __read_mostly flask_enforcing = 0;
-boolean_param("flask_enforcing", flask_enforcing);
+bool_t __read_mostly flask_enforcing = 1;
#define MAX_POLICY_SIZE 0x4000000
static void __init parse_flask_param(char *s)
{
if ( !strcmp(s, "enforcing") )
- {
- flask_enforcing = 1;
flask_bootparam = FLASK_BOOTPARAM_ENFORCING;
- }
else if ( !strcmp(s, "late") )
- {
- flask_enforcing = 1;
flask_bootparam = FLASK_BOOTPARAM_LATELOAD;
- }
else if ( !strcmp(s, "disabled") )
flask_bootparam = FLASK_BOOTPARAM_DISABLED;
else if ( !strcmp(s, "permissive") )
return;
case FLASK_BOOTPARAM_PERMISSIVE:
+ flask_enforcing = 0;
+ break;
+
case FLASK_BOOTPARAM_ENFORCING:
case FLASK_BOOTPARAM_LATELOAD:
break;