live-patching.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] ftrace: Introduce PERMANENT ftrace_ops flag
@ 2019-10-07  8:17 Miroslav Benes
  2019-10-07  8:17 ` [PATCH 1/3] ftrace: Make test_rec_ops_needs_regs() generic Miroslav Benes
                   ` (3 more replies)
  0 siblings, 4 replies; 15+ messages in thread
From: Miroslav Benes @ 2019-10-07  8:17 UTC (permalink / raw)
  To: rostedt, mingo, jpoimboe, jikos, pmladek, joe.lawrence
  Cc: linux-kernel, live-patching, Miroslav Benes

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 problem per se, because only administrator can set sysctl
values, but it still may be surprising.

Introduce PERMANENT ftrace_ops flag to amend this. If the
FTRACE_OPS_FL_PERMANENT is set, the tracing of the function is not
disabled. Such ftrace_ops can still be unregistered in a standard way.

The patch set passes ftrace and livepatch kselftests.

Miroslav Benes (3):
  ftrace: Make test_rec_ops_needs_regs() generic
  ftrace: Introduce PERMANENT ftrace_ops flag
  livepatch: Use FTRACE_OPS_FL_PERMANENT

 Documentation/trace/ftrace-uses.rst |  6 ++++
 Documentation/trace/ftrace.rst      |  2 ++
 include/linux/ftrace.h              |  8 +++--
 kernel/livepatch/patch.c            |  3 +-
 kernel/trace/ftrace.c               | 47 ++++++++++++++++++++++++-----
 5 files changed, 55 insertions(+), 11 deletions(-)

-- 
2.23.0


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2019-10-10 13:50 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-07  8:17 [PATCH 0/3] ftrace: Introduce PERMANENT ftrace_ops flag Miroslav Benes
2019-10-07  8:17 ` [PATCH 1/3] ftrace: Make test_rec_ops_needs_regs() generic Miroslav Benes
2019-10-07  8:17 ` [PATCH 2/3] ftrace: Introduce PERMANENT ftrace_ops flag Miroslav Benes
2019-10-07  8:17 ` [PATCH 3/3] livepatch: Use FTRACE_OPS_FL_PERMANENT Miroslav Benes
2019-10-08 19:35 ` [PATCH 0/3] ftrace: Introduce PERMANENT ftrace_ops flag Joe Lawrence
2019-10-08 19:50   ` Steven Rostedt
2019-10-09 10:33     ` Miroslav Benes
2019-10-09 11:22   ` Petr Mladek
2019-10-09 14:23     ` Joe Lawrence
2019-10-09 14:26     ` Steven Rostedt
2019-10-10  8:50       ` Petr Mladek
2019-10-10 13:14         ` Steven Rostedt
2019-10-10 13:38           ` Miroslav Benes
2019-10-10 13:43             ` Steven Rostedt
2019-10-10 13:44               ` Steven Rostedt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).