When using systemtap with overlay filesystem, we need to get real inode and pass it into uprobe_register function. Otherwise, there will be an inode error. To fix the problem, we need to modify 4 places in runtime/linux/uprobes-inode.c file to let systemtap get the real inode value. The following is the way to support this feature. 733c733 --- inode = vm_file->f_path.dentry->d_inode; +++ inode = d_real_inode(vm_file->f_path.dentry); 915c915 --- p->inode = dentry->d_inode; +++ p->inode = d_real_inode(dentry); 928c928 --- offset, vm_flags, dentry->d_inode); +++ offset, vm_flags, d_real_inode(dentry)); 938c938 --- rc = stapiu_change_semaphore_plus(c, task, addr, dentry->d_inode); +++ rc = stapiu_change_semaphore_plus(c, task, addr, d_real_inode(dentry));
Those sound like usable porting options, yup. Since the runtime is compiled on a wide range of kernel versions (2.6.32+ believe it, or not), we may well need some compile-time protection for the macro/function.