Kernel Stack Virtual Address

410 Views Asked by At

Is the linux kernel stack at the same virtual address in each process context?

Before answer, please note that I've specified the KERNEL stack and not the user space one.

1

There are 1 best solutions below

0
On

If you have only one core then you only need one kernel stack. If you have more than one core than is possible two or more cores execute kernel code so there will be problem if two cores use the same stack. Of course kernel must map all the stacks to all virtual address spaces because the different stack is per cpu not per process and a process may run by two cpus (not the same time) and they will need to find at every process virtual address space his own stack.