Re: [PATCH] kernel/extable.c: mark core_kernel_text notrace

From: Thomas Gleixner
Date: Thu Jun 22 2017 - 18:17:33 EST


On Thu, 22 Jun 2017, Steven Rostedt wrote:
> On Wed, 21 Jun 2017 09:03:26 +0200
> Marcin Nowakowski <marcin.nowakowski@xxxxxxxxxx> wrote:
> >
> > -int core_kernel_text(unsigned long addr)
> > +int notrace core_kernel_text(unsigned long addr)
>
> Is mips the only one with this issue. I hate adding notrace to general
> functions if it is only an issue with a single arch.

We have unwinders using that function and btw, ftrace has a similar issue
with core_kernel_data(). Probably not endless recursive, but not pretty
either if you have trace entries from within the tracer itself.

> Can we add a: mips_notrace? where we have:
>
> #ifdef CONFIG_MIPS
> # define mips_notrace notrace
> #else
> # define mips_notrace
> #endif

We can, but that will explode into an unholy mess sooner than later. I know
you'd love to come up with the most convoluted macro magic to make that
happen.

Thanks,

tglx