#define MAX_LSM_EVM_XATTR      2
 
-/* Maximum number of letters for an LSM name string */
-#define SECURITY_NAME_MAX      10
-
 /* How many LSMs were built into the kernel? */
 #define LSM_COUNT (__end_lsm_info - __start_lsm_info)
 
 
 char *lsm_names;
 /* Boot-time LSM user choice */
-static __initdata char chosen_lsm[SECURITY_NAME_MAX + 1] =
-       CONFIG_DEFAULT_SECURITY;
 static __initdata const char *chosen_lsm_order;
+static __initdata const char *chosen_major_lsm;
 
 static __initconst const char * const builtin_lsm_order = CONFIG_LSM;
 
                return true;
 
        /* Disabled if this LSM isn't the chosen one. */
-       if (strcmp(lsm->name, chosen_lsm) != 0)
+       if (strcmp(lsm->name, chosen_major_lsm) != 0)
                return false;
 
        return true;
        struct lsm_info *lsm;
        char *sep, *name, *next;
 
+       if (!chosen_major_lsm)
+               chosen_major_lsm = CONFIG_DEFAULT_SECURITY;
+
        sep = kstrdup(order, GFP_KERNEL);
        next = sep;
        /* Walk the list, looking for matching LSMs. */
 }
 
 /* Save user chosen LSM */
-static int __init choose_lsm(char *str)
+static int __init choose_major_lsm(char *str)
 {
-       strncpy(chosen_lsm, str, SECURITY_NAME_MAX);
+       chosen_major_lsm = str;
        return 1;
 }
-__setup("security=", choose_lsm);
+__setup("security=", choose_major_lsm);
 
 /* Explicitly choose LSM initialization order. */
 static int __init choose_lsm_order(char *str)