summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorCong Wang <xiyou.wangcong@gmail.com>2019-05-25 09:58:00 -0700
committerSteven Rostedt (VMware) <rostedt@goodmis.org>2019-07-16 15:14:48 -0400
commit5967bd5c4239be449744a1471daf60c866486c24 (patch)
tree21749fc55df7a96e7154575356bbed9fa4f231b4 /kernel
parent46710f3a34b592ac5c51a95f696b2d2a2a0d9419 (diff)
downloadlinux-5967bd5c4239be449744a1471daf60c866486c24.tar.bz2
tracing: Let filter_assign_type() detect FILTER_PTR_STRING
filter_assign_type() could detect dynamic string and static string, but not string pointers. Teach filter_assign_type() to detect string pointers, and this will be needed by trace event injection code. BTW, trace event hist uses FILTER_PTR_STRING too. Link: http://lkml.kernel.org/r/20190525165802.25944-3-xiyou.wangcong@gmail.com Cc: Ingo Molnar <mingo@redhat.com> Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com> Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/trace/trace_events_filter.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/kernel/trace/trace_events_filter.c b/kernel/trace/trace_events_filter.c
index d3e59312ef40..550e8a0d048a 100644
--- a/kernel/trace/trace_events_filter.c
+++ b/kernel/trace/trace_events_filter.c
@@ -1080,6 +1080,9 @@ int filter_assign_type(const char *type)
if (strchr(type, '[') && strstr(type, "char"))
return FILTER_STATIC_STRING;
+ if (strcmp(type, "char *") == 0 || strcmp(type, "const char *") == 0)
+ return FILTER_PTR_STRING;
+
return FILTER_OTHER;
}