[PATCH] powerpc: added DSCR support to ptrace

Benjamin Herrenschmidt benh at kernel.crashing.org
Wed Jan 16 05:17:15 EST 2013


On Fri, 2013-01-11 at 17:29 +1100, Alexey Kardashevskiy wrote:
> +static unsigned long get_user_dscr(struct task_struct *task)
> +{
> +       return -EIO;
> +}
> +

Does it make sense to return an error here ? ptrace_get_reg() doesn't
seem to have provisions for returning errors, it just return register
values, there's no way to differenciate an error code from a register
value as far as I can tell...

I'll apply your patch anyway because this is an existing problem with
that function (it already returns -EIO in other circumstances), but I
would like if you could submit a followup patch that changes it to
return the register by value and return a real error code, which can be
then handled properly in the two call sites (ptrace.c and ptrace32.c).

Cheers,
Ben.




More information about the Linuxppc-dev mailing list