Re: [RFC PATCH] powerpc/ftrace: Refactoring and support for -fpatchable-function-entry
From: Steven Rostedt <rostedt@goodmis.org>
Date: 2023-05-23 13:20:49
From: Steven Rostedt <rostedt@goodmis.org>
Date: 2023-05-23 13:20:49
On Sat, 20 May 2023 23:58:01 +0530 Naveen N Rao [off-list ref] wrote:
quoted
At the begining of ftrace_replace_code(), don't you miss: if (unlikely(ftrace_disabled)) return;ftrace_disabled is a static, so it can't be tested here. FWIW, x86 also implements ftrace_replace_code(), and doesn't test ftrace_disabled. Looking at the call path, it looks like it gets tested much before, so may not be necessary. It sure would be good to get Steven's view on this.
Yes, ftrace_disabled should not be used in arch code. It should be caught before then. Thanks, -- Steve