Re: How to enable/disable security features on mmap() ?
From: Arjan van de Ven
Date: Thu Dec 08 2005 - 09:48:26 EST
On Thu, 2005-12-08 at 15:39 +0100, Emmanuel Fleury wrote:
> I guess that setting the variable randomize_va_space to 0 just remove
> the stack pointer (sp) randomization.
>
> Seen in arch/i386/kernel/process.c:
>
> unsigned long arch_align_stack(unsigned long sp)
> {
> if (randomize_va_space)
> sp -= get_random_int() % 8192;
> return sp & ~0xf;
> }
>
> Why not having defined this as a CONFIG_STACK_RANDOMIZATION variables
well it's a /proc/ variable already! So you can just turn it off
entirely at runtime. (what is better is that you use the setarch program
to turn it off for selected programs though...)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/