Linux如何保护内存? [英] How does linux protect memory?

查看:351
本文介绍了Linux如何保护内存?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我很感兴趣,在linux从一个角度集结点保护模式下的运行方式。其中注册并当它涉及到把CPU处于保护模式为i386的中断时:0x86_64机?我明白当我看到像MMAP和mprotect的函数的C源代码,但是什么让我接管汇编内存管理是如何工作的?我在哪里可以得到更多的信息对此有何看法?

I'm interested in how linux runs in protected mode from an assembly point of view. Which registers and interrupts are used when it comes to putting the cpu in protected mode for an i386:0x86_64 machine? I understand how memory managment works when I look at the c source of functions like mmap and mprotect, however whats keeping me from taking over with assembly? Where can I get more info on this?

推荐答案

我相信你正在寻找的 弓/ 86 / MM / - 的 弓/ 86 / MM / INIT.C 设置为正确的体系结构中的页表(IA32或AMD64),并考虑到可用的处理器功能(PSE,PGE,等等)。

I believe you're looking for arch/x86/mm/ -- arch/x86/mm/init.c sets up the page tables for the correct architecture (ia32 or AMD64) and takes into account the processor features available (PSE, PGE, etc.).

这篇关于Linux如何保护内存?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆