android_kernel_motorola_sm6225/arch/powerpc
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
..
boot powerpc: conditionally compile platform-specific serial drivers 2017-08-31 14:26:48 +10:00
configs powerpc/configs: Update for CONFIG_SND changes 2017-09-20 13:30:09 +10:00
crypto Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2017-05-02 15:53:46 -07:00
include Merge branch 'akpm' (patches from Andrew) 2017-09-09 10:30:07 -07:00
kernel powerpc/kprobes: Update optprobes to use emulate_update_regs() 2017-09-20 20:21:24 +10:00
kvm kvm,powerpc: Serialize wq active checks in ops->vcpu_kick 2017-09-15 16:57:13 +02:00
lib powerpc/sstep: mullw should calculate a 64 bit signed result 2017-09-20 13:30:09 +10:00
math-emu Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
mm powerpc/mm: Use seq_putc() in two functions 2017-09-01 16:42:52 +10:00
net powerpc updates for 4.14 2017-09-07 10:15:40 -07:00
oprofile ktime: Cleanup ktime_set() usage 2016-12-25 17:21:22 +01:00
perf powerpc/sysrq: Fix oops whem ppmu is not registered 2017-09-20 13:30:09 +10:00
platforms powerpc/powernv: Clear LPCR[PECE1] via stop-api only for deep state offline 2017-09-20 13:30:09 +10:00
purgatory powerpc/asm: Convert .llong directives to .8byte 2017-08-31 14:26:47 +10:00
sysdev treewide: make "nr_cpu_ids" unsigned 2017-09-08 18:26:48 -07:00
tools powerpc/64: Tool to check head sections location sanity 2017-05-30 14:59:51 +10:00
xmon powerpc/xmon: Add ISA v3.0 SPRs to SPR dump 2017-08-31 14:26:45 +10:00
Kconfig powerpc updates for 4.14 2017-09-07 10:15:40 -07:00
Kconfig.debug powerpc/xmon: Enable disassembly files (compilation changes) 2017-02-15 20:02:42 +11:00
Makefile Merge branch 'fixes' into next 2017-08-23 22:20:10 +10:00
Makefile.postlink powerpc/64: Tool to check head sections location sanity 2017-05-30 14:59:51 +10:00