--- zzzz-none-000/linux-5.4.213/drivers/md/dm-crypt.c 2022-09-15 10:04:56.000000000 +0000 +++ alder-5690pro-762/linux-5.4.213/drivers/md/dm-crypt.c 2024-08-14 09:02:03.000000000 +0000 @@ -2346,7 +2346,7 @@ char **ivmode, char **ivopts) { struct crypt_config *cc = ti->private; - char *tmp, *cipher, *chainmode, *keycount; + char *tmp, *cipher, *chainmode, *keycount, *qcengine; char *cipher_api = NULL; int ret = -EINVAL; char dummy; @@ -2374,6 +2374,11 @@ cc->key_parts = cc->tfms_count; chainmode = strsep(&tmp, "-"); + if (strnstr(tmp, "qce", sizeof("qce"))) + qcengine = strsep(&tmp, "-"); + else + qcengine = NULL; + *ivmode = strsep(&tmp, ":"); *ivopts = tmp; @@ -2395,7 +2400,10 @@ if (!cipher_api) goto bad_mem; - if (*ivmode && !strcmp(*ivmode, "essiv")) { + if (qcengine) { + ret = snprintf(cipher_api, CRYPTO_MAX_ALG_NAME, + "%s-%s-%s", chainmode, cipher, qcengine); + } else if (*ivmode && !strcmp(*ivmode, "essiv")) { if (!*ivopts) { ti->error = "Digest algorithm missing for ESSIV mode"; kfree(cipher_api);