Skip to contentSkip to conversation

Patch "x86, perf: Fix static_key bug in load_mm_cr4()" has been added to the 4.1-stable tree

PATCH [email protected] 1 participant 1 message Aug 8, 2015

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

x86, perf: Fix static_key bug in load_mm_cr4()

to the 4.1-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:

     x86-perf-fix-static_key-bug-in-load_mm_cr4.patch

and it can be found in the queue-4.1 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From a833581e372a4adae2319d8dc379493edbc444e9 Mon Sep 17 00:00:00 2001

From: Peter Zijlstra <[email protected]>
Date: Thu, 9 Jul 2015 19:23:38 +0200
Subject: x86, perf: Fix static_key bug in load_mm_cr4()

From: Peter Zijlstra <[email protected]>

commit a833581e372a4adae2319d8dc379493edbc444e9 upstream.

Mikulas reported his K6-3 not booting. This is because the static_key API confusion struck and bit Andy, this wants to be static_key_false().

Cc Andrea Arcangeli <[email protected]>
Cc Andy Lutomirski <[email protected]>
Cc Arnaldo Carvalho de Melo <[email protected]>
Cc Borislav Petkov <[email protected]>
Cc Brian Gerst <[email protected]>
Cc Denys Vlasenko <[email protected]>
Cc H. Peter Anvin <[email protected]>
Cc Kees Cook <[email protected]>
Cc Linus Torvalds <[email protected]>
Cc Paul Mackerras <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Thomas Gleixner <[email protected]>
Cc Valdis Kletnieks <[email protected]>
Cc Vince Weaver <[email protected]>
Cc hillf.zj <[email protected]>
Fixes a66734297f78 ("perf/x86: Add /sys/devices/cpu/rdpmc=2 to allow rdpmc for all tasks")
---
 arch/x86/include/asm/mmu_context.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/include/asm/mmu_context.h +1 -1
@@ -23,7 +23,7 @@ extern struct static_key rdpmc_always_av
 
 static inline void load_mm_cr4(struct mm_struct *mm)
 {
-	if (static_key_true(&rdpmc_always_available) ||
+	if (static_key_false(&rdpmc_always_available) ||
 	    atomic_read(&mm->context.perf_rdpmc_allowed))
 		cr4_set_bits(X86_CR4_PCE);
 	else

Patches currently in stable-queue which might be from [email protected] are

queue-4.1/x86-kasan-fix-kasan-shadow-region-page-tables.patch queue-4.1/x86-perf-fix-static_key-bug-in-load_mm_cr4.patch queue-4.1/x86-kasan-fix-boot-crash-on-amd-processors.patch queue-4.1/x86-init-clear-init_level4_pgt-earlier.patch queue-4.1/x86-kasan-flush-tlbs-after-switching-cr3.patch