Call Gate..

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
Johnny

Call Gate..

Post by Johnny »

What is call gate in short?
And What's the differences between call gate and conforming?
Curufir

Re:Call Gate..

Post by Curufir »

A call gate is used to redirect execution to a specific entry point in memory. This entry point is often in a different segment and ring.

The big difference between gates and conforming (Is it conforming, or non-conforming? Can never remember :)) is that without the gate you can't specify the entry point. So badly written/malicious code can gain uncontrolled access to code in other segments/rings.

An example would be using something like fopen in the standard library. The call from your code into the standard library doesn't need to use a call gate to reach the standard library code, because it will be operating in the same ring as your code and switching execution to arbitrary points in the library is liable to only affect only your application. However when the library uses the system call for file opening it will use a type of call gate (Most likely a software interrupt) to switch rings and run the system call code, because allowing apps to call arbitrary positions in the kernel is dangerous in the extreme.

Hope that helps.
Johnny

Re:Call Gate..

Post by Johnny »

Thanks a lot , It helped me..
I think I need look into Intel's manual for more detail..
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:Call Gate..

Post by Pype.Clicker »

Post Reply