[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAGXu5jK6wPLQRte4S3cnSgDZ7LoVugtTytK5iW5c_XYRq7HA5w@mail.gmail.com>
Date: Sat, 15 Sep 2018 18:49:07 -0700
From: Kees Cook <keescook@...omium.org>
To: Jann Horn <jannh@...gle.com>
Cc: James Morris <jmorris@...ei.org>,
Casey Schaufler <casey@...aufler-ca.com>,
John Johansen <john.johansen@...onical.com>,
Tetsuo Handa <penguin-kernel@...ove.sakura.ne.jp>,
Paul Moore <paul@...l-moore.com>,
Stephen Smalley <sds@...ho.nsa.gov>,
Casey Schaufler <casey.schaufler@...el.com>,
linux-security-module <linux-security-module@...r.kernel.org>,
kernel list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 07/18] LSM: Add minor LSM initialization loop
On Sat, Sep 15, 2018 at 6:27 PM, Jann Horn <jannh@...gle.com> wrote:
> On Sun, Sep 16, 2018 at 3:11 AM Kees Cook <keescook@...omium.org> wrote:
>> Split initialization loop into two phases: "exclusive" LSMs and "minor"
>> LSMs.
>>
>> Signed-off-by: Kees Cook <keescook@...omium.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.
You cut the patch quote off where I do exactly that:
>> + enum lsm_type type; /* Optional: default is LSM_TYPE_EXCLUSIVE */
:)
-Kees
--
Kees Cook
Pixel Security
Powered by blists - more mailing lists