Re: crash in entry.S restore_all, 2.6.12-rc2, x86, PAGEALLOC

Linus Torvalds
2005-04-05T21:03:28Z

On Tue, 5 Apr 2005, Ingo Molnar wrote:
>
> esi: 009b63f9 edi: 00000001 ebp: f543a000 esp: f543bfc8
>
> i.e. esp & 0xfff was 0xfc8 - while i think it should normally be 0xfc4
> (page boundary minus size of pt_regs == 0 - 0x3c == 0xfc4). So somewhere
> we lost 4 bytes of esp? An extra popl, or an addl $4, %esp? But why dont
> we crash in that case

Normally, esp will be immediately reset by any user-land stuff: we'll
forget the old kernel stack entirely, and always re-load esp from the esp0
thing in the TSS.

And as long as we stay in kernel land, we'll obviously never touch the
esp/xss fields of pt_regs (except in this special case of doing the
speculative load of xss), so...

Linus