mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: David Daney <ddaney@caviumnetworks.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] trace-cmd: Don't SIGSEGV when event field format cannot be parsed (v2).
Date: Fri, 23 Jul 2010 11:10:38 -0400	[thread overview]
Message-ID: <1279897838.3319.51.camel@gandalf.stny.rr.com> (raw)
In-Reply-To: <1279832705-14219-1-git-send-email-ddaney@caviumnetworks.com>

On Thu, 2010-07-22 at 14:05 -0700, David Daney wrote:
> >From the MIPS kernel we get things like:
> 
> print fmt: "page=%p pfn=%lu order=%d migratetype=%d", REC->page, ({ struct page *__pg = (REC->page); int __sec = page_to_section(__pg); (unsigned long)(__pg - __section_mem_map_addr(__nr_to_section(__sec))); }), REC->order, REC->migratetype
> 
> This cannot be parsed, leading to a NULL struct event_format* being
> passed to pevent_get_common_field_val, which produces a SIGSEGV.  It
> would be good to get a parsable format from the kernel, but to
> remediate the problem for legacy kernels, we can just return an error
> indicator in this case.  This allows some output from trace-cmd
> report, although perhaps with some missing data.  But this is better
> than crashing.
> 
> (v2): Do the check in all pevent_get_*
> 
> Signed-off-by: David Daney <ddaney@caviumnetworks.com>

Applied, thanks David!

-- Steve



      reply	other threads:[~2010-07-23 15:10 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-13 18:44 [PATCH] trace-cmd: Don't SIGSEGV when event field format cannot be parsed David Daney
2010-07-22 20:08 ` Steven Rostedt
2010-07-22 21:05   ` [PATCH] trace-cmd: Don't SIGSEGV when event field format cannot be parsed (v2) David Daney
2010-07-23 15:10     ` Steven Rostedt [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=1279897838.3319.51.camel@gandalf.stny.rr.com \
    --to=rostedt@goodmis.org \
    --cc=ddaney@caviumnetworks.com \
    --cc=linux-kernel@vger.kernel.org \
    /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®