linux/arch/x86
Andy Lutomirski 5dc855d44c x86/perf: Fix CR4.PCE propagation to use active_mm instead of mm
If one thread mmaps a perf event while another thread in the same mm
is in some context where active_mm != mm (which can happen in the
scheduler, for example), refresh_pce() would write the wrong value
to CR4.PCE.  This broke some PAPI tests.

Reported-and-tested-by: Vince Weaver <vincent.weaver@maine.edu>
Signed-off-by: Andy Lutomirski <luto@kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Borislav Petkov <bpetkov@suse.de>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: stable@vger.kernel.org
Fixes: 7911d3f7af ("perf/x86: Only allow rdpmc if a perf_event is mapped")
Link: http://lkml.kernel.org/r/0c5b38a76ea50e405f9abe07a13dfaef87c173a1.1489694270.git.luto@kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2017-03-17 08:28:26 +01:00
..
boot Merge branch 'x86-boot-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2017-02-20 14:04:37 -08:00
configs IOMMU Updates for Linux v4.9 2016-10-11 12:52:41 -07:00
crypto crypto: sha512-mb - Protect sha512 mb ctx mgr access 2017-02-11 17:50:41 +08:00
entry userfaultfd: non-cooperative: add event for memory unmaps 2017-02-24 17:46:55 -08:00
events x86/perf: Fix CR4.PCE propagation to use active_mm instead of mm 2017-03-17 08:28:26 +01:00
hyperv drivers: hv: Turn off write permission on the hypercall page 2017-02-10 15:48:00 +01:00
ia32 Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
include mm, x86: fix HIGHMEM64 && PARAVIRT build config for native_pud_clear() 2017-02-27 18:43:48 -08:00
kernel Merge branch 'linus' into perf/urgent, to resolve conflict 2017-03-02 08:05:45 +01:00
kvm scripts/spelling.txt: add "an user" pattern and fix typo instances 2017-02-27 18:43:46 -08:00
lguest clocksource: Use a plain u64 instead of cycle_t 2016-12-25 11:04:12 +01:00
lib x86/timer: Make delay() work during early bootup 2017-01-22 10:03:12 +01:00
math-emu Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
mm mm: add arch-independent testcases for RODATA 2017-02-27 18:43:48 -08:00
net bpf: fix unlocking of jited image when module ronx not set 2017-02-21 13:30:14 -05:00
oprofile x86/oprofile/nmi: Convert to hotplug state machine 2016-11-22 23:34:43 +01:00
pci This is a tree wide change and has been kept separate for that reason. 2017-02-25 13:45:43 -08:00
platform The usual collection of new drivers, non-critical fixes, and updates 2017-02-25 14:28:06 -08:00
power Merge branch 'x86-timers-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2016-12-18 13:59:10 -08:00
purgatory x86/kexec: add -fno-PIE 2016-11-09 22:28:09 +01:00
ras x86/ras/amd/inj: Change dependency 2017-01-24 09:14:55 +01:00
realmode x86/build: Don't use $(LINUXINCLUDE) twice 2016-11-28 07:49:17 +01:00
tools x86/tools: Fix gcc-7 warning in relocs.c 2016-12-19 11:50:24 +01:00
um Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
video
xen This is a tree wide change and has been kept separate for that reason. 2017-02-25 13:45:43 -08:00
.gitignore
Kbuild Drivers: hv vmbus: Move Hypercall page setup out of common code 2017-01-19 11:42:07 +01:00
Kconfig The usual collection of new drivers, non-critical fixes, and updates 2017-02-25 14:28:06 -08:00
Kconfig.cpu
Kconfig.debug mm: add arch-independent testcases for RODATA 2017-02-27 18:43:48 -08:00
Makefile
Makefile_32.cpu
Makefile.um