当前位置:网站首页>cat /proc/kallsyms found that the kernel symbol table values are all 0
cat /proc/kallsyms found that the kernel symbol table values are all 0
2022-08-04 11:13:00 【android framework】
Recently debugging the kernel, after cat /proc/kallsyms found that the symbol table values are all 0.
Check the kernel configuration items, the configuration has been configured.
Finding a lot of online information, it is said that the kernel deliberately prevents non-root users from viewing the symbol table in order to prevent the occurrence of vulnerabilities.
But if I switch the shell to root, I can only see 0.
Therefore, only the kernel code can be modified.kernel/kernel/kallsyms.c
static int s_show(struct seq_file *m, void *p)
{
struct kallsym_iter *iter = m->private;
/* Some debugging symbols have no name. Ignore them. */if (!iter->name[0])return 0;if (iter->module_name[0]) {char type;/** Label it "global" if it is exported,* "local" if not exported.*/type = iter->exported ? toupper(iter->type) :tolower(iter->type);seq_printf(m, "%pK %c %s\t[%s]\n", (void *)iter->value,type, iter->name, iter->module_name);} elseseq_printf(m, "%pK %c %s\n", (void *)iter->value,iter->type, iter->name);return 0;
}
Need to seq_printf(m, “%pK %c %s\t[%s]\n”, (void *)iter->value,
type, iter->name, iter->module_name); Remove the K in it and recompile and program the kernel.
seq_printf(m, “%p %c %s\t[%s]\n”, (void *)iter->value,
type, iter->name, iter->module_name);
边栏推荐
猜你喜欢
Graphical Hands-on Tutorial--ESP32 One-Key Network Configuration (Smartconfig, Airkiss)
Advanced transcriptome analysis and R data visualization hot registration (2022.10)
学会使用set和map的基本接口
第二批养老理财试点产品发行 一小时销售20亿元
zabbix部署
Learn to use the basic interface of set and map
图文手把手教程--ESP32 OTA空中升级(VSCODE+IDF)
Small program containers accelerate the construction of an integrated online government service platform
中介者模式(Mediator)
Apache Calcite 框架原理入门和生产应用
随机推荐
复盘:经典的HR面试问题,这些问题可以挖掘你个人的素质,看看你是否合适合我们部门
datax oracle to oracle离线json文件
图文手把手教程--ESP32 MQTT对接EMQX本地服务器(VSCODE+ESP-IDF)
123
datax oracle to oracle增量同步
CVPR 2022 | 从人体网格预测骨架,是真正的生理学骨架!
【LeetCode】1403.非递增顺序的最小子序列
Heap Sort
知网网站地址更换
昨夜梦佳人,七夕试伊妆丨基于ModelArts实现AI妆容迁移丨【玩转华为云】
tp5+微信小程序 分片上传
解析treeSet集合进行自定义类的排序
技术干货 | 用零信任保护代码安全
apache dolphin scheduler 文件dolphinscheduler-daemon.sh详解
在 .NET MAUI 中如何更好地自定义控件
剑指长城炮? 长安全新皮卡官方谍照
【LeetCode】899.有序队列
【Idea series】idea configuration
遍历Map的四种方法
手搓一个“七夕限定”,用3D Engine 5分钟实现烟花绽放效果