Re: [patch 2/3]: entry.S trap return fixes

2005-04-12 Thread Stas Sergeev
Hello.
Andrew Morton wrote:
do_debug() returns void, do_int3() too when
This patch is applicable to the mainline kernel, is it not?
I think so - with some offsets it applies
and looks valid.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [patch 2/3]: entry.S trap return fixes

2005-04-12 Thread Andrew Morton
Stas Sergeev <[EMAIL PROTECTED]> wrote:
>
> do_debug() returns void, do_int3() too when
>  !CONFIG_KPROBES.
>  This patch fixes the CONFIG_KPROBES variant
>  of do_int3() to return void too and adjusts
>  the entry.S accordingly.
> 

This patch is applicable to the mainline kernel, is it not?


> 
> 
> 
> [kgdbfix1.diff  text/x-patch (1297 bytes)]
>  --- linux/arch/i386/kernel/entry.S.old   2005-04-12 09:47:38.0 
> +0400
>  +++ linux/arch/i386/kernel/entry.S   2005-04-12 11:13:03.0 +0400
>  @@ -550,8 +550,6 @@
>   xorl %edx,%edx  # error code 0
>   movl %esp,%eax  # pt_regs pointer
>   call do_debug
>  -testl %eax,%eax
>  -jnz restore_all
>   jmp ret_from_exception
>   
>   /*
>  @@ -632,8 +630,6 @@
>   xorl %edx,%edx  # zero error code
>   movl %esp,%eax  # pt_regs pointer
>   call do_int3
>  -testl %eax,%eax
>  -jnz restore_all
>   jmp ret_from_exception
>   
>   ENTRY(overflow)
>  --- linux/arch/i386/kernel/traps.c.old   2005-04-12 09:47:38.0 
> +0400
>  +++ linux/arch/i386/kernel/traps.c   2005-04-12 10:59:54.0 +0400
>  @@ -695,16 +695,15 @@
>   }
>   
>   #ifdef CONFIG_KPROBES
>  -fastcall int do_int3(struct pt_regs *regs, long error_code)
>  +fastcall void do_int3(struct pt_regs *regs, long error_code)
>   {
>   if (notify_die(DIE_INT3, "int3", regs, error_code, 3, SIGTRAP)
>   == NOTIFY_STOP)
>  -return 1;
>  +return;
>   /* This is an interrupt gate, because kprobes wants interrupts
>   disabled.  Normal trap handlers don't. */
>   restore_interrupts(regs);
>   do_trap(3, SIGTRAP, "int3", 1, regs, error_code, NULL);
>  -return 0;
>   }
>   #endif
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[patch 2/3]: entry.S trap return fixes

2005-04-12 Thread Stas Sergeev
Hello.
do_debug() returns void, do_int3() too when
!CONFIG_KPROBES.
This patch fixes the CONFIG_KPROBES variant
of do_int3() to return void too and adjusts
the entry.S accordingly.
Signed-off-by: Stas Sergeev <[EMAIL PROTECTED]>
--- linux/arch/i386/kernel/entry.S.old	2005-04-12 09:47:38.0 +0400
+++ linux/arch/i386/kernel/entry.S	2005-04-12 11:13:03.0 +0400
@@ -550,8 +550,6 @@
 	xorl %edx,%edx			# error code 0
 	movl %esp,%eax			# pt_regs pointer
 	call do_debug
-	testl %eax,%eax
-	jnz restore_all
 	jmp ret_from_exception
 
 /*
@@ -632,8 +630,6 @@
 	xorl %edx,%edx		# zero error code
 	movl %esp,%eax		# pt_regs pointer
 	call do_int3
-	testl %eax,%eax
-	jnz restore_all
 	jmp ret_from_exception
 
 ENTRY(overflow)
--- linux/arch/i386/kernel/traps.c.old	2005-04-12 09:47:38.0 +0400
+++ linux/arch/i386/kernel/traps.c	2005-04-12 10:59:54.0 +0400
@@ -695,16 +695,15 @@
 }
 
 #ifdef CONFIG_KPROBES
-fastcall int do_int3(struct pt_regs *regs, long error_code)
+fastcall void do_int3(struct pt_regs *regs, long error_code)
 {
 	if (notify_die(DIE_INT3, "int3", regs, error_code, 3, SIGTRAP)
 			== NOTIFY_STOP)
-		return 1;
+		return;
 	/* This is an interrupt gate, because kprobes wants interrupts
 	disabled.  Normal trap handlers don't. */
 	restore_interrupts(regs);
 	do_trap(3, SIGTRAP, "int3", 1, regs, error_code, NULL);
-	return 0;
 }
 #endif