From: Michael Ellerman <patch-notifications@ellerman.id.au>
To: Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com>
Cc: maddy@linux.vnet.ibm.com, linux-kernel@vger.kernel.org,
Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com>,
paulus@samba.org, kan.liang@intel.com, tglx@linutronix.de,
sukadev@linux.vnet.ibm.com, linuxppc-dev@lists.ozlabs.org
Subject: Re: powerpc/perf: Fix oops when grouping different pmu events
Date: Wed, 6 Dec 2017 23:59:59 +1100 (AEDT) [thread overview]
Message-ID: <3ysJcJ3ygHz9sRV@ozlabs.org> (raw)
In-Reply-To: <20171130083322.31206-1-ravi.bangoria@linux.vnet.ibm.com>
On Thu, 2017-11-30 at 08:33:22 UTC, Ravi Bangoria wrote:
> When user tries to group imc (In-Memory Collections) event with
> normal event, (sometime) kernel crashes with following log:
>
> Faulting instruction address: 0x00000000
> [link register ] c00000000010ce88 power_check_constraints+0x128/0x980
> ...
> c00000000010e238 power_pmu_event_init+0x268/0x6f0
> c0000000002dc60c perf_try_init_event+0xdc/0x1a0
> c0000000002dce88 perf_event_alloc+0x7b8/0xac0
> c0000000002e92e0 SyS_perf_event_open+0x530/0xda0
> c00000000000b004 system_call+0x38/0xe0
>
> 'event_base' field of 'struct hw_perf_event' is used as flags for
> normal hw events and used as memory address for imc events. While
> grouping these two types of events, collect_events() tries to
> interpret imc 'event_base' as a flag, which causes a corruption
> resulting in a crash.
>
> Consider only those events which belongs to 'perf_hw_context' in
> collect_events().
>
> Signed-off-by: Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com>
> Reviewed-By: Madhavan Srinivasan <maddy@linux.vnet.ibm.com>
Applied to powerpc fixes, thanks.
https://git.kernel.org/powerpc/c/5aa04b3eb6fca63d2e9827be656dca
cheers
prev parent reply other threads:[~2017-12-06 13:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-30 8:33 [PATCH] powerpc/perf: Fix oops when grouping different pmu events Ravi Bangoria
2017-12-01 5:05 ` Madhavan Srinivasan
2017-12-06 12:59 ` Michael Ellerman [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=3ysJcJ3ygHz9sRV@ozlabs.org \
--to=patch-notifications@ellerman.id.au \
--cc=kan.liang@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=maddy@linux.vnet.ibm.com \
--cc=paulus@samba.org \
--cc=ravi.bangoria@linux.vnet.ibm.com \
--cc=sukadev@linux.vnet.ibm.com \
--cc=tglx@linutronix.de \
/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;
as well as URLs for NNTP newsgroup(s).