Thread (7 messages) 7 messages, 5 authors, 2017-12-22

Re: [PATCH] powerpc/perf: Dereference bhrb entries safely

From: Naveen N. Rao <hidden>
Date: 2017-12-12 15:39:45
Also in: lkml

Ravi Bangoria wrote:
It may very well happen that branch instructions recorded by
bhrb entries already get unmapped before they get processed by
the kernel. Hence, trying to dereference such memory location
will endup in a crash. Ex,
=20
    Unable to handle kernel paging request for data at address 0xc0080000=
19c41764
    Faulting instruction address: 0xc000000000084a14
    NIP [c000000000084a14] branch_target+0x4/0x70
    LR [c0000000000eb828] record_and_restart+0x568/0x5c0
    Call Trace:
    [c0000000000eb3b4] record_and_restart+0xf4/0x5c0 (unreliable)
    [c0000000000ec378] perf_event_interrupt+0x298/0x460
    [c000000000027964] performance_monitor_exception+0x54/0x70
    [c000000000009ba4] performance_monitor_common+0x114/0x120
=20
Fix this by deferefencing them safely.
=20
Suggested-by: Naveen N. Rao <redacted>
Signed-off-by: Ravi Bangoria <redacted>
Reviewed-by: Naveen N. Rao <redacted>


- Naveen

=
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help