Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 224419de authored by Mukesh Ojha's avatar Mukesh Ojha Committed by Gerrit - the friendly Code Review server
Browse files

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: default avatarMukesh Ojha <mojha@codeaurora.org>
Signed-off-by: default avatarNeeraj Upadhyay <neeraju@codeaurora.org>
parent 5219be0f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment