[Crash-utility] How to get module symbols working?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I am analyzing the kdump in latest crash utility 8.0.4++.

I think I loaded the module symbols correctly :
crash> mod
     MODULE       NAME              TEXT_BASE       SIZE  OBJECT FILE
ffff80007a7e2040  npdereference  ffff80007a7e0000  12288  (not loaded)  [CONFIG_KALLSYMS]
crash>
crash> mod -s npdereference /home/naveen/.repos/src/arm64/linux/drivers/naveen/npdereference.ko
     MODULE       NAME              TEXT_BASE       SIZE  OBJECT FILE
ffff80007a7e2040  npdereference  ffff80007a7e0000  12288  /home/naveen/.repos/src/arm64/linux/drivers/naveen/npdereference.ko

But still my backtrace doesn't say the correct symbol name :
#12 [ffff800082c6ba60] _MODULE_INIT_TEXT_START_npdereference at ffff80007a7e602c [npdereference]

The module name is "npdereference.ko" and the function where the crash is done looks like below. So I expect "null_deref_module_init"  to be present instead of "_MODULE_INIT_TEXT_START_npdereference" :

static int __init null_deref_module_init(void) {
    // Pointer to an integer, initialized to NULL
    int *null_pointer = NULL;
    printk(KERN_INFO "Null dereference module loaded\n");

    // Dereferencing the NULL pointer to trigger a crash
    printk(KERN_INFO "Triggering null pointer dereference...\n");
    *null_pointer = 1; // This line will cause a null pointer dereference

    return 0; // This will never be reached
}


The "sym" command also doesn't point me to the source file :
crash> sym ffff80007a7e602c
ffff80007a7e602c (m) _MODULE_INIT_TEXT_START_npdereference+44 [npdereference]
crash>

Is there a way to make this work correctly. The kernel module here is called "npdereference.ko" and is in-tree (part of kernel source repo).

Regards,
Naveen
--
Crash-utility mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxxxxxx
https://${domain_name}/admin/lists/devel.lists.crash-utility.osci.io/
Contribution Guidelines: https://github.com/crash-utility/crash/wiki

[Index of Archives]     [Fedora Development]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]     [Fedora Tools]

 

Powered by Linux