Patch "ftrace: Fix breakage of set_ftrace_pid" has been added to the 4.1-stable tree
Subsystems (3)
This is a note to let you know that I've just added the patch titled
ftrace: Fix breakage of set_ftrace_pid
to the 4.1-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
ftrace-fix-breakage-of-set_ftrace_pid.patch
and it can be found in the queue-4.1 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
e3eea1404f5ff7a2ceb7b5e7ba412a6fd94f2935Mon Sep 17 00:00:00 2001
From: "Steven Rostedt (Red Hat)" <[email protected]>
Date: Fri, 24 Jul 2015 10:38:12 -0400
Subject: ftrace: Fix breakage of set_ftrace_pid
From: "Steven Rostedt (Red Hat)" <[email protected]>
commit e3eea1404f5ff7a2ceb7b5e7ba412a6fd94f2935 upstream.
Commit 4104d326b670 ("ftrace: Remove global function list and call function directly") simplified the ftrace code by removing the global_ops list with a new design. But this cleanup also broke the filtering of PIDs that are added to the set_ftrace_pid file.
Add back the proper hooks to have pid filtering working once again.
--- include/linux/ftrace.h | 3 ++ kernel/trace/ftrace.c | 52 ++++++++++++++++++++++++++++++++----------------- 2 files changed, 37 insertions(+), 18 deletions(-)
include/linux/ftrace.h +3 -0
@@ -116,6 +116,7 @@ ftrace_func_t ftrace_ops_get_func(struct* SAVE_REGS. If another ops with this flag set is already registered * for any of the functions that this ops will be registered for, then * this ops will fail to register or set_filter_ip. +* PID - Is affected by set_ftrace_pid (allows filtering on those pids) */ enum {FTRACE_OPS_FL_ENABLED =1 <<0 ,
@@ -132,6 +133,7 @@ enum {FTRACE_OPS_FL_MODIFYING =1 <<11 ,FTRACE_OPS_FL_ALLOC_TRAMP =1 <<12 ,FTRACE_OPS_FL_IPMODIFY =1 <<13 , + FTRACE_OPS_FL_PID = 1 << 14, };#ifdef CONFIG_DYNAMIC_FTRACE
@@ -159,6 +161,7 @@ struct ftrace_ops {struct ftrace_ops *next;unsigned long flags;void *private; +ftrace_func_t saved_func;int __percpu *disabled;#ifdef CONFIG_DYNAMIC_FTRACE int nr_trampolines;
kernel/trace/ftrace.c +34 -18
127 lines not on this page · raw message
Patches currently in stable-queue which might be from [email protected] are
queue-4.1/ftrace-fix-breakage-of-set_ftrace_pid.patch