* [PATCH 1/3] crypto: x86 - Remove CONFIG_AS_SHA1_NI
@ 2025-04-03 9:44 Uros Bizjak
2025-04-03 9:44 ` [PATCH 2/3] crypto: x86 - Remove CONFIG_AS_SHA256_NI Uros Bizjak
` (2 more replies)
0 siblings, 3 replies; 12+ messages in thread
From: Uros Bizjak @ 2025-04-03 9:44 UTC (permalink / raw)
To: linux-crypto, x86, linux-kernel
Cc: Uros Bizjak, Herbert Xu, David S. Miller, Thomas Gleixner,
Ingo Molnar, Borislav Petkov, Dave Hansen, H. Peter Anvin
Current minimum required version of binutils is 2.25,
which supports SHA-1 instruction mnemonics.
Remove check for assembler support of SHA-1 instructions
and all relevant macros for conditional compilation.
No functional change intended.
Signed-off-by: Uros Bizjak <ubizjak@gmail.com>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
---
arch/x86/Kconfig.assembler | 5 -----
arch/x86/crypto/Makefile | 3 +--
arch/x86/crypto/sha1_ssse3_glue.c | 10 ----------
3 files changed, 1 insertion(+), 17 deletions(-)
diff --git a/arch/x86/Kconfig.assembler b/arch/x86/Kconfig.assembler
index 6d20a6ce0507..70fe87bb1055 100644
--- a/arch/x86/Kconfig.assembler
+++ b/arch/x86/Kconfig.assembler
@@ -6,11 +6,6 @@ config AS_AVX512
help
Supported by binutils >= 2.25 and LLVM integrated assembler
-config AS_SHA1_NI
- def_bool $(as-instr,sha1msg1 %xmm0$(comma)%xmm1)
- help
- Supported by binutils >= 2.24 and LLVM integrated assembler
-
config AS_SHA256_NI
def_bool $(as-instr,sha256msg1 %xmm0$(comma)%xmm1)
help
diff --git a/arch/x86/crypto/Makefile b/arch/x86/crypto/Makefile
index 5d19f41bde58..97c1dbc3b7d6 100644
--- a/arch/x86/crypto/Makefile
+++ b/arch/x86/crypto/Makefile
@@ -56,8 +56,7 @@ aesni-intel-$(CONFIG_64BIT) += aes-gcm-avx10-x86_64.o
endif
obj-$(CONFIG_CRYPTO_SHA1_SSSE3) += sha1-ssse3.o
-sha1-ssse3-y := sha1_avx2_x86_64_asm.o sha1_ssse3_asm.o sha1_ssse3_glue.o
-sha1-ssse3-$(CONFIG_AS_SHA1_NI) += sha1_ni_asm.o
+sha1-ssse3-y := sha1_avx2_x86_64_asm.o sha1_ssse3_asm.o sha1_ni_asm.o sha1_ssse3_glue.o
obj-$(CONFIG_CRYPTO_SHA256_SSSE3) += sha256-ssse3.o
sha256-ssse3-y := sha256-ssse3-asm.o sha256-avx-asm.o sha256-avx2-asm.o sha256_ssse3_glue.o
diff --git a/arch/x86/crypto/sha1_ssse3_glue.c b/arch/x86/crypto/sha1_ssse3_glue.c
index ab8bc54f254d..abb793cbad01 100644
--- a/arch/x86/crypto/sha1_ssse3_glue.c
+++ b/arch/x86/crypto/sha1_ssse3_glue.c
@@ -28,9 +28,7 @@
#include <asm/simd.h>
static const struct x86_cpu_id module_cpu_ids[] = {
-#ifdef CONFIG_AS_SHA1_NI
X86_MATCH_FEATURE(X86_FEATURE_SHA_NI, NULL),
-#endif
X86_MATCH_FEATURE(X86_FEATURE_AVX2, NULL),
X86_MATCH_FEATURE(X86_FEATURE_AVX, NULL),
X86_MATCH_FEATURE(X86_FEATURE_SSSE3, NULL),
@@ -256,7 +254,6 @@ static void unregister_sha1_avx2(void)
crypto_unregister_shash(&sha1_avx2_alg);
}
-#ifdef CONFIG_AS_SHA1_NI
asmlinkage void sha1_ni_transform(struct sha1_state *digest, const u8 *data,
int rounds);
@@ -306,11 +303,6 @@ static void unregister_sha1_ni(void)
crypto_unregister_shash(&sha1_ni_alg);
}
-#else
-static inline int register_sha1_ni(void) { return 0; }
-static inline void unregister_sha1_ni(void) { }
-#endif
-
static int __init sha1_ssse3_mod_init(void)
{
if (!x86_match_cpu(module_cpu_ids))
@@ -360,6 +352,4 @@ MODULE_ALIAS_CRYPTO("sha1");
MODULE_ALIAS_CRYPTO("sha1-ssse3");
MODULE_ALIAS_CRYPTO("sha1-avx");
MODULE_ALIAS_CRYPTO("sha1-avx2");
-#ifdef CONFIG_AS_SHA1_NI
MODULE_ALIAS_CRYPTO("sha1-ni");
-#endif
--
2.49.0
^ permalink raw reply related [flat|nested] 12+ messages in thread* [PATCH 2/3] crypto: x86 - Remove CONFIG_AS_SHA256_NI 2025-04-03 9:44 [PATCH 1/3] crypto: x86 - Remove CONFIG_AS_SHA1_NI Uros Bizjak @ 2025-04-03 9:44 ` Uros Bizjak 2025-04-03 16:43 ` Eric Biggers 2025-04-03 9:44 ` [PATCH 3/3] crypto: x86 - Remove CONFIG_AS_AVX512 Uros Bizjak 2025-04-03 16:43 ` [PATCH 1/3] crypto: x86 - Remove CONFIG_AS_SHA1_NI Eric Biggers 2 siblings, 1 reply; 12+ messages in thread From: Uros Bizjak @ 2025-04-03 9:44 UTC (permalink / raw) To: linux-crypto, x86, linux-kernel Cc: Uros Bizjak, Herbert Xu, David S. Miller, Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen, H. Peter Anvin Current minimum required version of binutils is 2.25, which supports SHA-256 instruction mnemonics. Remove check for assembler support of SHA-256 instructions and all relevant macros for conditional compilation. No functional change intended. Signed-off-by: Uros Bizjak <ubizjak@gmail.com> Cc: Herbert Xu <herbert@gondor.apana.org.au> Cc: "David S. Miller" <davem@davemloft.net> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@kernel.org> Cc: Borislav Petkov <bp@alien8.de> Cc: Dave Hansen <dave.hansen@linux.intel.com> Cc: "H. Peter Anvin" <hpa@zytor.com> --- arch/x86/Kconfig.assembler | 4 ---- arch/x86/crypto/Makefile | 3 +-- arch/x86/crypto/sha256_ssse3_glue.c | 10 ---------- 3 files changed, 1 insertion(+), 16 deletions(-) diff --git a/arch/x86/Kconfig.assembler b/arch/x86/Kconfig.assembler index 70fe87bb1055..4d06fd3c8dfe 100644 --- a/arch/x86/Kconfig.assembler +++ b/arch/x86/Kconfig.assembler @@ -6,10 +6,6 @@ config AS_AVX512 help Supported by binutils >= 2.25 and LLVM integrated assembler -config AS_SHA256_NI - def_bool $(as-instr,sha256msg1 %xmm0$(comma)%xmm1) - help - Supported by binutils >= 2.24 and LLVM integrated assembler config AS_TPAUSE def_bool $(as-instr,tpause %ecx) help diff --git a/arch/x86/crypto/Makefile b/arch/x86/crypto/Makefile index 97c1dbc3b7d6..e06b739176c9 100644 --- a/arch/x86/crypto/Makefile +++ b/arch/x86/crypto/Makefile @@ -59,8 +59,7 @@ obj-$(CONFIG_CRYPTO_SHA1_SSSE3) += sha1-ssse3.o sha1-ssse3-y := sha1_avx2_x86_64_asm.o sha1_ssse3_asm.o sha1_ni_asm.o sha1_ssse3_glue.o obj-$(CONFIG_CRYPTO_SHA256_SSSE3) += sha256-ssse3.o -sha256-ssse3-y := sha256-ssse3-asm.o sha256-avx-asm.o sha256-avx2-asm.o sha256_ssse3_glue.o -sha256-ssse3-$(CONFIG_AS_SHA256_NI) += sha256_ni_asm.o +sha256-ssse3-y := sha256-ssse3-asm.o sha256-avx-asm.o sha256-avx2-asm.o sha256_ni_asm.o sha256_ssse3_glue.o obj-$(CONFIG_CRYPTO_SHA512_SSSE3) += sha512-ssse3.o sha512-ssse3-y := sha512-ssse3-asm.o sha512-avx-asm.o sha512-avx2-asm.o sha512_ssse3_glue.o diff --git a/arch/x86/crypto/sha256_ssse3_glue.c b/arch/x86/crypto/sha256_ssse3_glue.c index e04a43d9f7d5..429a3cefbab4 100644 --- a/arch/x86/crypto/sha256_ssse3_glue.c +++ b/arch/x86/crypto/sha256_ssse3_glue.c @@ -45,9 +45,7 @@ asmlinkage void sha256_transform_ssse3(struct sha256_state *state, const u8 *data, int blocks); static const struct x86_cpu_id module_cpu_ids[] = { -#ifdef CONFIG_AS_SHA256_NI X86_MATCH_FEATURE(X86_FEATURE_SHA_NI, NULL), -#endif X86_MATCH_FEATURE(X86_FEATURE_AVX2, NULL), X86_MATCH_FEATURE(X86_FEATURE_AVX, NULL), X86_MATCH_FEATURE(X86_FEATURE_SSSE3, NULL), @@ -329,7 +327,6 @@ static void unregister_sha256_avx2(void) ARRAY_SIZE(sha256_avx2_algs)); } -#ifdef CONFIG_AS_SHA256_NI asmlinkage void sha256_ni_transform(struct sha256_state *digest, const u8 *data, int rounds); @@ -403,11 +400,6 @@ static void unregister_sha256_ni(void) ARRAY_SIZE(sha256_ni_algs)); } -#else -static inline int register_sha256_ni(void) { return 0; } -static inline void unregister_sha256_ni(void) { } -#endif - static int __init sha256_ssse3_mod_init(void) { if (!x86_match_cpu(module_cpu_ids)) @@ -461,7 +453,5 @@ MODULE_ALIAS_CRYPTO("sha224"); MODULE_ALIAS_CRYPTO("sha224-ssse3"); MODULE_ALIAS_CRYPTO("sha224-avx"); MODULE_ALIAS_CRYPTO("sha224-avx2"); -#ifdef CONFIG_AS_SHA256_NI MODULE_ALIAS_CRYPTO("sha256-ni"); MODULE_ALIAS_CRYPTO("sha224-ni"); -#endif -- 2.49.0 ^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH 2/3] crypto: x86 - Remove CONFIG_AS_SHA256_NI 2025-04-03 9:44 ` [PATCH 2/3] crypto: x86 - Remove CONFIG_AS_SHA256_NI Uros Bizjak @ 2025-04-03 16:43 ` Eric Biggers 0 siblings, 0 replies; 12+ messages in thread From: Eric Biggers @ 2025-04-03 16:43 UTC (permalink / raw) To: Uros Bizjak Cc: linux-crypto, x86, linux-kernel, Herbert Xu, David S. Miller, Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen, H. Peter Anvin On Thu, Apr 03, 2025 at 11:44:40AM +0200, Uros Bizjak wrote: > Current minimum required version of binutils is 2.25, > which supports SHA-256 instruction mnemonics. > > Remove check for assembler support of SHA-256 instructions > and all relevant macros for conditional compilation. > > No functional change intended. > > Signed-off-by: Uros Bizjak <ubizjak@gmail.com> > Cc: Herbert Xu <herbert@gondor.apana.org.au> > Cc: "David S. Miller" <davem@davemloft.net> > Cc: Thomas Gleixner <tglx@linutronix.de> > Cc: Ingo Molnar <mingo@kernel.org> > Cc: Borislav Petkov <bp@alien8.de> > Cc: Dave Hansen <dave.hansen@linux.intel.com> > Cc: "H. Peter Anvin" <hpa@zytor.com> > --- > arch/x86/Kconfig.assembler | 4 ---- > arch/x86/crypto/Makefile | 3 +-- > arch/x86/crypto/sha256_ssse3_glue.c | 10 ---------- > 3 files changed, 1 insertion(+), 16 deletions(-) Reviewed-by: Eric Biggers <ebiggers@kernel.org> - Eric ^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH 3/3] crypto: x86 - Remove CONFIG_AS_AVX512 2025-04-03 9:44 [PATCH 1/3] crypto: x86 - Remove CONFIG_AS_SHA1_NI Uros Bizjak 2025-04-03 9:44 ` [PATCH 2/3] crypto: x86 - Remove CONFIG_AS_SHA256_NI Uros Bizjak @ 2025-04-03 9:44 ` Uros Bizjak 2025-04-03 16:43 ` Eric Biggers 2025-04-04 1:13 ` kernel test robot 2025-04-03 16:43 ` [PATCH 1/3] crypto: x86 - Remove CONFIG_AS_SHA1_NI Eric Biggers 2 siblings, 2 replies; 12+ messages in thread From: Uros Bizjak @ 2025-04-03 9:44 UTC (permalink / raw) To: linux-crypto, x86, linux-kernel Cc: Uros Bizjak, Herbert Xu, David S. Miller, Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen, H. Peter Anvin Current minimum required version of binutils is 2.25, which supports AVX-512 instruction mnemonics. Remove check for assembler support of AVX-512 instructions and all relevant macros for conditional compilation. No functional change intended. Signed-off-by: Uros Bizjak <ubizjak@gmail.com> Cc: Herbert Xu <herbert@gondor.apana.org.au> Cc: "David S. Miller" <davem@davemloft.net> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@kernel.org> Cc: Borislav Petkov <bp@alien8.de> Cc: Dave Hansen <dave.hansen@linux.intel.com> Cc: "H. Peter Anvin" <hpa@zytor.com> --- arch/x86/Kconfig.assembler | 5 ----- arch/x86/crypto/Kconfig | 2 +- arch/x86/crypto/Makefile | 3 +-- arch/x86/crypto/blake2s-core.S | 4 ---- arch/x86/crypto/blake2s-glue.c | 6 ++---- arch/x86/crypto/chacha_glue.c | 6 ++---- arch/x86/crypto/poly1305-x86_64-cryptogams.pl | 8 -------- arch/x86/crypto/poly1305_glue.c | 6 +++--- 8 files changed, 9 insertions(+), 31 deletions(-) diff --git a/arch/x86/Kconfig.assembler b/arch/x86/Kconfig.assembler index 4d06fd3c8dfe..d149a0ee371a 100644 --- a/arch/x86/Kconfig.assembler +++ b/arch/x86/Kconfig.assembler @@ -1,11 +1,6 @@ # SPDX-License-Identifier: GPL-2.0 # Copyright (C) 2020 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved. -config AS_AVX512 - def_bool $(as-instr,vpmovm2b %k1$(comma)%zmm5) - help - Supported by binutils >= 2.25 and LLVM integrated assembler - config AS_TPAUSE def_bool $(as-instr,tpause %ecx) help diff --git a/arch/x86/crypto/Kconfig b/arch/x86/crypto/Kconfig index 3d948f10c94c..547bb0db9217 100644 --- a/arch/x86/crypto/Kconfig +++ b/arch/x86/crypto/Kconfig @@ -332,7 +332,7 @@ config CRYPTO_ARIA_AESNI_AVX2_X86_64 config CRYPTO_ARIA_GFNI_AVX512_X86_64 tristate "Ciphers: ARIA with modes: ECB, CTR (AVX512/GFNI)" - depends on X86 && 64BIT && AS_AVX512 && AS_GFNI + depends on X86 && 64BIT && AS_GFNI select CRYPTO_SKCIPHER select CRYPTO_SIMD select CRYPTO_ALGAPI diff --git a/arch/x86/crypto/Makefile b/arch/x86/crypto/Makefile index e06b739176c9..2f22b381f244 100644 --- a/arch/x86/crypto/Makefile +++ b/arch/x86/crypto/Makefile @@ -43,8 +43,7 @@ obj-$(CONFIG_CRYPTO_AEGIS128_AESNI_SSE2) += aegis128-aesni.o aegis128-aesni-y := aegis128-aesni-asm.o aegis128-aesni-glue.o obj-$(CONFIG_CRYPTO_CHACHA20_X86_64) += chacha-x86_64.o -chacha-x86_64-y := chacha-avx2-x86_64.o chacha-ssse3-x86_64.o chacha_glue.o -chacha-x86_64-$(CONFIG_AS_AVX512) += chacha-avx512vl-x86_64.o +chacha-x86_64-y := chacha-avx2-x86_64.o chacha-ssse3-x86_64.o chacha-avx512vl-x86_64.o chacha_glue.o obj-$(CONFIG_CRYPTO_AES_NI_INTEL) += aesni-intel.o aesni-intel-y := aesni-intel_asm.o aesni-intel_glue.o diff --git a/arch/x86/crypto/blake2s-core.S b/arch/x86/crypto/blake2s-core.S index b50b35ff1fdb..ac1c845445a4 100644 --- a/arch/x86/crypto/blake2s-core.S +++ b/arch/x86/crypto/blake2s-core.S @@ -29,7 +29,6 @@ SIGMA: .byte 13, 7, 12, 3, 11, 14, 1, 9, 2, 5, 15, 8, 10, 0, 4, 6 .byte 6, 14, 11, 0, 15, 9, 3, 8, 10, 12, 13, 1, 5, 2, 7, 4 .byte 10, 8, 7, 1, 2, 4, 6, 5, 13, 15, 9, 3, 0, 11, 14, 12 -#ifdef CONFIG_AS_AVX512 .section .rodata.cst64.BLAKE2S_SIGMA2, "aM", @progbits, 640 .align 64 SIGMA2: @@ -43,7 +42,6 @@ SIGMA2: .long 6, 13, 0, 14, 12, 2, 1, 11, 15, 4, 5, 8, 7, 9, 3, 10 .long 15, 5, 4, 13, 10, 7, 3, 11, 12, 2, 0, 6, 9, 8, 1, 14 .long 8, 7, 14, 11, 13, 15, 0, 12, 10, 4, 5, 6, 3, 2, 1, 9 -#endif /* CONFIG_AS_AVX512 */ .text SYM_FUNC_START(blake2s_compress_ssse3) @@ -174,7 +172,6 @@ SYM_FUNC_START(blake2s_compress_ssse3) RET SYM_FUNC_END(blake2s_compress_ssse3) -#ifdef CONFIG_AS_AVX512 SYM_FUNC_START(blake2s_compress_avx512) vmovdqu (%rdi),%xmm0 vmovdqu 0x10(%rdi),%xmm1 @@ -253,4 +250,3 @@ SYM_FUNC_START(blake2s_compress_avx512) vzeroupper RET SYM_FUNC_END(blake2s_compress_avx512) -#endif /* CONFIG_AS_AVX512 */ diff --git a/arch/x86/crypto/blake2s-glue.c b/arch/x86/crypto/blake2s-glue.c index 0313f9673f56..00f84f29cc8c 100644 --- a/arch/x86/crypto/blake2s-glue.c +++ b/arch/x86/crypto/blake2s-glue.c @@ -41,8 +41,7 @@ void blake2s_compress(struct blake2s_state *state, const u8 *block, SZ_4K / BLAKE2S_BLOCK_SIZE); kernel_fpu_begin(); - if (IS_ENABLED(CONFIG_AS_AVX512) && - static_branch_likely(&blake2s_use_avx512)) + if (static_branch_likely(&blake2s_use_avx512)) blake2s_compress_avx512(state, block, blocks, inc); else blake2s_compress_ssse3(state, block, blocks, inc); @@ -59,8 +58,7 @@ static int __init blake2s_mod_init(void) if (boot_cpu_has(X86_FEATURE_SSSE3)) static_branch_enable(&blake2s_use_ssse3); - if (IS_ENABLED(CONFIG_AS_AVX512) && - boot_cpu_has(X86_FEATURE_AVX) && + if (boot_cpu_has(X86_FEATURE_AVX) && boot_cpu_has(X86_FEATURE_AVX2) && boot_cpu_has(X86_FEATURE_AVX512F) && boot_cpu_has(X86_FEATURE_AVX512VL) && diff --git a/arch/x86/crypto/chacha_glue.c b/arch/x86/crypto/chacha_glue.c index 8bb74a272879..ce12ad807af1 100644 --- a/arch/x86/crypto/chacha_glue.c +++ b/arch/x86/crypto/chacha_glue.c @@ -48,8 +48,7 @@ static unsigned int chacha_advance(unsigned int len, unsigned int maxblocks) static void chacha_dosimd(u32 *state, u8 *dst, const u8 *src, unsigned int bytes, int nrounds) { - if (IS_ENABLED(CONFIG_AS_AVX512) && - static_branch_likely(&chacha_use_avx512vl)) { + if (static_branch_likely(&chacha_use_avx512vl)) { while (bytes >= CHACHA_BLOCK_SIZE * 8) { chacha_8block_xor_avx512vl(state, dst, src, bytes, nrounds); @@ -282,8 +281,7 @@ static int __init chacha_simd_mod_init(void) cpu_has_xfeatures(XFEATURE_MASK_SSE | XFEATURE_MASK_YMM, NULL)) { static_branch_enable(&chacha_use_avx2); - if (IS_ENABLED(CONFIG_AS_AVX512) && - boot_cpu_has(X86_FEATURE_AVX512VL) && + if (boot_cpu_has(X86_FEATURE_AVX512VL) && boot_cpu_has(X86_FEATURE_AVX512BW)) /* kmovq */ static_branch_enable(&chacha_use_avx512vl); } diff --git a/arch/x86/crypto/poly1305-x86_64-cryptogams.pl b/arch/x86/crypto/poly1305-x86_64-cryptogams.pl index b9abcd79c1f4..409ec6955733 100644 --- a/arch/x86/crypto/poly1305-x86_64-cryptogams.pl +++ b/arch/x86/crypto/poly1305-x86_64-cryptogams.pl @@ -2811,18 +2811,10 @@ if ($avx>2) { # reason stack layout is kept identical to poly1305_blocks_avx2. If not # for this tail, we wouldn't have to even allocate stack frame... -if($kernel) { - $code .= "#ifdef CONFIG_AS_AVX512\n"; -} - &declare_function("poly1305_blocks_avx512", 32, 4); poly1305_blocks_avxN(1); &end_function("poly1305_blocks_avx512"); -if ($kernel) { - $code .= "#endif\n"; -} - if (!$kernel && $avx>3) { ######################################################################## # VPMADD52 version using 2^44 radix. diff --git a/arch/x86/crypto/poly1305_glue.c b/arch/x86/crypto/poly1305_glue.c index 08ff4b489f7e..8b5593c46da7 100644 --- a/arch/x86/crypto/poly1305_glue.c +++ b/arch/x86/crypto/poly1305_glue.c @@ -107,7 +107,7 @@ static void poly1305_simd_blocks(void *ctx, const u8 *inp, size_t len, const size_t bytes = min_t(size_t, len, SZ_4K); kernel_fpu_begin(); - if (IS_ENABLED(CONFIG_AS_AVX512) && static_branch_likely(&poly1305_use_avx512)) + if (static_branch_likely(&poly1305_use_avx512)) poly1305_blocks_avx512(ctx, inp, bytes, padbit); else if (static_branch_likely(&poly1305_use_avx2)) poly1305_blocks_avx2(ctx, inp, bytes, padbit); @@ -265,8 +265,8 @@ static int __init poly1305_simd_mod_init(void) if (boot_cpu_has(X86_FEATURE_AVX) && boot_cpu_has(X86_FEATURE_AVX2) && cpu_has_xfeatures(XFEATURE_MASK_SSE | XFEATURE_MASK_YMM, NULL)) static_branch_enable(&poly1305_use_avx2); - if (IS_ENABLED(CONFIG_AS_AVX512) && boot_cpu_has(X86_FEATURE_AVX) && - boot_cpu_has(X86_FEATURE_AVX2) && boot_cpu_has(X86_FEATURE_AVX512F) && + if (boot_cpu_has(X86_FEATURE_AVX) && boot_cpu_has(X86_FEATURE_AVX2) && + boot_cpu_has(X86_FEATURE_AVX512F) && cpu_has_xfeatures(XFEATURE_MASK_SSE | XFEATURE_MASK_YMM | XFEATURE_MASK_AVX512, NULL) && /* Skylake downclocks unacceptably much when using zmm, but later generations are fast. */ boot_cpu_data.x86_vfm != INTEL_SKYLAKE_X) -- 2.49.0 ^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH 3/3] crypto: x86 - Remove CONFIG_AS_AVX512 2025-04-03 9:44 ` [PATCH 3/3] crypto: x86 - Remove CONFIG_AS_AVX512 Uros Bizjak @ 2025-04-03 16:43 ` Eric Biggers 2025-04-04 1:13 ` kernel test robot 1 sibling, 0 replies; 12+ messages in thread From: Eric Biggers @ 2025-04-03 16:43 UTC (permalink / raw) To: Uros Bizjak Cc: linux-crypto, x86, linux-kernel, Herbert Xu, David S. Miller, Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen, H. Peter Anvin On Thu, Apr 03, 2025 at 11:44:41AM +0200, Uros Bizjak wrote: > Current minimum required version of binutils is 2.25, > which supports AVX-512 instruction mnemonics. > > Remove check for assembler support of AVX-512 instructions > and all relevant macros for conditional compilation. > > No functional change intended. > > Signed-off-by: Uros Bizjak <ubizjak@gmail.com> > Cc: Herbert Xu <herbert@gondor.apana.org.au> > Cc: "David S. Miller" <davem@davemloft.net> > Cc: Thomas Gleixner <tglx@linutronix.de> > Cc: Ingo Molnar <mingo@kernel.org> > Cc: Borislav Petkov <bp@alien8.de> > Cc: Dave Hansen <dave.hansen@linux.intel.com> > Cc: "H. Peter Anvin" <hpa@zytor.com> Reviewed-by: Eric Biggers <ebiggers@kernel.org> - Eric ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 3/3] crypto: x86 - Remove CONFIG_AS_AVX512 2025-04-03 9:44 ` [PATCH 3/3] crypto: x86 - Remove CONFIG_AS_AVX512 Uros Bizjak 2025-04-03 16:43 ` Eric Biggers @ 2025-04-04 1:13 ` kernel test robot 2025-04-04 1:51 ` Eric Biggers 1 sibling, 1 reply; 12+ messages in thread From: kernel test robot @ 2025-04-04 1:13 UTC (permalink / raw) To: Uros Bizjak, linux-crypto, x86, linux-kernel Cc: oe-kbuild-all, Uros Bizjak, Herbert Xu, Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen, H. Peter Anvin Hi Uros, kernel test robot noticed the following build warnings: [auto build test WARNING on herbert-cryptodev-2.6/master] [also build test WARNING on herbert-crypto-2.6/master tip/x86/core linus/master v6.14] [cannot apply to next-20250403] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch#_base_tree_information] url: https://github.com/intel-lab-lkp/linux/commits/Uros-Bizjak/crypto-x86-Remove-CONFIG_AS_SHA256_NI/20250403-174814 base: https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master patch link: https://lore.kernel.org/r/20250403094527.349526-3-ubizjak%40gmail.com patch subject: [PATCH 3/3] crypto: x86 - Remove CONFIG_AS_AVX512 config: i386-buildonly-randconfig-001-20250404 (https://download.01.org/0day-ci/archive/20250404/202504040855.mr885Pz1-lkp@intel.com/config) compiler: gcc-12 (Debian 12.2.0-14) 12.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250404/202504040855.mr885Pz1-lkp@intel.com/reproduce) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <lkp@intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202504040855.mr885Pz1-lkp@intel.com/ All warnings (new ones prefixed by >>): >> lib/raid6/recov_avx512.c:382:2: warning: #warning "your version of binutils lacks AVX512 support" [-Wcpp] 382 | #warning "your version of binutils lacks AVX512 support" | ^~~~~~~ vim +382 lib/raid6/recov_avx512.c 13c520b2993c9fa Gayatri Kammela 2016-08-12 380 13c520b2993c9fa Gayatri Kammela 2016-08-12 381 #else 13c520b2993c9fa Gayatri Kammela 2016-08-12 @382 #warning "your version of binutils lacks AVX512 support" -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 3/3] crypto: x86 - Remove CONFIG_AS_AVX512 2025-04-04 1:13 ` kernel test robot @ 2025-04-04 1:51 ` Eric Biggers 2025-04-04 5:55 ` Uros Bizjak 0 siblings, 1 reply; 12+ messages in thread From: Eric Biggers @ 2025-04-04 1:51 UTC (permalink / raw) To: Uros Bizjak Cc: linux-crypto, kernel test robot, x86, linux-kernel, oe-kbuild-all, Herbert Xu, Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen, H. Peter Anvin On Fri, Apr 04, 2025 at 09:13:40AM +0800, kernel test robot wrote: > Hi Uros, > > kernel test robot noticed the following build warnings: > > [auto build test WARNING on herbert-cryptodev-2.6/master] > [also build test WARNING on herbert-crypto-2.6/master tip/x86/core linus/master v6.14] > [cannot apply to next-20250403] > [If your patch is applied to the wrong git tree, kindly drop us a note. > And when submitting patch, we suggest to use '--base' as documented in > https://git-scm.com/docs/git-format-patch#_base_tree_information] > > url: https://github.com/intel-lab-lkp/linux/commits/Uros-Bizjak/crypto-x86-Remove-CONFIG_AS_SHA256_NI/20250403-174814 > base: https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master > patch link: https://lore.kernel.org/r/20250403094527.349526-3-ubizjak%40gmail.com > patch subject: [PATCH 3/3] crypto: x86 - Remove CONFIG_AS_AVX512 > config: i386-buildonly-randconfig-001-20250404 (https://download.01.org/0day-ci/archive/20250404/202504040855.mr885Pz1-lkp@intel.com/config) > compiler: gcc-12 (Debian 12.2.0-14) 12.2.0 > reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250404/202504040855.mr885Pz1-lkp@intel.com/reproduce) > > If you fix the issue in a separate patch/commit (i.e. not just a new version of > the same patch/commit), kindly add following tags > | Reported-by: kernel test robot <lkp@intel.com> > | Closes: https://lore.kernel.org/oe-kbuild-all/202504040855.mr885Pz1-lkp@intel.com/ > > All warnings (new ones prefixed by >>): > > >> lib/raid6/recov_avx512.c:382:2: warning: #warning "your version of binutils lacks AVX512 support" [-Wcpp] > 382 | #warning "your version of binutils lacks AVX512 support" > | ^~~~~~~ > > > vim +382 lib/raid6/recov_avx512.c > > 13c520b2993c9fa Gayatri Kammela 2016-08-12 380 > 13c520b2993c9fa Gayatri Kammela 2016-08-12 381 #else > 13c520b2993c9fa Gayatri Kammela 2016-08-12 @382 #warning "your version of binutils lacks AVX512 support" Yeah, CONFIG_AS_AVX512 needs to be removed from lib/raid6/ too. It looked like that directory was rolling its own CONFIG_AS_AVX512 in lib/raid6/test/Makefile, but that's a makefile for a test program and not the actual kernel makefile. - Eric ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 3/3] crypto: x86 - Remove CONFIG_AS_AVX512 2025-04-04 1:51 ` Eric Biggers @ 2025-04-04 5:55 ` Uros Bizjak 2025-04-04 19:09 ` Eric Biggers 0 siblings, 1 reply; 12+ messages in thread From: Uros Bizjak @ 2025-04-04 5:55 UTC (permalink / raw) To: Eric Biggers Cc: linux-crypto, kernel test robot, x86, linux-kernel, oe-kbuild-all, Herbert Xu, Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen, H. Peter Anvin On Fri, Apr 4, 2025 at 3:51 AM Eric Biggers <ebiggers@kernel.org> wrote: > > On Fri, Apr 04, 2025 at 09:13:40AM +0800, kernel test robot wrote: > > Hi Uros, > > > > kernel test robot noticed the following build warnings: > > > > [auto build test WARNING on herbert-cryptodev-2.6/master] > > [also build test WARNING on herbert-crypto-2.6/master tip/x86/core linus/master v6.14] > > [cannot apply to next-20250403] > > [If your patch is applied to the wrong git tree, kindly drop us a note. > > And when submitting patch, we suggest to use '--base' as documented in > > https://git-scm.com/docs/git-format-patch#_base_tree_information] > > > > url: https://github.com/intel-lab-lkp/linux/commits/Uros-Bizjak/crypto-x86-Remove-CONFIG_AS_SHA256_NI/20250403-174814 > > base: https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master > > patch link: https://lore.kernel.org/r/20250403094527.349526-3-ubizjak%40gmail.com > > patch subject: [PATCH 3/3] crypto: x86 - Remove CONFIG_AS_AVX512 > > config: i386-buildonly-randconfig-001-20250404 (https://download.01.org/0day-ci/archive/20250404/202504040855.mr885Pz1-lkp@intel.com/config) > > compiler: gcc-12 (Debian 12.2.0-14) 12.2.0 > > reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250404/202504040855.mr885Pz1-lkp@intel.com/reproduce) > > > > If you fix the issue in a separate patch/commit (i.e. not just a new version of > > the same patch/commit), kindly add following tags > > | Reported-by: kernel test robot <lkp@intel.com> > > | Closes: https://lore.kernel.org/oe-kbuild-all/202504040855.mr885Pz1-lkp@intel.com/ > > > > All warnings (new ones prefixed by >>): > > > > >> lib/raid6/recov_avx512.c:382:2: warning: #warning "your version of binutils lacks AVX512 support" [-Wcpp] > > 382 | #warning "your version of binutils lacks AVX512 support" > > | ^~~~~~~ > > > > > > vim +382 lib/raid6/recov_avx512.c > > > > 13c520b2993c9fa Gayatri Kammela 2016-08-12 380 > > 13c520b2993c9fa Gayatri Kammela 2016-08-12 381 #else > > 13c520b2993c9fa Gayatri Kammela 2016-08-12 @382 #warning "your version of binutils lacks AVX512 support" > > Yeah, CONFIG_AS_AVX512 needs to be removed from lib/raid6/ too. It looked like > that directory was rolling its own CONFIG_AS_AVX512 in lib/raid6/test/Makefile, > but that's a makefile for a test program and not the actual kernel makefile. I think the best approach to avoid patch dependencies is not to remove the test for AS_AVX512 from Kconfig.assembler in this patch, but in a separate patch that will be eventually committed late in the merge cycle (or for the next version), after all other users are removed from the tree. I have patches for other parts ready. I'll post v2 of this series with the above adjustment. Thanks, Uros. ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 3/3] crypto: x86 - Remove CONFIG_AS_AVX512 2025-04-04 5:55 ` Uros Bizjak @ 2025-04-04 19:09 ` Eric Biggers 2025-04-05 1:31 ` Herbert Xu 0 siblings, 1 reply; 12+ messages in thread From: Eric Biggers @ 2025-04-04 19:09 UTC (permalink / raw) To: Uros Bizjak Cc: linux-crypto, kernel test robot, x86, linux-kernel, oe-kbuild-all, Herbert Xu, Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen, H. Peter Anvin On Fri, Apr 04, 2025 at 07:55:40AM +0200, Uros Bizjak wrote: > On Fri, Apr 4, 2025 at 3:51 AM Eric Biggers <ebiggers@kernel.org> wrote: > > > > On Fri, Apr 04, 2025 at 09:13:40AM +0800, kernel test robot wrote: > > > Hi Uros, > > > > > > kernel test robot noticed the following build warnings: > > > > > > [auto build test WARNING on herbert-cryptodev-2.6/master] > > > [also build test WARNING on herbert-crypto-2.6/master tip/x86/core linus/master v6.14] > > > [cannot apply to next-20250403] > > > [If your patch is applied to the wrong git tree, kindly drop us a note. > > > And when submitting patch, we suggest to use '--base' as documented in > > > https://git-scm.com/docs/git-format-patch#_base_tree_information] > > > > > > url: https://github.com/intel-lab-lkp/linux/commits/Uros-Bizjak/crypto-x86-Remove-CONFIG_AS_SHA256_NI/20250403-174814 > > > base: https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master > > > patch link: https://lore.kernel.org/r/20250403094527.349526-3-ubizjak%40gmail.com > > > patch subject: [PATCH 3/3] crypto: x86 - Remove CONFIG_AS_AVX512 > > > config: i386-buildonly-randconfig-001-20250404 (https://download.01.org/0day-ci/archive/20250404/202504040855.mr885Pz1-lkp@intel.com/config) > > > compiler: gcc-12 (Debian 12.2.0-14) 12.2.0 > > > reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250404/202504040855.mr885Pz1-lkp@intel.com/reproduce) > > > > > > If you fix the issue in a separate patch/commit (i.e. not just a new version of > > > the same patch/commit), kindly add following tags > > > | Reported-by: kernel test robot <lkp@intel.com> > > > | Closes: https://lore.kernel.org/oe-kbuild-all/202504040855.mr885Pz1-lkp@intel.com/ > > > > > > All warnings (new ones prefixed by >>): > > > > > > >> lib/raid6/recov_avx512.c:382:2: warning: #warning "your version of binutils lacks AVX512 support" [-Wcpp] > > > 382 | #warning "your version of binutils lacks AVX512 support" > > > | ^~~~~~~ > > > > > > > > > vim +382 lib/raid6/recov_avx512.c > > > > > > 13c520b2993c9fa Gayatri Kammela 2016-08-12 380 > > > 13c520b2993c9fa Gayatri Kammela 2016-08-12 381 #else > > > 13c520b2993c9fa Gayatri Kammela 2016-08-12 @382 #warning "your version of binutils lacks AVX512 support" > > > > Yeah, CONFIG_AS_AVX512 needs to be removed from lib/raid6/ too. It looked like > > that directory was rolling its own CONFIG_AS_AVX512 in lib/raid6/test/Makefile, > > but that's a makefile for a test program and not the actual kernel makefile. > > I think the best approach to avoid patch dependencies is not to remove > the test for AS_AVX512 from Kconfig.assembler in this patch, but in a > separate patch that will be eventually committed late in the merge > cycle (or for the next version), after all other users are removed > from the tree. I have patches for other parts ready. > > I'll post v2 of this series with the above adjustment. > $ ./scripts/get_maintainer.pl lib/raid6/avx512.c linux-kernel@vger.kernel.org (open list) Whee, more unmaintained code... I think it would be okay to just update lib/raid6/ in the same patch. But if you want to wait for the next cycle that's fine too. - Eric ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 3/3] crypto: x86 - Remove CONFIG_AS_AVX512 2025-04-04 19:09 ` Eric Biggers @ 2025-04-05 1:31 ` Herbert Xu 2025-04-06 15:44 ` Uros Bizjak 0 siblings, 1 reply; 12+ messages in thread From: Herbert Xu @ 2025-04-05 1:31 UTC (permalink / raw) To: Eric Biggers Cc: Uros Bizjak, linux-crypto, kernel test robot, x86, linux-kernel, oe-kbuild-all, Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen, H. Peter Anvin, Song Liu, Yu Kuai, linux-raid On Fri, Apr 04, 2025 at 12:09:23PM -0700, Eric Biggers wrote: > > $ ./scripts/get_maintainer.pl lib/raid6/avx512.c > linux-kernel@vger.kernel.org (open list) > > Whee, more unmaintained code... I think it's maintained as a part of the software RAID code: SOFTWARE RAID (Multiple Disks) SUPPORT M: Song Liu <song@kernel.org> M: Yu Kuai <yukuai3@huawei.com> L: linux-raid@vger.kernel.org S: Supported Q: https://patchwork.kernel.org/project/linux-raid/list/ T: git git://git.kernel.org/pub/scm/linux/kernel/git/mdraid/linux.git F: drivers/md/Kconfig F: drivers/md/Makefile F: drivers/md/md* F: drivers/md/raid* F: include/linux/raid/ F: include/uapi/linux/raid/ Cheers, -- Email: Herbert Xu <herbert@gondor.apana.org.au> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 3/3] crypto: x86 - Remove CONFIG_AS_AVX512 2025-04-05 1:31 ` Herbert Xu @ 2025-04-06 15:44 ` Uros Bizjak 0 siblings, 0 replies; 12+ messages in thread From: Uros Bizjak @ 2025-04-06 15:44 UTC (permalink / raw) To: Herbert Xu Cc: Eric Biggers, linux-crypto, kernel test robot, x86, linux-kernel, oe-kbuild-all, Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen, H. Peter Anvin, Song Liu, Yu Kuai, linux-raid On Sat, Apr 5, 2025 at 3:32 AM Herbert Xu <herbert@gondor.apana.org.au> wrote: > > On Fri, Apr 04, 2025 at 12:09:23PM -0700, Eric Biggers wrote: > > > > $ ./scripts/get_maintainer.pl lib/raid6/avx512.c > > linux-kernel@vger.kernel.org (open list) > > > > Whee, more unmaintained code... > > I think it's maintained as a part of the software RAID code: Thanks, let me repost the raid6 specific patch to listed addresses. Uros. ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 1/3] crypto: x86 - Remove CONFIG_AS_SHA1_NI 2025-04-03 9:44 [PATCH 1/3] crypto: x86 - Remove CONFIG_AS_SHA1_NI Uros Bizjak 2025-04-03 9:44 ` [PATCH 2/3] crypto: x86 - Remove CONFIG_AS_SHA256_NI Uros Bizjak 2025-04-03 9:44 ` [PATCH 3/3] crypto: x86 - Remove CONFIG_AS_AVX512 Uros Bizjak @ 2025-04-03 16:43 ` Eric Biggers 2 siblings, 0 replies; 12+ messages in thread From: Eric Biggers @ 2025-04-03 16:43 UTC (permalink / raw) To: Uros Bizjak Cc: linux-crypto, x86, linux-kernel, Herbert Xu, David S. Miller, Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen, H. Peter Anvin On Thu, Apr 03, 2025 at 11:44:39AM +0200, Uros Bizjak wrote: > Current minimum required version of binutils is 2.25, > which supports SHA-1 instruction mnemonics. > > Remove check for assembler support of SHA-1 instructions > and all relevant macros for conditional compilation. > > No functional change intended. > > Signed-off-by: Uros Bizjak <ubizjak@gmail.com> > Cc: Herbert Xu <herbert@gondor.apana.org.au> > Cc: "David S. Miller" <davem@davemloft.net> > Cc: Thomas Gleixner <tglx@linutronix.de> > Cc: Ingo Molnar <mingo@kernel.org> > Cc: Borislav Petkov <bp@alien8.de> > Cc: Dave Hansen <dave.hansen@linux.intel.com> > Cc: "H. Peter Anvin" <hpa@zytor.com> > --- > arch/x86/Kconfig.assembler | 5 ----- > arch/x86/crypto/Makefile | 3 +-- > arch/x86/crypto/sha1_ssse3_glue.c | 10 ---------- > 3 files changed, 1 insertion(+), 17 deletions(-) Reviewed-by: Eric Biggers <ebiggers@kernel.org> - Eric ^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2025-04-06 15:44 UTC | newest] Thread overview: 12+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2025-04-03 9:44 [PATCH 1/3] crypto: x86 - Remove CONFIG_AS_SHA1_NI Uros Bizjak 2025-04-03 9:44 ` [PATCH 2/3] crypto: x86 - Remove CONFIG_AS_SHA256_NI Uros Bizjak 2025-04-03 16:43 ` Eric Biggers 2025-04-03 9:44 ` [PATCH 3/3] crypto: x86 - Remove CONFIG_AS_AVX512 Uros Bizjak 2025-04-03 16:43 ` Eric Biggers 2025-04-04 1:13 ` kernel test robot 2025-04-04 1:51 ` Eric Biggers 2025-04-04 5:55 ` Uros Bizjak 2025-04-04 19:09 ` Eric Biggers 2025-04-05 1:31 ` Herbert Xu 2025-04-06 15:44 ` Uros Bizjak 2025-04-03 16:43 ` [PATCH 1/3] crypto: x86 - Remove CONFIG_AS_SHA1_NI Eric Biggers
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox