All of lore.kernel.org
 help / color / mirror / Atom feed
From: Casey Schaufler <casey@schaufler-ca.com>
To: Paul Moore <paul@paul-moore.com>
Cc: Greg KH <gregkh@linuxfoundation.org>,
	casey.schaufler@intel.com, linux-security-module@vger.kernel.org,
	jmorris@namei.org, keescook@chromium.org,
	john.johansen@canonical.com, penguin-kernel@i-love.sakura.ne.jp,
	stephen.smalley.work@gmail.com, linux-kernel@vger.kernel.org,
	linux-api@vger.kernel.org, mic@digikod.net,
	casey@schaufler-ca.com
Subject: Re: [PATCH v1 2/8] LSM: Add an LSM identifier for external use
Date: Wed, 9 Nov 2022 16:57:05 -0800	[thread overview]
Message-ID: <20cdb098-400e-25d0-f93e-98efb1095b68@schaufler-ca.com> (raw)
In-Reply-To: <CAHC9VhR8_aQFxBq4fG=q8FgVUEZAL6F_iSE9kFnO7Mf4tf52AQ@mail.gmail.com>

On 11/9/2022 3:33 PM, Paul Moore wrote:
> On Fri, Oct 28, 2022 at 12:55 PM Casey Schaufler <casey@schaufler-ca.com> wrote:
>> On 10/26/2022 11:31 PM, Greg KH wrote:
>>> On Wed, Oct 26, 2022 at 12:36:34PM -0700, Casey Schaufler wrote:
>>>>>> + *
>>>>>> + * Copyright (C) 2022 Casey Schaufler <casey@schaufler-ca.com>
>>>>>> + * Copyright (C) Intel Corporation
>>>>> No date for Intel?
>>>> The latest guidance I have received is that Intel does not want a date.
>>> Ok, then I need to have an Intel lawyer sign off on a patch that does
>>> this in order to have that be their official statement.  Otherwise, it
>>> needs a date.
>> Seems I misunderstood something. The date will be there.
>>
>>>>>> + */
>>>>>> +
>>>>>> +#ifndef _UAPI_LINUX_LSM_H
>>>>>> +#define _UAPI_LINUX_LSM_H
>>>>>> +
>>>>>> +/*
>>>>>> + * ID values to identify security modules.
>>>>>> + * A system may use more than one security module.
>>>>>> + *
>>>>>> + * LSM_ID_XXX values 0 - 31 are reserved for future use
>>>>> Reserved for what?  Why?
>>>> You're not the first person to ask.
>>> And the answer is?
>> There hasn't been an argument for it beyond "just in case".
>> I can't see a rational reason to reserve specific numbers as
>> I don't see value in LSM ranges.
>>
>>>> I'll remove the reserved values for the next version.
>>> Because we asked it will be removed?
>> Because I don't have a good reason for including it and it
>> has been called into question. If a reviewer has a legitimate
>> case for reserved values they may be back.
> Sorry for the delay, I was away for a couple of weeks and limiting my
> patch review to bug fixes, critical stuff, etc. but normal service is
> resuming this week ...
>
> I was the one who originally added the note on reserved values in my
> original strawman proposal and I suspect Casey just carried that
> forward into his patches, so feel free to blame me.

Done!

>   My reason for
> doing so is rather simple, we're going to treat the ID as a 32-bit
> value so we have *plenty* of room (just the thought of supporting +4
> billion unique LSMs is comically insane), and I'd like to try and
> leave some space for yet-undetermined "special" things that we might
> need to convey in the LSM syscalls.  For example, this would allow us
> to convey additional information to userspace when an application
> asked for labeling information using one of these reserved LSM IDs;
> applications which did not know (or care) about the special ID would
> continue to function normally but augmented/new applications would be
> able to make sense of the additional information ... and we wouldn't
> have to add a new syscall to do it.

I don't see how

	#define LSM_ID_SPECIAL	2

is better than

	#define LSM_ID_SPECIAL	13

There's no reason to "group" LSM_ID values, nor have a range of them.
Really, I don't care one way or the other. I will bend to whatever will
is stronger.

> It's basically really cheap futureproofing with little downside (we
> can always reclaim it at a later date if really necessary).  I've done
> similar things on other projects and it has proven to be useful in a
> few, and in none of the cases has it proven to be a problem.
>
> --
> paul-moore.com

  reply	other threads:[~2022-11-10  0:58 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20221025184519.13231-1-casey.ref@schaufler-ca.com>
2022-10-25 18:45 ` [PATCH v1 0/8] LSM: Two basic syscalls Casey Schaufler
2022-10-25 18:45   ` [PATCH v1 1/8] LSM: Identify modules by more than name Casey Schaufler
2022-10-26  5:56     ` Greg KH
2022-10-25 18:45   ` [PATCH v1 2/8] LSM: Add an LSM identifier for external use Casey Schaufler
2022-10-26  5:58     ` Greg KH
2022-10-26 19:36       ` Casey Schaufler
2022-10-27  0:11         ` Tetsuo Handa
2022-10-27  6:31         ` Greg KH
2022-10-28 16:54           ` Casey Schaufler
2022-11-09 23:33             ` Paul Moore
2022-11-10  0:57               ` Casey Schaufler [this message]
2022-11-10  2:37                 ` Paul Moore
2022-11-09 23:33     ` Paul Moore
2022-11-10  0:46       ` Casey Schaufler
2022-10-25 18:45   ` [PATCH v1 3/8] LSM: Identify the process attributes for each module Casey Schaufler
2022-10-26  5:59     ` Greg KH
2022-11-09 23:34     ` Paul Moore
2022-11-10  1:03       ` Casey Schaufler
2022-11-10  2:39         ` Paul Moore
2022-10-25 18:45   ` [PATCH v1 4/8] LSM: Maintain a table of LSM attribute data Casey Schaufler
2022-10-26  6:00     ` Greg KH
2022-10-27  0:38       ` Casey Schaufler
2022-10-27  6:29         ` Greg KH
2022-10-27 17:08           ` Casey Schaufler
2022-10-27 17:13             ` Greg KH
2022-11-09 23:34               ` Paul Moore
2022-11-09 23:34         ` Paul Moore
2022-11-09 23:34           ` Paul Moore
2022-10-25 18:45   ` [PATCH v1 5/8] proc: Use lsmids instead of lsm names for attrs Casey Schaufler
2022-10-25 18:45   ` [PATCH v1 6/8] LSM: lsm_self_attr syscall for LSM self attributes Casey Schaufler
2022-10-25 21:49     ` kernel test robot
2022-10-26  6:03     ` Greg KH
2022-10-26  7:01     ` kernel test robot
2022-10-26  8:14     ` kernel test robot
2022-10-26  9:33     ` kernel test robot
2022-11-09 23:34     ` Paul Moore
2022-11-10  1:32       ` Casey Schaufler
2022-11-10  3:02         ` Paul Moore
2022-11-10 23:36       ` Paul Moore
2022-11-11  0:36         ` Casey Schaufler
2022-11-11  3:16           ` Paul Moore
2022-10-25 18:45   ` [PATCH v1 7/8] LSM: Create lsm_module_list system call Casey Schaufler
2022-10-26  6:02     ` Greg KH
2022-10-26 12:07     ` kernel test robot
2022-11-09 23:35     ` Paul Moore
2022-11-10  1:37       ` Casey Schaufler
2022-11-10  3:17         ` Paul Moore
2022-10-25 18:45   ` [PATCH v1 8/8] lsm: wireup syscalls lsm_self_attr and lsm_module_list Casey Schaufler
2022-10-26  2:01     ` kernel test robot
2022-10-26  8:07     ` Geert Uytterhoeven
2022-11-23 19:57 [PATCH v1 0/8] LSM: Two basic syscalls Casey Schaufler
2022-11-23 19:57 ` [PATCH v1 2/8] LSM: Add an LSM identifier for external use Casey Schaufler

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=20cdb098-400e-25d0-f93e-98efb1095b68@schaufler-ca.com \
    --to=casey@schaufler-ca.com \
    --cc=casey.schaufler@intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jmorris@namei.org \
    --cc=john.johansen@canonical.com \
    --cc=keescook@chromium.org \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=mic@digikod.net \
    --cc=paul@paul-moore.com \
    --cc=penguin-kernel@i-love.sakura.ne.jp \
    --cc=stephen.smalley.work@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.