Re: [RFC PATCH bpf-next v3 1/2] ftrace: deprecate disabling via ftrace_enabled sysctl

Song Liu <[email protected]>
Newsgroups org.kernel.vger.live-patching,org.kernel.vger.bpf,org.kernel.vger.linux-trace-kernel,org.kernel.vger.stable
Message-ID <CAPhsuW53yRgFMkNuAPCrCm9fhNNb4EpN7vbcSEGkNCZXHjk7AA@mail.gmail.com>
On Thu, Aug 6, 2026 at 8:30 AM Andrey Grodzovsky
<[email protected]> wrote:
>
> Writing 0 to kernel.ftrace_enabled has not reliably disabled ftrace
> for years (FTRACE_OPS_FL_PERMANENT users already block it, and more
> callers rely on ftrace always being on). Refuse the write instead of
> leaving it in an inconsistent "disables some, not all" state: return
> -EOPNOTSUPP and log a message. Reads and enabling (writing 1) are
> unaffected.
>
> Update the docs to note the deprecation up front.
>
> Suggested-by: Steven Rostedt <[email protected]>
> Signed-off-by: Andrey Grodzovsky <[email protected]>

Sashiko's comments make sense. Other than those:

Acked-by: Song Liu <[email protected]>

> ---
>  Documentation/trace/ftrace.rst |  5 ++++
>  kernel/trace/ftrace.c          | 43 +++++-----------------------------
>  2 files changed, 11 insertions(+), 37 deletions(-)
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.