lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1164220580.12365.8.camel@hades.cambridge.redhat.com>
Date:	Wed, 22 Nov 2006 18:36:20 +0000
From:	David Woodhouse <dwmw2@...radead.org>
To:	supriya kannery <supriyak@...ibm.com>
Cc:	linux-kernel@...r.kernel.org, linuxppc-dev@...abs.org
Subject: Re: Incorrect order of last two arguments of ptrace for requests
	PPC_PTRACE_GETREGS, SETREGS, GETFPREGS, SETFPREGS

On Wed, 2006-10-25 at 16:23 +0530, supriya kannery wrote:
> In ptrace, when request is PPC_PTRACE_GETREGS, SETREGS, GETFPREGS and 
> SETFPREGS, order of the last two arguments is not correct.
> 
> General format of ptrace is ptrace (request, pid, addr, data).  For the 
> above mentioned request ids in ppc64, if we use ptrace like
> 
>  long reg[32];
>  ptrace (PPC_PTRACE_GETREGS, pid, 0, &reg[0]);
> 
> the return value is always -1.
> 
> If we exchange the last two arguments like,
> 
>  ptrace (PPC_PTRACE_GETREGS, pid, &reg[0], 0);
> 
> it works!
> 
> This is because PPC_PTRACE_GETREGS option for powerpc is implemented 
> such that general purpose
> registers of the child process get copied to the address variable 
> instead of data variable. Same is
> the case with other PPC request options PPC_PTRACE_SETREGS, GETFPREGS 
> and SETFPREGS.
> 
> Prepared a patch for this problem and tested with 2.6.18-rc6 kernel. 
> This patch can be applied directly to 2.6.19-rc3 kernel.

A more appropriate place to send this would be the linux-ppc development
list.

-- 
dwmw2

View attachment "ppc_ptrace_params.patch" of type "text/x-patch" (3449 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ