From: Yang Jihong <yangjihong1@huawei.com>
To: Namhyung Kim <namhyung@kernel.org>
Cc: <peterz@infradead.org>, <mingo@redhat.com>, <acme@kernel.org>,
<mark.rutland@arm.com>, <alexander.shishkin@linux.intel.com>,
<jolsa@kernel.org>, <irogers@google.com>,
<adrian.hunter@intel.com>, <linux-perf-users@vger.kernel.org>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] perf jevents: Fix segfault in perf_pmu__find_events_table
Date: Tue, 19 Sep 2023 09:50:09 +0800 [thread overview]
Message-ID: <10d67fbc-49b2-25ff-6d02-e13d6a22bced@huawei.com> (raw)
In-Reply-To: <CAM9d7cjCwykJ+9oB_u1cP+qgLNbwUCFhR31iK9rfjfSFxs13fg@mail.gmail.com>
Hello,
On 2023/9/19 7:55, Namhyung Kim wrote:
> Hello,
>
> On Sun, Sep 17, 2023 at 8:05 PM Yang Jihong <yangjihong1@huawei.com> wrote:
>>
>> Before caching the JSON events table, perf_pmu__find_events_table() need
>> to check whether table is empty.
>>
>> For example, AuthenticAMD-15-6B-1 is used. The matching events table cannot
>> be found. As a result, a null pointer is accessed when caching JSON events
>> table, causing segfault.
>>
>> Before:
>> # perf record -vv true
>> DEBUGINFOD_URLS=
>> Using CPUID AuthenticAMD-15-6B-1
>> Segmentation fault (core dumped)
>>
>> After:
>> # perf record -vv true
>> DEBUGINFOD_URLS=
>> Using CPUID AuthenticAMD-15-6B-1
>> <SNIP>
>> [ perf record: Woken up 1 times to write data ]
>> [ perf record: Captured and wrote 0.005 MB perf.data ]
>>
>> Fixes: 7c52f10c0d4d ("perf pmu: Cache JSON events table")
>> Signed-off-by: Yang Jihong <yangjihong1@huawei.com>
>
> Thanks for the fix but please see
>
> https://lore.kernel.org/all/20230913125157.2790375-1-tmricht@linux.ibm.com/
>
Uh.. no notice that there is already a fix, please ignore it.
Thanks,
Yang
prev parent reply other threads:[~2023-09-19 1:50 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-18 3:03 Yang Jihong
2023-09-18 23:55 ` Namhyung Kim
2023-09-19 1:50 ` Yang Jihong [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=10d67fbc-49b2-25ff-6d02-e13d6a22bced@huawei.com \
--to=yangjihong1@huawei.com \
--cc=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=irogers@google.com \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.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®