From: Sapan Bhatia Date: Tue, 21 May 2013 20:45:07 +0000 (-0400) Subject: Rewired registers via which arguments are collected to reflect new interfaces in... X-Git-Tag: procprotect-0.3-4~3 X-Git-Url: http://git.onelab.eu/?p=procprotect.git;a=commitdiff_plain;h=c4d10fa8ab1fd1a2fc9db070c139f07f836b2e83 Rewired registers via which arguments are collected to reflect new interfaces in kernel 3.9 --- diff --git a/procprotect.c b/procprotect.c index 1d91401..dc2d4e4 100644 --- a/procprotect.c +++ b/procprotect.c @@ -95,14 +95,13 @@ static int lookup_fast_entry(struct kretprobe_instance *ri, struct pt_regs *regs int ret = -1; struct procprotect_ctx *ctx; struct nameidata *nd = (struct nameidata *) regs->di; - struct qstr *q = (struct qstr *) regs->si; struct dentry *parent = nd->path.dentry; struct inode *pinode = parent->d_inode; if (pinode->i_sb->s_magic == PROC_SUPER_MAGIC && current->nsproxy->mnt_ns!=init_task.nsproxy->mnt_ns) { ctx = (struct procprotect_ctx *) ri->data; - ctx->inode = regs->cx; + ctx->inode = regs->dx; ctx->flags = nd->flags; ret = 0; } @@ -136,8 +135,7 @@ static int lookup_slow_entry(struct kretprobe_instance *ri, struct pt_regs *regs int ret = -1; struct procprotect_ctx *ctx; struct nameidata *nd = (struct nameidata *) regs->di; - struct qstr *q = (struct qstr *) regs->si; - struct path *p = (struct path *) regs->dx; + struct path *p = (struct path *) regs->si; struct dentry *parent = nd->path.dentry; struct inode *pinode = parent->d_inode; @@ -148,7 +146,7 @@ static int lookup_slow_entry(struct kretprobe_instance *ri, struct pt_regs *regs && current->nsproxy->mnt_ns!=init_task.nsproxy->mnt_ns) { ctx = (struct procprotect_ctx *) ri->data; - ctx->q = q; + ctx->q = &nd->last; ctx->flags = nd->flags; ctx->path = p; ret = 0;