* Patch "bus: arm-ccn: Do not attempt to configure XPs for cycle counter" has been added to the 4.4-stable tree
@ 2016-09-22 13:41 gregkh
0 siblings, 0 replies; only message in thread
From: gregkh @ 2016-09-22 13:41 UTC (permalink / raw)
To: pawel.moll, gregkh, mark.rutland; +Cc: stable, stable-commits
This is a note to let you know that I've just added the patch titled
bus: arm-ccn: Do not attempt to configure XPs for cycle counter
to the 4.4-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
bus-arm-ccn-do-not-attempt-to-configure-xps-for-cycle-counter.patch
and it can be found in the queue-4.4 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
>From b7c1beb278e8e3dc664ed3df3fc786db126120a9 Mon Sep 17 00:00:00 2001
From: Pawel Moll <pawel.moll@arm.com>
Date: Fri, 5 Aug 2016 15:07:10 +0100
Subject: bus: arm-ccn: Do not attempt to configure XPs for cycle counter
From: Pawel Moll <pawel.moll@arm.com>
commit b7c1beb278e8e3dc664ed3df3fc786db126120a9 upstream.
Fuzzing the CCN perf driver revealed a small but definitely dangerous
mistake in the event setup code. When a cycle counter is requested, the
driver should not reconfigure the events bus at all, otherwise it will
corrupt (in most but the simplest cases) its configuration and may end
up accessing XP array out of its bounds and corrupting control
registers.
Reported-by: Mark Rutland <mark.rutland@arm.com>
Reviewed-by: Mark Rutland <mark.rutland@arm.com>
Tested-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Pawel Moll <pawel.moll@arm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/bus/arm-ccn.c | 4 ++++
1 file changed, 4 insertions(+)
--- a/drivers/bus/arm-ccn.c
+++ b/drivers/bus/arm-ccn.c
@@ -895,6 +895,10 @@ static void arm_ccn_pmu_xp_dt_config(str
struct arm_ccn_component *xp;
u32 val, dt_cfg;
+ /* Nothing to do for cycle counter */
+ if (hw->idx == CCN_IDX_PMU_CYCLE_COUNTER)
+ return;
+
if (CCN_CONFIG_TYPE(event->attr.config) == CCN_TYPE_XP)
xp = &ccn->xp[CCN_CONFIG_XP(event->attr.config)];
else
Patches currently in stable-queue which might be from pawel.moll@arm.com are
queue-4.4/bus-arm-ccn-fix-xp-watchpoint-settings-bitmask.patch
queue-4.4/bus-arm-ccn-do-not-attempt-to-configure-xps-for-cycle-counter.patch
queue-4.4/bus-arm-ccn-fix-pmu-handling-of-mn.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2016-09-22 13:42 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-22 13:41 Patch "bus: arm-ccn: Do not attempt to configure XPs for cycle counter" has been added to the 4.4-stable tree gregkh
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).