From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 405rgV3V23zF1ps for ; Thu, 22 Mar 2018 00:46:21 +1100 (AEDT) Date: Wed, 21 Mar 2018 09:46:17 -0400 From: Steven Rostedt To: "Naveen N. Rao" Cc: Michael Ellerman , Paul Mackerras , linuxppc-dev@lists.ozlabs.org, Anton Blanchard , Nicholas Piggin , sathnaga@linux.vnet.ibm.com Subject: Re: [PATCH v2 1/5] powerpc64/ftrace: Add a field in paca to disable ftrace in unsafe code paths Message-ID: <20180321094617.6088d579@gandalf.local.home> In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Wed, 21 Mar 2018 16:13:18 +0530 "Naveen N. Rao" wrote: > We have some C code that we call into from real mode where we cannot > take any exceptions. Though the C functions themselves are mostly safe, > if these functions are traced, there is a possibility that we may take > an exception. For instance, in certain conditions, the ftrace code uses > WARN(), which uses a 'trap' to do its job. > > For such scenarios, introduce a new field in paca 'ftrace_disabled', > which is checked on ftrace entry before continuing. This field can then > be set to a non-zero value to disable/pause ftrace, and reset to zero to > resume ftrace. Looks fine to me: Acked-by: Steven Rostedt (VMware) -- Steve > > Signed-off-by: Naveen N. Rao > ---