[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <46D6E32F.30204@gmail.com>
Date: Thu, 30 Aug 2007 17:33:03 +0200
From: Franck Bui-Huu <vagabon.xyz@...il.com>
To: Jiri Kosina <jkosina@...e.cz>
CC: Mike Frysinger <vapier.adi@...il.com>,
Andrew Morton <akpm@...ux-foundation.org>,
linux-kernel@...r.kernel.org
Subject: Re: [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@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists