Skip to contentSkip to conversation

ptrace: remove PT_DTRACE from m68k, m68knommu

PATCH In review Oleg Nesterov 4 participants 6 messages Apr 23, 2009 – Apr 24, 2009 m68k architecture

lore
Share & tools
lore
#0 lore raw

PATCH 3/4 ptrace: remove PT_DTRACE from m68k, m68knommu

m68k sets PT_DTRACE in trap_c() but never uses it.

 arch/m68k/kernel/traps.c            |    1 -
 arch/m68knommu/kernel/asm-offsets.c |    1 -
 arch/m68knommu/kernel/traps.c       |    1 -
 3 files changed, 3 deletions(-)
arch/m68k/kernel/traps.c renamed from arch/m68k/kernel/traps.c~DT_3_SET +0 -1
@@ -1057,7 +1057,6 @@ asmlinkage void trap_c(struct frame *fp)
 	if (fp->ptregs.sr & PS_S) {
 		if ((fp->ptregs.vector >> 2) == VEC_TRACE) {
 			/* traced a trapping instruction */
-			current->ptrace |= PT_DTRACE;
 		} else
 			bad_super_trap(fp);
 		return;
arch/m68knommu/kernel/asm-offsets.c renamed from arch/m68knommu/kernel/asm-offsets.c~DT_3_SET +0 -1
@@ -79,7 +79,6 @@ int main(void)
 	DEFINE(TRAP_TRACE, TRAP_TRACE);
 
 	DEFINE(PT_PTRACED, PT_PTRACED);
-	DEFINE(PT_DTRACE, PT_DTRACE);
 
 	DEFINE(THREAD_SIZE, THREAD_SIZE);
 
arch/m68knommu/kernel/traps.c renamed from arch/m68knommu/kernel/traps.c~DT_3_SET +0 -1
@@ -200,7 +200,6 @@ asmlinkage void trap_c(struct frame *fp)
 	if (fp->ptregs.sr & PS_S) {
 		if ((fp->ptregs.vector >> 2) == VEC_TRACE) {
 			/* traced a trapping instruction */
-			current->ptrace |= PT_DTRACE;
 		} else
 			bad_super_trap(fp);
 		return;
Acked-by on v1 3/4
#1 lore raw
Quoted 3 lines · Oleg Nesterov

m68k sets PT_DTRACE in trap_c() but never uses it.

Quoted 37 lines
 arch/m68k/kernel/traps.c            |    1 -
 arch/m68knommu/kernel/asm-offsets.c |    1 -
 arch/m68knommu/kernel/traps.c       |    1 -
 3 files changed, 3 deletions(-)
arch/m68k/kernel/traps.c renamed from arch/m68k/kernel/traps.c~DT_3_SET +0 -1
@@ -1057,7 +1057,6 @@ asmlinkage void trap_c(struct frame *fp)
 	if (fp->ptregs.sr & PS_S) {
 		if ((fp->ptregs.vector >> 2) == VEC_TRACE) {
 			/* traced a trapping instruction */
-			current->ptrace |= PT_DTRACE;
 		} else
 			bad_super_trap(fp);
 		return;
arch/m68knommu/kernel/asm-offsets.c renamed from arch/m68knommu/kernel/asm-offsets.c~DT_3_SET +0 -1
@@ -79,7 +79,6 @@ int main(void)
 	DEFINE(TRAP_TRACE, TRAP_TRACE);
 
 	DEFINE(PT_PTRACED, PT_PTRACED);
-	DEFINE(PT_DTRACE, PT_DTRACE);
 
 	DEFINE(THREAD_SIZE, THREAD_SIZE);
 
arch/m68knommu/kernel/traps.c renamed from arch/m68knommu/kernel/traps.c~DT_3_SET +0 -1
@@ -200,7 +200,6 @@ asmlinkage void trap_c(struct frame *fp)
 	if (fp->ptregs.sr & PS_S) {
 		if ((fp->ptregs.vector >> 2) == VEC_TRACE) {
 			/* traced a trapping instruction */
-			current->ptrace |= PT_DTRACE;
 		} else
 			bad_super_trap(fp);
 		return;
Signature · 5 lines
------------------------------------------------------------------------
Greg Ungerer  --  Principal Engineer        EMAIL:     [email protected]
SnapGear Group, McAfee                      PHONE:       +61 7 3435 2888
825 Stanley St,                             FAX:         +61 7 3891 3630
Woolloongabba, QLD, 4102, Australia         WEB: http://www.SnapGear.com
maintainer Acked-by on v1 3/4
#2 lore raw
In reply to Oleg Nesterov
Quoted 3 lines · Oleg Nesterov

m68k sets PT_DTRACE in trap_c() but never uses it.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

#3 lore raw
In reply to Oleg Nesterov
Quoted 12 lines · Oleg Nesterov

m68k sets PT_DTRACE in trap_c() but never uses it.

 arch/m68k/kernel/traps.c            |    1 -
 arch/m68knommu/kernel/asm-offsets.c |    1 -
 arch/m68knommu/kernel/traps.c       |    1 -
 3 files changed, 3 deletions(-)

arch/m68k/kernel/traps.c asmlinkage void trap_c(struct frame *fp) · line 1060

Quoted 4 lines
arch/m68k/kernel/traps.c renamed from arch/m68k/kernel/traps.c~DT_3_SET +0 -1
@@ -1057,7 +1057,6 @@ asmlinkage void trap_c(struct frame *fp)
 	if (fp->ptregs.sr & PS_S) {
 		if ((fp->ptregs.vector >> 2) == VEC_TRACE) {
 			/* traced a trapping instruction */
-			current->ptrace |= PT_DTRACE;

This is supposed to be setting the TIF_DELAYED_TRACE thread flag.

Andreas.

Signature · 3 lines
Andreas Schwab, [email protected]
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."
#4 lore raw
Quoted 11 lines · Andreas Schwab
Quoted 9 lines · Oleg Nesterov

m68k sets PT_DTRACE in trap_c() but never uses it.

 arch/m68k/kernel/traps.c            |    1 -
 arch/m68knommu/kernel/asm-offsets.c |    1 -
 arch/m68knommu/kernel/traps.c       |    1 -

 3 files changed, 3 deletions(-)
Quoted 9 lines

arch/m68k/kernel/traps.c   2009-04-22 21:52:23.000000000 +0200 asmlinkage void trap_c(struct frame *fp) · line 1060

Quoted 7 lines
arch/m68k/kernel/traps.c   2009-04-22 21:52:23.000000000 +0200 renamed from arch/m68k/kernel/traps.c~DT_3_SET  2009-04-06 00:03:35.000000000 +0200 +0 -1
@@ -1057,7 +1057,6 @@ asmlinkage void trap_c(struct frame *fp)
       if (fp->ptregs.sr & PS_S) {
               if ((fp->ptregs.vector >> 2) == VEC_TRACE) {
                       /* traced a trapping instruction */
-                     current->ptrace |= PT_DTRACE;

This is supposed to be setting the TIF_DELAYED_TRACE thread flag.

This code already looks different in the m68k tree, due to your fix to `Allow all kernel traps to be handled via exception fixups' for ARAnyM, and some related cleanups by you and Roman.

But more interestingly, Roman's last cleanup said there's no need to set TIF_DELAYED_TRACE?

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

#5 lore raw
Quoted 2 lines · Geert Uytterhoeven

But more interestingly, Roman's last cleanup said there's no need to set TIF_DELAYED_TRACE?

Ok, I remember now.

Andreas.

Signature · 3 lines
Andreas Schwab, [email protected]
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."