Re: [PATCH] Fix out-by-one error in traps.c

2007-09-04 Thread Rusty Russell
On Fri, 2007-08-31 at 11:24 -0700, Linus Torvalds wrote: > > On Sat, 1 Sep 2007, Rusty Russell wrote: > > > > This is only for the initial booting stack (init_thread_union); see > > arch/i386/kernel/head.S: > > /* Set up the stack pointer */ > > lss stack_start,%esp > > ... > > pu

Re: [PATCH] Fix out-by-one error in traps.c

2007-08-31 Thread Linus Torvalds
On Sat, 1 Sep 2007, Rusty Russell wrote: > > This is only for the initial booting stack (init_thread_union); see > arch/i386/kernel/head.S: > /* Set up the stack pointer */ > lss stack_start,%esp > ... > pushl $0# fake return address for unwinder Ok, we s

Re: [PATCH] Fix out-by-one error in traps.c

2007-08-31 Thread Rusty Russell
On Fri, 2007-08-31 at 00:51 -0700, Linus Torvalds wrote: > > On Fri, 31 Aug 2007, Rusty Russell wrote: > > head.S pushes a "$0" on the stack to stop the unwinder, lguest doesn't. > > The unwinder should stop when it sees an invalid frame pointer, and even > without the push 0 I'd have expected i

Re: [PATCH] Fix out-by-one error in traps.c

2007-08-31 Thread Linus Torvalds
On Fri, 31 Aug 2007, Rusty Russell wrote: > On Thu, 2007-08-30 at 21:44 -0700, Linus Torvalds wrote: > > > > Hmm.. This *really* cannot happen with a normal kernel - it implies that > > the stack has crossed into an invalid page. > > AFAICT, a corrupt stack could lead us to touch a page whic

Re: [PATCH] Fix out-by-one error in traps.c

2007-08-30 Thread Rusty Russell
On Thu, 2007-08-30 at 21:44 -0700, Linus Torvalds wrote: > > On Fri, 31 Aug 2007, Rusty Russell wrote: > > > > We don't care if ebp is on the stack, we care about ebp + 4. Without > > this, lguest (with CONFIG_DEBUG_LOCKDEP) can touch a page unmapped by > > CONFIG_DEBUG_PAGEALLOC. > > Hmm.. This

Re: [PATCH] Fix out-by-one error in traps.c

2007-08-30 Thread Linus Torvalds
On Fri, 31 Aug 2007, Rusty Russell wrote: > > We don't care if ebp is on the stack, we care about ebp + 4. Without > this, lguest (with CONFIG_DEBUG_LOCKDEP) can touch a page unmapped by > CONFIG_DEBUG_PAGEALLOC. Hmm.. This *really* cannot happen with a normal kernel - it implies that the stac

[PATCH] Fix out-by-one error in traps.c

2007-08-30 Thread Rusty Russell
We don't care if ebp is on the stack, we care about ebp + 4. Without this, lguest (with CONFIG_DEBUG_LOCKDEP) can touch a page unmapped by CONFIG_DEBUG_PAGEALLOC. Signed-off-by: Rusty Russell <[EMAIL PROTECTED]> diff -r b0b1ab8ecf48 arch/i386/kernel/traps.c --- a/arch/i386/kernel/traps.c Fri Au