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 74C25C4345F for ; Tue, 30 Apr 2024 09:26:02 +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=EgigbM+eoB8qKSIAEsQhF2npLyVVZPx0N4XVk3KcG1U=; b=19fXHQkwSe4BrK 1rRptN2aC7t90zpxm2dRv573wxuMcT0JEppkB7oHil88GGGOdlTYBrkJEpKxOMg0lcpgSgoq8b5Uj PqMfL9a9daCnXEtQ/giH3WzkWfIsw3k3HKpgJJ2W1iin86q0Ym+TNKaR5YolAJsIUkWi/X/xa2CzQ pOAtkFuIRLhLTwFumOcFA0Aa0quF+qWo3vKbO7NZTehkJMgmG/x7yJcIATjjF0WSWfpuQ3iFSFnWr uz2p0s9ZlTMwFnbm6v3dmaLC2lrcbXe5YFaywKgNr5EZ3suLHJtxS7++BMomhwEVlNcg5Pm7qhXgo YSBUcbSJK440pKOjfyzg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s1jk8-00000005p3p-1EMX; Tue, 30 Apr 2024 09:25:44 +0000 Received: from pandora.armlinux.org.uk ([2001:4d48:ad52:32c8:5054:ff:fe00:142]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s1jk4-00000005oT9-08kO for linux-arm-kernel@lists.infradead.org; Tue, 30 Apr 2024 09:25:42 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=iijlrqDU16ePvlg5sT9u3QWJTUGqRQHjwf91olcab1E=; b=1hQkszTR1j3Cf3e0tAvzBMB053 DUa0y56OHnrqzwtibwoQdiLQCYk1OpOv1MTjyDVRnGgOWchvnMqr2rXIm53svJQrARp6qlJgZeIkk jXtbW6mITrRGnWTb+Nhad74s+e/EQ8eTj2tVJHkiB4uKbXvnuOwPG42kLB6GsbXyigKGN68nb7GRO Yc2rombN6oZdgiEnBE+nmon/w+GUvBe4doIMvKqAmkD/UPC9LvLPMCGvq6UuFHZ5UWBlRXr2pSHQb 7Ki3H59xaPvU82e66e3dWyI8MnwoUK0eyQBYuWaEvipXQKJuTBDWJ9JNiX1CFloWPb9pz+hO40x5a ZiM5r0vw==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:56090) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1s1jhq-0004Mn-0j; Tue, 30 Apr 2024 10:23:22 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1s1jhp-0001gQ-0k; Tue, 30 Apr 2024 10:23:21 +0100 Date: Tue, 30 Apr 2024 10:23:20 +0100 From: "Russell King (Oracle)" To: Ard Biesheuvel Cc: Linus Walleij , Sami Tolvanen , Kees Cook , Nathan Chancellor , Nick Desaulniers , Arnd Bergmann , linux-arm-kernel@lists.infradead.org, llvm@lists.linux.dev Subject: Re: [PATCH] ARM: Use conditionals for CFI branches Message-ID: References: <20240430-arm32-cfi-topping-v1-1-4cb6a15552aa@linaro.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-20240430_022540_382744_7883B9E3 X-CRM114-Status: GOOD ( 16.44 ) 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 Tue, Apr 30, 2024 at 11:18:55AM +0200, Ard Biesheuvel wrote: > On Tue, 30 Apr 2024 at 10:26, Linus Walleij wrote: > > diff --git a/arch/arm/mm/cache-fa.S b/arch/arm/mm/cache-fa.S > > index db454033b76f..4a3668b52a2d 100644 > > --- a/arch/arm/mm/cache-fa.S > > +++ b/arch/arm/mm/cache-fa.S > > @@ -112,7 +112,9 @@ SYM_FUNC_END(fa_flush_user_cache_range) > > * - end - virtual end address > > */ > > SYM_TYPED_FUNC_START(fa_coherent_kern_range) > > +#ifdef CONFIG_CFI_CLANG /* Fallthrough if !CFI */ > > These functions are only called indirectly if MULTI_CACHE is enabled, > right? If so, this could be > > #if defined(CONFIG_CFI_CLANG) && defined(MULTI_CACHE) I don't see that makes any difference. Whether or not they're called indirectly, the symbol is the entry point to the function. If called directly and the useless branch is there, we'll incur the overhead of the BL instruction flushing the pipeline followed immediately by the overhead of the B instruction flushing the pipeline again. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last! _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel