Kprobes support for IA64
Ananth N Mavinakayanahalli
ananth@in.ibm.com
Mon May 23 20:17:00 GMT 2005
On Mon, May 23, 2005 at 12:47:07PM -0700, Lynch, Rusty wrote:
>
....
> >
> >I worked with Prarit Bhargava (SGI) today to show the usage of
> >kprobes/jprobes on ia64. Everything worked fine, except for a
> consistent:
> >
> >-bash: child setpgid (xxx to xxx): No such process
> > ^^^ ^^^ pids of bash
> >message during rmmod of a jprobe module. Not sure why this message
> comes
> >up though. The machine we were testing on was a 16-way Altix box I
> think.
> >
> >Ananth
>
> I haven't seen this message before. Do you have a simple testcase that
> exposes this?
I normally use the attached (barebones) jprobe test module (originally by
Prasanna). We modified just the jp.kp.addr and .entry values for IA64 in
this file to test.
Thanks,
Ananth
-------------- next part --------------
/*jprobes-sample.c */
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/kallsyms.h>
#include <linux/module.h>
#include <linux/kprobes.h>
#include <asm/types.h>
/*
* Jumper probe for blockdev_direct_IO
* Mirror principle enables access to arguments of the probed routine
* from the probe handler.
*/
long jdo_fork(unsigned long clone_flags, unsigned long stack_start, struct pt_regs *regs, unsigned long stack_size, int __user *parent_tidptr, int __user *child_tidptr)
{
printk("In handler? \n");
printk("jprobe: clone_flags=0x%x, stack_start=0x%x, stack_size=0x%x\n", clone_flags, stack_start, stack_size);
jprobe_return();
return 0;
}
static struct jprobe my_jprobe = {
{.addr = (kprobe_opcode_t *)0xc011eb20},
.entry = JPROBE_ENTRY(jdo_fork)
//.entry = (kprobe_opcode_t *)jdo_fork
};
int init_module(void)
{
int ret;
/* first time invokation to initialize probe handler */
printk("plant jprobe at %p, handler addr %p\n",
my_jprobe.kp.addr, my_jprobe.entry);
/* now we are all set to register the probe */
ret = register_jprobe(&my_jprobe);
if (ret) {
printk("Unable to register jprobe\n");
return ret;
}
printk("registered jprobe\n");
return 0;
}
void cleanup_module(void)
{
unregister_jprobe(&my_jprobe);
printk("jprobe unregistered\n");
}
MODULE_LICENSE("GPL");
More information about the Systemtap
mailing list