[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b8acdcc49b33b738bebc0921f7688782489b52bd.camel@linux.ibm.com>
Date: Wed, 08 Mar 2023 10:52:06 -0500
From: Mimi Zohar <zohar@...ux.ibm.com>
To: Roberto Sassu <roberto.sassu@...weicloud.com>,
viro@...iv.linux.org.uk, chuck.lever@...cle.com,
jlayton@...nel.org, dmitry.kasatkin@...il.com, paul@...l-moore.com,
jmorris@...ei.org, serge@...lyn.com, dhowells@...hat.com,
jarkko@...nel.org, stephen.smalley.work@...il.com,
eparis@...isplace.org, casey@...aufler-ca.com, brauner@...nel.org
Cc: linux-fsdevel@...r.kernel.org, linux-nfs@...r.kernel.org,
linux-integrity@...r.kernel.org,
linux-security-module@...r.kernel.org, keyrings@...r.kernel.org,
selinux@...r.kernel.org, linux-kernel@...r.kernel.org,
stefanb@...ux.ibm.com, Roberto Sassu <roberto.sassu@...wei.com>
Subject: Re: [PATCH 23/28] security: Introduce LSM_ORDER_LAST
On Wed, 2023-03-08 at 15:35 +0100, Roberto Sassu wrote:
> On Wed, 2023-03-08 at 09:00 -0500, Mimi Zohar wrote:
> > On Wed, 2023-03-08 at 14:26 +0100, Roberto Sassu wrote:
> > > On Wed, 2023-03-08 at 08:13 -0500, Mimi Zohar wrote:
> > > > Hi Roberto,
> > > >
> > > > On Fri, 2023-03-03 at 19:25 +0100, Roberto Sassu wrote:
> > > > > From: Roberto Sassu <roberto.sassu@...wei.com>
> > > > >
> > > > > Introduce LSM_ORDER_LAST, to satisfy the requirement of LSMs willing to be
> > > > > the last, e.g. the 'integrity' LSM, without changing the kernel command
> > > > > line or configuration.
> > > >
> > > > Please reframe this as a bug fix for 79f7865d844c ("LSM: Introduce
> > > > "lsm=" for boottime LSM selection") and upstream it first, with
> > > > 'integrity' as the last LSM. The original bug fix commit 92063f3ca73a
> > > > ("integrity: double check iint_cache was initialized") could then be
> > > > removed.
> > >
> > > Ok, I should complete the patch by checking the cache initialization in
> > > iint.c.
> > >
> > > > > As for LSM_ORDER_FIRST, LSMs with LSM_ORDER_LAST are always enabled and put
> > > > > at the end of the LSM list in no particular order.
> > > >
> > > > ^Similar to LSM_ORDER_FIRST ...
> > > >
> > > > And remove "in no particular order".
> > >
> > > The reason for this is that I originally thought that the relative
> > > order of LSMs specified in the kernel configuration or the command line
> > > was respected (if more than one LSM specifies LSM_ORDER_LAST). In fact
> > > not. To do this, we would have to parse the LSM string again, as it is
> > > done for LSM_ORDER_MUTABLE LSMs.
> >
> > IMA and EVM are only configurable if 'integrity' is enabled. Similar
> > to how LSM_ORDER_FIRST is reserved for capabilities, LSM_ORDER_LAST
> > should be reserved for integrity (LSMs), if it is configured, for the
> > reason as described in the "[PATCH 24/28] ima: Move to LSM
> > infrastructure" patch description.
>
> Yes, it is just that nothing prevents to have multiple LSMs with order
> LSM_ORDER_LAST. I guess we will enforce that it is only one by
> reviewing the code.
At least add a comment, like the existing one for LSM_ORDER_FIRST.
> > > > enum lsm_order {
> > > > > LSM_ORDER_FIRST = -1, /* This is only for capabilities. */
> > > > > LSM_ORDER_MUTABLE = 0,
> > > > > + LSM_ORDER_LAST = 1,
> > > > > };
--
thanks,
Mimi
Powered by blists - more mailing lists