Re: [PATCH v2] ftrace: Introduce PERMANENT ftrace_ops flag

From: Joe Lawrence
Date: Tue Oct 15 2019 - 10:58:06 EST


On Tue, Oct 15, 2019 at 01:23:10PM +0200, Miroslav Benes wrote:
> > Hi Miroslav,
> >
> > Maybe we should add a test to verify this new behavior? See sample
> > version below (lightly tested). We can add to this one, or patch
> > seperately if you prefer.
>
> Thanks a lot, Joe. It looks nice. I'll include it in v3. One question
> below.
>
> [ ... snip ... ]
>
> Shouldn't we call push_ftrace_enabled() somewhere at the beginning of the
> test script? set_dynamic_debug() calls its push_dynamic_debug() directly,
> but set_ftrace_enabled() is different, because it is called more than once
> in the script.
>
> One could argue that ftrace_enabled has to be true at the beginning of
> testing anyway, but I think it would be cleaner. Btw, we should probably
> guarantee that ftrace_enabled is true when livepatch selftests are
> invoked.
>

Here's a new version that combines the ftrace_enabled configuration with
the debugfs stuff (so its only pushed/pop once per test) and updates all
the tests accordingly. Feel free to any tweaks or flourishes when
adding to v3.

Thanks,

-- Joe

-->8-- -->8-- -->8-- -->8-- -->8-- -->8-- -->8-- -->8-- -->8-- -->8--