From patchwork Sun Jan 15 12:15:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Taehee Yoo X-Patchwork-Id: 643554 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 16752C3DA78 for ; Sun, 15 Jan 2023 12:16:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231289AbjAOMQG (ORCPT ); Sun, 15 Jan 2023 07:16:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46022 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231229AbjAOMQF (ORCPT ); Sun, 15 Jan 2023 07:16:05 -0500 Received: from mail-pj1-x1036.google.com (mail-pj1-x1036.google.com [IPv6:2607:f8b0:4864:20::1036]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 62788EC72 for ; Sun, 15 Jan 2023 04:16:04 -0800 (PST) Received: by mail-pj1-x1036.google.com with SMTP id q5so442520pjh.1 for ; Sun, 15 Jan 2023 04:16:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=B6oF+4VZyEAvmo7w8Nzwr9qcZrAklAmY5ZcuUNzWjhI=; b=fTn5yfJhYtmG+vkB+ptUvD/c25kNu8mH4OEPRK26zrlcCUcRhesdQ+YD8DKgJM8bs2 Jci9x/Ija9SlAnWMTO6J9FzB8tgUL0F3AqkbjHjxtktK0b4Qx+GcWmMZ6q4pUpwCZrvi bwyqPjn4av4JGL7uhdI8gH6bEDplvNXmlvfSE3Hnn6PA+NgCZV6tcYyw0IjyxYuF2Qlm qUTd0dmi0lpTROMPiPQS6cvl82WmVr9rqvcy6HdoVXdM1iSPfltPjbJBykDKsVKWk5sw +XAzmbvGFXjfb/EfKf4+hDhO35MuP8p7DIAL878nl0k9+435QPrNP2PufSJG+tcUXmcK cHIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=B6oF+4VZyEAvmo7w8Nzwr9qcZrAklAmY5ZcuUNzWjhI=; b=77jrcQ3jyKRYhlAvYOMuWWziRml+dPLzJ9k+mowbDTbvzqm0gffYNjCiG2WWqQ6ABQ hMZy1++zqWk8Wf4byXcQVHKxLzdZyOR3Yf6OvKpmlMMdO9nuRDkBTlOgvpM6JjN0z2ls ai5bSU3WethF4DdfOTu7LyAJyOMhLSiPLTQCdYSMWfjOHa16Z+wLAE5fVQKmKyFOrsuj lEQO9ppO/NCrwtE90rPTu0rgqfuARelQMANgE/TebxNxgROl7IjoAOq/q3WwO4/1xN3L a3blYlIq+ntgXFt4Vb5FrR+EV/X9hqMYFdJwQh1YdebIQh9YUxdZkoqvAf1auwzU42H4 M/Yg== X-Gm-Message-State: AFqh2koNQdZLkOWs7qbAlePQrHooLLNwt6868X3yTOtYAYZdb3F1jyrs aOX7YjSEnCUU3o+2C59yRCApV5iuoJs= X-Google-Smtp-Source: AMrXdXvpdnPBqCe4rYOo7BQtOQomZoHToMylzUzTj/YGkUo5X4OqZBJPzSJkvn3clJjiuONt2KrUDg== X-Received: by 2002:a05:6a21:e385:b0:b3:4044:1503 with SMTP id cc5-20020a056a21e38500b000b340441503mr89854994pzc.52.1673784962695; Sun, 15 Jan 2023 04:16:02 -0800 (PST) Received: from ap.. ([182.213.254.91]) by smtp.gmail.com with ESMTPSA id e13-20020a63e00d000000b00485cbedd34bsm14361783pgh.89.2023.01.15.04.16.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 15 Jan 2023 04:16:01 -0800 (PST) From: Taehee Yoo To: linux-crypto@vger.kernel.org, herbert@gondor.apana.org.au, davem@davemloft.net, x86@kernel.org Cc: jbeulich@suse.com, ap420073@gmail.com Subject: [PATCH 1/3] crypto: x86/aria-avx - fix build failure with old binutils Date: Sun, 15 Jan 2023 12:15:34 +0000 Message-Id: <20230115121536.465367-2-ap420073@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230115121536.465367-1-ap420073@gmail.com> References: <20230115121536.465367-1-ap420073@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org The minimum version of binutils for kernel build is currently 2.23 and it doesn't support GFNI. So, it fails to build the aria-avx if the old binutils is used. The code using GFNI is an optional part of aria-avx. So, it disables GFNI part in it when the old binutils is used. In order to check whether the using binutils is supporting GFNI or not, AS_GFNI is added. Fixes: ba3579e6e45c ("crypto: aria-avx - add AES-NI/AVX/x86_64/GFNI assembler implementation of aria cipher") Reported-by: Jan Beulich Signed-off-by: Taehee Yoo --- arch/x86/Kconfig.assembler | 5 +++++ arch/x86/crypto/aria-aesni-avx-asm_64.S | 10 ++++++++++ arch/x86/crypto/aria_aesni_avx_glue.c | 4 +++- 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/arch/x86/Kconfig.assembler b/arch/x86/Kconfig.assembler index 26b8c08e2fc4..b88f784cb02e 100644 --- a/arch/x86/Kconfig.assembler +++ b/arch/x86/Kconfig.assembler @@ -19,3 +19,8 @@ config AS_TPAUSE def_bool $(as-instr,tpause %ecx) help Supported by binutils >= 2.31.1 and LLVM integrated assembler >= V7 + +config AS_GFNI + def_bool $(as-instr,vgf2p8mulb %xmm0$(comma)%xmm1$(comma)%xmm2) + help + Supported by binutils >= 2.30 and LLVM integrated assembler diff --git a/arch/x86/crypto/aria-aesni-avx-asm_64.S b/arch/x86/crypto/aria-aesni-avx-asm_64.S index be6adc6e7458..fe0d84a7ced1 100644 --- a/arch/x86/crypto/aria-aesni-avx-asm_64.S +++ b/arch/x86/crypto/aria-aesni-avx-asm_64.S @@ -286,6 +286,7 @@ vpbroadcastb ((round * 16) + idx + 4)(rk), t0; \ vpxor t0, x7, x7; +#ifdef CONFIG_AS_GFNI #define aria_sbox_8way_gfni(x0, x1, x2, x3, \ x4, x5, x6, x7, \ t0, t1, t2, t3, \ @@ -308,6 +309,8 @@ vgf2p8affineinvqb $0, t2, x3, x3; \ vgf2p8affineinvqb $0, t2, x7, x7 +#endif /* CONFIG_AS_GFNI */ + #define aria_sbox_8way(x0, x1, x2, x3, \ x4, x5, x6, x7, \ t0, t1, t2, t3, \ @@ -547,6 +550,7 @@ y4, y5, y6, y7, \ mem_tmp, 8); +#ifdef CONFIG_AS_GFNI #define aria_fe_gfni(x0, x1, x2, x3, \ x4, x5, x6, x7, \ y0, y1, y2, y3, \ @@ -701,6 +705,8 @@ y4, y5, y6, y7, \ mem_tmp, 8); +#endif /* CONFIG_AS_GFNI */ + /* NB: section is mergeable, all elements must be aligned 16-byte blocks */ .section .rodata.cst16, "aM", @progbits, 16 .align 16 @@ -752,6 +758,7 @@ .Ltf_hi__x2__and__fwd_aff: .octa 0x3F893781E95FE1576CDA64D2BA0CB204 +#ifdef CONFIG_AS_GFNI .section .rodata.cst8, "aM", @progbits, 8 .align 8 /* AES affine: */ @@ -812,6 +819,7 @@ BV8(0, 0, 0, 0, 0, 1, 0, 0), BV8(0, 0, 0, 0, 0, 0, 1, 0), BV8(0, 0, 0, 0, 0, 0, 0, 1)) +#endif /* CONFIG_AS_GFNI */ /* 4-bit mask */ .section .rodata.cst4.L0f0f0f0f, "aM", @progbits, 4 @@ -1080,6 +1088,7 @@ SYM_TYPED_FUNC_START(aria_aesni_avx_ctr_crypt_16way) RET; SYM_FUNC_END(aria_aesni_avx_ctr_crypt_16way) +#ifdef CONFIG_AS_GFNI SYM_FUNC_START_LOCAL(__aria_aesni_avx_gfni_crypt_16way) /* input: * %r9: rk @@ -1298,3 +1307,4 @@ SYM_TYPED_FUNC_START(aria_aesni_avx_gfni_ctr_crypt_16way) FRAME_END RET; SYM_FUNC_END(aria_aesni_avx_gfni_ctr_crypt_16way) +#endif /* CONFIG_AS_GFNI */ diff --git a/arch/x86/crypto/aria_aesni_avx_glue.c b/arch/x86/crypto/aria_aesni_avx_glue.c index 487094d64863..4e1516b76669 100644 --- a/arch/x86/crypto/aria_aesni_avx_glue.c +++ b/arch/x86/crypto/aria_aesni_avx_glue.c @@ -26,6 +26,7 @@ asmlinkage void aria_aesni_avx_ctr_crypt_16way(const void *ctx, u8 *dst, const u8 *src, u8 *keystream, u8 *iv); EXPORT_SYMBOL_GPL(aria_aesni_avx_ctr_crypt_16way); +#ifdef CONFIG_AS_GFNI asmlinkage void aria_aesni_avx_gfni_encrypt_16way(const void *ctx, u8 *dst, const u8 *src); EXPORT_SYMBOL_GPL(aria_aesni_avx_gfni_encrypt_16way); @@ -36,6 +37,7 @@ asmlinkage void aria_aesni_avx_gfni_ctr_crypt_16way(const void *ctx, u8 *dst, const u8 *src, u8 *keystream, u8 *iv); EXPORT_SYMBOL_GPL(aria_aesni_avx_gfni_ctr_crypt_16way); +#endif /* CONFIG_AS_GFNI */ static struct aria_avx_ops aria_ops; @@ -201,7 +203,7 @@ static int __init aria_avx_init(void) return -ENODEV; } - if (boot_cpu_has(X86_FEATURE_GFNI)) { + if (boot_cpu_has(X86_FEATURE_GFNI) && IS_ENABLED(CONFIG_AS_GFNI)) { aria_ops.aria_encrypt_16way = aria_aesni_avx_gfni_encrypt_16way; aria_ops.aria_decrypt_16way = aria_aesni_avx_gfni_decrypt_16way; aria_ops.aria_ctr_crypt_16way = aria_aesni_avx_gfni_ctr_crypt_16way; From patchwork Sun Jan 15 12:15:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Taehee Yoo X-Patchwork-Id: 642979 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9763FC3DA78 for ; Sun, 15 Jan 2023 12:16:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230237AbjAOMQM (ORCPT ); Sun, 15 Jan 2023 07:16:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46098 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231318AbjAOMQI (ORCPT ); Sun, 15 Jan 2023 07:16:08 -0500 Received: from mail-pj1-x1032.google.com (mail-pj1-x1032.google.com [IPv6:2607:f8b0:4864:20::1032]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B2C12EC72 for ; Sun, 15 Jan 2023 04:16:06 -0800 (PST) Received: by mail-pj1-x1032.google.com with SMTP id z1-20020a17090a66c100b00226f05b9595so13532535pjl.0 for ; Sun, 15 Jan 2023 04:16:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ZsIHUBPNIc9WbNZUL0qiZArx3gr0fKEZEvsvg+a0Ja8=; b=WMNFp9q7PMPWpJB2sQMXSgYJ/zgEJLAnYCHawTc5GHUt6iduqz4bYqGc8y+yn4CQm+ zzs0tLjOGkr+vwgroeRKsIC2tqUsHxZbOQTpnsTnrncPJmDLPD1IOokBP31ncXUDWLY8 eZPr4ql6/7BLEQNIpFEWquk5U2SLxpVrK5KS2ckk6xsDS4Evu7+TnbSDP9Yxxv4Pvi/l JD/yBUsfEUrwTzYkFs6CIF037w7vr85DHTOO7cql0Ljh4UdOeDrLyFpdMdEqyz9yFYJR cihrrT8brEEOyU2vzNXCZe5HKmZBKLXzSQeA34A0cCUsf/7DR5RdAHiuqiv9QNqNkN+s XcYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ZsIHUBPNIc9WbNZUL0qiZArx3gr0fKEZEvsvg+a0Ja8=; b=qJHQISLVp0kkkUm575vmEc4D3cCwzWL2IQbKF4bFu/Vqidke2Z0vOnG84lh88aFOcL aPzv2bJ1/BoaanD/34zLE2giJ0qMQRcq4Di03vxia50NTrYEDfh/HjxqhD3FffEI3oRj EZWiRXd3yKHKbWInnwcZzjaNsmH9U0Luje/hspZTm5btxZ+ablPMQZdDx73cE+ZNdN6K ZPyzh6gItwUMwoGCyFmcSOU/YKibj8Hd478g8ufe6/VGbJLMFeC9XtoKhEZIQNBma5tR tV/due4PIoN2AUVYXKQ71Pc2GgYLaBNgo6w7PKjb90nKVxutpKp06GGWRxtkudNhow9v dS3A== X-Gm-Message-State: AFqh2ko9m6Ryoq2gvk9oR3Tq1TrNKn35ti5H9FVDBVvnOYXNnUSC4xw3 uXt+bXjcoAyG0W5KGqWeRPQgXhWdX+I= X-Google-Smtp-Source: AMrXdXvCwN8PV4GsrWLAnbsAGC2X9qztR6p6CUwj7blnMYMl6yJq0485P5uCp6bLk2MNfJ5eCB1V9A== X-Received: by 2002:a05:6a20:b91c:b0:af:89c2:ad01 with SMTP id fe28-20020a056a20b91c00b000af89c2ad01mr90230594pzb.40.1673784965690; Sun, 15 Jan 2023 04:16:05 -0800 (PST) Received: from ap.. ([182.213.254.91]) by smtp.gmail.com with ESMTPSA id e13-20020a63e00d000000b00485cbedd34bsm14361783pgh.89.2023.01.15.04.16.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 15 Jan 2023 04:16:04 -0800 (PST) From: Taehee Yoo To: linux-crypto@vger.kernel.org, herbert@gondor.apana.org.au, davem@davemloft.net, x86@kernel.org Cc: jbeulich@suse.com, ap420073@gmail.com Subject: [PATCH 2/3] crypto: x86/aria-avx2 - fix build failure with old binutils Date: Sun, 15 Jan 2023 12:15:35 +0000 Message-Id: <20230115121536.465367-3-ap420073@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230115121536.465367-1-ap420073@gmail.com> References: <20230115121536.465367-1-ap420073@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org The minimum version of binutils for kernel build is currently 2.23 and it doesn't support GFNI. So, it fails to build the aria-avx2 if the old binutils is used. The code using GFNI is an optional part of aria-avx2. So, it disables GFNI part in it when the old binutils is used. Fixes: 37d8d3ae7a58 ("crypto: x86/aria - implement aria-avx2") Reported-by: Jan Beulich Signed-off-by: Taehee Yoo --- arch/x86/crypto/aria-aesni-avx2-asm_64.S | 10 +++++++++- arch/x86/crypto/aria_aesni_avx2_glue.c | 4 +++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/arch/x86/crypto/aria-aesni-avx2-asm_64.S b/arch/x86/crypto/aria-aesni-avx2-asm_64.S index b6cac9a40f2c..82a14b4ad920 100644 --- a/arch/x86/crypto/aria-aesni-avx2-asm_64.S +++ b/arch/x86/crypto/aria-aesni-avx2-asm_64.S @@ -302,6 +302,7 @@ vpbroadcastb ((round * 16) + idx + 4)(rk), t0; \ vpxor t0, x7, x7; +#ifdef CONFIG_AS_GFNI #define aria_sbox_8way_gfni(x0, x1, x2, x3, \ x4, x5, x6, x7, \ t0, t1, t2, t3, \ @@ -324,6 +325,7 @@ vgf2p8affineinvqb $0, t2, x3, x3; \ vgf2p8affineinvqb $0, t2, x7, x7 +#endif /* CONFIG_AS_GFNI */ #define aria_sbox_8way(x0, x1, x2, x3, \ x4, x5, x6, x7, \ t0, t1, t2, t3, \ @@ -596,7 +598,7 @@ aria_load_state_8way(y0, y1, y2, y3, \ y4, y5, y6, y7, \ mem_tmp, 8); - +#ifdef CONFIG_AS_GFNI #define aria_fe_gfni(x0, x1, x2, x3, \ x4, x5, x6, x7, \ y0, y1, y2, y3, \ @@ -750,6 +752,7 @@ aria_load_state_8way(y0, y1, y2, y3, \ y4, y5, y6, y7, \ mem_tmp, 8); +#endif /* CONFIG_AS_GFNI */ .section .rodata.cst32.shufb_16x16b, "aM", @progbits, 32 .align 32 @@ -803,6 +806,7 @@ .Ltf_hi__x2__and__fwd_aff: .octa 0x3F893781E95FE1576CDA64D2BA0CB204 +#ifdef CONFIG_AS_GFNI .section .rodata.cst8, "aM", @progbits, 8 .align 8 /* AES affine: */ @@ -864,6 +868,8 @@ BV8(0, 0, 0, 0, 0, 0, 1, 0), BV8(0, 0, 0, 0, 0, 0, 0, 1)) +#endif /* CONFIG_AS_GFNI */ + /* 4-bit mask */ .section .rodata.cst4.L0f0f0f0f, "aM", @progbits, 4 .align 4 @@ -1213,6 +1219,7 @@ SYM_TYPED_FUNC_START(aria_aesni_avx2_ctr_crypt_32way) RET; SYM_FUNC_END(aria_aesni_avx2_ctr_crypt_32way) +#ifdef CONFIG_AS_GFNI SYM_FUNC_START_LOCAL(__aria_aesni_avx2_gfni_crypt_32way) /* input: * %r9: rk @@ -1431,3 +1438,4 @@ SYM_TYPED_FUNC_START(aria_aesni_avx2_gfni_ctr_crypt_32way) FRAME_END RET; SYM_FUNC_END(aria_aesni_avx2_gfni_ctr_crypt_32way) +#endif /* CONFIG_AS_GFNI */ diff --git a/arch/x86/crypto/aria_aesni_avx2_glue.c b/arch/x86/crypto/aria_aesni_avx2_glue.c index 95fccc6dc420..87a11804fc77 100644 --- a/arch/x86/crypto/aria_aesni_avx2_glue.c +++ b/arch/x86/crypto/aria_aesni_avx2_glue.c @@ -26,6 +26,7 @@ asmlinkage void aria_aesni_avx2_ctr_crypt_32way(const void *ctx, u8 *dst, const u8 *src, u8 *keystream, u8 *iv); EXPORT_SYMBOL_GPL(aria_aesni_avx2_ctr_crypt_32way); +#ifdef CONFIG_AS_GFNI asmlinkage void aria_aesni_avx2_gfni_encrypt_32way(const void *ctx, u8 *dst, const u8 *src); EXPORT_SYMBOL_GPL(aria_aesni_avx2_gfni_encrypt_32way); @@ -36,6 +37,7 @@ asmlinkage void aria_aesni_avx2_gfni_ctr_crypt_32way(const void *ctx, u8 *dst, const u8 *src, u8 *keystream, u8 *iv); EXPORT_SYMBOL_GPL(aria_aesni_avx2_gfni_ctr_crypt_32way); +#endif /* CONFIG_AS_GFNI */ static struct aria_avx_ops aria_ops; @@ -215,7 +217,7 @@ static int __init aria_avx2_init(void) return -ENODEV; } - if (boot_cpu_has(X86_FEATURE_GFNI)) { + if (boot_cpu_has(X86_FEATURE_GFNI) && IS_ENABLED(CONFIG_AS_GFNI)) { aria_ops.aria_encrypt_16way = aria_aesni_avx_gfni_encrypt_16way; aria_ops.aria_decrypt_16way = aria_aesni_avx_gfni_decrypt_16way; aria_ops.aria_ctr_crypt_16way = aria_aesni_avx_gfni_ctr_crypt_16way; From patchwork Sun Jan 15 12:15:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Taehee Yoo X-Patchwork-Id: 643553 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C0AC1C63797 for ; Sun, 15 Jan 2023 12:16:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231317AbjAOMQN (ORCPT ); Sun, 15 Jan 2023 07:16:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46158 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231320AbjAOMQL (ORCPT ); Sun, 15 Jan 2023 07:16:11 -0500 Received: from mail-pj1-x1035.google.com (mail-pj1-x1035.google.com [IPv6:2607:f8b0:4864:20::1035]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 42AEFEC77 for ; Sun, 15 Jan 2023 04:16:10 -0800 (PST) Received: by mail-pj1-x1035.google.com with SMTP id b9-20020a17090a7ac900b00226ef160dcaso26886809pjl.2 for ; Sun, 15 Jan 2023 04:16:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=wohviZ5AvrjkuM7pQcDlfVJrclFly2Iud3REWsRmAw4=; b=lY7pD+T5ac0vU7tN+oT3cgxBrTlrow27QBa+Ul+yDnwo4ujhty+UqIMla6wQh4uopA fLdjIO/298xMCdgXYXH+755sNG07yPI29YYubpWXM+DG2Ejegv+d9yv/5uq6ejresUPQ wPUoPF4dznYt7YVMz9m6PaLnTAxIfO26e8foeMXuZmiQVa7xoKb9SD3FXjG1Hko/YSaW bcx+QG1E0JZGvhauEG3Q6r7Acnq7SA0R32MqsN0fuRcAjK51mHcbVW3cgVkrFlBsHq7+ d7rFXFqzTYMA/z1MaXzsx6EJpTzidg9jDuliX1ky7DEiPguf4YBJxj/Ek4Df4mbumQri BAww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=wohviZ5AvrjkuM7pQcDlfVJrclFly2Iud3REWsRmAw4=; b=gAnGsypLhhCp1NGBEPGsDvzL/1my3+TOO8KZhr08qWIAqWRYn2TsSsVByinJrXWmLk GZHow2Bu9s6ydybHhpooYMuFGZ1d9j+ge/fubYpOfmBQg0jx1cP1KXBD0V1JxkOrJiVA d041XLXGqU3FgNJYGzExTltqp9jy+VnxnMaOhgkGAa8ikYMxWeFQRlmZUIUdsdrWTGLk mGdcdxuYKcsCeLLzU8boZd7yu0KnzbKXsAkqxYcOrvUv7vAQhFch9UzoiToRzvryp5vd m4ftbdvRoA2FX4wI2EWWRibOVHD0rj5ZS56A8wpwnrYz0+mHzhvm4EGDR03HMcnZ3Bs3 vgkQ== X-Gm-Message-State: AFqh2kpaRvNTRN13D3gRgCoebphDVPpIP+N6Jq4amM0h+Nc5hH3ytI5d On1nq/BtKUfPedHAa2CE20yZqdlBSKo= X-Google-Smtp-Source: AMrXdXt4FAh+3/A863+VTauLOL/OD890p6vjJkx4xKG3mU4iSXKS8R9xQwU5CNQ9MhurdLHBFo+v9w== X-Received: by 2002:a17:90a:8a84:b0:229:3660:1759 with SMTP id x4-20020a17090a8a8400b0022936601759mr7866277pjn.25.1673784968666; Sun, 15 Jan 2023 04:16:08 -0800 (PST) Received: from ap.. ([182.213.254.91]) by smtp.gmail.com with ESMTPSA id e13-20020a63e00d000000b00485cbedd34bsm14361783pgh.89.2023.01.15.04.16.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 15 Jan 2023 04:16:07 -0800 (PST) From: Taehee Yoo To: linux-crypto@vger.kernel.org, herbert@gondor.apana.org.au, davem@davemloft.net, x86@kernel.org Cc: jbeulich@suse.com, ap420073@gmail.com Subject: [PATCH 3/3] crypto: x86/aria-avx15 - fix build failure with old binutils Date: Sun, 15 Jan 2023 12:15:36 +0000 Message-Id: <20230115121536.465367-4-ap420073@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230115121536.465367-1-ap420073@gmail.com> References: <20230115121536.465367-1-ap420073@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org The minimum version of binutils for kernel build is currently 2.23 and it doesn't support GFNI. So, it fails to build the aria-avx512 if the old binutils is used. aria-avx512 requires GFNI, so it should not be allowed to build if the old binutils is used. The AS_AVX512 and AS_GFNI are added to the Kconfig to disable build aria-avx512 if the old binutils is used. Fixes: c970d42001f2 ("crypto: x86/aria - implement aria-avx512") Reported-by: Jan Beulich Signed-off-by: Taehee Yoo --- arch/x86/crypto/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/crypto/Kconfig b/arch/x86/crypto/Kconfig index 688e848f740d..9bbfd01cfa2f 100644 --- a/arch/x86/crypto/Kconfig +++ b/arch/x86/crypto/Kconfig @@ -325,7 +325,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 + depends on X86 && 64BIT && AS_AVX512 && AS_GFNI select CRYPTO_SKCIPHER select CRYPTO_SIMD select CRYPTO_ALGAPI