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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.000000000 +0400
+++ linux/arch/i386/kernel/entry.S	2005-04-12 11:13:03.000000000 +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.000000000 +0400
+++ linux/arch/i386/kernel/traps.c	2005-04-12 10:59:54.000000000 +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
 

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux