Re: [PATCH 1/9] ftrace: Move the recursion testing into global headers

2020-10-30 Thread Steven Rostedt
On Fri, 30 Oct 2020 10:13:50 +0100 (CET) Miroslav Benes wrote: > how does this work in case of NMI? trace_get_context_bit() returns 0 (it > does not change later in the patch set). "start" in > trace_test_and_set_recursion() is 0 zero too as used later in the patch > set by ftrace_test_recursi

Re: [PATCH 1/9] ftrace: Move the recursion testing into global headers

2020-10-30 Thread Miroslav Benes
Hi, > +static __always_inline int trace_get_context_bit(void) > +{ > + int bit; > + > + if (in_interrupt()) { > + if (in_nmi()) > + bit = 0; > + > + else if (in_irq()) > + bit = 1; > + else > +

[PATCH 1/9] ftrace: Move the recursion testing into global headers

2020-10-28 Thread Steven Rostedt
From: "Steven Rostedt (VMware)" Currently, if a callback is registered to a ftrace function and its ftrace_ops does not have the RECURSION flag set, it is encapsulated in a helper function that does the recursion for it. Really, all the callbacks should have their own recursion protection for pe