~ubuntu-branches/ubuntu/quantal/linux-lowlatency/quantal

« back to all changes in this revision

Viewing changes to arch/x86/kernel/process.c

  • Committer: Package Import Robot
  • Author(s): Alessio Igor Bogani
  • Date: 2011-10-26 11:13:05 UTC
  • Revision ID: package-import@ubuntu.com-20111026111305-04kado7d1u2er2rl
Tags: 3.2.0-16.25
Add new lowlatency kernel flavour

Show diffs side-by-side

added added

removed removed

Lines of Context:
663
663
unsigned long arch_randomize_brk(struct mm_struct *mm)
664
664
{
665
665
        unsigned long range_end = mm->brk + 0x02000000;
666
 
        return randomize_range(mm->brk, range_end, 0) ? : mm->brk;
 
666
        unsigned long bump = 0;
 
667
#ifdef CONFIG_X86_32
 
668
        /* when using ASLR in arch_get_unmapped_exec_area, we must shove
 
669
           the brk segment way out of the way of the exec area, since it
 
670
           can collide with future allocations if not. */
 
671
        if ( (mm->get_unmapped_exec_area == arch_get_unmapped_exec_area) &&
 
672
             (mm->brk < 0x08000000) ) {
 
673
                bump = (TASK_SIZE/6);
 
674
        }
 
675
#endif
 
676
        return bump + (randomize_range(mm->brk, range_end, 0) ? : mm->brk);
667
677
}
668
678