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=-17.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, 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 9E4A1C64E8A for ; Mon, 30 Nov 2020 12:00:38 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 0E2CC207BC for ; Mon, 30 Nov 2020 12:00:38 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="I/BTbIaV"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="XbGPLq/G" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0E2CC207BC Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org 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=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject: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=ew2LONkwov4BbDb6UzxtW+XWWYkhA+3WT8rePgoBwBI=; b=I/BTbIaVAjtBFTVtpl/SvAATN O3uTT85w+WpX72FNP1+yy+drFgJMfffr15n1KulYMNqpn8KYgfJ8nd32D+XVh8QYDgrnQXrZGSF/v WWG2JSqfpwwnwgDK/NqhVtbKVSMaOOpvmtsQrM2l1cOK85V9mo4xniYZePf5R3INb6XQ6kzteHdak AbKj0TrUbOMWAseYxZ0Lgic6LaGzzY54OeeC/Y2KDwc9xR7eIBCLcZSJo02F0TXekxJVJp9F9EUOX LWP2RQlINh7h7k2J/EUwT7f55Zq7vyiVsEFNwrqH2hmIA+TWJ731t8e9Q+eiouII9+gwwpiylLAPJ ScWiW58bg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kjhpp-0008Pl-9z; Mon, 30 Nov 2020 11:59:13 +0000 Received: from mail.kernel.org ([198.145.29.99]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kjhpm-0008P0-Oh for linux-arm-kernel@lists.infradead.org; Mon, 30 Nov 2020 11:59:11 +0000 Received: from willie-the-truck (236.31.169.217.in-addr.arpa [217.169.31.236]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D62772073C; Mon, 30 Nov 2020 11:59:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1606737549; bh=jcKRnTY2A7tTxLUEBA4FhjDB78+vG8Uu58hBCNu3Qs8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=XbGPLq/Gdk/ASCNBy/7/E3wrn5zqLDESpvoy2UNHGZHuuXFZQPCXO7FbliCo+KTjL dcpgEk4JxaUXIYiMKN86igCiutZADLzLXf9whER7tpQ4rNqnS6qJKWRrApd0RwpCLA mDCVfehaZ+02umT+yBR6tKxGFcK/pkEQRrCuPSVg= Date: Mon, 30 Nov 2020 11:59:03 +0000 From: Will Deacon To: Sami Tolvanen Subject: Re: [PATCH v7 16/17] arm64: disable recordmcount with DYNAMIC_FTRACE_WITH_REGS Message-ID: <20201130115902.GD24563@willie-the-truck> References: <20201118220731.925424-1-samitolvanen@google.com> <20201118220731.925424-17-samitolvanen@google.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20201118220731.925424-17-samitolvanen@google.com> 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-20201130_065910_929502_A0CC3A77 X-CRM114-Status: GOOD ( 23.20 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arch@vger.kernel.org, Kees Cook , "Paul E. McKenney" , kernel-hardening@lists.openwall.com, Peter Zijlstra , Greg Kroah-Hartman , Masahiro Yamada , linux-kbuild@vger.kernel.org, Nick Desaulniers , linux-kernel@vger.kernel.org, Steven Rostedt , clang-built-linux@googlegroups.com, linux-pci@vger.kernel.org, Josh Poimboeuf , linux-arm-kernel@lists.infradead.org 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 Wed, Nov 18, 2020 at 02:07:30PM -0800, Sami Tolvanen wrote: > DYNAMIC_FTRACE_WITH_REGS uses -fpatchable-function-entry, which makes > running recordmcount unnecessary as there are no mcount calls in object > files, and __mcount_loc doesn't need to be generated. > > While there's normally no harm in running recordmcount even when it's > not strictly needed, this won't work with LTO as we have LLVM bitcode > instead of ELF objects. > > This change selects FTRACE_MCOUNT_USE_PATCHABLE_FUNCTION_ENTRY, which > disables recordmcount when patchable function entries are used instead. > > Signed-off-by: Sami Tolvanen > --- > arch/arm64/Kconfig | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig > index 1515f6f153a0..c7f07978f5b6 100644 > --- a/arch/arm64/Kconfig > +++ b/arch/arm64/Kconfig > @@ -158,6 +158,8 @@ config ARM64 > select HAVE_DYNAMIC_FTRACE > select HAVE_DYNAMIC_FTRACE_WITH_REGS \ > if $(cc-option,-fpatchable-function-entry=2) > + select FTRACE_MCOUNT_USE_PATCHABLE_FUNCTION_ENTRY \ > + if DYNAMIC_FTRACE_WITH_REGS I don't really understand why this is in the arch header file, rather than have the core code check for "fpatchable-function-entry=2" and expose a CC_HAS_PATCHABLE_FUNCTION_ENTRY, but in the interest of making some progress on this series: Acked-by: Will Deacon Will _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel