From: "Frédéric Weisbecker" <fweisbec@gmail.com>
To: Li Zefan <lizf@cn.fujitsu.com>
Cc: Steven Rostedt <rostedt@goodmis.org>, Ingo Molnar <mingo@elte.hu>,
Tom Zanussi <tzanussi@gmail.com>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/2] tracing/filters: strloc should be unsigned short
Date: Fri, 29 May 2009 15:28:20 +0200 [thread overview]
Message-ID: <c62985530905290628y3e203defrc00835d3d7596aed@mail.gmail.com> (raw)
In-Reply-To: <4A1F9FA6.3030906@cn.fujitsu.com>
2009/5/29 Li Zefan <lizf@cn.fujitsu.com>:
> I forgot to update filter code accordingly in
> "tracing/events: change the type of __str_loc_item to unsigned short"
> (commt b0aae68cc5508f3c2fbf728988c954db4c8b8a53)
>
> It can cause system crash:
>
> # echo 1 > tracing/events/irq/irq_handler_entry/enable
> # echo 'name == eth0' > /mnt/tracing/events/irq/irq_handler_entry/filter
>
> [ Impact: fix system crash while filtering on __string() field ]
>
> Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
> ---
> kernel/trace/trace_events_filter.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/kernel/trace/trace_events_filter.c b/kernel/trace/trace_events_filter.c
> index a7430b1..a854eed 100644
> --- a/kernel/trace/trace_events_filter.c
> +++ b/kernel/trace/trace_events_filter.c
> @@ -178,7 +178,7 @@ static int filter_pred_string(struct filter_pred *pred, void *event,
> static int filter_pred_strloc(struct filter_pred *pred, void *event,
> int val1, int val2)
> {
> - int str_loc = *(int *)(event + pred->offset);
> + unsigned short str_loc = *(unsigned short *)(event + pred->offset);
Ouch, indeed :-)
I will apply this one and send it to Ingo, thanks!
> char *addr = (char *)(event + str_loc);
> int cmp, match;
>
> --
> 1.5.4.rc3
>
>
prev parent reply other threads:[~2009-05-29 13:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-29 8:41 Li Zefan
2009-05-29 13:28 ` Frédéric Weisbecker [this message]
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=c62985530905290628y3e203defrc00835d3d7596aed@mail.gmail.com \
--to=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lizf@cn.fujitsu.com \
--cc=mingo@elte.hu \
--cc=rostedt@goodmis.org \
--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
all inboxes | Powered by JetHome®