Noptrace module example int (*real_ptrace) (int, int, int, int); int new_ptrace (int, int, int, int); extern void *sys_call_table[]; /* The replacement function */ int new_ptrace(int request, int pid, int addr, int data) { return -1; } int init_module() { /* Save a pointer to the old ptrace function */ real_ptrace = sys_call_table[ __NR_ptrace ]; /* point to our new ptrace function in sys_call_table */ sys_call_table[ __NR_ptrace ] = (void *)new_ptrace; printk(KERN_INFO "noptrace module installed\n"); return 0; }