Hi list,
I am afraid whether i am posting to the right list. I could not find a
krpobe mailing list; so posting.
I took kprobe example from kernel documentation. There is an error
during insertion of module.
root@fox:/# uname -a
Linux fox 3.16.0-031600-generic #201408031935 SMP Sun Aug 3 23:36:11
UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
root@fox:/#
root@fox:/# insmod ~fox/workspace/module/kprobe.ko
insmod: ERROR: could not insert module
/home/fox/workspace/module/kprobe.ko: Invalid parameters
Please find the code snippet below.
kp.pre_handler = handler_pre;
kp.post_handler = handler_post;
kp.fault_handler = handler_fault;
kp.addr = (kprobe_opcode_t*)
kallsyms_lookup_name("my_empty_call_back_enter");
ret = register_kprobe(&kp);
if (ret < 0) {
printk(KERN_INFO "register_kprobe failed, returned %d \n", ret);
return ret;
}
-Ratheesh
--
To unsubscribe from this list: send the line "unsubscribe linux-perf-users" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html