donald jiang
donald jiang

Reputation: 181

The difference between "call gate" and "Software interrupt?

These are safe, low-privilege ways to call kernel functions.

I don't know the difference between the two.

Upvotes: 1

Views: 212

Answers (1)

mevets
mevets

Reputation: 10445

You can look through the intel manuals for all the gory bits; but in a nutshell:

  1. Call Gate does not disable interrupts.
  2. Call Gate can copy N arguments between the stacks on a privity switch.
  3. Call Gate can be LDT private
  4. Call Gate can be disguised as a normal function pointer, if your compiler happens to support intel medium,large compilations models.
  5. Given 4, a normal "ret" instruction undoes a call gate entry.
  6. Almost nobody every used Call Gates.

whereas:

  1. Interrupt gates disable interrupts.
  2. Interrupt gates don't care about arguments.
  3. The IDT is a global resource.
  4. The invocation sequence for interrupts is pretty unique from functions.

Upvotes: 4

Related Questions