title: When starting a system call, how are user-mode ss and esp saved, e.g. in linux?
body: <p>I know user-mode ss/esp should be saved into the kernel-mode stack for later restore.</p>
  
  <p>The question is that to locate kernel-mode stack, ss/esp have to be loaded with the corresponding kernel-mode values first. Now it seems to me that user-mode ss/esp have been flushed. Then how does the hardware/system retrieve the user-mode ss/esp?</p>
  
  <p>Are user-mode ss and esp saved in some temporary places? Or the operation is supported by x86 circuit?</p>