lkml.org 
[lkml]   [2015]   [Feb]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subject[GIT PULL] perf x86 updates for v3.20
Linus,

Please pull the latest perf-core-for-linus git tree from:

git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git perf-core-for-linus

# HEAD: a66734297f78707ce39d756b656bfae861d53f62 perf/x86: Add /sys/devices/cpu/rdpmc=2 to allow rdpmc for all tasks

( I'm sending these changes from Andy Lutomirski separately
because they were based on other bits that went upstream
in this cycle. )

This series tightens up RDPMC permissions: currently even
highly sandboxed x86 execution environments (such as
seccomp) have permission to execute RDPMC, which may leak
various perf events / PMU state such as timing information
and other CPU execution details.

This 'all is allowed' RDPMC mode is still preserved as the
(non-default) /sys/devices/cpu/rdpmc=2 setting. The new
default is that RDPMC access is only allowed if a perf
event is mmap-ed (which is needed to correctly interpret
RDPMC counter values in any case).

As a side effect of these changes CR4 handling is cleaned
up in the x86 code and a shadow copy of the CR4 value is
added.

The extra CR4 manipulation adds ~ <50ns to the context
switch cost between rdpmc-capable and rdpmc-non-capable
mms.

( Note: shortlog and diffstat created manually due to the
somewhat unusual merge base - hopefully the result is
still fine. )

Thanks,

Ingo

------------------>

Andy Lutomirski (7):
x86: Clean up cr4 manipulation
x86: Store a per-cpu shadow copy of CR4
x86: Add a comment clarifying LDT context switching
perf: Add pmu callbacks to track event mapping and unmapping
perf: Pass the event to arch_perf_update_userpage()
perf/x86: Only allow rdpmc if a perf_event is mapped
perf/x86: Add /sys/devices/cpu/rdpmc=2 to allow rdpmc for all tasks

Ingo Molnar (1):
Merge branch 'x86/asm' into perf/x86, to avoid conflicts with upcoming patches

arch/x86/include/asm/mmu.h | 2 ++
arch/x86/include/asm/mmu_context.h | 33 +++++++++++++++++++++-----
arch/x86/include/asm/paravirt.h | 6 ++---
arch/x86/include/asm/processor.h | 33 --------------------------
arch/x86/include/asm/special_insns.h | 6 ++---
arch/x86/include/asm/tlbflush.h | 77 ++++++++++++++++++++++++++++++++++++++++++++++++++++++------
arch/x86/include/asm/virtext.h | 5 ++--
arch/x86/kernel/acpi/sleep.c | 2 +-
arch/x86/kernel/cpu/common.c | 17 ++++++++++----
arch/x86/kernel/cpu/mcheck/mce.c | 3 ++-
arch/x86/kernel/cpu/mcheck/p5.c | 3 ++-
arch/x86/kernel/cpu/mcheck/winchip.c | 3 ++-
arch/x86/kernel/cpu/mtrr/cyrix.c | 6 ++---
arch/x86/kernel/cpu/mtrr/generic.c | 6 ++---
arch/x86/kernel/cpu/perf_event.c | 76 +++++++++++++++++++++++++++++++++++++++++++++--------------
arch/x86/kernel/cpu/perf_event.h | 2 ++
arch/x86/kernel/head32.c | 1 +
arch/x86/kernel/head64.c | 2 ++
arch/x86/kernel/i387.c | 3 ++-
arch/x86/kernel/process.c | 5 ++--
arch/x86/kernel/process_32.c | 2 +-
arch/x86/kernel/process_64.c | 2 +-
arch/x86/kernel/setup.c | 2 +-
arch/x86/kernel/xsave.c | 3 ++-
arch/x86/kvm/svm.c | 2 +-
arch/x86/kvm/vmx.c | 10 ++++----
arch/x86/mm/fault.c | 2 +-
arch/x86/mm/init.c | 13 ++++++++--
arch/x86/mm/tlb.c | 3 ---
arch/x86/power/cpu.c | 11 ++++-----
arch/x86/realmode/init.c | 2 +-
arch/x86/xen/enlighten.c | 4 ++--
drivers/lguest/x86/core.c | 5 ++--
include/linux/perf_event.h | 7 ++++++
kernel/events/core.c | 14 +++++++++--
35 files changed, 253 insertions(+), 120 deletions(-)


\
 
 \ /
  Last update: 2015-02-16 09:01    [W:0.099 / U:0.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site