Skip to contentSkip to conversation

PTRACE_SYSEMU numbering

PATCH Daniel Jacobowitz 3 participants 5 messages Sep 21, 2005 – Oct 6, 2005 ptrace support

lore
Share & tools
lore
#0 lore raw

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

include/linux/ptrace.h +1 -0
@@ -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.

Signature · 2 lines
Daniel Jacobowitz
CodeSourcery, LLC
#1 lore raw

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

Quoted 13 lines · Daniel Jacobowitz

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

include/linux/ptrace.h +1 -0
@@ -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

Quoted 10 lines

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.

Signature · 2 lines
Daniel Jacobowitz
CodeSourcery, LLC

Laurent Vivier
[email protected]

#2 lore raw
Quoted 15 lines · Laurent Vivier

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

Quoted 7 lines

+#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.

Quoted 4 lines
Quoted 4 lines

But can we fix
this?

You've added PTRACE_SYSEMU on top of PTRACE_GETFDPIC,

Ok, I see the value on frv.

Quoted 7 lines
Quoted 7 lines

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).

Quoted 3 lines
Quoted 3 lines

That's exactly the problem we defined the 0x4200-0x4300 range
to prevent.

Signature · 11 lines
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
#3 lore raw
Quoted 4 lines · Blaisorblade

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.

Signature · 2 lines
Daniel Jacobowitz
CodeSourcery, LLC
#4 lore raw
Quoted 11 lines · Daniel Jacobowitz
Quoted 5 lines · Blaisorblade

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.

Quoted 2 lines

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.

Signature · 11 lines
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