On Fri, Mar 31, 2006 at 11:23:32PM +0900, Ken'ichi Ohmichi wrote:
> 
> I tested kdump in 2.6.16-mm2, and the file size of vmcore is now displayed
> correctly. But the cp command(copy vmcore to the disk) fails.
> 
> The physical address of the problem offset(4,226,876,448) is not found at
> map_offset_to_paddr(). Because m->offset more than this offset is not set.
> The content of vc_list was as follows at map_offset_to_paddr().
> 
> Debug:
>   static u64 map_offset_to_paddr(loff_t offset, struct list_head *vc_list,
>                                         struct vmcore **m_ptr)
>   {
>         struct vmcore *m;
>         u64 paddr;
> 
>         list_for_each_entry(m, vc_list, list) {
>                 u64 start, end;
>                 start = m->offset;
>                 end = m->offset + m->size - 1;
>                 if (offset >= start && offset <= end) {
>                         paddr = m->paddr + offset - start;
>                         *m_ptr = m;
>                         return paddr;
>                 }
>         }
>  +      list_for_each_entry(m, vc_list, list) {
>  +              start = m->offset;
>  +              end = m->offset + m->size - 1;
>  +              printk(KERN_ERR "start = %llx, end = %llx\n", start, end);
>  +      } 
>         *m_ptr = NULL;
>         return 0;
>   }
> 
> Output:
>   start = 190,      end = 233
>   start = 234,      end = 2d7
>   start = 2d8,      end = 37b
>   start = 37c,      end = 41f
>   start = 420,      end = a041f
>   start = a0420,    end = fa041f
>   start = fa0420,   end = 33fa041f
>   start = 33fa0420, end = cbf1041f
>   start = cbf10420, end = fbf1041f(4,226,876,447)
> 
> Do you have any idea why this is happening?

Ok. I guess that you have got a congituous chunk of memory which is more
than 4G and size field overflow might be taking place in /proc/vmcore code.
Can you please apply the attached patch and try.

Please also post the output of /proc/iomem.

Thanks
Vivek

Signed-off-by: Vivek Goyal <[EMAIL PROTECTED]>
---

 include/linux/proc_fs.h |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

diff -puN include/linux/proc_fs.h~kdump-vmcore-size-overflow-bug-fix 
include/linux/proc_fs.h
--- 
linux-2.6.16-mm2-16M/include/linux/proc_fs.h~kdump-vmcore-size-overflow-bug-fix 
    2006-03-31 16:13:47.000000000 -0500
+++ linux-2.6.16-mm2-16M-root/include/linux/proc_fs.h   2006-03-31 
16:13:59.000000000 -0500
@@ -79,7 +79,7 @@ struct kcore_list {
 struct vmcore {
        struct list_head list;
        unsigned long long paddr;
-       unsigned long size;
+       unsigned long long size;
        loff_t offset;
 };
 
_
_______________________________________________
fastboot mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/fastboot

Reply via email to