Olaf Hering wrote:
We use this patch to catch incorrect access to per_cpu data. But crash
cant deal with it unfortunately.

http://patchwork.ozlabs.org/linuxppc/patch?id=4423

honeydew:~ # crash -s /root/2.6.15.42-kexec/vmlinux /proc/vmcore
crash: pglist_data.node_mem_map structure member does not exist.
crash: certain memory-related commands will fail or display invalid data

crash: invalid kernel virtual address: aeeeeeeeef3736ae  type: "runqueues entry (per_cpu)"

--
Crash-utility mailing list
Crash-utility@redhat.com
https://www.redhat.com/mailman/listinfo/crash-utility

Hi Olaf,

Thanks for the heads-up:

Index: linux-2.6.16-rc1-git3/arch/powerpc/kernel/setup_64.c
===================================================================
--- linux-2.6.16-rc1-git3.orig/arch/powerpc/kernel/setup_64.c
+++ linux-2.6.16-rc1-git3/arch/powerpc/kernel/setup_64.c
@@ -670,6 +670,14 @@ void __init setup_per_cpu_areas(void)
                size = PERCPU_ENOUGH_ROOM;
 #endif

+       /*
+        * Poison invalid cpus, with lots of high bits set this should
+        * always fault
+        */
+       for (i = 0; i < NR_CPUS; i++) {
+               paca[i].data_offset = 0xeeeeeeeeeeeeeeeeULL;
+       }
+
        for_each_cpu(i) {
                ptr = alloc_bootmem_node(NODE_DATA(cpu_to_node(i)), size);
                if (!ptr)
 

I'll defer this to the IBM ppc64 guys, but it would seemingly
be simple enough to detect this in ppc64.c:ppc64_paca_init()
by checking for both 0 and 0xeeeeeeeeeeeeeeeeULL:

        for (i = cpus = 0; i < nr_paca; i++) {
                readmem(symbol_value("paca") + (i * SIZE(ppc64_paca)),
                        KVADDR, cpu_paca_buf, SIZE(ppc64_paca),
                        "paca entry", FAULT_ON_ERROR);

                per_cpu_offset = ULONG(cpu_paca_buf + data_offset);
-               if (per_cpu_offset == 0)
+               if ((per_cpu_offset == 0) ||
+                   (per_cpu_offset == 0xeeeeeeeeeeeeeeeeULL))
                        continue;
                kt->__per_cpu_offset[i] = per_cpu_offset;
                kt->flags |= PER_CPU_OFF;
                cpus++;
        }

Thanks again,
  Dave