From: Namhyung Kim <namhyung@kernel.org>
To: linux-kernel@vger.kernel.org,
Hannes Frederic Sowa <hannes@stressinduktion.org>
Cc: a.p.zijlstra@chello.nl, paulus@samba.org, mingo@redhat.com,
acme@ghostprotocols.net, hyc.lee@gmail.com
Subject: Re: [PATCH] [perf] convert_variable_type does not correctly check type of arrays
Date: Wed, 07 Nov 2012 16:46:30 +0900 [thread overview]
Message-ID: <87bof9onxl.fsf@sejong.aot.lge.com> (raw)
In-Reply-To: <20121105224916.GA15530@order.stressinduktion.org> (Hannes Frederic Sowa's message of "Mon, 5 Nov 2012 23:49:16 +0100")
Hi Hannes,
On Mon, 5 Nov 2012 23:49:16 +0100, Hannes Frederic Sowa wrote:
> While casting an array of (unsigned) chars to a string, perf does not
> check the containing type but only the opaque type and is bailing out:
>
> $ perf probe -v -a 'neigh_destroy:22 dev->name:string'
> probe-definition(0): neigh_destroy:22 dev->name:string
> symbol:neigh_destroy file:(null) line:22 offset:0 return:0 lazy:(null)
> parsing arg: dev->name:string into type:string dev, name(1)
> 1 arguments
> Use vmlinux: /home/hannes/linux/vmlinux
> Using /home/hannes/linux/vmlinux for symbols
> Probe point found: neigh_destroy+115
> Searching 'dev' variable in context.
> Converting variable dev into trace event.
> converting name in dev
> name type is (null).
> Failed to cast into string: name is not (unsigned) char *.
> Failed to find 'dev' in this function.
> An error occurred in debuginfo analysis (-22).
> Error: Failed to add events. (-22)
>
> After the code flow ensures that type could only be a pointer or
> array type, call die_get_real_type unconditionally again to fetch the
> containing type and have further validation been done on that Die.
Hyeoncheol posted a same fix before, but not merged yet, Arnaldo?
https://lkml.org/lkml/2012/9/20/3
Thanks,
Namhyung
prev parent reply other threads:[~2012-11-07 7:46 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-05 22:49 [PATCH] [perf] convert_variable_type does not correctly check type of arrays Hannes Frederic Sowa
2012-11-07 7:46 ` Namhyung Kim [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=87bof9onxl.fsf@sejong.aot.lge.com \
--to=namhyung@kernel.org \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@ghostprotocols.net \
--cc=hannes@stressinduktion.org \
--cc=hyc.lee@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=paulus@samba.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