Re: How to enable/disable security features on mmap() ?

Emmanuel Fleury
2005-12-08T14:40:42Z

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
(you have some need to avoid to use it in the case of the Crusoe processor:

Seen in karch/i386/ernel/cpu/transmeta.c:

#ifdef CONFIG_SYSCTL
/* randomize_va_space slows us down enormously;
it probably triggers retranslation of x86->native bytecode */
randomize_va_space = 0;
#endif

Regards
--
Emmanuel Fleury

Elegance is not optional.
-- Richard O'Keefe