2005-09-21 17:25:53

by Daniel Jacobowitz

[permalink] [raw]
Subject: PTRACE_SYSEMU numbering

Here's a bit of the PTRACE_SYSEMU patch, committed three weeks ago:

--- a/include/linux/ptrace.h
+++ b/include/linux/ptrace.h
@@ -20,6 +20,7 @@
#define PTRACE_DETACH 0x11
#define PTRACE_SYSCALL 24
+#define PTRACE_SYSEMU 31

/* 0x4200-0x4300 are reserved for architecture-independent additions. */
#define PTRACE_SETOPTIONS 0x4200

OK, I admit I could have made the comment clearer. But can we fix this?
You've added PTRACE_SYSEMU on top of PTRACE_GETFDPIC, which presumably will
mess up either debugging or UML on that architecture (if the latter were
ported). That's exactly the problem we defined the 0x4200-0x4300 range
to prevent.

--
Daniel Jacobowitz
CodeSourcery, LLC


2005-09-22 06:48:38

by Laurent Vivier

[permalink] [raw]
Subject: Re: PTRACE_SYSEMU numbering

Hi,

there is no problem for me.
Paolo, as you are the submitter of the patch to the list and the real
maintainer, what do you think about that ?

Regards,
Laurent

Le 21 sept. 05 ? 19:25, Daniel Jacobowitz a ?crit :

> Here's a bit of the PTRACE_SYSEMU patch, committed three weeks ago:
>
> --- a/include/linux/ptrace.h
> +++ b/include/linux/ptrace.h
> @@ -20,6 +20,7 @@
> #define PTRACE_DETACH 0x11
> #define PTRACE_SYSCALL 24
> +#define PTRACE_SYSEMU 31
>
> /* 0x4200-0x4300 are reserved for architecture-independent
> additions. */
> #define PTRACE_SETOPTIONS 0x4200
>
> OK, I admit I could have made the comment clearer. But can we fix
> this?
> You've added PTRACE_SYSEMU on top of PTRACE_GETFDPIC, which
> presumably will
> mess up either debugging or UML on that architecture (if the latter
> were
> ported). That's exactly the problem we defined the 0x4200-0x4300
> range
> to prevent.
>
> --
> Daniel Jacobowitz
> CodeSourcery, LLC
>

Laurent Vivier
[email protected]



2005-09-22 19:48:32

by Blaisorblade

[permalink] [raw]
Subject: Re: PTRACE_SYSEMU numbering

On Thursday 22 September 2005 08:48, Laurent Vivier wrote:
> Hi,

> Paolo, as you are the submitter of the patch to the list and the real
> maintainer, what do you think about that ?

> Regards,
> Laurent

> > +#define PTRACE_SYSEMU 31

> > /* 0x4200-0x4300 are reserved for architecture-independent
> > additions. */
> > #define PTRACE_SETOPTIONS 0x4200

> > OK, I admit I could have made the comment clearer.
That's not your fault, the patch was born using those numbers, even because it
started from 2.4.

> > But can we fix
> > this?

> > You've added PTRACE_SYSEMU on top of PTRACE_GETFDPIC,
Ok, I see the value on frv.
> > which
> > presumably will
> > mess up either debugging or UML on that architecture

> > (if the latter
> > were
> > ported).
The fix is easy, IMHO, and not even urgent. It suffices to move PTRACE_SYSEMU
def from <linux/ptrace.h> to <asm-i386/ptrace.h>, and we didn't do that yet
for laziness only. There's no architecture that I know of, apart i386, which
implements SYSEMU (except maybe s390, but that isn't public).
> > That's exactly the problem we defined the 0x4200-0x4300
> > range
> > to prevent.

--
Inform me of my mistakes, so I can keep imitating Homer Simpson's "Doh!".
Paolo Giarrusso, aka Blaisorblade (Skype ID "PaoloGiarrusso", ICQ 215621894)
http://www.user-mode-linux.org/~blaisorblade





___________________________________
Yahoo! Mail: gratis 1GB per i messaggi e allegati da 10MB
http://mail.yahoo.it

2005-09-23 15:10:32

by Daniel Jacobowitz

[permalink] [raw]
Subject: Re: PTRACE_SYSEMU numbering

On Thu, Sep 22, 2005 at 09:46:38PM +0200, Blaisorblade wrote:
> The fix is easy, IMHO, and not even urgent. It suffices to move PTRACE_SYSEMU
> def from <linux/ptrace.h> to <asm-i386/ptrace.h>, and we didn't do that yet
> for laziness only. There's no architecture that I know of, apart i386, which
> implements SYSEMU (except maybe s390, but that isn't public).

Please either renumber it to something above 0x4200, or make it i386
private. If you intend for other architectures to implement it in the
future, renumbering it would be better.

--
Daniel Jacobowitz
CodeSourcery, LLC

2005-10-06 19:23:16

by Blaisorblade

[permalink] [raw]
Subject: Re: PTRACE_SYSEMU numbering

On Friday 23 September 2005 17:10, Daniel Jacobowitz wrote:
> On Thu, Sep 22, 2005 at 09:46:38PM +0200, Blaisorblade wrote:
> > The fix is easy, IMHO, and not even urgent. It suffices to move
> > PTRACE_SYSEMU def from <linux/ptrace.h> to <asm-i386/ptrace.h>, and we
> > didn't do that yet for laziness only. There's no architecture that I know
> > of, apart i386, which implements SYSEMU (except maybe s390, but that
> > isn't public).

> Please either renumber it to something above 0x4200,

> or make it i386
> private.
I'm going to do this.
> If you intend for other architectures to implement it in the
> future, renumbering it would be better.
Possibly yes, sooner or later ports will emerge, but this is already in
production, so I have ABI issues.

For new archs, I'll use the right range.
--
Inform me of my mistakes, so I can keep imitating Homer Simpson's "Doh!".
Paolo Giarrusso, aka Blaisorblade (Skype ID "PaoloGiarrusso", ICQ 215621894)
http://www.user-mode-linux.org/~blaisorblade





___________________________________
Yahoo! Mail: gratis 1GB per i messaggi e allegati da 10MB
http://mail.yahoo.it