arch: randomize initial user stack pointer

Inside the page randomization of initial user stack pointer is not only a part
of ASLR implementation but also a performance improvement that helps
eliminating aligned 64 kB data access.

Minimal user stack size is increased to 8 kB in order to ensure that regardless
of initial stack pointer value there is still enough space on stack.
This commit is contained in:
Pawel Dziepak
2013-04-04 15:16:20 +02:00
parent a37c845e52
commit 3b4269ecf5
3 changed files with 21 additions and 1 deletions
+1 -1
View File
@@ -15,7 +15,7 @@
#define USER_STACK_GUARD_SIZE (4 * B_PAGE_SIZE) // 16 kB
#define USER_MAIN_THREAD_STACK_SIZE (16 * 1024 * 1024) // 16 MB
#define USER_STACK_SIZE (256 * 1024) // 256 kB
#define MIN_USER_STACK_SIZE (4 * 1024) // 4 KB
#define MIN_USER_STACK_SIZE (8 * 1024) // 8 kB
#define MAX_USER_STACK_SIZE (16 * 1024 * 1024) // 16 MB