Jiri Olsa
eda1e32855
tracing: handle broken names in ftrace filter
...
If one filter item (for set_ftrace_filter and set_ftrace_notrace) is being
setup by more than 1 consecutive writes (FTRACE_ITER_CONT flag), it won't
be handled corretly.
I used following program to test/verify:
[snip]
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <string.h>
int main(int argc, char **argv)
{
int fd, i;
char *file = argv[1];
if (-1 == (fd = open(file, O_WRONLY))) {
perror("open failed");
return -1;
}
for(i = 0; i < (argc - 2); i++) {
int len = strlen(argv[2+i]);
int cnt, off = 0;
while(len) {
cnt = write(fd, argv[2+i] + off, len);
len -= cnt;
off += cnt;
}
}
close(fd);
return 0;
}
[snip]
before change:
sh-4.0# echo > ./set_ftrace_filter
sh-4.0# /test ./set_ftrace_filter "sys" "_open "
sh-4.0# cat ./set_ftrace_filter
#### all functions enabled ####
sh-4.0#
after change:
sh-4.0# echo > ./set_ftrace_notrace
sh-4.0# test ./set_ftrace_notrace "sys" "_open "
sh-4.0# cat ./set_ftrace_notrace
sys_open
sh-4.0#
Signed-off-by: Jiri Olsa <jolsa@redhat.com>
LKML-Reference: <20090811152904.GA26065@jolsa.lab.eng.brq.redhat.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2009-08-18 20:39:48 -04:00
..
2009-08-12 18:50:08 +02:00
2009-08-18 20:39:48 -04:00
2009-06-29 10:22:10 +02:00
2009-06-15 11:36:42 -04:00
2009-06-09 12:34:23 -04:00
2009-06-17 17:01:09 -04:00
2009-08-07 12:46:39 -04:00
2009-04-07 14:43:06 +02:00
2009-05-07 11:17:34 +02:00
2009-03-22 18:16:54 +01:00
2009-08-06 06:26:09 +02:00
2009-06-26 20:48:40 +02:00
2009-08-08 17:56:13 +02:00
2009-08-06 06:26:09 +02:00
2009-04-29 14:06:03 +02:00
2009-07-28 23:17:23 +02:00
2009-07-16 23:34:32 -04:00
2009-05-07 13:36:22 +02:00
2009-03-04 22:15:30 -05:00
2009-04-07 14:43:06 +02:00
2009-03-23 09:22:15 +01:00
2009-07-02 08:51:13 +02:00
2009-06-09 17:29:07 -04:00
2009-05-07 11:17:34 +02:00
2009-07-23 10:07:17 -04:00
2009-04-14 22:05:43 -04:00
2009-04-23 23:01:36 -04:00
2008-05-23 21:13:23 +02:00
2009-04-07 13:36:21 +02:00
2009-07-23 09:52:09 -04:00
2009-07-23 09:53:55 -04:00
2009-03-24 23:22:58 -04:00
2009-04-09 05:43:32 +02:00
2009-06-15 10:06:19 -07:00
2009-06-02 01:14:26 +02:00
2009-08-18 02:07:04 +02:00
2009-08-09 12:53:48 +02:00