[Crash-utility] Question about ARM module address range
Dave Anderson
anderson at redhat.com
Tue Aug 14 19:21:11 UTC 2012
----- Original Message -----
> >
> > Jan, Thomas,
> >
> > Can you check whether this still works with vmcores that have modules loaded?
> > My sample vmlinux/vmcores don't seem to have any modules loaded.
>
> Same here -- my sample vmcores don't have any modules installed -- but I cannot
> see how this patch can possibly hurt, and it certainly makes sense. I'm going to
> queue it for crash-6.0.9 unless it gets NAK'd before I release it.
>
> Thanks,
> Dave
Also, as we discussed before, I'm also going to add
a "KERNEL MODULES BASE: <address>" line to the "mach"
command.
Thanks,
Dave
>
> >
> > diff --git a/arm.c b/arm.c
> > index ea06e1a..7f63a10 100644
> > --- a/arm.c
> > +++ b/arm.c
> > @@ -305,14 +305,20 @@ arm_init(int when)
> > error(WARNING, "Couldn't retrieve crash_notes\n");
> > break;
> >
> > - case POST_VM:
> > + case POST_VM: {
> > + ulong vaddr;
> > +
> > machdep->machspec->vmalloc_start_addr = vt->high_memory;
> > /*
> > * Modules are placed in first vmalloc'd area. This is 16MB
> > * below PAGE_OFFSET.
> > */
> > - machdep->machspec->modules_vaddr = first_vmalloc_address();
> > machdep->machspec->modules_end = machdep->kvbase - 1;
> > + vaddr = first_vmalloc_address();
> > + if (vaddr > machdep->machspec->modules_end)
> > + machdep->machspec->modules_vaddr = DEFAULT_MODULES_VADDR;
> > + else
> > + machdep->machspec->modules_vaddr = vaddr;
> >
> > if (init_unwind_tables()) {
> > if (CRASHDEBUG(1))
> > @@ -323,6 +329,7 @@ arm_init(int when)
> > }
> > break;
> > }
> > + }
> > }
> >
> > void
> > @@ -614,7 +621,7 @@ static int
> > arm_is_module_addr(ulong vaddr)
> > {
> > ulong modules_start;
> > - ulong modules_end = machdep->kvbase - 1;
> > + ulong modules_end = machdep->machspec->modules_end;
> >
> > if (!MODULES_VADDR) {
> > /*
> > @@ -622,7 +629,7 @@ arm_is_module_addr(ulong vaddr)
> > * called, we use defaults here which is 16MB below kernel start
> > * address.
> > */
> > - modules_start = machdep->kvbase - 16 * 1024 * 1024;
> > + modules_start = DEFAULT_MODULES_VADDR;
> > } else {
> > modules_start = MODULES_VADDR;
> > }
> > diff --git a/defs.h b/defs.h
> > index caa87c0..e775e24 100755
> > --- a/defs.h
> > +++ b/defs.h
> > @@ -2438,6 +2438,7 @@ struct load_module {
> >
> > #define IS_VMALLOC_ADDR(X) arm_is_vmalloc_addr((ulong)(X))
> >
> > +#define DEFAULT_MODULES_VADDR (machdep->kvbase - 16 * 1024 * 1024)
> > #define MODULES_VADDR (machdep->machspec->modules_vaddr)
> > #define MODULES_END (machdep->machspec->modules_end)
> > #define VMALLOC_START (machdep->machspec->vmalloc_start_addr)
> >
> > --
> > Crash-utility mailing list
> > Crash-utility at redhat.com
> > https://www.redhat.com/mailman/listinfo/crash-utility
> >
>
> --
> Crash-utility mailing list
> Crash-utility at redhat.com
> https://www.redhat.com/mailman/listinfo/crash-utility
>
More information about the Crash-utility
mailing list