Re: [PATCH 13/16] h8300: ptrace helper

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

 



On Wednesday 21 January 2015 13:31:47 Yoshinori Sato wrote:

> +long arch_ptrace(struct task_struct *child, long request,
> +		 unsigned long addr, unsigned long data)
> +{
> +	int ret;
> +	int regno = addr >> 2;
> +	unsigned long __user *datap = (unsigned long __user *) data;
> +
> +	switch (request) {
> +	/* read the word at location addr in the USER area. */
> +	case PTRACE_PEEKUSR: {
...
> +	case PTRACE_POKEUSR: /* write the word at location addr
...
> +	case PTRACE_GETREGS: { /* Get all gp regs from the child. */
...
> +	case PTRACE_SETREGS: { /* Set all gp regs in the child. */

For modern architecture implementations, we now use 'regset' to
abstract these, and simplify the arch_ptrace interface to
a single ptrace_request call. See openrisc or arm64 as examples.

	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