[Crash-utility] poisoned per_cpu data not handled on ppc64

Haren Myneni hbabu at us.ibm.com
Thu Mar 9 18:51:59 UTC 2006


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 at 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 at redhat.com
> https://www.redhat.com/mailman/listinfo/crash-utility
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/crash-utility/attachments/20060309/2f79004f/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: crash-ppc64-kdump-fixes.patch
Type: application/octet-stream
Size: 3270 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/crash-utility/attachments/20060309/2f79004f/attachment.obj>


More information about the Crash-utility mailing list