powerpc/perf: Check that events only include valid bits on Power8
authorMichael Ellerman <michael@ellerman.id.au>
Fri, 28 Jun 2013 08:15:10 +0000 (18:15 +1000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 Jul 2013 21:07:22 +0000 (14:07 -0700)
commita9514fe520175d13cba23cf3c9dbba4df9691c86
tree53cce96995c7e40b7da6b5c680d5821b9e9bbaae
parent910a165889c9e0c79cb96883db3948c5eea204e2
powerpc/perf: Check that events only include valid bits on Power8

commit d8bec4c9cd58f6d3679e09b7293851fb92ad7557 upstream.

A mistake we have made in the past is that we pull out the fields we
need from the event code, but don't check that there are no unknown bits
set. This means that we can't ever assign meaning to those unknown bits
in future.

Although we have once again failed to do this at release, it is still
early days for Power8 so I think we can still slip this in and get away
with it.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/powerpc/perf/power8-pmu.c