Messages in this thread | | | Date | Wed, 11 Feb 2009 16:23:42 +0100 | From | Ingo Molnar <> | Subject | Re: Using module private memory to simulate microkernel's memory protection |
| |
* Ingo Molnar <mingo@elte.hu> wrote:
> * Pengfei Hu <hpfei.cn@gmail.com> wrote: > > > > > > > Hm, are you aware of the kmemcheck project? > > > > > > Ingo > > > > > > > Frankly, I only know this project's name. Just when I nearly finished > > this patch, I browsed http://git.kernel.org/ first time. I am only a > > beginner in Linux kernel. Maybe I should first discuss before write > > code. But I think it is not too late. > > > > Can you tell me more about this project? I realy appreciate it. > > Sure:
More info: kmemcheck was written by Vegard Nossum (and released more than a year ago) and it uses similar principles as your patch: it enforces memory usage constraints via pagetable access bits.
More description about kmemcheck can be found in the following LWN article:
http://lwn.net/Articles/260068/
I think your idea of limiting execution to individual modules could perhaps be combined with kmemcheck. It's the same general principle.
The difference is that your patch calls back from the page fault handler and modifies the monitored pte's to present, brings in a TLB and then it modifies it to not present. So the page can be accessed up until the TLB gets flushed.
Kmemcheck uses debug traps to execute a single instruction, and thus gets finer grained control of what is visible to a task.
Ingo
| |