[PATCH 07/18] LSM: Add minor LSM initialization loop

Jann Horn jannh at google.com
Sun Sep 16 01:27:42 UTC 2018


On Sun, Sep 16, 2018 at 3:11 AM Kees Cook <keescook at chromium.org> wrote:
> Split initialization loop into two phases: "exclusive" LSMs and "minor"
> LSMs.
>
> Signed-off-by: Kees Cook <keescook at chromium.org>
> ---
>  include/linux/lsm_hooks.h | 6 ++++++
>  security/security.c       | 8 +++++---
>  2 files changed, 11 insertions(+), 3 deletions(-)
>
> diff --git a/include/linux/lsm_hooks.h b/include/linux/lsm_hooks.h
> index f8e618e2bdd2..ec3419b9b16f 100644
> --- a/include/linux/lsm_hooks.h
> +++ b/include/linux/lsm_hooks.h
> @@ -2039,7 +2039,13 @@ extern char *lsm_names;
>  extern void security_add_hooks(struct security_hook_list *hooks, int count,
>                                 char *lsm);
>
> +enum lsm_type {
> +       LSM_TYPE_EXCLUSIVE = 0,
> +       LSM_TYPE_MINOR,
> +};

Is the intent of this explicit zero assignment that LSM_TYPE_EXCLUSIVE
should be the default? If so, perhaps a comment "/* default */", or
something like that, might be helpful.



More information about the Linux-security-module-archive mailing list