From: Li Zefan <lizf@cn.fujitsu.com>
To: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>, LKML <linux-kernel@vger.kernel.org>,
Steven Rostedt <rostedt@goodmis.org>,
Lai Jiangshan <laijs@cn.fujitsu.com>,
Tom Zanussi <tzanussi@gmail.com>,
Thomas Gleixner <tglx@linutronix.de>,
Peter Zijlstra <peterz@infradead.org>
Subject: Re: [RFC][PATCH 5/5] tracing/filters: Provide support for char * pointers
Date: Mon, 03 Aug 2009 14:58:15 +0800 [thread overview]
Message-ID: <4A768A87.6090800@cn.fujitsu.com> (raw)
In-Reply-To: <1249111408-8657-6-git-send-email-fweisbec@gmail.com>
Frederic Weisbecker wrote:
> Provide support for char * pointers in the filtering framework.
> Usually, char * entries are dangerous in traces because the string
> can be released whereas a pointer to it can still wait to be read from
> the ring buffer. But sometimes we can assume it's safe, like in case
> of RO data (eg: __file__ or __line__, used in bkl trace event). If
> these RO data are in a module and so is the call to the trace event,
> then it's safe, because the ring buffer will be flushed once this
> module get unloaded.
>
The problem is we don't distinguish dangerous char * from
safe char *... They are both defined as:
__field(char *, str)
So for those dangerous ones, a string filter still can be applied,
which will dereference those pointers.
> Now the bkl events becomes more useful. Say that you want to trace
> only the bkl use in reiserfs:
>
> cd /debug/tracing/events/bkl/lock_kernel
> echo "file == fs/reiserfs*" > filter_regex
> cat /debug/tracing/trace
>
> syslogd-3658 [001] 1874.661878: lock_kernel: depth: 1, fs/reiserfs/super.c:563 reiserfs_dirty_inode()
> syslogd-3658 [001] 1874.662266: lock_kernel: depth: 0, fs/reiserfs/inode.c:2695 reiserfs_write_end()
> syslogd-3658 [001] 1874.662268: lock_kernel: depth: 1, fs/reiserfs/super.c:563 reiserfs_dirty_inode()
> syslogd-3658 [001] 1874.662291: lock_kernel: depth: 0, fs/reiserfs/inode.c:2695 reiserfs_write_end()
next prev parent reply other threads:[~2009-08-03 6:59 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-01 7:23 [RFC][GIT PULL] bkl ftrace events + filter regex support Frederic Weisbecker
2009-08-01 7:23 ` [RFC][PATCH 1/5] tracing/bkl: Add bkl ftrace events Frederic Weisbecker
2009-08-01 7:23 ` [RFC][PATCH 2/5] tracing/event: Cleanup the useless dentry variable Frederic Weisbecker
2009-08-01 7:23 ` [RFC][PATCH 3/5] tracing/filters: Cleanup useless headers Frederic Weisbecker
2009-08-03 5:19 ` Li Zefan
2009-08-05 22:30 ` Frederic Weisbecker
2009-08-01 7:23 ` [RFC][PATCH 4/5] tracing/filters: Provide basic regex support Frederic Weisbecker
2009-08-03 5:39 ` Li Zefan
2009-08-05 22:47 ` Frederic Weisbecker
2009-08-06 1:14 ` Li Zefan
2009-08-06 1:49 ` Frederic Weisbecker
2009-08-07 4:14 ` Tom Zanussi
2009-08-07 5:19 ` Frederic Weisbecker
2009-08-07 8:11 ` Peter Zijlstra
2009-08-01 7:23 ` [RFC][PATCH 5/5] tracing/filters: Provide support for char * pointers Frederic Weisbecker
2009-08-03 6:58 ` Li Zefan [this message]
2009-08-05 23:02 ` Frederic Weisbecker
2009-08-06 1:35 ` Li Zefan
2009-08-06 1:59 ` Frederic Weisbecker
2009-08-06 3:50 ` Li Zefan
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=4A768A87.6090800@cn.fujitsu.com \
--to=lizf@cn.fujitsu.com \
--cc=fweisbec@gmail.com \
--cc=laijs@cn.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
--cc=tzanussi@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox