Message ID | 20230131093643.3850272-1-arnd@kernel.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2655267wrn; Tue, 31 Jan 2023 01:44:53 -0800 (PST) X-Google-Smtp-Source: AK7set/gqObhkp7TY+zHlSbODtO3Xo7ghDdSXThYSBJYeW9qIi7h5KoLUkv36qCQ6AOfWLARFUtV X-Received: by 2002:a17:907:a0d2:b0:871:dd2:4afb with SMTP id hw18-20020a170907a0d200b008710dd24afbmr2761819ejc.42.1675158292988; Tue, 31 Jan 2023 01:44:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675158292; cv=none; d=google.com; s=arc-20160816; b=kTSkxfLA1bMkjagawZa+RjOyb3BoMisKseaYxDlkDmLS227LUUcCH/mr3nCkJbzal+ zZqF4UePJoe5Kt93OGF8ro/7T4r0oXKTMc6sBjB+G99jfkBNLJpLwFraTUb2EZt00+Nb gPphJ0k7nTE38/J9eZJVAWD5s0nSMc0jVx1KBojtymOcx6LdaJIU4yreOGgsx9Ez7z9j JUNNlDx7q9TtOQjw0l4n4UaD6lLzatxG/LNeVN/JdLchE2g3iLOM318mGZE79RM5rfTY xnHGtYi79RD0eeqq/Q9V/JStFl5kikC2wGhL+6huO7gGrLI+/19flnR2/YCfkDTjzTgX by8w== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=IxxArth3neU5u2hRKV5LVsabXm3nYfbV4d3S6412wEA=; b=lwLrcQ9+fyU4XmtCzwmKAVJWvcPZcldI/ZIuzBOSy5GxcQBACItaNnO4H/J1WBE4Bp scybDKC4th+0hMJX0rOzS4r+EwCnHyoq+XxrwexspiQqQ7jE/Kjs/4Krbyz35gEKAok2 sG7R2KooJnR/mDLCAv16bc81GplfWz1o2LAW0vKlWAJ6YlhFM02foJHt77k1Zq1NN4go /XPiuGoTLfdcQbzib9cMgf5GDycf3cUZfRs0LYuHYnOZEdjs/dVCVjY09r0TIRVbPidu c2QU/86qNr2F+Pnb1B+7xWmjjY32RmTiPmfeHa2gHwJpIvOG2lgKqoze9ltZHr93qWbr DyHA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=MYUxqJEH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id we6-20020a170907234600b00883ec4c63e2si9162251ejb.645.2023.01.31.01.44.29; Tue, 31 Jan 2023 01:44:52 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=MYUxqJEH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232083AbjAaJg5 (ORCPT <rfc822;maxin.john@gmail.com> + 99 others); Tue, 31 Jan 2023 04:36:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34956 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232045AbjAaJg4 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 31 Jan 2023 04:36:56 -0500 Received: from sin.source.kernel.org (sin.source.kernel.org [IPv6:2604:1380:40e1:4800::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E7D292ED7C; Tue, 31 Jan 2023 01:36:51 -0800 (PST) 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 sin.source.kernel.org (Postfix) with ESMTPS id D500DCE1BDB; Tue, 31 Jan 2023 09:36:49 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 44056C433D2; Tue, 31 Jan 2023 09:36:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1675157808; bh=GavFmW+1c8ztCVeGwDutDoxHL37vN4T5JEoOXRXcG/c=; h=From:To:Cc:Subject:Date:From; b=MYUxqJEHhG2PVvygty4+eT+DQJwk+ibpguGCqWoCRG4+eOid1YCReeKvC8mKIZQhk 5FJXELMy6JtDWeOmUrNvevujG0i7RRlSzsyY+9wP6Qm8mbNGGsqWXxi3Qxna6enJ/b J1l2t2uf97D0dFgE6DrGpv9Wa5PlwOm6rr647iD0acBP3Hhco5WMI6/c4TiR/xQ/7J ZB6Eh2OhV5hW8sLCVuZiJzEHO8Y4YPCZBbNzkzFYIq5gi9VEjV3JBPh1IJaFrJjpY9 Kxjoyl1Iw7QI8BrT3l5JdFSi2BBiwuoUooBKwhn8ZOtQzDGlp44vA3FrWU3iL8+Yba Bny4Al+KU+xOA== From: Arnd Bergmann <arnd@kernel.org> To: Peter Zijlstra <peterz@infradead.org> Cc: Arnd Bergmann <arnd@arndb.de>, Steven Rostedt <rostedt@goodmis.org>, Masami Hiramatsu <mhiramat@kernel.org>, Mark Rutland <mark.rutland@arm.com>, Thomas Gleixner <tglx@linutronix.de>, Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>, Dave Hansen <dave.hansen@linux.intel.com>, x86@kernel.org, "H. Peter Anvin" <hpa@zytor.com>, Josh Poimboeuf <jpoimboe@kernel.org>, linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org Subject: [PATCH] ftrace,kcfi: Define ftrace_stub_graph conditionally Date: Tue, 31 Jan 2023 10:36:30 +0100 Message-Id: <20230131093643.3850272-1-arnd@kernel.org> X-Mailer: git-send-email 2.39.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1756530781868827245?= X-GMAIL-MSGID: =?utf-8?q?1756530781868827245?= |
Series |
ftrace,kcfi: Define ftrace_stub_graph conditionally
|
|
Commit Message
Arnd Bergmann
Jan. 31, 2023, 9:36 a.m. UTC
From: Arnd Bergmann <arnd@arndb.de> When CONFIG_FUNCTION_GRAPH_TRACER is disabled, __kcfi_typeid_ftrace_stub_graph is missing, causing a link failure: ld.lld: error: undefined symbol: __kcfi_typeid_ftrace_stub_graph referenced by arch/x86/kernel/ftrace_64.o:(__cfi_ftrace_stub_graph) in archive vmlinux.a Mark the reference to it as conditional on the same symbol, as is done on arm64. Fixes: 883bbbffa5a4 ("ftrace,kcfi: Separate ftrace_stub() and ftrace_stub_graph()") See-also: 2598ac6ec493 ("arm64: ftrace: Define ftrace_stub_graph only with FUNCTION_GRAPH_TRACER") Signed-off-by: Arnd Bergmann <arnd@arndb.de> --- arch/x86/kernel/ftrace_64.S | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/arch/x86/kernel/ftrace_64.S b/arch/x86/kernel/ftrace_64.S index 1265ad519249..fb4f1e01b64a 100644 --- a/arch/x86/kernel/ftrace_64.S +++ b/arch/x86/kernel/ftrace_64.S @@ -136,10 +136,12 @@ SYM_TYPED_FUNC_START(ftrace_stub) RET SYM_FUNC_END(ftrace_stub) +#ifdef CONFIG_FUNCTION_GRAPH_TRACER SYM_TYPED_FUNC_START(ftrace_stub_graph) CALL_DEPTH_ACCOUNT RET SYM_FUNC_END(ftrace_stub_graph) +#endif #ifdef CONFIG_DYNAMIC_FTRACE