@@ -354,10 +354,15 @@ int evm_init_hmac(struct inode *inode, const struct xattr *lsm_xattr,
int evm_init_key(void)
{
struct key *evm_key;
+ struct key_type *type;
struct encrypted_key_payload *ekp;
int rc;
- evm_key = request_key(&key_type_encrypted, EVMKEY, NULL);
+ type = key_type_lookup("encrypted");
+ if (IS_ERR(type))
+ return PTR_ERR(type);
+
+ evm_key = request_key(type, EVMKEY, NULL);
if (IS_ERR(evm_key))
return -ENOENT;
@@ -372,3 +377,5 @@ int evm_init_key(void)
key_put(evm_key);
return rc;
}
+
+MODULE_SOFTDEP("pre: encrypted_keys");
Lookup the key type by name and protect evm from encrypted_keys.ko module load failures. Cc: Mimi Zohar <zohar@linux.ibm.com> Cc: <linux-integrity@vger.kernel.org> Signed-off-by: Dan Williams <dan.j.williams@intel.com> --- security/integrity/evm/evm_crypto.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)