what the difference between esp and esp0?
June 16, 2015
8:46 p.m.
On Tue, Jun 16, 2015 at 4:27 AM, hitmoon <zhaoxiaoqiang007@gmail.com> wrote:
Hi: I recently read the book "understanding the linux kernel 3rd", in the task switch process, there are two esp in thread_struct. In macro 'switch_to' , The esp is loaded to switch to the next's kernel stack, but in '__switch_to', esp0 is copied to tss's esp0 field, what the esp0 mean? What the difference between them?
esp0 is the stack pointer that is loaded into esp when the privileged level changes to 0. For example, when a process running in user mode (level 3) jumps into the kernel via a system call. You can read more about it in the Intel SDM, Volume 3 Chapter 7. http://www.intel.com/content/www/us/en/processors/architectures-software-dev...
4076
Age (days ago)
4077
Last active (days ago)
2 comments
2 participants
participants (2)
-
David Matlack -
hitmoon