Re: Dumping the checksums in a module

John Sigler
2007-05-22T08:19:59Z

Sam Ravnborg wrote:
> On Fri, May 18, 2007 at 10:27:06PM +0200, Jan Engelhardt wrote:
>> On May 18 2007 17:02, John Sigler wrote:
>>> I'm getting "disagrees about version of symbol struct_module" messages,
>>> and I'm trying to understand why.
>>>
>>> As far as I understand (which is not very far), if I define
>>> CONFIG_MODVERSIONS, then checksums for various functions (all exported
>>> functions?) and various structures (which ones?) will be included inside
>>> the kernel image, and written to Module.symvers. When an out-of-tree
>>> module is built, it will also include these checksums.
>>>
>>> How do I list the checksums within a module?
>>>
>>> Is there a simpler way to list all the checksums?
>> 22:25 ichi:~ > modinfo aes
>> srcversion: 8CB82B3A254D5A950FD0D14
>>
>> I think this one checksum is computed out of all functions that
>> the module uses.
>
> It is computed based on all files used for the module.
> Check help for "Loadable module support | Source Checksum for all modules"

How do I list *all* the checksums inside a given module?

For example, I want to know the checksum for "struct_module" in test.ko

$ grep struct_module Module.symvers
0x71d1e11f struct_module vmlinux EXPORT_SYMBOL

That's for the kernel.

$(MAGIC_COMMAND_TO_DUMP_CHECKSUMS) test.ko | grep struct_module
=> ...

Regards.