lkml.org 
[lkml]   [2005]   [Apr]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: crash in entry.S restore_all, 2.6.12-rc2, x86, PAGEALLOC

* Linus Torvalds <torvalds@osdl.org> wrote:

> > > So I'd actually prefer to get that mystery explained..
> > IIRC if the interrupt doesn't do the CPL
> > switch, the interrupt gate doesn't save
> > the stack, and so there may not be the
> > full "struct pt_regs" when the kernel
> > thread is interrupted.
>
> Yes. But how do you have _such_ an empty stack when the interrupt
> comes in? See what I mean? IOW, that requires that the kernel stack
> would have only two words on it when the interrupt happens. How?
>
> It may be a 4kB stack issue or something. Does this happen only with
> CONFIG_4KSTACKS, and just after a stack switch to an irq stack, for
> example?

i didnt have 4K stacks set. In all crashes, esp had the same pattern:

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 - it ought to shift all the pt_regs structure by a
word, making it a completely senseless return frame. Any task in such a
situation ought to at least segfault. So if this is during thread
startup, i dont know how it survives the first execution.

Ingo
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-04-06 13:31    [W:0.362 / U:0.288 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site