android_kernel_samsung_univ.../arch
Ravi Bangoria ca20b875a9 powerpc/perf: Fix oops when grouping different pmu events
[ Upstream commit 5aa04b3eb6fca63d2e9827be656dcadc26d54e11 ]

When user tries to group imc (In-Memory Collections) event with
normal event, (sometime) kernel crashes with following log:

    Faulting instruction address: 0x00000000
    [link register   ] c00000000010ce88 power_check_constraints+0x128/0x980
    ...
    c00000000010e238 power_pmu_event_init+0x268/0x6f0
    c0000000002dc60c perf_try_init_event+0xdc/0x1a0
    c0000000002dce88 perf_event_alloc+0x7b8/0xac0
    c0000000002e92e0 SyS_perf_event_open+0x530/0xda0
    c00000000000b004 system_call+0x38/0xe0

'event_base' field of 'struct hw_perf_event' is used as flags for
normal hw events and used as memory address for imc events. While
grouping these two types of events, collect_events() tries to
interpret imc 'event_base' as a flag, which causes a corruption
resulting in a crash.

Consider only those events which belongs to 'perf_hw_context' in
collect_events().

Signed-off-by: Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com>
Reviewed-By: Madhavan Srinivasan <maddy@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-02-25 11:03:40 +01:00
..
alpha alpha: fix reboot on Avanti platform 2018-02-16 20:09:46 +01:00
arc ARC: uaccess: dont use "l" gcc inline asm constraint modifier 2018-01-10 09:27:11 +01:00
arm ARM: dts: am4372: Correct the interrupts_properties of McASP 2018-02-25 11:03:39 +01:00
arm64 arm64: dts: add #cooling-cells to CPU nodes 2018-02-25 11:03:37 +01:00
avr32
blackfin pinctrl: adi2: Fix Kconfig build problem 2017-12-20 10:05:00 +01:00
c6x
cris
frv
h8300
hexagon
ia64
m32r
m68k
metag
microblaze
mips MIPS: AR7: ensure the port type's FCR value is used 2018-01-23 19:50:18 +01:00
mn10300 mn10300/misalignment: Use SIGSEGV SEGV_MAPERR to report a failed user copy 2018-02-16 20:09:47 +01:00
nios2
openrisc signal/openrisc: Fix do_unaligned_access to send the proper signal 2018-02-16 20:09:46 +01:00
parisc parisc: Fix alignment of pa_tlb_lock in assembly on 32-bit SMP kernel 2018-01-10 09:27:12 +01:00
powerpc powerpc/perf: Fix oops when grouping different pmu events 2018-02-25 11:03:40 +01:00
s390 s390: fix handling of -1 in set{,fs}[gu]id16 syscalls 2018-02-22 15:44:58 +01:00
score
sh signal/sh: Ensure si_signo is initialized in do_divide_error 2018-02-16 20:09:46 +01:00
sparc sparc64/mm: set fields in deferred pages 2017-12-16 10:33:55 +01:00
tile
um um: link vmlinux with -no-pie 2018-01-31 12:06:12 +01:00
unicore32
x86 KVM: x86: fix escape of guest dr6 to the host 2018-02-25 11:03:36 +01:00
xtensa xtensa: fix futex_atomic_cmpxchg_inatomic 2018-02-16 20:09:47 +01:00
.gitignore
Kconfig