]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
bus: arm-ccn: Do not attempt to configure XPs for cycle counter
authorPawel Moll <pawel.moll@arm.com>
Fri, 5 Aug 2016 14:07:10 +0000 (15:07 +0100)
committerPawel Moll <pawel.moll@arm.com>
Wed, 17 Aug 2016 09:48:58 +0000 (10:48 +0100)
commitb7c1beb278e8e3dc664ed3df3fc786db126120a9
tree4320aa67ee70f4962faee893d006e7487f33c81d
parent4e486cba285ff06a1f28f0fc2991dde1482d1dcf
bus: arm-ccn: Do not attempt to configure XPs for cycle counter

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>
Cc: stable@vger.kernel.org # 3.17+
Signed-off-by: Pawel Moll <pawel.moll@arm.com>
drivers/bus/arm-ccn.c