----- Original Message ----- > Dne St 11. ledna 2012 00:37:50 Petr Tesarik napsal(a): > > [...] > > I can see now that this is unnecessarily complicated, because the > > node_remap_* variables are static arrays of MAX_NUMNODES elements, so I > > can get their size from the debuginfo at POST_GDB init and initialize a > > machine-specific data type with it. I'll post another patch tomorrow. > > And here we go. Tested on my system and seems to work just fine. > > Petr Tesarik > SUSE Linux Hi Petr, This looks pretty good to me. However, just to clarify the chicken-and-egg situation here... When remap_init() does these 3 readmem() calls, they will pass through x86_kvtop_remap() -- which I guess would fail because the arrays would still be at least partially uninitialized?: + readmem(start_vaddr, KVADDR, ms->remap_start_vaddr, + ms->max_numnodes * sizeof(ulong), "node_remap_start_vaddr", + FAULT_ON_ERROR); + readmem(end_vaddr, KVADDR, ms->remap_end_vaddr, + ms->max_numnodes * sizeof(ulong), "node_remap_end_vaddr", + FAULT_ON_ERROR); + readmem(start_pfn, KVADDR, ms->remap_start_pfn, + ms->max_numnodes * sizeof(ulong), "node_remap_end_vaddr", + FAULT_ON_ERROR); To fortify this (and put my mind at ease), can we also set a "remap_state" flag in the machdep structure that describes the remap data structures in maybe two states: UNINITIALIZED - set at SETUP_ENV time, then cleared in x86_init() before remap_init() is called NOT_USED - if remap_init() fails Then have x86_kvtop_remap() -- which will get called on every readmem() or kvtop() for the rest of time, check for (UNINITIALIZED|NOT_USED), and return FALSE immediately if either are set? What do you think? Dave -- Crash-utility mailing list Crash-utility@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/crash-utility