From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Li Huafei <lihuafei1@huawei.com>
Cc: mhiramat@kernel.org, namhyung@kernel.org, peterz@infradead.org,
mingo@redhat.com, mark.rutland@arm.com,
alexander.shishkin@linux.intel.com, jolsa@redhat.com,
srikar@linux.vnet.ibm.com, fche@redhat.com, Jianlin.Lv@arm.com,
linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org,
yangjihong1@huawei.com, zhangjinhao2@huawei.com
Subject: Re: [PATCH] perf probe: Fix null pointer dereference in convert_variable_location()
Date: Tue, 1 Jun 2021 10:23:52 -0300 [thread overview]
Message-ID: <YLY06O/Dk/2jpCB7@kernel.org> (raw)
In-Reply-To: <20210601092750.169601-1-lihuafei1@huawei.com>
Em Tue, Jun 01, 2021 at 05:27:50PM +0800, Li Huafei escreveu:
> If we just check whether the variable can be converted, 'tvar' should be
> a null pointer. However, the null pointer check is missing in the
> 'Constant value' execution path.
>
> The following cases can trigger this problem:
>
> $ cat test.c
> #include <stdio.h>
Thanks for providing the detailed analysis and test steps, I've
reproduced the problem before the patch and it now works with your
patch:
[acme@five tmp]$ sudo perf probe -x ./test main:6
Added new event:
probe_test:main_L6 (on main:6 in /tmp/test)
You can now use it in all perf tools, such as:
perf record -e probe_test:main_L6 -aR sleep 1
[acme@five tmp]$
Thanks, applied.
- Arnaldo
next prev parent reply other threads:[~2021-06-01 13:23 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-01 9:27 [PATCH] perf probe: Fix null pointer dereference in convert_variable_location() Li Huafei
2021-06-01 13:23 ` Arnaldo Carvalho de Melo [this message]
2021-06-01 23:45 ` Masami Hiramatsu
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=YLY06O/Dk/2jpCB7@kernel.org \
--to=acme@kernel.org \
--cc=Jianlin.Lv@arm.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=fche@redhat.com \
--cc=jolsa@redhat.com \
--cc=lihuafei1@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mhiramat@kernel.org \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.org \
--cc=srikar@linux.vnet.ibm.com \
--cc=yangjihong1@huawei.com \
--cc=zhangjinhao2@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.