Olaf,
        I was looking in 2.6.16-rc5-git8, but did not find the patch that you mentioned.


arch/powerpc/kernel/setup_64.c:

#ifdef CONFIG_SMP
void __init setup_per_cpu_areas(void)
{
        int i;
        unsigned long size;
        char *ptr;

        /* Copy section for each CPU (we discard the original) */
        size = ALIGN(__per_cpu_end - __per_cpu_start, SMP_CACHE_BYTES);
#ifdef CONFIG_MODULES
        if (size < PERCPU_ENOUGH_ROOM)
                size = PERCPU_ENOUGH_ROOM;
#endif

        for_each_cpu(i) {
                ptr = alloc_bootmem_node(NODE_DATA(cpu_to_node(i)), size);
                if (!ptr)
                        panic("Cannot allocate cpu data for CPU %d\n", i);

                paca[i].data_offset = ptr - __per_cpu_start;
                memcpy(ptr, __per_cpu_start, __per_cpu_end - __per_cpu_start);
     }
}


 Instead of depending on paca[#].data_offset, my fix will use cpu_online_map to read the valid cpu paca structs. But, if the kernel sets 0xeeeeeeeeeeeeeeeeULL, yes, using this value will be the better solution.

Dave, the attached patch contains both fixes that Rachita reported.
        - Report an error message if the thread is running in user space and print regs.
        - Finding the valid per_cpu_offset values

Thanks
Haren




crash-utility-bounces@redhat.com wrote on 03/09/2006 01:15:56 AM:

>
> 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