Re: Patch 4/6 randomize the stack pointer

From: Linus Torvalds
Date: Thu Jan 27 2005 - 16:22:21 EST




On Thu, 27 Jan 2005, Arjan van de Ven wrote:
>
> and then there are architectures with an upward growing stack....
> and maybe the alignment will even vary per cpu type (runtime) for some
> architectures? Maybe arch maintainers can jump in quickly to say if a
> scheme with a per arch shift factor would be sufficient or if all kinds
> of horrors would creep up for them (in which case a per arch function
> would be more suitable)

I think it's much nicer to just have the generic randomization hook, and
not try to do something fancy. It's not like this is complex, and it's a
lot better to have the same (simple) code duplicated five times than it is
to make a (much more complex) interface to have things shared.

Linus
-
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/