当前位置:网站首页>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);
边栏推荐
猜你喜欢
随机推荐
C#/VB.NET:在 Word 中设置文本对齐方式
Jenkins使用手册(1) —— 软件安装
标准C语言学习总结12
图文手把手教程--ESP32 MQTT对接EMQX本地服务器(VSCODE+ESP-IDF)
开源一夏|ArkUI如何自定义弹窗(eTS)
Camunda overall architecture and related concepts
linux下数据库初始化密码
热成像测温的原理是什么呢?你知道吗?
Doing Homework HDU - 1074
知乎数据分析训练营
复盘:经典的HR面试问题,这些问题可以挖掘你个人的素质,看看你是否合适合我们部门
AWS Lambda related concepts and implementation approach
什么是终端特权管理
【飞控开发高级教程7】疯壳·开源编队无人机-编队飞行
iMeta | German National Cancer Center Gu Zuguang published a complex heatmap visualization method
Win11怎么重装显卡驱动程序?Win11显卡驱动怎么卸载重装?
Leetcode刷题——路径总和
Mysql高级篇学习总结13:多表连接查询语句优化方法(带join语句)
数字知识库及考学一体化平台
Business collocations









