public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH]x86_64 debug_stack nested patch (again)
@ 2006-05-10  9:26 bibo,mao
  2006-05-11 11:17 ` Andrew Morton
  0 siblings, 1 reply; 4+ messages in thread
From: bibo,mao @ 2006-05-10  9:26 UTC (permalink / raw)
  To: akpm; +Cc: Andi Kleen, Jan Beulich, Anil S Keshavamurthy, linux-kernel

Hi,
In x86_64 platform, INT1 and INT3 trap stack is IST stack called DEBUG_STACK,
when INT1/INT3 trap happens, system will switch to DEBUG_STACK by hardware. 
Current DEBUG_STACK size is 4K, when int1/int3 trap happens, kernel will 
minus current DEBUG_STACK IST value by 4k. But if int3/int1 trap is nested, 
it will destroy other vector's IST stack. This patch modifies this, it sets 
DEBUG_STACK size as 8K and allows two level of nested int1/int3 trap.

Kprobe DEBUG_STACK may be nested, because kprobe hanlder may be probed 
by other kprobes. This patch is against 2.6.17-rc3. Thanks jbeulich for pointing out error in the first patch.

Signed-Off-By: bibo, mao <bibo.mao@intel.com>

--- 2.6.17-rc3.org/include/asm-x86_64/page.h	2006-05-10 12:07:18.000000000 +0800
+++ 2.6.17-rc3/include/asm-x86_64/page.h	2006-05-10 12:19:24.000000000 +0800
@@ -20,7 +20,7 @@
 #define EXCEPTION_STACK_ORDER 0
 #define EXCEPTION_STKSZ (PAGE_SIZE << EXCEPTION_STACK_ORDER)
 
-#define DEBUG_STACK_ORDER EXCEPTION_STACK_ORDER
+#define DEBUG_STACK_ORDER (EXCEPTION_STACK_ORDER + 1)
 #define DEBUG_STKSZ (PAGE_SIZE << DEBUG_STACK_ORDER)
 
 #define IRQSTACK_ORDER 2


Thanks
bibo,mao

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-05-16  9:43 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-05-10  9:26 [PATCH]x86_64 debug_stack nested patch (again) bibo,mao
2006-05-11 11:17 ` Andrew Morton
2006-05-11 11:28   ` Andi Kleen
2006-05-16  9:42     ` bibo,mao

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox