status of kernel memory debugging?
hi all,
For a project in packet filtering (ffpf.sf.net) I'm in the process of debugging kernel code I wrote. I have the habit of running all userspace code through valgrind, and have setup user-mode-linux to do the same with the kernel.
Reading through some old LKML threads I see that there has been talk of valgrinding a UML image, but the outcome appears inconclusive. Could someone please update me on the status of memory debugging in the kernel, especially regarding valgrind?
Do you have other tools you regularly use, or is is simply a trial-and-error practice? Note that I already export my kernelspace code to userspace for unit-testing where possible. It is only in the ioctl/syscall handlers that this technique fails.
thanks,
Willem de Bruijn
Quoted 4 lines · Willem de Bruijn
Reading through some old LKML threads I see that there has been talk of valgrinding a UML image, but the outcome appears inconclusive. Could someone please update me on the status of memory debugging in the kernel, especially regarding valgrind?
UML is still too strange for valgrind, despite progress on both sides (valgrind accepting more strange things and UML becoming less strange).
I tried grinding UML a month or so ago, and its use of clone was a sticking point.
Jeff
Quoted 7 lines
UML is still too strange for valgrind, despite progress on both sides (valgrind accepting more strange things and UML becoming less strange).
I tried grinding UML a month or so ago, and its use of clone was a sticking point.
I think I read your remark, yes. Thanks for the update; I hoped some strides had been made in that direction since then. Personally, I know to little about the topic to be of any use.
I guess the best option is then using slab caches per object type, so that I can at least find obvious memory leaks.
On a sidenote, it'll be interesting to see what valgrind reports once (if?) the kernel gets a good grinding.
Willem