Thread (13 messages) flat view 13 messages, 2 authors, 2018-03-21

Re: [PATCH v2 1/5] powerpc64/ftrace: Add a field in paca to disable ftrace in unsafe code paths

From: Steven Rostedt <rostedt@goodmis.org>
Date: 2018-03-21 13:46:21

On Wed, 21 Mar 2018 16:13:18 +0530
"Naveen N. Rao" [off-list ref] 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) <rostedt@goodmis.org>

-- Steve
Signed-off-by: Naveen N. Rao <redacted>
---
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help