powerpc/64s/perf: perf interrupt does not have to get_user_pages to access user memory
authorNicholas Piggin <npiggin@gmail.com>
Wed, 11 Nov 2020 12:01:51 +0000 (22:01 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 19 Nov 2020 05:56:52 +0000 (16:56 +1100)
commit987c426320cce72d1b28f55c8603b239e4f7187c
treeb1e9572df774b1b1c48091285984b81b9be874d2
parentfdcfeaba38e5b183045f5b079af94f97658eabe6
powerpc/64s/perf: perf interrupt does not have to get_user_pages to access user memory

read_user_stack_slow that walks user address translation by hand is
only required on hash, because a hash fault can not be serviced from
"NMI" context (to avoid re-entering the hash code) so the user stack
can be mapped into Linux page tables but not accessible by the CPU.

Radix MMU mode does not have this restriction. A page fault failure
would indicate the page is not accessible via get_user_pages either,
so avoid this on radix.

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20201111120151.3150658-1-npiggin@gmail.com
arch/powerpc/perf/callchain.h
arch/powerpc/perf/callchain_64.c