Sample Header Ad - 728x90

Access list of all symbols exported `/proc/kallsyms` from inside kernel module?

1 vote
0 answers
2687 views
I'm writing a simple kernel module and it seems on the newest kernel versions (I've tried 5.8, 5.10, 6.0) functions like kallsyms_lookup_name and kallsyms_on_each_symbol are no longer exported, meaning they can't be accessed through kallsyms.h. So, how do I access the list containing all the kernel symbols and their addresses from the kernel module? What's the best approach? I'm able to find them with a shell command sudo cat /proc/kallsyms/ but now I wanna be able to do that from the k.o. Any suggestions?
Asked by Allan Almeida (13 rep)
Nov 1, 2022, 02:05 PM