How does Windows protect transition into kernel mode?

后端 未结 5 1724
梦如初夏
梦如初夏 2021-02-01 08:50

How does Windows protect against a user-mode thread from arbitrarily transitioning the CPU to kernel-mode?

I understand these things are true:

  1. User-mode th
5条回答
  •  闹比i
    闹比i (楼主)
    2021-02-01 09:36

    Code running in User Mode (Ring 3) can't arbitrarily change to Kernel Mode (Ring 0). It can only do so using special routes -- jump gates, interrupts, and sysenter vectors. These routes are highly protected and input is scrubbed so that bad data can't (shouldn't) cause bad behavior.

    All of this is set up by the kernel, usually on startup. It can only be configured in Kernel Mode so User-Mode code can't modify it.

提交回复
热议问题