Commit 8a0f7969 authored by wangshouping's avatar wangshouping Committed by Zheng Zengkai
Browse files

crypto: Add PMULL judgment during initialization to prevent oops

openEuler inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I4OKIE?from=project-issue


CVE: NA

----------------------------------------

For servers that do not support PMULL on
the cpu, execute "modprobe crct10dif-ce",
and accur oops.

Signed-off-by: default avatarwangshouping <wangshouping@huawei.com>
Reviewed-by: default avatarYue Haibing <yuehaibing@huawei.com>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent 91df43ce
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -97,7 +97,11 @@ static struct shash_alg alg = {

static int __init crct10dif_arm64_mod_init(void)
{
	if (cpu_have_named_feature(PMULL)) {
		return crypto_register_shash(&alg);
	} else {
		return -ENODEV;
	}
}

static void __exit crct10dif_arm64_mod_fini(void)