linux-arch.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Jonas Bonn <jonas@southpole.se>
Cc: linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org
Subject: Re: [PATCH v2 06/19] OpenRISC: PTrace
Date: Tue, 5 Jul 2011 18:42:11 +0200	[thread overview]
Message-ID: <201107051842.11666.arnd@arndb.de> (raw)
In-Reply-To: <1309881907.3393.15.camel@jerome>

On Tuesday 05 July 2011, Jonas Bonn wrote:
> I've been looking a bit at the ptrace stuff the last couple of days.
> One question that occurred to me was:  is it mandatory to export the
> "struct pt_regs" info in ptrace.h to userspace?

I don't know, it certainly has been the case traditionally, but as
far as I can tell, this was mainly used by ancient gdb ports,
while newer versions just hardcode the offsets for PTRACE_PEEKUSR.

> I'm not sure I like the layout of our struct pt_regs.  It would be
> better to lay out the registers in a way that mirrors the order that
> they are saved during exception/syscall entry in order to make better
> use of the cache.
> 
> Since the registers can be exported via a regset to userspace anyway
> (which doesn't necessarily need to look like pt_regs), I don't see that
> userspace really needs how we lay out the registers on the stack.  By
> not exporting pt_regs, I am free to change the layout... if it's
> exported, it becomes ABI.

Yes. I think you can just change your ptrace code to not export
pt_regs through PEEKUSR but only through elf_gregset_t, which
you can define independently.

	Arnd

  parent reply	other threads:[~2011-07-05 16:42 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-02 21:15 OpenRISC Architecture: Patch set version 2 Jonas Bonn
2011-07-02 21:15 ` [PATCH v2 01/19] OpenRISC: Boot code Jonas Bonn
2011-07-02 21:15 ` [PATCH v2 02/19] OpenRISC: Device tree Jonas Bonn
2011-07-02 21:15   ` Jonas Bonn
2011-07-03 18:07   ` Segher Boessenkool
2011-07-03 20:51   ` Grant Likely
     [not found]     ` <CACxGe6tFX=EQjaL-4EjSXquY5eh+bca29=d=cE5-YAVCUVRCvA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-07-03 21:39       ` Benjamin Herrenschmidt
2011-07-03 21:39         ` Benjamin Herrenschmidt
2011-07-04  4:58     ` Jonas Bonn
2011-07-04  4:58       ` Jonas Bonn
2011-07-04  5:35       ` Grant Likely
2011-07-02 21:15 ` [PATCH v2 03/19] OpenRISC: Memory management Jonas Bonn
2011-07-02 21:15 ` [PATCH v2 04/19] OpenRISC: Signal handling Jonas Bonn
2011-07-02 21:15   ` Jonas Bonn
2011-07-02 21:15 ` [PATCH v2 05/19] OpenRISC: Build infrastructure Jonas Bonn
2011-07-02 21:15   ` Jonas Bonn
2011-07-02 21:15 ` [PATCH v2 06/19] OpenRISC: PTrace Jonas Bonn
2011-07-03 19:40   ` Marcin Slusarz
2011-07-05 15:42   ` Arnd Bergmann
2011-07-05 16:05     ` Jonas Bonn
2011-07-05 16:05       ` Jonas Bonn
2011-07-05 16:42       ` Arnd Bergmann [this message]
2011-07-02 21:15 ` [PATCH v2 07/19] OpenRISC: DMA Jonas Bonn
2011-07-05 15:37   ` Arnd Bergmann
2011-07-08  7:36     ` Jonas Bonn
2011-07-08  7:44       ` Arnd Bergmann
2011-07-02 21:15 ` [PATCH v2 08/19] OpenRISC: Timekeeping Jonas Bonn
2011-07-02 21:15   ` Jonas Bonn
2011-07-02 21:15 ` [PATCH v2 09/19] OpenRISC: IRQ Jonas Bonn
2011-07-02 21:15   ` Jonas Bonn
2011-07-02 21:15 ` [PATCH v2 10/19] OpenRISC: System calls Jonas Bonn
2011-07-02 21:15   ` Jonas Bonn
2011-07-05 15:39   ` Arnd Bergmann
2011-07-02 21:15 ` [PATCH v2 11/19] OpenRISC: Idle/Power management Jonas Bonn
2011-07-02 21:15 ` [PATCH v2 12/19] OpenRISC: Scheduling/Process management Jonas Bonn
2011-07-02 21:15 ` [PATCH v2 13/19] OpenRISC: GPIO Jonas Bonn
2011-07-02 21:15   ` Jonas Bonn
2011-07-02 21:15 ` [PATCH v2 14/19] OpenRISC: Module support Jonas Bonn
2011-07-02 21:15 ` [PATCH v2 15/19] OpenRISC: Traps Jonas Bonn
2011-07-02 21:15 ` [PATCH v2 16/19] OpenRISC: Headers Jonas Bonn
2011-07-02 21:15 ` [PATCH v2 17/19] OpenRISC: Library routines Jonas Bonn
2011-07-02 21:15   ` Jonas Bonn
2011-07-02 21:15 ` [PATCH v2 18/19] OpenRISC: Miscellaneous Jonas Bonn
2011-07-02 21:15   ` Jonas Bonn
2011-07-02 21:15 ` [PATCH v2 19/19] OpenRISC: Add MAINTAINERS entry Jonas Bonn
2011-07-02 21:15   ` Jonas Bonn
2011-07-05 15:56 ` OpenRISC Architecture: Patch set version 2 Arnd Bergmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201107051842.11666.arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=jonas@southpole.se \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).