Thread (27 messages) 27 messages, 7 authors, 2021-12-18

Re: [PATCH v1 0/5] Implement livepatch on PPC32

From: Christophe Leroy <hidden>
Date: 2021-12-18 16:12:30
Also in: linux-s390, linuxppc-dev, lkml


Le 14/12/2021 à 15:01, Steven Rostedt a écrit :
On Tue, 14 Dec 2021 08:35:14 +0100
Christophe Leroy [off-list ref] wrote:
quoted
quoted
Will continue investigating.
   
trace_selftest_startup_function_graph() calls register_ftrace_direct()
which returns -ENOSUPP because powerpc doesn't select
CONFIG_DYNAMIC_FTRACE_WITH_DIRECT_CALLS.

Should TEST_DIRECT_TRAMP depend on CONFIG_DYNAMIC_FTRACE_WITH_DIRECT_CALLS ?
Yes, that should be:

#if defined(CONFIG_DYNAMIC_FTRACE) && \
     defined(CONFIG_HAVE_DYNAMIC_FTRACE_WITH_DIRECT_CALLS)
#define TEST_DIRECT_TRAMP
noinline __noclone static void trace_direct_tramp(void) { }
#endif


And make it test it with or without the args.
Shouldn't it just be:

#ifdef CONFIG_DYNAMIC_FTRACE_WITH_DIRECT_CALLS

Because

register_ftrace_direct() depends on that symbol, so if you have 
CONFIG_DYNAMIC_FTRACE && CONFIG_HAVE_DYNAMIC_FTRACE_WITH_DIRECT_CALLS 
but not DYNAMIC_FTRACE_WITH_REGS then 
CONFIG_DYNAMIC_FTRACE_WITH_DIRECT_CALLS is unset and 
register_ftrace_direct() returns -ENOTSUPP

Christophe
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help