Skip to content

Commit 24568b4

Browse files
WOnder93herbertx
authored andcommitted
crypto: x86/aegis,morus - Do not require OSXSAVE for SSE2
It turns out OSXSAVE needs to be checked only for AVX, not for SSE. Without this patch the affected modules refuse to load on CPUs with SSE2 but without AVX support. Fixes: 877ccce ("crypto: x86/aegis,morus - Fix and simplify CPUID checks") Cc: <stable@vger.kernel.org> # 4.18 Reported-by: Zdenek Kaspar <zkaspar82@gmail.com> Signed-off-by: Ondrej Mosnacek <omosnace@redhat.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
1 parent 3702a05 commit 24568b4

File tree

5 files changed

+0
-5
lines changed

5 files changed

+0
-5
lines changed

arch/x86/crypto/aegis128-aesni-glue.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,6 @@ static int __init crypto_aegis128_aesni_module_init(void)
379379
{
380380
if (!boot_cpu_has(X86_FEATURE_XMM2) ||
381381
!boot_cpu_has(X86_FEATURE_AES) ||
382-
!boot_cpu_has(X86_FEATURE_OSXSAVE) ||
383382
!cpu_has_xfeatures(XFEATURE_MASK_SSE, NULL))
384383
return -ENODEV;
385384

arch/x86/crypto/aegis128l-aesni-glue.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,6 @@ static int __init crypto_aegis128l_aesni_module_init(void)
379379
{
380380
if (!boot_cpu_has(X86_FEATURE_XMM2) ||
381381
!boot_cpu_has(X86_FEATURE_AES) ||
382-
!boot_cpu_has(X86_FEATURE_OSXSAVE) ||
383382
!cpu_has_xfeatures(XFEATURE_MASK_SSE, NULL))
384383
return -ENODEV;
385384

arch/x86/crypto/aegis256-aesni-glue.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,6 @@ static int __init crypto_aegis256_aesni_module_init(void)
379379
{
380380
if (!boot_cpu_has(X86_FEATURE_XMM2) ||
381381
!boot_cpu_has(X86_FEATURE_AES) ||
382-
!boot_cpu_has(X86_FEATURE_OSXSAVE) ||
383382
!cpu_has_xfeatures(XFEATURE_MASK_SSE, NULL))
384383
return -ENODEV;
385384

arch/x86/crypto/morus1280-sse2-glue.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ MORUS1280_DECLARE_ALGS(sse2, "morus1280-sse2", 350);
4040
static int __init crypto_morus1280_sse2_module_init(void)
4141
{
4242
if (!boot_cpu_has(X86_FEATURE_XMM2) ||
43-
!boot_cpu_has(X86_FEATURE_OSXSAVE) ||
4443
!cpu_has_xfeatures(XFEATURE_MASK_SSE, NULL))
4544
return -ENODEV;
4645

arch/x86/crypto/morus640-sse2-glue.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ MORUS640_DECLARE_ALGS(sse2, "morus640-sse2", 400);
4040
static int __init crypto_morus640_sse2_module_init(void)
4141
{
4242
if (!boot_cpu_has(X86_FEATURE_XMM2) ||
43-
!boot_cpu_has(X86_FEATURE_OSXSAVE) ||
4443
!cpu_has_xfeatures(XFEATURE_MASK_SSE, NULL))
4544
return -ENODEV;
4645

0 commit comments

Comments
 (0)