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,
kamalesh@linux.vnet.ibm.com, paulus@samba.org,
kan.liang@intel.com,
Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com>,
tglx@linutronix.de, linuxppc-dev@lists.ozlabs.org,
naveen.n.rao@linux.vnet.ibm.com
Subject: Re: powerpc/perf: Dereference bhrb entries safely
Date: Fri, 22 Dec 2017 15:43:22 +1100 (AEDT) [thread overview]
Message-ID: <3z2wqt3rg6z9s7g@ozlabs.org> (raw)
In-Reply-To: <20171212122915.20338-1-ravi.bangoria@linux.vnet.ibm.com>
On Tue, 2017-12-12 at 12:29:15 UTC, Ravi Bangoria wrote:
> It may very well happen that branch instructions recorded by
> bhrb entries already get unmapped before they get processed by
> the kernel. Hence, trying to dereference such memory location
> will endup in a crash. Ex,
>
> Unable to handle kernel paging request for data at address 0xc008000019c41764
> Faulting instruction address: 0xc000000000084a14
> NIP [c000000000084a14] branch_target+0x4/0x70
> LR [c0000000000eb828] record_and_restart+0x568/0x5c0
> Call Trace:
> [c0000000000eb3b4] record_and_restart+0xf4/0x5c0 (unreliable)
> [c0000000000ec378] perf_event_interrupt+0x298/0x460
> [c000000000027964] performance_monitor_exception+0x54/0x70
> [c000000000009ba4] performance_monitor_common+0x114/0x120
>
> Fix this by deferefencing them safely.
>
> Suggested-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
> Signed-off-by: Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com>
> Reviewed-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
Applied to powerpc fixes, thanks.
https://git.kernel.org/powerpc/c/f41d84dddc66b164ac16acf3f584c2
cheers
prev parent reply other threads:[~2017-12-22 4:43 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-12 12:29 [PATCH] powerpc/perf: Dereference bhrb entries safely Ravi Bangoria
2017-12-12 15:39 ` Naveen N. Rao
2017-12-14 12:24 ` Balbir Singh
2017-12-19 7:23 ` Ravi Bangoria
2017-12-19 9:55 ` Balbir Singh
2017-12-19 10:23 ` Michael Ellerman
2017-12-22 4:43 ` 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=3z2wqt3rg6z9s7g@ozlabs.org \
--to=patch-notifications@ellerman.id.au \
--cc=kamalesh@linux.vnet.ibm.com \
--cc=kan.liang@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=maddy@linux.vnet.ibm.com \
--cc=naveen.n.rao@linux.vnet.ibm.com \
--cc=paulus@samba.org \
--cc=ravi.bangoria@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