[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20191007081714.20259-1-mbenes@suse.cz>
Date: Mon, 7 Oct 2019 10:17:11 +0200
From: Miroslav Benes <mbenes@...e.cz>
To: rostedt@...dmis.org, mingo@...hat.com, jpoimboe@...hat.com,
jikos@...nel.org, pmladek@...e.com, joe.lawrence@...hat.com
Cc: linux-kernel@...r.kernel.org, live-patching@...r.kernel.org,
Miroslav Benes <mbenes@...e.cz>
Subject: [PATCH 0/3] ftrace: Introduce PERMANENT ftrace_ops flag
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
Powered by blists - more mailing lists