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?

有帮助吗?

解决方案

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.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top