Thread (4 messages) 4 messages, 2 authors, 2023-03-09

Re: [PATCH v2] security: Introduce LSM_ORDER_LAST and set it for the integrity LSM

From: Mimi Zohar <zohar@linux.ibm.com>
Date: 2023-03-09 00:23:48
Also in: linux-integrity, lkml

On Wed, 2023-03-08 at 18:11 +0100, Roberto Sassu wrote:
From: Roberto Sassu <roberto.sassu@huawei.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.
^needing to be last
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.

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>
Thanks, Roberto.  With this patch, 'integrity' can be safely removed
from CONFIG_LSM definitions.

-- 
thanks,

Mimi

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help