[lkml]   [2005]   [Dec]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: 4k stacks
    On Saturday 24 December 2005 07:03, Denis Vlasenko wrote:
    > + movl %esp, %edi
    > + movl %edi, %ecx
    > + andl $~0x1000, %edi
    > + subl %edi, %ecx
    > ecx will be equal to ?

    0x1000 with 8k stacks, so long as %esp in in the top page of the 2 page
    stack. 0x0 otherwise. Which explains why the poisoning crashes the kernel
    with 4k stacks.

    But there's another problem with Dick Johnson's approach, and that is that
    he doesn't clear the poison when a kernel stack is freed. (I don't believe
    the kernel does this automatically, though I could be mistaken). And that
    means that the results can't be trusted: if you have a string of 20 Qs,
    _something's_ overwritten the rest, but that something wasn't necessarily
    using the memory as a stack at the time. More than that, with the Qs
    spread over two pages it's quite possible for one page to be overwritten
    and the other still free with it's 20 or so Qs.

    Andrew Wade
    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: 2005-12-25 03:48    [W:0.020 / U:35.672 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site