crypto: x86/aegis,morus - Do not require OSXSAVE for SSE2
Subsystems (3)
PATCH 1/1 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 877ccce7cbe8 ("crypto: x86/aegis,morus - Fix and simplify CPUID checks")
Cc <[email protected]> # 4.18
Reported-by Zdenek Kaspar <[email protected]>
Signed-off-by Ondrej Mosnacek <[email protected]>
--- arch/x86/crypto/aegis128-aesni-glue.c | 1 - arch/x86/crypto/aegis128l-aesni-glue.c | 1 - arch/x86/crypto/aegis256-aesni-glue.c | 1 - arch/x86/crypto/morus1280-sse2-glue.c | 1 - arch/x86/crypto/morus640-sse2-glue.c | 1 - 5 files changed, 5 deletions(-)
NOTE: This patch doesn't apply to the current crypto-2.6 tree [1], since it is based on v4.18-rc7, which doesn't contain the commit this patch is fixing. It needs to merge in the v4.18 tag before this patch can be applied.
Thanks,
Ondrej
[1] https://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6.git/
arch/x86/crypto/aegis128-aesni-glue.c +0 -1
@@ -379,7 +379,6 @@ static int __init crypto_aegis128_aesni_module_init(void) {if (!boot_cpu_has (X86_FEATURE_XMM2 ) || !boot_cpu_has (X86_FEATURE_AES ) || - !boot_cpu_has (X86_FEATURE_OSXSAVE ) || !cpu_has_xfeatures (XFEATURE_MASK_SSE ,NULL ))return -ENODEV ;
arch/x86/crypto/aegis128l-aesni-glue.c +0 -1
@@ -379,7 +379,6 @@ static int __init crypto_aegis128l_aesni_module_init(void) {if (!boot_cpu_has (X86_FEATURE_XMM2 ) || !boot_cpu_has (X86_FEATURE_AES ) || - !boot_cpu_has (X86_FEATURE_OSXSAVE ) || !cpu_has_xfeatures (XFEATURE_MASK_SSE ,NULL ))return -ENODEV ;
arch/x86/crypto/aegis256-aesni-glue.c +0 -1
@@ -379,7 +379,6 @@ static int __init crypto_aegis256_aesni_module_init(void) {if (!boot_cpu_has (X86_FEATURE_XMM2 ) || !boot_cpu_has (X86_FEATURE_AES ) || - !boot_cpu_has (X86_FEATURE_OSXSAVE ) || !cpu_has_xfeatures (XFEATURE_MASK_SSE ,NULL ))return -ENODEV ;
arch/x86/crypto/morus1280-sse2-glue.c +0 -1
@@ -40,7 +40,6 @@ MORUS1280_DECLARE_ALGS(sse2, "morus1280-sse2", 350);static int __init crypto_morus1280_sse2_module_init (void ) {if (!boot_cpu_has (X86_FEATURE_XMM2 ) || - !boot_cpu_has (X86_FEATURE_OSXSAVE ) || !cpu_has_xfeatures (XFEATURE_MASK_SSE ,NULL ))return -ENODEV ;
arch/x86/crypto/morus640-sse2-glue.c +0 -1
@@ -40,7 +40,6 @@ MORUS640_DECLARE_ALGS(sse2, "morus640-sse2", 400);static int __init crypto_morus640_sse2_module_init (void ) {if (!boot_cpu_has (X86_FEATURE_XMM2 ) || - !boot_cpu_has (X86_FEATURE_OSXSAVE ) || !cpu_has_xfeatures (XFEATURE_MASK_SSE ,NULL ))return -ENODEV ;
Signature · 1 line
2.17.1
Herbert Xu
maintainerQuoted 8 lines · Ondrej Mosnacek
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 877ccce7cbe8 ("crypto: x86/aegis,morus - Fix and simplify CPUID checks")Cc <[email protected]> # 4.18Reported-by Zdenek Kaspar <[email protected]>Signed-off-by Ondrej Mosnacek <[email protected]>
Patch applied. Thanks.
Signature · 3 lines
Email: Herbert Xu <[email protected]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt