lkml.org 
[lkml]   [2015]   [Apr]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [V6,1/9] elf: Add new powerpc specifc core note sections
From
Date
Anshuman Khandual <khandual@linux.vnet.ibm.com> wrote on 23.03.2015
11:34:30:

> > With that in mind, do we have a way to set the top 32bits of the MSR
> > (which contain the TM bits) when ptracing 32 bit processes? I can't
> > find anything like that in this patch set.
>
> No, we dont have that yet. When ptracing in 32-bit mode the MSR value
> which can be viewed or set from the user space through PTRACE_GETREGS
> PTRACE_SETREGS call is it's lower 32 bits only. Either we can club
> the upper 32 bits of MSR as part of one of the ELF core notes we are
> adding in the patch series or we can create one more separate ELF core
> note for that purpose. Let me know your opinion on this.

I'm not sure I understand this. I thought we had the following:

- If the process calling ptrace is itself 64-bit (which is how GDB is
built on all current Linux distributions), then PTRACE_GETREGS etc.
will *always* operate on 64-bit register sets, even if the target
process is 32-bit.

- If the process calling ptrace is 32-bit, then PTRACE_GETREGS will
operate on 32-bit register sets. However, there is a separate
PTRACE_GETREGS64 / PTRACE_SETREGS64 call that will also provide
the opportunity to operate on the full 64-bit register set. Both
apply independently of whether the target process is 32-bit or
64-bit.

Is this not correct?

Bye,
Ulrich



\
 
 \ /
  Last update: 2015-04-08 20:21    [W:0.119 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site