Re: [PATCH 0/3] ftrace: Introduce PERMANENT ftrace_ops flag

2019-10-10 Thread Steven Rostedt
On Thu, 10 Oct 2019 15:38:20 +0200 (CEST) Miroslav Benes wrote: > On Thu, 10 Oct 2019, Steven Rostedt wrote: > > > On Thu, 10 Oct 2019 10:50:35 +0200 > > Petr Mladek wrote: > > > > > It will make the flag unusable for other ftrace users. But it > > > will be already be the case when it can't

Re: [PATCH 0/3] ftrace: Introduce PERMANENT ftrace_ops flag

2019-10-10 Thread Steven Rostedt
On Thu, 10 Oct 2019 09:43:52 -0400 Steven Rostedt wrote: > > Yes, but let's still add the patch that does the permanent check. And > then I'll put the "remove this flag" patch on top (and revert > everything else). This way, if somebody complains, and Linus reverts > the removal patch, we don't

Re: [PATCH 0/3] ftrace: Introduce PERMANENT ftrace_ops flag

2019-10-10 Thread Miroslav Benes
On Thu, 10 Oct 2019, Steven Rostedt wrote: > On Thu, 10 Oct 2019 10:50:35 +0200 > Petr Mladek wrote: > > > It will make the flag unusable for other ftrace users. But it > > will be already be the case when it can't be disabled. > > Honestly, I hate that flag. Most people don't even know about i

Re: [PATCH 0/3] ftrace: Introduce PERMANENT ftrace_ops flag

2019-10-10 Thread Steven Rostedt
On Thu, 10 Oct 2019 10:50:35 +0200 Petr Mladek wrote: > It will make the flag unusable for other ftrace users. But it > will be already be the case when it can't be disabled. Honestly, I hate that flag. Most people don't even know about it. It was added in the beginning of ftrace as a way to sto

Re: [PATCH 0/3] ftrace: Introduce PERMANENT ftrace_ops flag

2019-10-10 Thread Petr Mladek
On Wed 2019-10-09 10:26:54, Steven Rostedt wrote: > Petr Mladek wrote: > I think Joe's approach is much easier to understand and implement. The > "ftrace_enabled" is a global flag, and affects all things ftrace (the > function bindings). What this patch was doing, was what you said. Make > ftrace_

Re: [PATCH 0/3] ftrace: Introduce PERMANENT ftrace_ops flag

2019-10-09 Thread Steven Rostedt
On Wed, 9 Oct 2019 13:22:34 +0200 Petr Mladek wrote: > > Hi Miroslav, > > > > I wonder if the opposite would be more intuitive: when ftrace_enabled is > > not set, don't allow livepatches to register ftrace filters and > > likewise, don't allow ftrace_enabled to be unset if any livepatches are >

Re: [PATCH 0/3] ftrace: Introduce PERMANENT ftrace_ops flag

2019-10-09 Thread Joe Lawrence
On Wed, Oct 09, 2019 at 01:22:34PM +0200, Petr Mladek wrote: > On Tue 2019-10-08 15:35:34, Joe Lawrence wrote: > > On Mon, Oct 07, 2019 at 10:17:11AM +0200, Miroslav Benes wrote: > > > Livepatch uses ftrace for redirection to new patched functions. It is > > > thus directly affected by ftrace sysct

Re: [PATCH 0/3] ftrace: Introduce PERMANENT ftrace_ops flag

2019-10-09 Thread Petr Mladek
On Tue 2019-10-08 15:35:34, Joe Lawrence wrote: > On Mon, Oct 07, 2019 at 10:17:11AM +0200, Miroslav Benes wrote: > > Livepatch uses ftrace for redirection to new patched functions. It is > > thus directly affected by ftrace sysctl knobs such as ftrace_enabled. > > Setting ftrace_enabled to 0 also

Re: [PATCH 0/3] ftrace: Introduce PERMANENT ftrace_ops flag

2019-10-09 Thread Miroslav Benes
On Tue, 8 Oct 2019, Steven Rostedt wrote: > On Tue, 8 Oct 2019 15:35:34 -0400 > Joe Lawrence wrote: > > > > > I wonder if the opposite would be more intuitive: when ftrace_enabled is > > not set, don't allow livepatches to register ftrace filters and > > likewise, don't allow ftrace_enabled to

Re: [PATCH 0/3] ftrace: Introduce PERMANENT ftrace_ops flag

2019-10-08 Thread Steven Rostedt
On Tue, 8 Oct 2019 15:35:34 -0400 Joe Lawrence wrote: > > I wonder if the opposite would be more intuitive: when ftrace_enabled is > not set, don't allow livepatches to register ftrace filters and > likewise, don't allow ftrace_enabled to be unset if any livepatches are > already registered. I

Re: [PATCH 0/3] ftrace: Introduce PERMANENT ftrace_ops flag

2019-10-08 Thread Joe Lawrence
On Mon, Oct 07, 2019 at 10:17:11AM +0200, Miroslav Benes wrote: > Livepatch uses ftrace for redirection to new patched functions. It is > thus directly affected by ftrace sysctl knobs such as ftrace_enabled. > Setting ftrace_enabled to 0 also disables all live patched functions. It > is not a probl