[Crash-utility] kernel module parsing failure - mips

Sagar Borikar sagar.borikar at gmail.com
Sun Dec 4 15:10:38 UTC 2016


On Sun, Dec 4, 2016 at 6:05 AM, Rabin Vincent <rabin at rab.in> wrote:
> On Sat, Dec 03, 2016 at 01:15:23PM -0800, Sagar Borikar wrote:
>> > So the first error should be fixed properly before attempting "mod".  What
>> > kernel version is this and what page size do to use?
>>
>> 4.4.20 kernel and page size is 16K
>
> I'd only tested 4K pages before but I've now provisioned a QEMU Malta machine
> with 16K pages.  I've now sent a patch to the list which fixes the
> definition  of __PGD_ORDER.  With only that patch, the pgd size errors
> are gone and "mod" works for my 16K kernel/dump:
>
>  crash> sym -n swapper_pg_dir
>  80540000 (B) swapper_pg_dir
>  80544000 (B) invalid_pte_table
>  crash> sys
>        KERNEL: vmlinux-16k-unload
>     DUMPFILES: /var/tmp/ramdump_elf_wZxP65 [temporary ELF header]
>                rawdump-16k-unload
>          CPUS: 1
>          DATE: Sun Dec  4 14:46:08 2016
>        UPTIME: 00:00:21
>  LOAD AVERAGE: 0.31, 0.07, 0.02
>         TASKS: 54
>      NODENAME: buildroot
>       RELEASE: 4.4.27-dirty
>       VERSION: #12 SMP Sun Dec 4 14:45:32 CET 2016
>       MACHINE: mips  (unknown Mhz)
>        MEMORY: 128 MB
>         PANIC: "Kernel panic - not syncing: Fatal exception"
>  crash> help -m | grep -A7 pagesize
>             pagesize: 16384
>            pageshift: 14
>             pagemask: ffffffffffffc000
>           pageoffset: 3fff
>          pgdir_shift: 26
>         ptrs_per_pgd: 64
>         ptrs_per_pte: 4096
>            stacksize: 16384
>  crash> mod
>   MODULE   NAME      SIZE  OBJECT FILE
>  c01050c0  null_blk  5333  (not loaded)  [CONFIG_KALLSYMS]
>
> With the fixed __PGD_ORDER, PGD_ORDER gets the value zero and that is
> correct for my kernel.  __PGD_ORDER isn't used anywhere else that in
> PGD_ORDER, so even your hack of forcing PGD_ORDER to zero would have
> fixed "mod" for me.
>
> So there could be some other additional problem in your case besides the
> incorrect __PGD_ORDER.  Could you please apply the fix and run crash
> with the -d8 argument and post the full log?  Thanks.

With your earlier patches, its same result as I was getting. i.e


please wait... (gathering module symbol data)
WARNING: cannot access vmalloc'd module memory


crash> mod
mod: cannot access vmalloc'd module memory


Here is detailed info of the help -m and mach output

              flags: 1 (KSYMS_START)

                                                [0/153]
             kvbase: 80000000
  identity_map_base: 80000000
           pagesize: 16384
          pageshift: 14
           pagemask: ffffffffffffc000
         pageoffset: 3fff
        pgdir_shift: 26
       ptrs_per_pgd: 64
       ptrs_per_pte: 4096
          stacksize: 16384
                 hz: 1000
            memsize: 261865472 (0xf9bc000)
               bits: 32
            nr_irqs: 360
      eframe_search: mips_eframe_search()
         back_trace: mips_back_trace_cmd()
    processor_speed: mips_processor_speed()
              uvtop: mips_uvtop()
              kvtop: mips_kvtop()
       get_task_pgd: mips_get_task_pgd()
           dump_irq: generic_dump_irq()
    show_interrupts: generic_show_interrupts()
   get_irq_affinity: generic_get_irq_affinity()
    get_stack_frame: mips_get_stack_frame()
      get_stackbase: generic_get_stackbase()
       get_stacktop: generic_get_stacktop()
      translate_pte: mips_translate_pte()
        memory_size: generic_memory_size()
      vmalloc_start: mips_vmalloc_start()
       is_task_addr: mips_is_task_addr()
      verify_symbol: mips_verify_symbol()
         dis_filter: generic_dis_filter()
           cmd_mach: mips_cmd_mach()
       get_smp_cpus: mips_get_smp_cpus()
          is_kvaddr: generic_is_kvaddr()
          is_uvaddr: generic_is_uvaddr()
       verify_paddr: generic_verify_paddr()
    init_kernel_pgd: NULL
    value_to_symbol: generic_machdep_value_to_symbol()
  line_number_hooks: NULL
      last_pgd_read: 82c30000
      last_pmd_read: 0
     last_ptbl_read: 3018000
                pgd: 8a71b70
                pmd: 0
               ptbl: 8a75b78
  section_size_bits: 26
   max_physmem_bits: 32
  sections_per_root: 0
           machspec: 8696240

crash> mach
                 HZ: 1000
          PAGE SIZE: 16384

      _PAGE_PRESENT: 00000001
         _PAGE_READ: 00000020
        _PAGE_WRITE: 00000002
     _PAGE_ACCESSED: 00000004
     _PAGE_MODIFIED: 00000008
       _PAGE_GLOBAL: 00000040
        _PAGE_VALID: 00000080
      _PAGE_NO_READ: 00000020
      _PAGE_NO_EXEC: 00000010
        _PAGE_DIRTY: 00000100

Please find the attached log with -d8 output.

Thanks
Sagar

>
> --
> Crash-utility mailing list
> Crash-utility at redhat.com
> https://www.redhat.com/mailman/listinfo/crash-utility
-------------- next part --------------
A non-text attachment was scrubbed...
Name: crash.log
Type: application/octet-stream
Size: 220257 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/crash-utility/attachments/20161204/98b0b8d5/attachment.obj>


More information about the Crash-utility mailing list