Re: Using module private memory to simulate microkernel's memory protection

From: Pengfei Hu
Date: Sat Feb 21 2009 - 04:25:17 EST


I wonder why kmemcheck has so many version. Can you tell me the
relation between them? My main target of this patch is checking
dangling pointer. But the fulll checking of dangling pointer is very
difficult. It need tracking reference of a memory. I only know NuMega
BoundsChecker can do this. Valgrind uses another method to check it.
It always allocate different address until consume all the available
address. Then it will loop again. So this method is not complete
enough. My patch can't really check dangling pointer. It can only
limit dangling pointer inside its own module and avoid the worst case:
one module write other module's memory randomly.

Kmemcheck track every access of allocating memory. But it can't track
reference of local variable. I think only instrumentation can do this
job. GCC bounds checking can error of check out of range. But it can't
check dangling pointer. I want to add this feature to it. GCC bounds
checking's instrumentation is at tree level. So it can't be used in
other complier. I want make instrumentation at source code. So it can
be used in other complier and platform. I know a unit test software
use this method to check coverage. If we can make instrumentation at
source code, then we will get the most flexibility.

I'll be very happy if my patch can be combined with kmemcheck. I don't
know if Vegard Nossum admit my idea. What should I do next?

linux/kernel/git/vegard/kmemcheck.gi
linux/kernel/git/x86/linux-2.6-kmemcheck-4.git
linux/kernel/git/x86/linux-2.6-kmemcheck-v2.git
linux/kernel/git/x86/linux-2.6-kmemcheck-v3.git
linux/kernel/git/x86/linux-2.6-kmemcheck.git

>
> Kmemcheck uses debug traps to execute a single instruction, and thus gets
> finer grained control of what is visible to a task.
>
> Ingo
>



--
Regards,
Pengfei
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/