Files
android_kernel_xiaomi_sm8450/arch/powerpc/kernel
Naveen N. Rao 8afafa6fba powerpc/kprobes: Update optprobes to use emulate_update_regs()
Optprobes depended on an updated regs->nip from analyse_instr() to
identify the location to branch back from the optprobes trampoline.
However, since commit 3cdfcbfd32 ("powerpc: Change analyse_instr so
it doesn't modify *regs"), analyse_instr() doesn't update the registers
anymore.  Due to this, we end up branching back from the optprobes
trampoline to the same branch into the trampoline resulting in a loop.

Fix this by calling out to emulate_update_regs() before using the nip.
Additionally, explicitly compare the return value from analyse_instr()
to 1, rather than just checking for !0 so as to guard against any
future changes to analyse_instr() that may result in -1 being returned
in more scenarios.

Fixes: 3cdfcbfd32 ("powerpc: Change analyse_instr so it doesn't modify *regs")
Signed-off-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2017-09-20 20:21:24 +10:00
..
2016-06-14 13:58:26 +10:00
2017-08-10 23:32:18 +10:00
2017-06-28 06:54:33 -07:00
2017-08-31 14:26:10 +10:00
2016-08-07 23:50:09 -04:00
2016-08-07 23:50:09 -04:00
2016-08-07 23:50:09 -04:00
2017-06-27 17:02:50 -07:00
2017-09-08 18:26:48 -07:00
2017-06-27 12:09:09 +10:00
2015-04-07 17:15:13 +10:00
2017-08-23 22:20:10 +10:00