[lkml]   [2006]   [May]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: Segfault on the i386 enter instruction
    Tomasz Malesinski <> writes:

    > The code attached below segfaults on the enter instruction. It works
    > when a stack frame is created by the three commented out
    > instructions and also when the first operand of the enter instruction
    > is small (less than about 6500 on my system).

    The difference is the value of the stack pointer when the page fault
    of extending the stack downwards occurs. For the long sequence
    ESP is already changed when it happens. For ENTER the CPU undoes
    the change before raising the fault. The page fault handler
    checks the page fault against ESP to catch invalid references below
    the stack.

    I don't think the 64bit kernel does anything different here than the
    32bit kernel. I tested it on a 32bit box and it faulted there too.

    Handling it like you expect would require to disassemble
    the function in the page fault handler and it's probably not
    worth doing that for this weird case.

    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2006-05-12 15:52    [W:0.019 / U:9.636 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site