【问题标题】:Memory Allocation for Kernel Space and User Space processes内核空间和用户空间进程的内存分配
【发布时间】:2012-02-03 22:02:44
【问题描述】:
Is there any difference between kernel space & user space MEMORY ALLOCATIONS?
From which region of memory they get allocated.

任何人都可以提供一些关于这方面的指导吗?

谢谢。

最好的问候,

桑迪普·辛格

【问题讨论】:

标签: linux-kernel kernel device-driver systems-programming


【解决方案1】:

这两个区域的内存区域由各自的地址空间范围控制。边界值存储在栅栏寄存器中。

【讨论】:

    【解决方案2】:

    用户和内核内存确实存在差异:在标记不同物理属性的意义上:

    https://unix.stackexchange.com/questions/87625/what-is-difference-between-user-space-and-kernel-space

    但是对于分配算法本身:用户空间内存总是依靠内核内存来实现其最终实现。

    而且由于内核模式内存比用户模式强大得多,因此有一种称为 SMEP 的硬件机制可以防止从内核模式内部执行用户模式内存:

    https://www.ncsi.com/nsatc11/presentations/wednesday/emerging_technologies/fischer.pdf

    像 NX 位这样的硬件功能始终由内核模式(环 0)控制:作为普通用户(环 3),您将无法访问该位。

    更多硬件功能:

    http://hypervsir.blogspot.sg/2014/11/page-structure-table-corruption-attacks.html

    【讨论】:

      猜你喜欢
      • 2011-11-29
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-05-21
      • 2021-10-29
      • 2012-03-02
      • 2011-12-16
      相关资源
      最近更新 更多