Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2548385pxj; Mon, 10 May 2021 05:41:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJykGx5rHYLczTsjRmdfyft5mzYGUl/4N7erjpbVhmNJLAE1lm4QerhZsW5CduVcjwKiT2wG X-Received: by 2002:a02:90cd:: with SMTP id c13mr21256913jag.18.1620650487469; Mon, 10 May 2021 05:41:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620650487; cv=none; d=google.com; s=arc-20160816; b=UR+oHR92eWj7OWsVB1vm830NP9xb6dubKMxSPwr7Y23ay29eSivmq0XLcDKId1+qQL kePmG5X8tX7UBLbt6uiOmwyaJdXjtkuvpyXpZHT/FxobHoRttns2sKX7P4zHQFEbHzqa VO7mBcZ5VGanajxzihIP8wajPyCYKnbN3+kmTqIcNaOhZ+dO2hdQvkQPealFLmYvJj8b H/2hn5Y9EaWNYu1CjHtVMwETzuh88FNXm4uqyDorlGtmScfgu8hFjfQxWOXOUH0NaHv0 CyazLPZCerCNQ0mYb/bfSomKA+NwaBlXsRtvTPFf1z/1pViKolTbMOX7OHEuXOqZs+aq Dctg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=coLbGHmptcj0gkGjxJvzo85Zcb0DQ27NApmckGnQJww=; b=gaVhq6edD/zmVArCtkqs6o8WdRYSwGDSuhlguNJ4A8XqorpHXl/+m69LzvFfeoHuha 7XHODKgFpCSo/DjNwMMoCOBsoO7FNIrpt341KtgqKNu6HJlM947+eVt3qA8wANz5lZrQ SOGVB1KGBoOARD+3FaBoTUGAVO+iWIwiN5m4FFFPkOfXznJL4LWvTFhw2JfogyI1jJw6 BZqObTWG00bGUU/RCNyWS9f0LqrwvJeYyikGw0P4iQxBLkDwsefNeDoUsdmY/e+0Y4CN GscDT6OApoNldytxI34dFRKj+OMy4KAc81J80HgX4E9EpjhflhEq3nkTydvqFzgOFX6a c3sw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=JQufBwhC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d7si5712264iop.32.2021.05.10.05.41.15; Mon, 10 May 2021 05:41:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=JQufBwhC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237071AbhEJMeh (ORCPT + 99 others); Mon, 10 May 2021 08:34:37 -0400 Received: from mail.kernel.org ([198.145.29.99]:53674 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234919AbhEJLNM (ORCPT ); Mon, 10 May 2021 07:13:12 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 1EB2B613C5; Mon, 10 May 2021 11:10:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1620645012; bh=GP313qOubS9rto88V4AxPe+esMFnkQi8JAn6FdOn3f8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JQufBwhCB0gUbFTf+CeoFYmD9Ayo4y+CruyX9Hul94sPNfBMs3G49ZFHVRvtoidQM xKUqfXTOlOQsK4w2f4XFMf50KWqxydD/CP6oxO7FgZMBBkySmI8MaVzezxcd0ivi5U IsfO6VFtnYWTyKM6VzkCxzRpSJyPVwBRvYSl/zoU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Arnd Bergmann , Jessica Clarke , Nathan Chancellor , "Jason A. Donenfeld" , Nick Desaulniers , Herbert Xu Subject: [PATCH 5.12 316/384] crypto: arm/curve25519 - Move .fpu after .arch Date: Mon, 10 May 2021 12:21:45 +0200 Message-Id: <20210510102025.208994993@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210510102014.849075526@linuxfoundation.org> References: <20210510102014.849075526@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Nathan Chancellor commit 44200f2d9b8b52389c70e6c7bbe51e0dc6eaf938 upstream. 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 Acked-by: Jason A. Donenfeld Reviewed-by: Nick Desaulniers Tested-by: Nick Desaulniers Signed-off-by: Herbert Xu Signed-off-by: Greg Kroah-Hartman --- arch/arm/crypto/curve25519-core.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/arch/arm/crypto/curve25519-core.S +++ b/arch/arm/crypto/curve25519-core.S @@ -10,8 +10,8 @@ #include .text -.fpu neon .arch armv7-a +.fpu neon .align 4 ENTRY(curve25519_neon)