From patchwork Mon Jan 24 08:17:54 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Masami Hiramatsu (Google)" X-Patchwork-Id: 12721645 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 D6661C433F5 for ; Mon, 24 Jan 2022 08:19:11 +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:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=sb+qMmM0rWuKUdHgKFI6KlSsa9kCjkSXKV5yeiyOIhs=; b=HpwLrc74FtRf5t +DriIGwOS7ccPTfUNPApocBqc2Q29tmRY+A5IBIXtI1maQfqlzdir+PPo3xPaa0ColiT3hAo+Z66A lWkV5N9BzPqnEBWWC1zzDlXDijkyUcw9FkvhgRIvD40cS9OFoJ+jYrljdG4tpsqw84EcAllw09ai0 97ihyG+UZrBxTuPEe+FXCpYspkFCTOcbQcZAdKhL2iLjvbDEazkDDP0tsCtbV9Hv5g3F2SnXRkEp3 I5lY0eqVEHcwQGiMe/4PGMizMJMpuIVSOnzwZPnVQslitqB1UfBNS2uYLHGD5bnJnBF2TQpgKXqMN VSbZA9BjNKwM/qxtUCRg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nBuY8-002YR4-E7; Mon, 24 Jan 2022 08:18:04 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nBuY2-002YPH-JE for linux-arm-kernel@lists.infradead.org; Mon, 24 Jan 2022 08:17:59 +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 dfw.source.kernel.org (Postfix) with ESMTPS id 1294F611A5; Mon, 24 Jan 2022 08:17:58 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1ABACC340E1; Mon, 24 Jan 2022 08:17:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1643012277; bh=/zmqS8dbVpUrMvVF0fn0ug9jInAB4m/q8XbM5mrGyac=; h=From:To:Cc:Subject:Date:From; b=QViBeMRDLqqldHim1dCtUDbnxQVBfkPwd4hlRmogKry0fwpFCZ+l/P1zeJtmHLxEG BD/Etr8XlTfz2TD85F60Ua6SAWwbxcOFsaz9BMfhnWWeCamWlQytsXSBcU7ypiE4jw mP2RcrqkUPPpU2mRiCjadzGDsIsRA2mAW4RSl6pgaZhOMPhgVxLJI6s00UfpxtqxpG 8HiFbVu+lz3/W68izUJWmazq8VR6uwzUWq/HAlTmBl2w/6/GjBHNvJN0e7ne2pijm9 ygCJ4G7h5BGFWEd515vvM8wmupkrjI/2Bn3VIkEFMZ9ceF6JPpIUC/Pg5Y+uAuRRFn ext8t3UVGD7Jw== From: Masami Hiramatsu To: linux-arm-kernel@lists.infradead.org Cc: Masami Hiramatsu , linux-kernel@vger.kernel.org, Catalin Marinas , Will Deacon , Mark Brown , Steven Rostedt , stable@vger.kernel.org Subject: [PATCH] arm64: Mark start_backtrace() notrace and NOKPROBE_SYMBOL Date: Mon, 24 Jan 2022 17:17:54 +0900 Message-Id: <164301227374.1433152.12808232644267107415.stgit@devnote2> X-Mailer: git-send-email 2.25.1 User-Agent: StGit/0.19 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220124_001758_706153_85D51532 X-CRM114-Status: GOOD ( 12.86 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Mark the start_backtrace() as notrace and NOKPROBE_SYMBOL because this function is called from ftrace and lockdep to get the caller address via return_address(). The lockdep is used in kprobes, it should also be NOKPROBE_SYMBOL. Fixes: b07f3499661c ("arm64: stacktrace: Move start_backtrace() out of the header") Cc: stable@vger.kernel.org Signed-off-by: Masami Hiramatsu --- arch/arm64/kernel/stacktrace.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm64/kernel/stacktrace.c b/arch/arm64/kernel/stacktrace.c index 94f83cd44e50..b0f21677764d 100644 --- a/arch/arm64/kernel/stacktrace.c +++ b/arch/arm64/kernel/stacktrace.c @@ -33,7 +33,7 @@ */ -void start_backtrace(struct stackframe *frame, unsigned long fp, +void notrace start_backtrace(struct stackframe *frame, unsigned long fp, unsigned long pc) { frame->fp = fp; @@ -55,6 +55,7 @@ void start_backtrace(struct stackframe *frame, unsigned long fp, frame->prev_fp = 0; frame->prev_type = STACK_TYPE_UNKNOWN; } +NOKPROBE_SYMBOL(start_backtrace); /* * Unwind from one frame record (A) to the next frame record (B).