Nouk
驱动中牛
驱动中牛
  • 注册日期2001-08-22
  • 最后登录2006-10-22
  • 粉丝0
  • 关注0
  • 积分0分
  • 威望0点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
阅读:1419回复:3

Protect Mode's Gate??

楼主#
更多 发布于:2001-09-06 08:59
mov eax,37h
lea edx,[esp+4]
int 2Eh

If the sample code can transfer Ring3 to Ring0,
is it named "Interrupt Gate"!?

and what is the "Trap Gate",can one type some code.

thx
Taiwan's Driver Developer
lu0
lu0
论坛版主
论坛版主
  • 注册日期2001-06-10
  • 最后登录2016-04-05
  • 粉丝2
  • 关注0
  • 积分-6311分
  • 威望21111点
  • 贡献值0点
  • 好评度7点
  • 原创分0分
  • 专家分0分
沙发#
发布于:2001-09-06 09:22
The NT operating system provide INT 2E for NATIVE LAYER to communicate with OS CORE.
It's a trap gate.
Regards, Lu Lin Webmaster of Inside Programming http://www.lu0s1.com
Nouk
驱动中牛
驱动中牛
  • 注册日期2001-08-22
  • 最后登录2006-10-22
  • 粉丝0
  • 关注0
  • 积分0分
  • 威望0点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
板凳#
发布于:2001-09-06 14:26
Thanks for ur answer.
How to diagnose the code what kind of trap is?
thx
Taiwan's Driver Developer
BSOD
驱动牛犊
驱动牛犊
  • 注册日期2001-09-28
  • 最后登录2004-09-02
  • 粉丝0
  • 关注0
  • 积分0分
  • 威望0点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
地板#
发布于:2001-09-28 22:28
HiNouk,

To examinate the gate type, I guess you need to check its protected mode gate descriptor in the IDT.

The gate (task, interrupt and trap) descriptor is 2 dwords,
say dword0 and dword1.
for task gate:
dword0:
b31->b16:meaningless
b15: segment present
b13,b14: privilege level from ring0 to ring3
b12->b8:00101
b7->b0:meaningless
dword1:
b31-b16:TSS selector
b15-b0:meaningless

for interrupt gate:
same as GDT except
dword0:
b12-b8:01110 for 32-bit 00110 for 16-bit

for Trap gate:
same as GDT except
dword0:
b12-8:01111 for 32-bit 00111 for 16-bit.

________________________________________

oversea Chinese KMD/OS developer

COOL NDIS
游客

返回顶部