Quantcast
Channel: Active questions tagged kernel - Stack Overflow
Viewing all articles
Browse latest Browse all 6409

IOPL vs CPL (Privileged vs I/O Instructions)? [duplicate]

$
0
0

Someone Wrote on stack-overflow What is a privileged instruction? :

... a privileged instruction is a processorop-code (assembler instruction) which can only be executed in"supervisor" (or Ring-0) mode. These types of instructions tend to beused to access I/O devices and protected data structures from thewindows kernel.

And quoting from my book:

I/O Instructions can run when CPL <= IOPL

Privileged Instructions can run when CPL == 0

  1. Isn't every I/O Instruction a Privileged Instruction since we need to acess memory which needs privilege as only OS can do it , please give an example for such one.

  2. Isn't every Privileged Instruction an I/O Instruction? Can someone give an example where this isn't the case?

Note: I'm referring to linux where CPL can hold only 2 values 0 (privileged) and 3 (non privileged).


Viewing all articles
Browse latest Browse all 6409

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>