Skip to the content.

使用 kernel 中调试工具

KASLR

/*
 * See Documentation/x86/x86_64/mm.txt for a description of the memory map.
 *
 * Be very careful vs. KASLR when changing anything here. The KASLR address
 * range must not overlap with anything except the KASAN shadow area, which
 * is correct as KASAN disables KASLR.
 */
#define MAXMEM      (1UL << MAX_PHYSMEM_BITS)

debug

从内核的选项来看,对于 debug 一无所知啊 !

page owner

page owner is for the tracking about who allocated each page.

Kernel 调试

基本按照这个操作

通过插入预防错误的方法实现

dump_page(page, "VM_BUG_ON_PAGE(" __stringify(cond)")");\

void dump_page(struct page *page, const char *reason)
{
	__dump_page(page, reason);
	dump_page_owner(page);
}
EXPORT_SYMBOL(dump_page);

以后再去慢慢跟踪吧!

kernel hacking

memtest

还有其他的,参考 : /Documentation/dev-tools/

本站所有文章转发 CSDN 将按侵权追究法律责任,其它情况随意。