diff options
author | Alex Auvolat <alex.auvolat@ens.fr> | 2014-12-06 20:05:02 +0100 |
---|---|---|
committer | Alex Auvolat <alex.auvolat@ens.fr> | 2014-12-06 20:05:02 +0100 |
commit | b38d90b5cacee9bfc775f1fa4b31c5863654c5e8 (patch) | |
tree | 4e8c8eecbdc49dff1d2352eae177eb855ac1d53b /kernel/l0/loader.s | |
parent | a48466109f59d507f9108635a5dc4ec865173f85 (diff) | |
download | kogata-b38d90b5cacee9bfc775f1fa4b31c5863654c5e8.tar.gz kogata-b38d90b5cacee9bfc775f1fa4b31c5863654c5e8.zip |
Add kernel stack protector. Find bug. Correct it.
Diffstat (limited to 'kernel/l0/loader.s')
-rw-r--r-- | kernel/l0/loader.s | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/kernel/l0/loader.s b/kernel/l0/loader.s index 6ad4ff0..5d0a2b8 100644 --- a/kernel/l0/loader.s +++ b/kernel/l0/loader.s @@ -1,6 +1,7 @@ [EXTERN kmain] ; kmain is defined in kmain.c [GLOBAL loader] ; making entry point visible to linker -[GLOBAL kernel_pd] ; make kernel page directory visible +[GLOBAL kernel_pd] ; make kernel page directory visible +[GLOBAL kernel_stack_protector] ; used to detect kernel stack overflow ; higher-half kernel setup K_HIGHHALF_ADDR equ 0xC0000000 @@ -74,7 +75,9 @@ hang: jmp hang [section .bss] -align 4 +align 0x1000 +kernel_stack_protector: + resb 0x1000 ; as soon as we have efficient paging, we WON'T map this page stack_bottom: resb LOADER_STACK_SIZE stack_top: |