[Crash-utility] Why does crash check the program context flags in FILL_PML4() macro

Dou Liyang douly.fnst at cn.fujitsu.com
Thu Jan 4 08:32:29 UTC 2018


Hi Dave,

One question:

#define FILL_PML4() { \
	if (!(pc->flags & RUNTIME) || ACTIVE()) { \
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
I am confused that crash checks the flags in the FILL_PML4() macro, but
not check that in other macros, such as FILL_PGD().

Could you tell me why we need to do this check?

		if (!IS_LAST_PML4_READ(vt->kernel_pgd[0])) \
                     readmem(vt->kernel_pgd[0], KVADDR, 
machdep->machspec->pml4, \
                         PAGESIZE(), "init_level4_pgt", FAULT_ON_ERROR); \
                 machdep->machspec->last_pml4_read = 
(ulong)(vt->kernel_pgd[0]); \
	} \
}

Thanks,
	dou





More information about the Crash-utility mailing list