[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6154a26bb0efc2abbfc51df4bf1adc8279854f3c.camel@linux.ibm.com>
Date: Thu, 15 Feb 2024 19:25:41 -0500
From: Mimi Zohar <zohar@...ux.ibm.com>
To: Roberto Sassu <roberto.sassu@...weicloud.com>, viro@...iv.linux.org.uk,
brauner@...nel.org, jack@...e.cz, chuck.lever@...cle.com,
jlayton@...nel.org, neilb@...e.de, kolga@...app.com,
Dai.Ngo@...cle.com, tom@...pey.com, paul@...l-moore.com,
jmorris@...ei.org, serge@...lyn.com, dmitry.kasatkin@...il.com,
eric.snowberg@...cle.com, dhowells@...hat.com, jarkko@...nel.org,
stephen.smalley.work@...il.com, omosnace@...hat.com,
casey@...aufler-ca.com, shuah@...nel.org, mic@...ikod.net
Cc: linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org,
linux-nfs@...r.kernel.org, linux-security-module@...r.kernel.org,
linux-integrity@...r.kernel.org, keyrings@...r.kernel.org,
selinux@...r.kernel.org, linux-kselftest@...r.kernel.org,
Roberto Sassu
<roberto.sassu@...wei.com>,
Stefan Berger <stefanb@...ux.ibm.com>
Subject: Re: [PATCH v10 19/25] integrity: Move
integrity_kernel_module_request() to IMA
On Thu, 2024-02-15 at 17:09 +0100, Roberto Sassu wrote:
> On Thu, 2024-02-15 at 11:31 +0100, Roberto Sassu wrote:
> > From: Roberto Sassu <roberto.sassu@...wei.com>
> >
> > In preparation for removing the 'integrity' LSM, move
> > integrity_kernel_module_request() to IMA, and rename it to
> > ima_kernel_module_request(). Rewrite the function documentation, to explain
> > better what the problem is.
> >
> > Compile it conditionally if CONFIG_INTEGRITY_ASYMMETRIC_KEYS is enabled,
> > and call it from security.c (removed afterwards with the move of IMA to the
> > LSM infrastructure).
> >
> > Adding this hook cannot be avoided, since IMA has no control on the flags
> > passed to crypto_alloc_sig() in public_key_verify_signature(), and thus
> > cannot pass CRYPTO_NOLOAD, which solved the problem for EVM hashing with
> > commit e2861fa71641 ("evm: Don't deadlock if a crypto algorithm is
> > unavailable").
> >
> > EVM alone does not need to implement this hook, first because there is no
> > mutex to deadlock, and second because even if it had it, there should be a
> > recursive call. However, since verification from EVM can be initiated only
> > by setting inode metadata, deadlock would occur if modprobe would do the
> > same while loading a kernel module (which is unlikely).
> >
> > Signed-off-by: Roberto Sassu <roberto.sassu@...wei.com>
> > Acked-by: Paul Moore <paul@...l-moore.com>
> > Reviewed-by: Stefan Berger <stefanb@...ux.ibm.com>
> > Reviewed-by: Mimi Zohar <zohar@...ux.ibm.com>
> > Acked-by: Mimi Zohar <zohar@...ux.ibm.com>
>
> I hope the change of the ima_kernel_module_request() documentation is
> fine for everyone.
>
> If not, let me know.
Thanks, Roberto. The updated kernel-doc looks good.
Mimi
Powered by blists - more mailing lists