linux-security-module.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Roberto Sassu <roberto.sassu@huaweicloud.com>
To: Casey Schaufler <casey@schaufler-ca.com>,
	Paul Moore <paul@paul-moore.com>,
	linux-security-module@vger.kernel.org
Cc: Mimi Zohar <zohar@linux.ibm.com>
Subject: Re: [PATCH] lsm: drop LSM_ID_IMA
Date: Mon, 23 Oct 2023 18:11:03 +0200	[thread overview]
Message-ID: <a52e1040-0110-40fb-8d22-876bda122b19@huaweicloud.com> (raw)
In-Reply-To: <88f4f464-ac09-4c93-95f4-fe4546b78a08@schaufler-ca.com>

On 10/23/2023 5:48 PM, Casey Schaufler wrote:
> On 10/23/2023 8:20 AM, Roberto Sassu wrote:
>> On 10/20/2023 11:56 PM, Casey Schaufler wrote:
>>> On 10/19/2023 1:08 AM, Roberto Sassu wrote:
>>>> On Wed, 2023-10-18 at 17:50 -0400, Paul Moore wrote:
>>>>> When IMA becomes a proper LSM we will reintroduce an appropriate
>>>>> LSM ID, but drop it from the userspace API for now in an effort
>>>>> to put an end to debates around the naming of the LSM ID macro.
>>>>>
>>>>> Signed-off-by: Paul Moore <paul@paul-moore.com>
>>>> Reviewed-by: Roberto Sassu <roberto.sassu@huawei.com>
>>>>
>>>> This makes sense according to the new goal of making 'ima' and 'evm' as
>>>> standalone LSMs.
>>>>
>>>> Otherwise, if we took existing LSMs, we should have defined
>>>> LSM_ID_INTEGRITY, associated to DEFINE_LSM(integrity).
>>>>
>>>> If we proceed with the new direction, I will add the new LSM IDs as
>>>> soon as IMA and EVM become LSMs.
>>>
>>> This seems right to me. Thank You.
>>
>> Perfect! Is it fine to assign an LSM ID to 'ima' and 'evm' and keep
>> the 'integrity' LSM to reserve space in the security blob without LSM
>> ID (as long as it does not register any hook)?
> 
> That will work, although it makes me wonder if all the data in the 'integrity' blob
> is used by both IMA and EVM. If these are going to be separate LSMs they should probably
> have their own security blobs. If there is data in common then an 'integrity' blob can
> still makes sense.

Yes, at the moment there is data in common, and we would need to check 
case-by-case. Would be good to do after moving IMA and EVM to the LSM 
infrastructure.

Roberto

>> Thanks
>>
>> Roberto
>>
>>>> Roberto
>>>>
>>>>> ---
>>>>>    include/uapi/linux/lsm.h | 15 +++++++--------
>>>>>    1 file changed, 7 insertions(+), 8 deletions(-)
>>>>>
>>>>> diff --git a/include/uapi/linux/lsm.h b/include/uapi/linux/lsm.h
>>>>> index eeda59a77c02..f0386880a78e 100644
>>>>> --- a/include/uapi/linux/lsm.h
>>>>> +++ b/include/uapi/linux/lsm.h
>>>>> @@ -54,14 +54,13 @@ struct lsm_ctx {
>>>>>    #define LSM_ID_SELINUX        101
>>>>>    #define LSM_ID_SMACK        102
>>>>>    #define LSM_ID_TOMOYO        103
>>>>> -#define LSM_ID_IMA        104
>>>>> -#define LSM_ID_APPARMOR        105
>>>>> -#define LSM_ID_YAMA        106
>>>>> -#define LSM_ID_LOADPIN        107
>>>>> -#define LSM_ID_SAFESETID    108
>>>>> -#define LSM_ID_LOCKDOWN        109
>>>>> -#define LSM_ID_BPF        110
>>>>> -#define LSM_ID_LANDLOCK        111
>>>>> +#define LSM_ID_APPARMOR        104
>>>>> +#define LSM_ID_YAMA        105
>>>>> +#define LSM_ID_LOADPIN        106
>>>>> +#define LSM_ID_SAFESETID    107
>>>>> +#define LSM_ID_LOCKDOWN        108
>>>>> +#define LSM_ID_BPF        109
>>>>> +#define LSM_ID_LANDLOCK        110
>>>>>      /*
>>>>>     * LSM_ATTR_XXX definitions identify different LSM attributes
>>


  reply	other threads:[~2023-10-23 16:11 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-18 21:50 [PATCH] lsm: drop LSM_ID_IMA Paul Moore
2023-10-19  8:08 ` Roberto Sassu
2023-10-20 21:56   ` Casey Schaufler
2023-10-23 15:20     ` Roberto Sassu
2023-10-23 15:48       ` Casey Schaufler
2023-10-23 16:11         ` Roberto Sassu [this message]
2023-10-24 13:18           ` Roberto Sassu
2023-10-24 21:18         ` Paul Moore
2023-10-25 10:35           ` Roberto Sassu
2023-10-25 13:14             ` Paul Moore
2023-10-25 14:06               ` Roberto Sassu
2023-10-25 14:36                 ` Roberto Sassu
2023-10-26  2:54                   ` Paul Moore
2023-10-26  8:49                     ` Roberto Sassu
2023-10-26  2:43                 ` Paul Moore
2023-10-25 16:46         ` Roberto Sassu
2023-10-24 21:15   ` Paul Moore
2023-11-13  4:05 ` Paul Moore

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a52e1040-0110-40fb-8d22-876bda122b19@huaweicloud.com \
    --to=roberto.sassu@huaweicloud.com \
    --cc=casey@schaufler-ca.com \
    --cc=linux-security-module@vger.kernel.org \
    --cc=paul@paul-moore.com \
    --cc=zohar@linux.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).