public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@kernel.org>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org,
	Andy Lutomirski <luto@amacapital.net>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Thomas Gleixner <tglx@linutronix.de>,
	Arnaldo Carvalho de Melo <acme@infradead.org>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: [GIT PULL] perf x86 updates for v3.20
Date: Mon, 16 Feb 2015 08:48:40 +0100	[thread overview]
Message-ID: <20150216074840.GA25445@gmail.com> (raw)

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(-)

             reply	other threads:[~2015-02-16  7:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-16  7:48 Ingo Molnar [this message]
2015-02-16 20:55 ` [GIT PULL] perf x86 updates for v3.20 Andy Lutomirski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150216074840.GA25445@gmail.com \
    --to=mingo@kernel.org \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@infradead.org \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@amacapital.net \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox