Re: Instrumentation and RCU

From: Mathieu Desnoyers
Date: Tue Mar 10 2020 - 14:37:36 EST


----- On Mar 10, 2020, at 2:31 PM, Thomas Gleixner tglx@xxxxxxxxxxxxx wrote:

> Mathieu Desnoyers <mathieu.desnoyers@xxxxxxxxxxxx> writes:
>> ----- On Mar 10, 2020, at 12:48 PM, Thomas Gleixner tglx@xxxxxxxxxxxxx wrote:
>>> How do you "fix" that when you can't reach the tracepoint because you
>>> trip over a breakpoint and then while trying to fixup that stuff you hit
>>> another one?
>>
>> I may still be missing something, but if the fixup code (AFAIU the code
>> performing
>> the out-of-line single-stepping of the original instruction) belongs to a
>> section
>> hidden from instrumentation, it should not be an issue.
>
> Sure, but what guarantees that on the way there is nothing which might
> call into instrumentable code? Nothing, really.
>
> That's why I want the explicit sections which can be analyzed by
> tools. Humans (including me) are really bad at it was demonstrated
> several times.

AFAIU, my in_tracer flag proposal complements yours.

The explicit sections thingy is required for early/late entry/exit code,
but does nothing to prevent "explicitly marked" safe-to-instrument kernel
code from triggering infinite recursion.

My flag proposal handles that second issue.

Thanks,

Mathieu

--
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com