From: Steven Rostedt <rostedt@goodmis.org>
To: linux-kernel@vger.kernel.org
Cc: Ingo Molnar <mingo@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
Ingo Molnar <mingo@redhat.com>,
Cong Wang <xiyou.wangcong@gmail.com>
Subject: [for-next][PATCH 4/5] tracing: Let filter_assign_type() detect FILTER_PTR_STRING
Date: Tue, 16 Jul 2019 15:00:18 -0400 [thread overview]
Message-ID: <20190716190057.160953156@goodmis.org> (raw)
In-Reply-To: 20190716190014.840939538@goodmis.org
From: Cong Wang <xiyou.wangcong@gmail.com>
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>
---
kernel/trace/trace_events_filter.c | 3 +++
1 file changed, 3 insertions(+)
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;
}
--
2.20.1
next prev parent reply other threads:[~2019-07-16 19:01 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-16 19:00 [for-next][PATCH 0/5] tracing: last minute changes before pushing Steven Rostedt
2019-07-16 19:00 ` [for-next][PATCH 1/5] ftrace/selftests: Return the skip code when tracing directory not configured in kernel Steven Rostedt
2019-07-16 19:00 ` [for-next][PATCH 2/5] ftrace/selftest: Test if set_event/ftrace_pid exists before writing Steven Rostedt
2019-07-16 19:00 ` [for-next][PATCH 3/5] tracing: Pass type into tracing_generic_entry_update() Steven Rostedt
2019-07-16 19:00 ` Steven Rostedt [this message]
2019-07-16 19:00 ` [for-next][PATCH 5/5] tracing: Make trace_get_fields() global Steven Rostedt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190716190057.160953156@goodmis.org \
--to=rostedt@goodmis.org \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=mingo@redhat.com \
--cc=xiyou.wangcong@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.