From: Roberto Sassu <roberto.sassu@huaweicloud.com>
To: Paul Moore <paul@paul-moore.com>
Cc: zohar@linux.ibm.com, dmitry.kasatkin@gmail.com,
jmorris@namei.org, serge@hallyn.com, mic@digikod.net,
linux-integrity@vger.kernel.org,
linux-security-module@vger.kernel.org, bpf@vger.kernel.org,
linux-kernel@vger.kernel.org, keescook@chromium.org,
Roberto Sassu <roberto.sassu@huawei.com>
Subject: Re: [PATCH v3 1/3] security: Introduce LSM_ORDER_LAST and set it for the integrity LSM
Date: Fri, 10 Mar 2023 08:57:36 +0100 [thread overview]
Message-ID: <93b680a9a31357b21610dd988d3c653a9ace3492.camel@huaweicloud.com> (raw)
In-Reply-To: <CAHC9VhRBxPnQeQ4SPHKXP_k1epoaZRGNUzCa+QJR9se_t+4+-Q@mail.gmail.com>
On Thu, 2023-03-09 at 18:44 -0500, Paul Moore wrote:
> On Thu, Mar 9, 2023 at 3:55 AM Roberto Sassu
> <roberto.sassu@huaweicloud.com> wrote:
> > From: Roberto Sassu <roberto.sassu@huawei.com>
> >
> > Introduce LSM_ORDER_LAST, to satisfy the requirement of LSMs needing to be
> > last, e.g. the 'integrity' LSM, without changing the kernel command line or
> > configuration.
> >
> > Also, set this order for the 'integrity' LSM. While not enforced, this is
> > the only LSM expected to use it.
> >
> > Similarly to LSM_ORDER_FIRST, LSMs with LSM_ORDER_LAST are always enabled
> > and put at the end of the LSM list.
>
> Since you are respinning this patchset anyway, I might make it clear
> that the LSM_ORDER_LAST LSMs are always enabled only when they are
> enabled at kernel configure/build time. Simply marking a LSM as
> LSM_ORDER_LAST does not mean you don't have to explicitly select the
> LSM in the rest of the Kconfig.
Ok, yes, better to clarify.
Thanks
Roberto
> > Finally, for LSM_ORDER_MUTABLE LSMs, set the found variable to true if an
> > LSM is found, regardless of its order. In this way, the kernel would not
> > wrongly report that the LSM is not built-in in the kernel if its order is
> > LSM_ORDER_LAST.
> >
> > Fixes: 79f7865d844c ("LSM: Introduce "lsm=" for boottime LSM selection")
> > Signed-off-by: Roberto Sassu <roberto.sassu@huawei.com>
> > ---
> > include/linux/lsm_hooks.h | 1 +
> > security/integrity/iint.c | 1 +
> > security/security.c | 12 +++++++++---
> > 3 files changed, 11 insertions(+), 3 deletions(-)
next prev parent reply other threads:[~2023-03-10 7:58 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-09 8:54 [PATCH v3 0/3] security: Always enable integrity LSM Roberto Sassu
2023-03-09 8:54 ` [PATCH v3 1/3] security: Introduce LSM_ORDER_LAST and set it for the " Roberto Sassu
2023-03-09 13:20 ` Mimi Zohar
2023-03-09 22:04 ` Paul Moore
2023-03-10 13:38 ` Mimi Zohar
2023-03-10 16:22 ` Paul Moore
2023-03-10 16:33 ` Roberto Sassu
2023-03-10 19:59 ` Mimi Zohar
2023-03-09 23:44 ` Paul Moore
2023-03-10 7:57 ` Roberto Sassu [this message]
2023-03-09 8:54 ` [PATCH v3 2/3] Revert "integrity: double check iint_cache was initialized" Roberto Sassu
2023-03-09 13:20 ` Mimi Zohar
2023-03-09 8:54 ` [PATCH v3 3/3] security: Remove integrity from the LSM list in Kconfig Roberto Sassu
2023-03-09 13:20 ` Mimi Zohar
2023-03-09 13:29 ` Roberto Sassu
2023-03-09 23:45 ` 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=93b680a9a31357b21610dd988d3c653a9ace3492.camel@huaweicloud.com \
--to=roberto.sassu@huaweicloud.com \
--cc=bpf@vger.kernel.org \
--cc=dmitry.kasatkin@gmail.com \
--cc=jmorris@namei.org \
--cc=keescook@chromium.org \
--cc=linux-integrity@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=roberto.sassu@huawei.com \
--cc=serge@hallyn.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).