mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-04-24 14:07:52 -04:00
kallsyms: store type information in its own array
When a module is loaded, its symbols' Elf_Sym information is stored in a symtab. Further, type information is also captured. Since Elf_Sym has no type field, historically the st_info field has been hijacked for storing type: st_info was overwritten. commit5439c985c5
("module: Overwrite st_size instead of st_info") changes that practice, as its one-liner indicates. Unfortunately, this change overwrites symbol size, information that a tool like DTrace expects to find. Allocate a typetab array to store type information so that no Elf_Sym field needs to be overwritten. Fixes:5439c985c5
("module: Overwrite st_size instead of st_info") Signed-off-by: Eugene Loh <eugene.loh@oracle.com> Reviewed-by: Nick Alcock <nick.alcock@oracle.com> [jeyu: renamed typeoff -> typeoffs ] Signed-off-by: Jessica Yu <jeyu@kernel.org>
This commit is contained in:
parent
9672e2cb0f
commit
1c7651f437
3 changed files with 16 additions and 8 deletions
|
@ -331,6 +331,7 @@ struct mod_kallsyms {
|
|||
Elf_Sym *symtab;
|
||||
unsigned int num_symtab;
|
||||
char *strtab;
|
||||
char *typetab;
|
||||
};
|
||||
|
||||
#ifdef CONFIG_LIVEPATCH
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue