Skip to content

Commit 5967bd5

Browse files
congwangrostedt
authored andcommitted
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/[email protected] Cc: Ingo Molnar <[email protected]> Signed-off-by: Cong Wang <[email protected]> Signed-off-by: Steven Rostedt (VMware) <[email protected]>
1 parent 46710f3 commit 5967bd5

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

kernel/trace/trace_events_filter.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1080,6 +1080,9 @@ int filter_assign_type(const char *type)
10801080
if (strchr(type, '[') && strstr(type, "char"))
10811081
return FILTER_STATIC_STRING;
10821082

1083+
if (strcmp(type, "char *") == 0 || strcmp(type, "const char *") == 0)
1084+
return FILTER_PTR_STRING;
1085+
10831086
return FILTER_OTHER;
10841087
}
10851088

0 commit comments

Comments
 (0)