lkml.org 
[lkml]   [2004]   [Feb]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [BUG] get_unmapped_area() change -> non booting machine


    On Thu, 12 Feb 2004, Dave McCracken wrote:
    >
    > So what's a reasonable value for 'not just above' and 'not just below'? We
    > could skip the entire hole, which would give us reasonable behavior for the
    > brk area, but it wouldn't work so well for the area below the stack. I'm
    > sure if we define a 'reasonable' value to skip someone somewhere will
    > collide with it.

    Well, we have had _exactly_ this issue before, which is why I mentioned
    it.

    See the HP-PA support code (for "CONFIG_STACK_GROWSUP") for setting up the
    stack in such a way that it leaves some empty space above it in fs/exec.c,
    for example. There it does

    ...
    /* Limit stack size to 1GB */
    stack_base = current->rlim[RLIMIT_STACK].rlim_max;
    if (stack_base > (1 << 30))
    stack_base = 1 << 30;
    stack_base = PAGE_ALIGN(STACK_TOP - stack_base);
    ...

    it it uses RLIMIT_STACK plus a maximum limit (although it's a _big_
    maximum limit, much bigger than we'd use for BSS). So we could do
    something similar for the BSS, with obviously a smaller hard limit (on a
    64-bit architecture a gigabyte is fine, but ..)

    Linus
    -
    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-11-18 23:46    [W:0.022 / U:33.004 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site