lkml.org 
[lkml]   [2007]   [Aug]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] i386 and x86_64: randomize brk()
Jiri Kosina wrote:
> On Thu, 30 Aug 2007, Mike Frysinger wrote:
>
>> Blackfin too please :) i think v850 also falls into this category, but
>> i'm not terribly familiar with it ...
>
> Andrew, do you still strongly oppose to having ARCH_HAS_RANDOMIZE_BRK
> macro instead please?
>

you might want to use a weak function instead ?

void __weak arch_randomize_brk(void)
{
/* nada by default */
}

and overload it only for x86 architectures by now.

BTW, how about minimize the arch specific code by slighly changing its
prototype ?

unsigned long arch_randomize_brk(struct mm_struct *mm)
{
unsigned long range_end = mm->brk + 0x02000000;

return randomize_range(mm->brk, range_end, 0) ? : mm->brk;
}

Franck
-
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: 2007-08-30 17:35    [W:0.055 / U:0.376 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site