Question

If a kernel does not support distinction between user mode and kernel mode, can any of the hardware be protected still?

Or would Memory, CPU, and devices be completely vulnerable to illegal access?

Was it helpful?

Solution

Yes there is still a way to keep them protected, however it would involve the use of a hypervisor.

The idea is that you would have a small kernel set up permissions of hardware access, how much RAM, which hardware, which cores, etc, and then that small kernel would bootstrap your hypothetical kernel which would run in kernel mode inside the hypervisor.

To use a hypervisor in such a way, the architecture you are using must support virtualization. x86 supports virtualization through Intel's VT-x and AMD's AMD-V. Not all CPUs, however, have these extensions and typically they are disabled by default.

If you cannot use a hypervisor, then there is no way to protect hardware or CPU access because all code is privileged and therefore is free to modify any system components.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top