Kconfig.debug: module: Add debug config to debug modules
There can be scenario where, dynamically loadable modules adds a certain nodes in list data structure and forgot to remove reference from the list while unloading themself. And this can result in fault while accessing those dangling pointers. So If we log the module used address ranges, we could be able to tell exact victim module. And, It will be good to keep these debug logs under a config flag. So, let's add DEBUG_MODULE_LOAD_INFO config and use this in printing module used init and core layout address ranges. e.g: Core layout sections: [ 40.599573] .text [ 40.627074] .plt [ 40.603426] .rodata.str1.8 [ 40.608016] __mcount_loc [ 40.622142] .note.gnu.build-id [ 40.612654] .data [ 40.616438] .gnu.linkonce.this_module [ 40.634909] .bss Init layout sections [ 40.630781] .init.plt [ 40.638591] .symtab [ 40.642573] .strtab After this patch: / # rmmod sample [ 63.816318] Unloaded sample: module core layout start: 0xffffff9dbff85000 size: 0x4000 This config should not be enabled in production builds. Change-Id: I4acfc4f53c561f92ca63fa3c4559148929575580 Signed-off-by:Mukesh Ojha <mojha@codeaurora.org> Signed-off-by:
Neeraj Upadhyay <neeraju@codeaurora.org>
Loading
Please register or sign in to comment