Thread (5 messages) 5 messages, 4 authors, 2023-06-09

Re: [PATCH] ftrace: Allow inline functions not inlined to be traced

From: Steven Rostedt <rostedt@goodmis.org>
Date: 2023-06-09 21:29:11
Also in: live-patching, lkml

On Thu, 8 Jun 2023 10:50:51 +0100
Mark Rutland [off-list ref] wrote:

Unfortunately, from a quick build-test of arm64 there are a bunch of places
that are currently inline that need to be __always_inline for this to be safe.
Notably we have a few low-level helpers like is_kernel_in_hyp_mode() that are
only inlines, and those get used in the bowels of our entry code before we've
restored some HW state (e.g. in arch_nmi_enter()).
Sounds like you also need to add noinstr ;-)
I'm happy to go audit and fixup arm64, but that will take some work.

Maybe it's worth having something like:

#ifdef ARCH_CAN_TRACE_INLINE
#define __notrace_inline
#else
#define __notrace_inline	notrace
#endif

... so that we can opt-in where this is safe, (e.g. on x86)?
I guess I can do that.

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