当前位置:网站首页>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);
边栏推荐
猜你喜欢
美摄问答室|美映 VS 美摄云剪辑
C语言*小白的探险历程
Mysql高级篇学习总结13:多表连接查询语句优化方法(带join语句)
利用pytest hook函数实现自动化测试结果推送企业微信
3-5年以上的功能测试如何进阶自动化?
Events in August | 51CTO's 17th Anniversary Celebration, post a blog post to get gifts such as tea sets/notebooks/T-shirts!
Digital management insight into retail and e-commerce operations - retail password
Win11 file types, how to change?Win11 modify the file suffix
在 .NET MAUI 中如何更好地自定义控件
Heap Sort
随机推荐
tp5+微信小程序 分片上传
Meishe Q&A Room | Meiying VS Meishe Cloud Editing
DB2查看执行过长的SQL
datax oracle to oracle incremental synchronization
Xilinx VIVADO 中 DDR3(Naive)的使用(2)读写设计
美摄问答室|美映 VS 美摄云剪辑
Camunda整体架构和相关概念
萌宠来袭,如何让“吸猫撸狗”更有保障?
ArrayList和LinkedList的区别
【LeetCode】899.有序队列
datax oracle to oracle离线json文件
知其然,知其所以然,JS 对象创建与继承
MySql数据库入门的基本操作
123
Xilinx VIVADO 中 DDR3(Naive)的使用(3)仿真测试
JUC(1)线程和进程、并发和并行、线程的状态、lock锁、生产者和消费者问题
LeetCode第三题(Longest Substring Without Repeating Characters)三部曲之三
Zikko上市同时搭载HDMI2.1和2.5GbE新款雷电4扩展坞
Mysql高级篇学习总结14:子查询优化、排序优化、GROUP BY优化、分页查询优化
热成像测温的原理是什么呢?你知道吗?