From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-20.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 29D45C43461 for ; Fri, 16 Apr 2021 11:33:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 08293611C2 for ; Fri, 16 Apr 2021 11:33:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242765AbhDPLdn (ORCPT ); Fri, 16 Apr 2021 07:33:43 -0400 Received: from helcar.hmeau.com ([216.24.177.18]:53148 "EHLO fornost.hmeau.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242542AbhDPLdm (ORCPT ); Fri, 16 Apr 2021 07:33:42 -0400 Received: from gwarestrin.arnor.me.apana.org.au ([192.168.103.7]) by fornost.hmeau.com with smtp (Exim 4.92 #5 (Debian)) id 1lXMiO-0003We-Dy; Fri, 16 Apr 2021 21:32:49 +1000 Received: by gwarestrin.arnor.me.apana.org.au (sSMTP sendmail emulation); Fri, 16 Apr 2021 21:32:48 +1000 Date: Fri, 16 Apr 2021 21:32:48 +1000 From: Herbert Xu To: Nathan Chancellor Cc: "David S. Miller" , Russell King , Nick Desaulniers , Ard Biesheuvel , "Jason A. Donenfeld" , linux-crypto@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com, stable@vger.kernel.org, Arnd Bergmann , Jessica Clarke Subject: Re: [PATCH] crypto: arm/curve25519 - Move '.fpu' after '.arch' Message-ID: <20210416113248.GM16633@gondor.apana.org.au> References: <20210409221155.1113205-1-nathan@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210409221155.1113205-1-nathan@kernel.org> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Fri, Apr 09, 2021 at 03:11:55PM -0700, Nathan Chancellor wrote: > Debian's clang carries a patch that makes the default FPU mode > 'vfp3-d16' instead of 'neon' for 'armv7-a' to avoid generating NEON > instructions on hardware that does not support them: > > https://salsa.debian.org/pkg-llvm-team/llvm-toolchain/-/raw/5a61ca6f21b4ad8c6ac4970e5ea5a7b5b4486d22/debian/patches/clang-arm-default-vfp3-on-armv7a.patch > https://bugs.debian.org/841474 > https://bugs.debian.org/842142 > https://bugs.debian.org/914268 > > This results in the following build error when clang's integrated > assembler is used because the '.arch' directive overrides the '.fpu' > directive: > > arch/arm/crypto/curve25519-core.S:25:2: error: instruction requires: NEON > vmov.i32 q0, #1 > ^ > arch/arm/crypto/curve25519-core.S:26:2: error: instruction requires: NEON > vshr.u64 q1, q0, #7 > ^ > arch/arm/crypto/curve25519-core.S:27:2: error: instruction requires: NEON > vshr.u64 q0, q0, #8 > ^ > arch/arm/crypto/curve25519-core.S:28:2: error: instruction requires: NEON > vmov.i32 d4, #19 > ^ > > Shuffle the order of the '.arch' and '.fpu' directives so that the code > builds regardless of the default FPU mode. This has been tested against > both clang with and without Debian's patch and GCC. > > Cc: stable@vger.kernel.org > Fixes: d8f1308a025f ("crypto: arm/curve25519 - wire up NEON implementation") > Link: https://github.com/ClangBuiltLinux/continuous-integration2/issues/118 > Reported-by: Arnd Bergmann > Suggested-by: Arnd Bergmann > Suggested-by: Jessica Clarke > Signed-off-by: Nathan Chancellor > --- > arch/arm/crypto/curve25519-core.S | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Patch applied. Thanks. -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-20.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D7EA2C433B4 for ; Fri, 16 Apr 2021 11:35:37 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9096D610F7 for ; Fri, 16 Apr 2021 11:35:37 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9096D610F7 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=gondor.apana.org.au Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=SE6rrV0adHJwOOlS1uZWbIgct9JEa51XGm+P64DjNbU=; b=SCUB+IqH5+Eqft6KVnTIDipig +vEFrKDrrbRR9EUczjlxbDE7vDBZ6ejMzHKujmpzDKy2FpWeN9GBsAleLYIVRVd/N7f7TNDdSZ2+p j6wDr3Wfr9W3k9sMqCHTb5Vnx35Kw5oM3JOCVfq6xM3+nS9Fj2Op0/0s9sxstUZmqb4eG3EzYbMdt wgZKwdUKtFu8axHlR0R0cVCwoUOZrMZdvEQ7z1kERCuRoomWN+fiJ0s6wMzbvPUh7jY6+cef2hE3F P2ec8vTJ1q1ITcHnYpqAKaebS9A8p0vNw4vXQyN8W4eCFFvpWSjwNVNSx+WzlSBXnZfi+CfbjScQB H7h6hgR7g==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lXMj3-001w1C-HO; Fri, 16 Apr 2021 11:33:29 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lXMir-001vyW-PL for linux-arm-kernel@desiato.infradead.org; Fri, 16 Apr 2021 11:33:18 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=aW26p2Q6N/O07QBMHOdc2s6idy4Vshl65NzTK91mYWw=; b=SNgYiZaOzj4BHEi8B9YK3fMGGI tMfpcdZO83aEE4EHaWsi9+C5R04Etfmuz8WeHzA80IH6O8Hb/sgLhxXlhL20G24pSKmZfmz4w8diz b9eIFfUNgKd4fiThnhVTzgoA+ioHqdj5vVz8dGOVDAhEzs63FWFcHp3tWkGC0i77eX1rxNzuYnNsu Lzi8FZ8eDWfHec/vPh2ItiKALd5Xeq8EHzLD9qB3itTbtKYZbj7Gxxqd8U9KoDgW6irpcwAd0I0mm /1YlCKhKAy22SajKBUPPvSFAtzQvVDsv4qqOwzxhBq6HfXMYqI9SWKIXOkvF+eXTThEMdBbVzWxHi EvxvAInQ==; Received: from helcar.hmeau.com ([216.24.177.18] helo=fornost.hmeau.com) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lXMip-009Jwe-7t for linux-arm-kernel@lists.infradead.org; Fri, 16 Apr 2021 11:33:16 +0000 Received: from gwarestrin.arnor.me.apana.org.au ([192.168.103.7]) by fornost.hmeau.com with smtp (Exim 4.92 #5 (Debian)) id 1lXMiO-0003We-Dy; Fri, 16 Apr 2021 21:32:49 +1000 Received: by gwarestrin.arnor.me.apana.org.au (sSMTP sendmail emulation); Fri, 16 Apr 2021 21:32:48 +1000 Date: Fri, 16 Apr 2021 21:32:48 +1000 From: Herbert Xu To: Nathan Chancellor Cc: "David S. Miller" , Russell King , Nick Desaulniers , Ard Biesheuvel , "Jason A. Donenfeld" , linux-crypto@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com, stable@vger.kernel.org, Arnd Bergmann , Jessica Clarke Subject: Re: [PATCH] crypto: arm/curve25519 - Move '.fpu' after '.arch' Message-ID: <20210416113248.GM16633@gondor.apana.org.au> References: <20210409221155.1113205-1-nathan@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210409221155.1113205-1-nathan@kernel.org> User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210416_043315_301992_FD6D5D6F X-CRM114-Status: GOOD ( 17.26 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, Apr 09, 2021 at 03:11:55PM -0700, Nathan Chancellor wrote: > Debian's clang carries a patch that makes the default FPU mode > 'vfp3-d16' instead of 'neon' for 'armv7-a' to avoid generating NEON > instructions on hardware that does not support them: > > https://salsa.debian.org/pkg-llvm-team/llvm-toolchain/-/raw/5a61ca6f21b4ad8c6ac4970e5ea5a7b5b4486d22/debian/patches/clang-arm-default-vfp3-on-armv7a.patch > https://bugs.debian.org/841474 > https://bugs.debian.org/842142 > https://bugs.debian.org/914268 > > This results in the following build error when clang's integrated > assembler is used because the '.arch' directive overrides the '.fpu' > directive: > > arch/arm/crypto/curve25519-core.S:25:2: error: instruction requires: NEON > vmov.i32 q0, #1 > ^ > arch/arm/crypto/curve25519-core.S:26:2: error: instruction requires: NEON > vshr.u64 q1, q0, #7 > ^ > arch/arm/crypto/curve25519-core.S:27:2: error: instruction requires: NEON > vshr.u64 q0, q0, #8 > ^ > arch/arm/crypto/curve25519-core.S:28:2: error: instruction requires: NEON > vmov.i32 d4, #19 > ^ > > Shuffle the order of the '.arch' and '.fpu' directives so that the code > builds regardless of the default FPU mode. This has been tested against > both clang with and without Debian's patch and GCC. > > Cc: stable@vger.kernel.org > Fixes: d8f1308a025f ("crypto: arm/curve25519 - wire up NEON implementation") > Link: https://github.com/ClangBuiltLinux/continuous-integration2/issues/118 > Reported-by: Arnd Bergmann > Suggested-by: Arnd Bergmann > Suggested-by: Jessica Clarke > Signed-off-by: Nathan Chancellor > --- > arch/arm/crypto/curve25519-core.S | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Patch applied. Thanks. -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel