Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754895AbbDHXLi (ORCPT ); Wed, 8 Apr 2015 19:11:38 -0400 Received: from ozlabs.org ([103.22.144.67]:58652 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754222AbbDHXLh convert rfc822-to-8bit (ORCPT ); Wed, 8 Apr 2015 19:11:37 -0400 Message-ID: <1428534695.4682.18.camel@neuling.org> Subject: Re: [V6,1/9] elf: Add new powerpc specifc core note sections From: Michael Neuling To: Ulrich Weigand Cc: Anshuman Khandual , akpm@linux-foundation.org, avagin@openvz.org, davej@redhat.com, davem@davemloft.net, dhowells@redhat.com, Edjunior Barbosa Machado , james.hogan@imgtec.com, kirjanov@gmail.com, linux-kernel@vger.kernel.org, linuxppc-dev@ozlabs.org, oleg@redhat.com, palves@redhat.com, Paul.Clothier@imgtec.com, peterz@infradead.org, sam.bobroff@au1.ibm.com, shuahkh@osg.samsung.com, sukadev@linux.vnet.ibm.com, tglx@linutronix.de Date: Thu, 09 Apr 2015 09:11:35 +1000 In-Reply-To: References: <20141203052204.9DA8F1400DD@ozlabs.org> <547EB253.5050307@linux.vnet.ibm.com> <548578A8.5020901@linux.vnet.ibm.com> <54947C64.4030206@linux.vnet.ibm.com> <54A50094.5070902@linux.vnet.ibm.com> <1421883597.30744.3.camel@neuling.org> <1421963049.30744.23.camel@neuling.org> <1422419289.9646.20.camel@neuling.org> <1424667110.16027.6.camel@neuling.org> <1426718702.4866.2.camel@neuling.org> <1426719027.4866.4.camel@neuling.org> <550FEC36.8080803@linux.vnet.ibm.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT X-Mailer: Evolution 3.12.10-0ubuntu1~14.10.1 Mime-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1817 Lines: 41 On Wed, 2015-04-08 at 19:50 +0200, Ulrich Weigand wrote: > Anshuman Khandual 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? I think you're correct. We should be right. I'd forgotten about the GET/SETREGS64 interfaces. Mikey -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/