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 lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (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 A1D40C433F5 for ; Mon, 14 Feb 2022 19:03:39 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4JyDCF6BN1z3cYY for ; Tue, 15 Feb 2022 06:03:37 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=kernel.org (client-ip=145.40.68.75; helo=ams.source.kernel.org; envelope-from=srs0=3i1i=s5=goodmis.org=rostedt@kernel.org; receiver=) Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4JyDBl3HYjz3bTn for ; Tue, 15 Feb 2022 06:03:11 +1100 (AEDT) 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 EE4C3B8074D; Mon, 14 Feb 2022 19:03:07 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 68A09C340E9; Mon, 14 Feb 2022 19:03:05 +0000 (UTC) Date: Mon, 14 Feb 2022 14:03:04 -0500 From: Steven Rostedt To: "Naveen N. Rao" Subject: Re: [PATCH v2 11/13] powerpc/ftrace: directly call of function graph tracer by ftrace caller Message-ID: <20220214140304.04d1e8a8@gandalf.local.home> In-Reply-To: <1644859156.qdgqumennn.naveen@linux.ibm.com> References: <04d196585ff81bde06a000bd9c633a33a5b21130.1640017960.git.christophe.leroy@csgroup.eu> <1644859156.qdgqumennn.naveen@linux.ibm.com> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Petr Mladek , Joe Lawrence , Jiri Kosina , "linux-kernel@vger.kernel.org" , Ingo Molnar , Josh Poimboeuf , "live-patching@vger.kernel.org" , Miroslav Benes , "linuxppc-dev@lists.ozlabs.org" Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" On Mon, 14 Feb 2022 22:54:23 +0530 "Naveen N. Rao" wrote: > For x86, commit 0c0593b45c9b4e ("x86/ftrace: Make function graph use > ftrace directly") also adds recursion check before the call to > function_graph_enter() in prepare_ftrace_return(). Do we need that on > powerpc as well? Yes. The function_graph_enter() does not provide any recursion protection, so if it were to call something that gets function graph traced, it will crash the machine. -- Steve