This is a note to let you know that I've just added the patch titled powerpc/perf: Ensure all EBB register state is cleared on fork() to the 3.14-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: powerpc-perf-ensure-all-ebb-register-state-is-cleared-on-fork.patch and it can be found in the queue-3.14 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From 3df48c981d5a9610e02e9270b1bc4274fb536710 Mon Sep 17 00:00:00 2001 From: Michael Ellerman <mpe@xxxxxxxxxxxxxx> Date: Tue, 10 Jun 2014 16:46:21 +1000 Subject: powerpc/perf: Ensure all EBB register state is cleared on fork() From: Michael Ellerman <mpe@xxxxxxxxxxxxxx> 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@xxxxxxxxxxxxxx> Signed-off-by: Benjamin Herrenschmidt <benh@xxxxxxxxxxxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- arch/powerpc/include/asm/switch_to.h | 2 ++ 1 file changed, 2 insertions(+) --- a/arch/powerpc/include/asm/switch_to.h +++ b/arch/powerpc/include/asm/switch_to.h @@ -84,6 +84,8 @@ static inline void clear_task_ebb(struct { #ifdef CONFIG_PPC_BOOK3S_64 /* EBB perf events are not inherited, so clear all EBB state. */ + t->thread.ebbrr = 0; + t->thread.ebbhr = 0; t->thread.bescr = 0; t->thread.mmcr2 = 0; t->thread.mmcr0 = 0; Patches currently in stable-queue which might be from mpe@xxxxxxxxxxxxxx are queue-3.14/powerpc-perf-ensure-all-ebb-register-state-is-cleared-on-fork.patch queue-3.14/powerpc-mm-check-paca-psize-is-up-to-date-for-huge-mappings.patch -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html