Re: [RFC Patch v1 33/55] ARC: ptrace support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Monday 12 November 2012 07:21 PM, Arnd Bergmann wrote:
> On Monday 12 November 2012, Vineet.Gupta1@xxxxxxxxxxxx wrote:
>> +       case PTRACE_PEEKUSR:
>> +               pos = addr;     /* offset in struct user_regs_struct */
>> +               count = 4;      /* 1 register only */
>> +               u_addr = (unsigned int __user *)data;
>> +               kbuf = NULL;
>> +               ret = genregs_get(child, NULL, pos, count, kbuf, u_addr);
>> +               break;
>> +
>> +       case PTRACE_POKEUSR:
>> +               pos = addr;     /* offset in struct user_regs_struct */
>> +               count = 4;      /* 1 register only */
>> +
>> +               /* Ideally @data would have abeen a user space buffer, from
>> +                * where, we do a copy_from_user.
>> +                * However this request only involves one word, which courtesy
>> +                * our ABI can be passed in a reg.
>> +                * regset interface however expects some buffer to copyin from
>> +                */
>> +               kbuf = &data;
>> +               u_addr = NULL;
>> +
>> +               ret = genregs_set(child, NULL, pos, count, kbuf, u_addr);
>> +               break;
>> +
> I think these should be moved into regsets, as we have done for all
> other new architectures. Your arch_ptrace then becomes a trivial wrapper
> around ptrace_request.

The regset stuff is already complete - and even this code uses the reget
callbacks. It's just that we need to carry on this dual ABI for some
time for our legacy gdbserver.

>
> 	Arnd

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


[Index of Archives]     [Linux Kernel]     [Kernel Newbies]     [x86 Platform Driver]     [Netdev]     [Linux Wireless]     [Netfilter]     [Bugtraq]     [Linux Filesystems]     [Yosemite Discussion]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]

  Powered by Linux