i have my kernel loaded at 0xC0000000, when my kernel starts it uses a temporary stack in the bss section of 4096 bytes, it then enters in protected mode starting using the user mode stack at 0xBFFF0000, when it forks for the first:
all the kernel code pages are linked
all the user mode pages (under 0xC0000000) are copied in new frames.
Everithing works but...what about the kernel stack i don't want a shared one i want that every process have his kernel stack (it's correct?! )
So where to put the kernel stack?! i have to copy the content of the temporary one in a new frame before the fork so that when a fork happens all the processes have the same virtual stack address? because if i don't copy it before the first fork the first forked process must be treated in a different way than the 2nd , 3rd, etc forked tasks.
I don't know if it's clear but if it's not the kernel of the question is: TELL ME ABOUT THE KERNEL STACK
