lkml.org 
[lkml]   [2009]   [Dec]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    Date
    SubjectRe: [uClinux-dev] Re: [PATCH] NOMMU: add [stack] label to per-process maps output
    On Wed, Dec 16, 2009 at 11:59, David Howells wrote:
    > Mike Frysinger wrote:
    >> +             if (vma->vm_start <= mm->start_brk &&
    >> +                             vma->vm_end >= mm->brk) {
    >
    > Hmmm...  That ought to involve mm->start_stack somewhere...  (Or, more
    > probably, task->stack_start:-/)

    with MMU, the [heap] (i.e. brk) and [stack] are different mappings.
    under NOMMU, they're the same mapping, except that no one uses the brk
    and the "heap" is really all of dynamic kernel memory. so we have to
    avoid the brk/[heap] check and simply copy over the [stack] one:
    } else if (mm) {
    if (vma->vm_start <= mm->start_stack &&
    vma->vm_end >= mm->start_stack) {
    pad_len_spaces(m, len);
    seq_puts(m, "[stack]");
    }
    }

    the semi-annoying thing is that FLAT combines a whole lot of stuff
    (including the stack) into the same mapping giving us the output:
    root:/> cat /proc/155/maps
    029f0000-029f9000 rwxp 00000000 00:00 0 [stack]

    but i guess this is no worse than the current ?
    -mike
    --
    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: 2009-12-17 23:51    [W:2.406 / U:0.004 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site