Crossing the Ring

What prevents a user-space program from directly executing a privileged instruction like disabling interrupts?

A

The linker prevents user-space binaries from linking against kernel symbols that contain privileged instructions

B

The compiler refuses to compile privileged instructions in user-space code

C

The CPU checks the current protection level (mode bit) and raises an exception if a privileged instruction is attempted in user mode

D

The OS intercepts the instruction at load time and replaces it with a no-op