On Fri, Mar 31, 2023 at 11:11 AM HAGIO KAZUHITO(萩尾 一仁) <k-hagio-ab@nec.com> wrote:
On 2023/02/16 16:55, HAGIO KAZUHITO(萩尾 一仁) wrote:
> Hi Alex,
>
> On 2023/02/15 21:26, Alexander Egorenkov wrote:
>> Hi,
>>
>> it seems this linux-next patch https://lore.kernel.org/all/20230207002802.2514802-1-song@kernel.org/
>> broke module_init().
>
> Thank you for the early notice!
>
> ugh... module memory regions now scattered?

I've been looking into this, but it seems like we have to rewrite a
very wide range of code related to modules and symbols, which assumes
that each module's memory region is basically only one block.

Probably the kernel patch will get merged into the mainline at v6.4.
crash may take some time to support.

Until finished, "crash --no_module" option can be used for linux-next
without module functionality.

   $ crash --no_modules vmlinux vmcore
   ...
   WARNING: no kernel module access

   crash>


Lianbo, my current working tree is here:
   https://github.com/k-hagio/crash/tree/6.4-module.wip1


Nice work, Kazu.
 
but now it can just startup and run "mod" command.  Other commands

At least for me, good news.

I'm still working on some crash tool bugs(reported by customers). But we can still talk about it here or offline.
Later, I will also test and investigate it more.

can cause a segmentation fault.

 
Have you got a core dump file? Or It is clear for now why it failed.

crash> mod
      MODULE       NAME                        BASE           SIZE  OBJECT FILE
ffffffffc041f9c0  dm_mod                ffffffffc0408000   217088  (not loaded)  [CONFIG_KALLSYMS]
ffffffffc0443100  pinctrl_sunrisepoint  ffffffffc0441000    28672  (not loaded)  [CONFIG_KALLSYMS]
ffffffffc04e8340  sg                    ffffffffc044d000    53248  (not loaded)  [CONFIG_KALLSYMS]
...

 Looks like it worked partially.

Thanks
Lianbo