powerpc: Introduce a new helper to obtain function entry points
kprobe_lookup_name() is specific to the kprobe subsystem and may not always return the function entry point (in a subsequent patch for KPROBES_ON_FTRACE). For looking up function entry points, introduce a separate helper and use it in optprobes.c Signed-off-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
This commit is contained in:

committed by
Michael Ellerman

parent
ead514d5fb
commit
1b32cd1715
@@ -243,10 +243,10 @@ int arch_prepare_optimized_kprobe(struct optimized_kprobe *op, struct kprobe *p)
|
||||
/*
|
||||
* 2. branch to optimized_callback() and emulate_step()
|
||||
*/
|
||||
op_callback_addr = kprobe_lookup_name("optimized_callback", 0);
|
||||
emulate_step_addr = kprobe_lookup_name("emulate_step", 0);
|
||||
op_callback_addr = (kprobe_opcode_t *)ppc_kallsyms_lookup_name("optimized_callback");
|
||||
emulate_step_addr = (kprobe_opcode_t *)ppc_kallsyms_lookup_name("emulate_step");
|
||||
if (!op_callback_addr || !emulate_step_addr) {
|
||||
WARN(1, "kprobe_lookup_name() failed\n");
|
||||
WARN(1, "Unable to lookup optimized_callback()/emulate_step()\n");
|
||||
goto error;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user