public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andi Kleen <ak@suse.de>
To: Andrew Morton <akpm@osdl.org>
Cc: "bibo,mao" <bibo.mao@intel.com>,
	jbeulich@novell.com, anil.s.keshavamurthy@intel.com,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH]x86_64 debug_stack nested patch (again)
Date: Thu, 11 May 2006 13:28:44 +0200	[thread overview]
Message-ID: <200605111328.45244.ak@suse.de> (raw)
In-Reply-To: <20060511041700.49c3bab0.akpm@osdl.org>

On Thursday 11 May 2006 13:17, Andrew Morton wrote:
> "bibo,mao" <bibo.mao@intel.com> wrote:
> >
> > 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
> 
> So....   why not do it this way?

Last time we discussed this I was told it could nest upto 3 or 4 times
So that still wouldn't work.

If anything they should decrease the int3/debug stack to 2K, then 8K 
might be enough.

Or even better would be to fix kprobes to not do that.

I think paranoidentry would need to be fixed for that too.

-Andi


  reply	other threads:[~2006-05-11 11:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2006-05-16  9:42     ` bibo,mao

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200605111328.45244.ak@suse.de \
    --to=ak@suse.de \
    --cc=akpm@osdl.org \
    --cc=anil.s.keshavamurthy@intel.com \
    --cc=bibo.mao@intel.com \
    --cc=jbeulich@novell.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox