Interrupt Stack, kernel thread - Linux

This is a discussion on Interrupt Stack, kernel thread - Linux ; hi I've a strange effect in my kernel modul, possibly it could be a stack overflow. So im wondering what happens if an interrupt interupts a kernel thread. Uses the interrupt the same stack as the thread? Is there a ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: Interrupt Stack, kernel thread

  1. Interrupt Stack, kernel thread

    hi

    I've a strange effect in my kernel modul, possibly it could be a
    stack overflow. So im wondering what happens if an interrupt interupts
    a kernel thread. Uses the interrupt the same stack as the thread?

    Is there a way to catch the pike amout of stack used by a kernel
    thread?

    thx
    Andreas


  2. Re: Interrupt Stack, kernel thread

    unifire д:
    > hi
    >
    > I've a strange effect in my kernel modul, possibly it could be a
    > stack overflow. So im wondering what happens if an interrupt interupts
    > a kernel thread. Uses the interrupt the same stack as the thread?
    >
    > Is there a way to catch the pike amout of stack used by a kernel
    > thread?
    >
    > thx
    > Andreas
    >


    If CONFIG_4KSTACKS is enabled(i386 only), the interrupt handler uses its
    own stack, otherwise uses the process's.

    I think the following code will help:

    #define GET_ESP(esp) do {\
    __asm__ __volatile__ ("movl %%esp, %0\n\t"\
    :"=m" (esp)\
    :\
    :"memory"); \
    } while(0);

    and minus with (unsigned long )current. FIXME
    Alan Camus

+ Reply to Thread