public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] tracepoint: Allow livepatch module add trace event
@ 2022-11-02 16:02 Jianlin Lv
  2022-11-14 17:20 ` Steven Rostedt
  2022-11-14 17:23 ` Steven Rostedt
  0 siblings, 2 replies; 10+ messages in thread
From: Jianlin Lv @ 2022-11-02 16:02 UTC (permalink / raw)
  To: rostedt, alison.schofield, davidgow, thunder.leizhen
  Cc: iecedge, jianlv, linux-kernel

In the case of keeping the system running, the preferred method for
tracing the kernel is dynamic tracing (kprobe), but the drawback of
this method is that events are lost, especially when tracing packages
in the network stack.

Livepatching provides a potential solution, which is to reimplement the
function you want to replace and insert a static tracepoint.
In such a way, custom stable static tracepoints can be expanded without
rebooting the system.

Signed-off-by: Jianlin Lv <iecedge@gmail.com>
---
 kernel/tracepoint.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/kernel/tracepoint.c b/kernel/tracepoint.c
index f23144af5743..8d1507dd0724 100644
--- a/kernel/tracepoint.c
+++ b/kernel/tracepoint.c
@@ -571,8 +571,8 @@ static void for_each_tracepoint_range(
 bool trace_module_has_bad_taint(struct module *mod)
 {
 	return mod->taints & ~((1 << TAINT_OOT_MODULE) | (1 << TAINT_CRAP) |
-			       (1 << TAINT_UNSIGNED_MODULE) |
-			       (1 << TAINT_TEST));
+				(1 << TAINT_UNSIGNED_MODULE) | (1 << TAINT_TEST) |
+				(1 << TAINT_LIVEPATCH));
 }
 
 static BLOCKING_NOTIFIER_HEAD(tracepoint_notify_list);
-- 
2.25.1


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

end of thread, other threads:[~2023-02-17  1:48 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-02 16:02 [PATCH] tracepoint: Allow livepatch module add trace event Jianlin Lv
2022-11-14 17:20 ` Steven Rostedt
2022-11-14 17:23 ` Steven Rostedt
2022-11-15  2:38   ` Jianlin Lv
2022-11-15  3:02     ` Steven Rostedt
2022-11-15 15:07       ` Masami Hiramatsu
2022-11-15 15:18         ` Steven Rostedt
2022-12-23  4:52           ` Jianlin Lv
2022-12-23  5:08             ` Steven Rostedt
2023-02-17  1:47               ` Steven Rostedt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox