- 论坛徽章:
- 0
|
原帖由 cuer_2 于 2009-6-9 08:44 发表
当进程发生切换了
当它再次被调度 此时它的系统堆栈中的数据还在吗?
应该是没有清空的。
在返回userspace前最后几条指令还在使用栈上的内容,见restore_all。
---movb PT_OLDSS(%esp), %ah
>---movb PT_CS(%esp), %al
>---andl $(X86_EFLAGS_VM | (SEGMENT_TI_MASK << 8) | SEGMENT_RPL_MASK), %eax
>---cmpl $((SEGMENT_LDT << 8) | USER_RPL), %eax
>---CFI_REMEMBER_STATE
>---je ldt_ss>-->--->---# returning to user-space with LDT SS
restore_nocheck:
>---TRACE_IRQS_IRET
restore_nocheck_notrace:
>---RESTORE_REGS
>---addl $4, %esp>-->--->---# skip orig_eax/error_code
>---CFI_ADJUST_CFA_OFFSET -4
irq_return:
>---INTERRUPT_RETURN |
|