On Oct 26 2007 13:30, Hugh Dickins wrote: >> @@ -251,7 +251,8 @@ asmlinkage unsigned long sys_brk(unsigned long brk) >> * not page aligned -Ram Gupta >> */ >> rlim = current->signal->rlim[RLIMIT_DATA].rlim_cur; >> - if (rlim < RLIM_INFINITY && brk - mm->start_data > rlim) >> + if (rlim < RLIM_INFINITY && (brk - mm->start_brk) + >> + (mm->end_data - mm->start_data) > rlim) >> goto out; >> >> newbrk = PAGE_ALIGN(brk); Parentheses around (brk - mm->start_brk) + (mm->end_data - mm->start_data) not strictly necessary. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
- Follow-Ups:
- References:
- x86: randomize brk() and RLIMIT_DATA
- From: Sami Farin <[email protected]>
- Re: x86: randomize brk() and RLIMIT_DATA
- From: Arjan van de Ven <[email protected]>
- Re: x86: randomize brk() and RLIMIT_DATA
- From: Jiri Kosina <[email protected]>
- Re: x86: randomize brk() and RLIMIT_DATA
- From: Sami Farin <[email protected]>
- [PATCH] [RFC] brk randomization: compute RLIMIT_DATA properly (was Re: x86: randomize brk() and RLIMIT_DATA)
- From: Jiri Kosina <[email protected]>
- Re: [PATCH] [RFC] brk randomization: compute RLIMIT_DATA properly (was Re: x86: randomize brk() and RLIMIT_DATA)
- From: Hugh Dickins <[email protected]>
- Re: [PATCH] [RFC] brk randomization: compute RLIMIT_DATA properly (was Re: x86: randomize brk() and RLIMIT_DATA)
- From: Jiri Kosina <[email protected]>
- Re: [PATCH] [RFC] brk randomization: compute RLIMIT_DATA properly (was Re: x86: randomize brk() and RLIMIT_DATA)
- From: Hugh Dickins <[email protected]>
- x86: randomize brk() and RLIMIT_DATA
- Prev by Date: Re: [PATCH] [RFC] brk randomization: compute RLIMIT_DATA properly (was Re: x86: randomize brk() and RLIMIT_DATA)
- Next by Date: Re: [AppArmor 35/45] Allow permission functions to tell between parent and leaf checks
- Previous by thread: Re: [PATCH] [RFC] brk randomization: compute RLIMIT_DATA properly (was Re: x86: randomize brk() and RLIMIT_DATA)
- Next by thread: Re: [PATCH] [RFC] brk randomization: compute RLIMIT_DATA properly (was Re: x86: randomize brk() and RLIMIT_DATA)
- Index(es):