android_kernel_motorola_sm6375/arch/powerpc
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Alexey Kardashevskiy df2a6a4a9d powerpc/perf: Fix crashes with generic_compat_pmu & BHRB
commit b460b512417ae9c8b51a3bdcc09020cd6c60ff69 upstream.

The bhrb_filter_map ("The Branch History Rolling Buffer") callback is
only defined in raw CPUs' power_pmu structs. The "architected" CPUs
use generic_compat_pmu, which does not have this callback, and crashes
occur if a user tries to enable branch stack for an event.

This add a NULL pointer check for bhrb_filter_map() which behaves as
if the callback returned an error.

This does not add the same check for config_bhrb() as the only caller
checks for cpuhw->bhrb_users which remains zero if bhrb_filter_map==0.

Fixes: be80e758d0 ("powerpc/perf: Add generic compat mode pmu driver")
Cc: [email protected] # v5.2+
Signed-off-by: Alexey Kardashevskiy <[email protected]>
Reviewed-by: Madhavan Srinivasan <[email protected]>
Signed-off-by: Michael Ellerman <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2020-09-03 11:27:05 +02:00
..
boot powerpc/boot: Fix CONFIG_PPC_MPC52XX references 2020-08-19 08:16:17 +02:00
configs scsi: sr: remove references to BLK_DEV_SR_VENDOR, leave it enabled 2020-07-22 09:32:57 +02:00
crypto
include KVM: Pass MMU notifier range flags to kvm_unmap_hva_range() 2020-08-26 10:41:08 +02:00
kernel powerpc/64s: Don't init FSCR_DSCR in __init_FSCR() 2020-09-03 11:26:39 +02:00
kvm KVM: Pass MMU notifier range flags to kvm_unmap_hva_range() 2020-08-26 10:41:08 +02:00
lib powerpc: Fix __clear_user() with KUAP enabled 2020-01-04 19:18:37 +01:00
math-emu
mm powerpc: Allow 4224 bytes of stack expansion for the signal frame 2020-08-21 13:05:24 +02:00
net
oprofile
perf powerpc/perf: Fix crashes with generic_compat_pmu & BHRB 2020-09-03 11:27:05 +02:00
platforms powerpc/spufs: add CONFIG_COREDUMP dependency 2020-09-03 11:26:48 +02:00
purgatory
sysdev powerpc/xive: Ignore kmemleak false positives 2020-09-03 11:26:42 +02:00
tools powerpc: Do not consider weak unresolved symbol relocations as bad 2020-02-24 08:37:00 +01:00
xmon powerpc/xmon: Restrict when kernel is locked down 2020-06-07 13:18:49 +02:00
Kbuild
Kconfig powerpc/kasan: Fix stack overflow by increasing THREAD_SHIFT 2020-06-24 17:50:12 +02:00
Kconfig.debug powerpc/ptdump: Only enable PPC_CHECK_WX with STRICT_KERNEL_RWX 2020-02-14 16:34:16 -05:00
Makefile powerpc: Don't add -mabi= flags when building with Clang 2020-01-04 19:18:23 +01:00
Makefile.postlink powerpc: Do not consider weak unresolved symbol relocations as bad 2020-02-24 08:37:00 +01:00