Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp244421pxb; Fri, 16 Apr 2021 04:44:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyTjiypnlqwae/pWnSl6jbSqOW0a3+6qcpZ4GZ9UDv0Vz+wNGeVqLp73ZvYZNEO9HI7zMi3 X-Received: by 2002:a17:90b:300f:: with SMTP id hg15mr9420263pjb.92.1618573479954; Fri, 16 Apr 2021 04:44:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618573479; cv=none; d=google.com; s=arc-20160816; b=d7yNrzbZHQh1i+eGJwv1IA/WgmDxpvR7IIp2dk7C14pyzXgVB+OnqvNVCvcyD2Xl40 4r3Dy2YI2UcRUdo3hc+egiVcwMYQE70uL3GfUcoa1tjEfOENoMfrsWS9Ia/qn3gvaVSL MWa9drlkahS9UlaFovRdDWHCdmjAEDwceGDMGW90y9ETV4Go1p9VREO2vHtP/idcjclj 9iP9XaIUJvW9e228JSKVsuOZJ6sPNRnBiS5fnsCfUEPpXMVXWpUWDQjTYZrSfk9wiYni kzUb+wvSwNOAHI0EQRHlgSKdI/j0ePbRAD9eUdLJm5pMdDyFYx97II34s1Efph97EqY4 HBkQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=aW26p2Q6N/O07QBMHOdc2s6idy4Vshl65NzTK91mYWw=; b=gOfBG08JmaqaAVOlw9EUy2Hm+ggUbpEjEmkBaei5+H1fjzMe9v1c232/D8UOTXNUYF yCJW11q4G3nQpJC3+bHKaxmbydSGJNbqIkkCSREnQnBDfRh6eE5gTzyFxwR8IaNnYwRb XFjhQeE/zI7u669CguxdWCFVtXksVCMH6nuwT/ibT+EZn07V45SY1TDkyeCui8b1Wppd KPXnJBxFtTlu9QxL0D/JZpgCFP1SCeucoVuiJ49Qmzg8kL8T34erK0aLOugGwNDvAsLk qvXQTv/waGZAFNNtD7jmPrY6cH9iedGTW3S/wTujELHA/b7FYyLL+RfMZFKjE3kpGoC3 keVw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o67si6862023pfd.10.2021.04.16.04.44.27; Fri, 16 Apr 2021 04:44:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242765AbhDPLdn (ORCPT + 99 others); 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