[tip:perf/core] perf_event: Don't allow vmalloc() backed perf on powerpc

tip-bot for Michael Ellerman tipbot at zytor.com
Fri May 8 23:24:39 AEST 2015

Commit-ID:  cb307113746b4d184155d2c412e8069aeaa60d42
Gitweb:     http://git.kernel.org/tip/cb307113746b4d184155d2c412e8069aeaa60d42
Author:     Michael Ellerman <mpe at ellerman.id.au>
AuthorDate: Mon, 4 May 2015 16:26:39 +1000
Committer:  Ingo Molnar <mingo at kernel.org>
CommitDate: Fri, 8 May 2015 12:26:01 +0200

perf_event: Don't allow vmalloc() backed perf on powerpc

On powerpc the perf event interrupt is not masked when interrupts are
disabled, allowing it to function as an NMI.

This causes problems if perf is using vmalloc. If we take a page fault
on the vmalloc region the fault handler will fail the page fault because
it detects we are coming in from an NMI (see do_hash_page()).

We don't actually need or want vmalloc backed perf so just disable it on

Signed-off-by: Michael Ellerman <mpe at ellerman.id.au>
Signed-off-by: Peter Zijlstra (Intel) <peterz at infradead.org>
Cc: <linuxppc-dev at ozlabs.org>
Cc: Andrew Morton <akpm at osdl.org>
Cc: Anton Blanchard <anton at samba.org>
Cc: Borislav Petkov <bp at alien8.de>
Cc: H. Peter Anvin <hpa at zytor.com>
Cc: Paul Mackerras <paulus at samba.org>
Cc: Thomas Gleixner <tglx at linutronix.de>
Cc: acme at ghostprotocols.net
Cc: sukadev at linux.vnet.ibm.com
Link: http://lkml.kernel.org/r/1430720799-18426-1-git-send-email-mpe@ellerman.id.au
Signed-off-by: Ingo Molnar <mingo at kernel.org>
 init/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/init/Kconfig b/init/Kconfig
index dc24dec..81050e4 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -1637,7 +1637,7 @@ config PERF_EVENTS
 	default n
 	bool "Debug: use vmalloc to back perf mmap() buffers"
+	depends on PERF_EVENTS && DEBUG_KERNEL && !PPC
 	 Use vmalloc memory to back perf mmap() buffers.

More information about the Linuxppc-dev mailing list