使用 task gate 进行任务切换

来源:互联网 发布:网络不安全事件 编辑:程序博客网 时间:2024/06/05 11:30

转自:点击打开链接

指令:

  call 0x20:00000000
  jmp 0x20:00000000
-----------------------------------
  selector 0x20 是个 task gate 的 selector


  这里使用 task gate 任务切换与使用 TSS selector 的情形基本一样。


值得注意的是,使用 task gate 在权限的 check 方面与 call gate 不同的是:

(1)call-gate 的权限 check 中:CPL <= DPLg && RPL <= DPLg  并且 CPL >= DPLs(或 CPL == DPLs)
(2)task-gate 的权限 check 中:CPL <= DPLg && RPL <= DPLg,忽略和 DPLs 的校验。


task-gate 的权限 check:
  CPL <= DPLg && RPL <= DPLg

原创粉丝点击