Re: [patch v3 2/2] ptrace: Add support for genericPTRACE_GETREGSET/PTRACE_SETREGSET

From: Oleg Nesterov
Date: Fri Feb 12 2010 - 11:00:51 EST


On 02/11, Roland McGrath wrote:
>
> > +static int ptrace_regset(struct task_struct *task, int req, unsigned int type,
> > + struct iovec *kiov)
> > +{
> > + const struct user_regset_view *view = task_user_regset_view(task);
> > + const struct user_regset *regset = find_regset(view, type);
> > + int regset_no;
> > +
> > + if (!regset || (kiov->iov_len % regset->size) != 0)
> > + return -EIO;
>
> My inclination would be to diagnose these more specifically.

Agreed.

Otherwise I think the patch is fine.

Oleg.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/