Re: Instrumentation and RCU

From: Peter Zijlstra
Date: Mon Mar 09 2020 - 16:18:57 EST


On Mon, Mar 09, 2020 at 06:02:32PM +0100, Thomas Gleixner wrote:
> #4 Protecting call chains
>
> Our current approach of annotating functions with notrace/noprobe is
> pretty much broken.
>
> Functions which are marked NOPROBE or notrace call out into functions
> which are not marked and while this might be ok, there are enough
> places where it is not. But we have no way to verify that.
>
> That's just a recipe for disaster. We really cannot request from
> sysadmins who want to use instrumentation to stare at the code first
> whether they can place/enable an instrumentation point somewhere.
> That'd be just a bad joke.
>
> I really think we need to have proper text sections which are off
> limit for any form of instrumentation and have tooling to analyze the
> calls into other sections. These calls need to be annotated as safe
> and intentional.

So the only tool I know of that does full callchains is smatch. And in
one of my series I did prod Dan about this.

The alternative is that we bite the bullet and add a vmlinux objtool
pass. This keeps getting mentioned, so maybe it is time :/ I'd hate it,
because it will increase build time at the slowest point, but it'd get
us the coverage we need here.