powerpc/perf: Ensure all EBB register state is cleared on fork()
authorMichael Ellerman <mpe@ellerman.id.au>
Tue, 10 Jun 2014 06:46:21 +0000 (16:46 +1000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 7 Jul 2014 01:57:28 +0000 (18:57 -0700)
commit7c16113243a7110a5e4b99db5cdfb077527c8526
treea9d2dd7308b29ac7bde4e706264b188276f2481a
parent50d4ff8de5263af02b63a97da867a21854d2c1a6
powerpc/perf: Ensure all EBB register state is cleared on fork()

commit 3df48c981d5a9610e02e9270b1bc4274fb536710 upstream.

In commit 330a1eb "Core EBB support for 64-bit book3s" I messed up
clear_task_ebb(). It clears some but not all of the task's Event Based
Branch (EBB) registers when we duplicate a task struct.

That allows a child task to observe the EBBHR & EBBRR of its parent,
which it should not be able to do.

Fix it by clearing EBBHR & EBBRR.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/powerpc/include/asm/switch_to.h