source "security/integrity/Kconfig"
 
-choice
-       prompt "Default security module"
-       default DEFAULT_SECURITY_SELINUX if SECURITY_SELINUX
-       default DEFAULT_SECURITY_SMACK if SECURITY_SMACK
-       default DEFAULT_SECURITY_TOMOYO if SECURITY_TOMOYO
-       default DEFAULT_SECURITY_APPARMOR if SECURITY_APPARMOR
-       default DEFAULT_SECURITY_DAC
-
-       help
-         Select the security module that will be used by default if the
-         kernel parameter security= is not specified.
-
-       config DEFAULT_SECURITY_SELINUX
-               bool "SELinux" if SECURITY_SELINUX=y
-
-       config DEFAULT_SECURITY_SMACK
-               bool "Simplified Mandatory Access Control" if SECURITY_SMACK=y
-
-       config DEFAULT_SECURITY_TOMOYO
-               bool "TOMOYO" if SECURITY_TOMOYO=y
-
-       config DEFAULT_SECURITY_APPARMOR
-               bool "AppArmor" if SECURITY_APPARMOR=y
-
-       config DEFAULT_SECURITY_DAC
-               bool "Unix Discretionary Access Controls"
-
-endchoice
-
-config DEFAULT_SECURITY
-       string
-       default "selinux" if DEFAULT_SECURITY_SELINUX
-       default "smack" if DEFAULT_SECURITY_SMACK
-       default "tomoyo" if DEFAULT_SECURITY_TOMOYO
-       default "apparmor" if DEFAULT_SECURITY_APPARMOR
-       default "" if DEFAULT_SECURITY_DAC
-
 config LSM
        string "Ordered list of enabled LSMs"
-       default "integrity"
+       default "loadpin,integrity,selinux,smack,tomoyo,apparmor"
        help
          A comma-separated list of LSMs, in initialization order.
          Any LSMs left off this list will be ignored. This can be
 
        LSM_HOOK_INIT(kernel_load_data, loadpin_load_data),
 };
 
-void __init loadpin_add_hooks(void)
+static int __init loadpin_init(void)
 {
        pr_info("ready to pin (currently %senforcing)\n",
                enforce ? "" : "not ");
        security_add_hooks(loadpin_hooks, ARRAY_SIZE(loadpin_hooks), "loadpin");
+       return 0;
 }
 
+DEFINE_LSM(loadpin) = {
+       .name = "loadpin",
+       .init = loadpin_init,
+};
+
 /* Should not be mutable after boot, so not listed in sysfs (perm == 0). */
 module_param(enforce, int, 0);
 MODULE_PARM_DESC(enforce, "Enforce module/firmware pinning");