Files
linux/Documentation/trace
Linus Torvalds 00d66b29a6 Merge tag 'ftrace-v7.3' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace
Pull ftrace updates from Steven Rostedt:

 - Deprecrate ftrace_enabled in disabling ftrace

   The file /proc/sys/kernel/ftrace_enabled was created when ftrace was
   first introduced back in 2008. It was to be a "kill switch" if
   something was to go wrong. It was also used as a way to turn off
   function tracing for the latency tracers that would have it on by
   default. But in 2013 (Linux 3.10) the option "function-trace" was
   introduced to disable function tracing for the latency tracers as the
   "ftrace_enabled" file was considered too big of a hammer and caused
   too many side effects.

   When live kernel patching came along, disabling ftrace via the
   ftrace_enabled file would put the system into an unstable state if a
   live kernel patch was installed. This created the need to mark some
   function hooks as "PERMANENT".

   Now there's a need for BPF usage marked as PERMANENT for the same
   reasons.

   The file "ftrace_enabled" usage is no longer viable. It doesn't do
   what it says it does and there is no reason to use it.

   Make writing '0' to it a nop and print a message saying its usage is
   deprecated. The return value of writing '0' is -EOPNOTSUPP so that
   user space will error on that write (hopefully to inform any
   developer that it no longer works).

   Eventually the file should be removed completely, but for now just
   making it not do anything is the path forward to that.

 - Update the livepatch tests to handle ftrace_enabled being disabled

   Because in the past, livepatch was broken by ftrace_enabled being
   turned off, there's a test case that checks to make sure it still
   doesn't break. But having the write of '0' return an error caused
   that test to break. Updated the test to handle the new change.

* tag 'ftrace-v7.3' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace:
  selftests/livepatch: update test-ftrace.sh for deprecated ftrace_enabled
  ftrace: deprecate disabling via ftrace_enabled sysctl
2026-08-19 14:01:58 -07:00
..
2023-08-18 11:29:03 -06:00
2020-08-11 10:22:15 -06:00
2023-08-18 11:29:03 -06:00