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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0F875C05027 for ; Mon, 23 Jan 2023 14:13:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; 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=gEOPdp3usEPbzPVuGjjn7HM+6ruNChK2l9ibIjN5IFs=; b=CJmkIzUrdUG5yi Psh0gsBYPn9jDA7VjCBho6mPzk10URZTaSoV9JmoSOK2UtNqThVtp/5+utisTfGsEAReTk+AGFU5i aHaSJL9gpodVqAP4EZd6SBPGRsh5AezHGelxTL+EJO0OrD0L2rPXtwzqb7w06T96r40DM5c+rWqg3 F1blvY1qoB+rlOkIrPXfaHOm0ajNb6DkArQOYynQPsUDsSJhJBfa1Tb5uXtyyHIJJvKmFArtPqiKg qbz4iURlq9pi+OYIC7k4rYdPNUZ3Iv8vHd5Dapue9BCLRLKJcmAAl3CV830rZBOGxjpZ309cGIww3 G8TSKfshwpjC44Duff+g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pJxZ1-00HXWo-Ec; Mon, 23 Jan 2023 14:12:47 +0000 Received: from ams.source.kernel.org ([2604:1380:4601:e00::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pJxYw-00HXV4-TM for linux-arm-kernel@lists.infradead.org; Mon, 23 Jan 2023 14:12:44 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id A41D4B80DA4; Mon, 23 Jan 2023 14:12:40 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D39AEC433D2; Mon, 23 Jan 2023 14:12:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1674483159; bh=xFLOnDtk94LbkRcvU27vXX6doFgrUITeWaNgk1986HA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=jQq6YkkL4QqEs8PFGw3bcEihpcmRbNRanM32NBpqWFWdXh5Ehhz4b8G1VFErSpd5G 3mPltjvOIJm6Mkk2GBX6cH8SabBqpW0qqK8TV3C8xUdRiD7Qm0izf9YHWyaSYDX981 tOdyj8EXbYHIr0Dm1Bun/NlOhTdu6F/yfUcc9b7gw/jwoetUd6xtRilM12Drpx8zUP fCBWyOp5AIPI1OrZXvR7uamLjREor/aShknMCc/Xik4qJIYp6+pNHHXhLiSl6RG7QA mBWeauYkaOjPPE4qhLJK71c99GqGuztPiPWEwbH8SvYBOXG/dN38Z9P1s3kGB9dpi6 kdn5DCte2Iysg== Date: Mon, 23 Jan 2023 07:12:37 -0700 From: Nathan Chancellor To: "Russell King (Oracle)" Cc: Nick Desaulniers , Arnd Bergmann , Ard Biesheuvel , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-crypto@vger.kernel.org, "kernelci.org bot" Subject: Re: [PATCH] ARM: Reduce __thumb2__ definition to crypto files that require it Message-ID: References: <20221222193039.2267074-1-nathan@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230123_061243_311780_24F389A6 X-CRM114-Status: GOOD ( 26.45 ) 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 Mon, Jan 23, 2023 at 10:48:24AM +0000, Russell King (Oracle) wrote: > On Thu, Dec 22, 2022 at 11:52:27AM -0800, Nick Desaulniers wrote: > > On Thu, Dec 22, 2022 at 11:30 AM Nathan Chancellor wrote: > > > > > > Commit 1d2e9b67b001 ("ARM: 9265/1: pass -march= only to compiler") added > > > a __thumb2__ define to ASFLAGS to avoid build errors in the crypto code, > > > which relies on __thumb2__ for preprocessing. Commit 59e2cf8d21e0 ("ARM: > > > 9275/1: Drop '-mthumb' from AFLAGS_ISA") followed up on this by removing > > > -mthumb from AFLAGS so that __thumb2__ would not be defined when the > > > default target was ARMv7 or newer. > > > > > > Unfortunately, the second commit's fix assumes that the toolchain > > > defaults to -mno-thumb / -marm, which is not the case for Debian's > > > arm-linux-gnueabihf target, which defaults to -mthumb: > > > > > > $ echo | arm-linux-gnueabihf-gcc -dM -E - | grep __thumb > > > #define __thumb2__ 1 > > > #define __thumb__ 1 > > > > Interesting, that was hard to foresee in review of 1d2e9b67b001 and > > 59e2cf8d21e0. > > > > FWIW, their non-hf target does not. > > $ echo | arm-linux-gnueabi-gcc -dM -E - | grep __thumb > > $ > > > > > > > > This target is used by several CI systems, which will still see > > > redefined macro warnings, despite '-mthumb' not being present in the > > > flags: > > > > > > : warning: "__thumb2__" redefined > > > : note: this is the location of the previous definition > > > > > > Remove the global AFLAGS __thumb2__ define and move it to the crypto > > > folder where it is required by the imported OpenSSL algorithms; the rest > > > of the kernel should use the internal CONFIG_THUMB2_KERNEL symbol to > > > know whether or not Thumb2 is being used or not. Be sure that __thumb2__ > > > is undefined first so that there are no macro redefinition warnings. > > > > > > Link: https://github.com/ClangBuiltLinux/linux/issues/1772 > > > Reported-by: "kernelci.org bot" > > > Suggested-by: Ard Biesheuvel > > > Signed-off-by: Nathan Chancellor > > > > Thanks Nathan and Ard. > > Shouldn't this also have a fixes tag? Ugh, yes, sorry about that :( would you kind taking these when you apply the patch or would you like me to resubmit? Fixes: 59e2cf8d21e0 ("ARM: 9275/1: Drop '-mthumb' from AFLAGS_ISA") Fixes: 1d2e9b67b001 ("ARM: 9265/1: pass -march= only to compiler") Cheers, Nathan _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel