On Thu, 8 Jun 2023 10:50:51 +0100 Mark Rutland <mark.rutland@xxxxxxx> 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