From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Wang Nan <wangnan0@huawei.com>
Cc: jolsa@kernel.org, dsahern@gmail.com, paulus@samba.org,
a.p.zijlstra@chello.nl, lizefan@huawei.com,
linux-kernel@vger.kernel.org, mingo@kernel.org
Subject: Re: [PATCH] perf: probe: avoid segfault if passed with ''.
Date: Wed, 29 Apr 2015 19:23:33 -0300 [thread overview]
Message-ID: <20150429222333.GE29633@kernel.org> (raw)
In-Reply-To: <1430210769-94177-1-git-send-email-wangnan0@huawei.com>
Em Tue, Apr 28, 2015 at 08:46:09AM +0000, Wang Nan escreveu:
> Since parse_perf_probe_point() deals with a user passed argument, we
> should not assume it to be a valid string.
>
> Without this patch, if pass '' to perf probe, a segfault raises:
>
> $ perf probe -a ''
> Segmentation fault
>
> This patch checks argument of parse_perf_probe_point() before
> string processing.
>
> After this patch:
>
> $ perf probe -a ''
>
> usage: perf probe [<options>] 'PROBEDEF' ['PROBEDEF' ...]
> or: perf probe [<options>] --add 'PROBEDEF' [--add 'PROBEDEF' ...]
> ...
Thanks, applied to perf/urgent.
- Arnaldo
next prev parent reply other threads:[~2015-05-04 20:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-28 8:46 [PATCH] perf: probe: avoid segfault if passed with '' Wang Nan
2015-04-29 22:23 ` Arnaldo Carvalho de Melo [this message]
2015-05-06 4:36 ` [tip:perf/urgent] perf probe: Fix " tip-bot for Wang Nan
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=20150429222333.GE29633@kernel.org \
--to=acme@kernel.org \
--cc=a.p.zijlstra@chello.nl \
--cc=dsahern@gmail.com \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lizefan@huawei.com \
--cc=mingo@kernel.org \
--cc=paulus@samba.org \
--cc=wangnan0@huawei.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.