提交 8a0f7969 编写于 作者: W wangshouping 提交者: Zheng Zengkai

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: Nwangshouping <wangshouping@huawei.com>
Reviewed-by: NYue Haibing <yuehaibing@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 91df43ce
......@@ -97,7 +97,11 @@ static struct shash_alg alg = {
static int __init crct10dif_arm64_mod_init(void)
{
return crypto_register_shash(&alg);
if (cpu_have_named_feature(PMULL)) {
return crypto_register_shash(&alg);
} else {
return -ENODEV;
}
}
static void __exit crct10dif_arm64_mod_fini(void)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册