当前位置:网站首页>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);
边栏推荐
- 【黄啊码】MySQL入门—1、SQL 的执行流程
- MySQL不提供数组,只能做成表吗?
- Leetcode刷题——构造二叉树(105. 从前序与中序遍历序列构造二叉树、106. 从中序与后序遍历序列构造二叉树)
- Heap Sort
- apache dolphin scheduler 文件dolphinscheduler-daemon.sh详解
- linux下数据库初始化密码
- What is the principle of thermal imaging temperature measurement?Do you know?
- Mysql——》类型转换符binary
- C#/VB.NET:在 Word 中设置文本对齐方式
- 【LeetCode】1403.非递增顺序的最小子序列
猜你喜欢

Camunda整体架构和相关概念

ECCV 2022 | 清华&腾讯AI Lab提出REALY: 重新思考3D人脸重建的评估方法

Win11 file types, how to change?Win11 modify the file suffix

【LeetCode】653. 两数之和 IV - 输入 BST

*iframe*

【Idea series】idea configuration

Use pytest hook function to realize automatic test result push enterprise WeChat

Redis查询缓存

audio_policy_configuration.xml配置文件详解

Xilinx VIVADO 中 DDR3(Naive)的使用(1)创建 IP 核
随机推荐
Doing Homework HDU - 1074
浅析深度学习在图像处理中的应用趋势及常见技巧
字节技术官亲码算法面试进阶神技太香了
ORB-SLAM3中的优化
关于架构的思考
MySQL最大建议行数2000w, 靠谱吗?
Leetcode刷题——构造二叉树(105. 从前序与中序遍历序列构造二叉树、106. 从中序与后序遍历序列构造二叉树)
2万字50张图玩转Flink面试体系
数字知识库及考学一体化平台
Leetcode刷题——路径总和
面试蚂蚁(P7)竟被MySQL难倒,奋发图强后二次面试入职蚂蚁金服
Difference between ArrayList and LinkedList
图文手把手教程--ESP32 OTA空中升级(VSCODE+IDF)
萌宠来袭,如何让“吸猫撸狗”更有保障?
Heap Sort
Xilinx VIVADO 中 DDR3(Naive)的使用(2)读写设计
STM32入门开发 制作红外线遥控器(智能居家-万能遥控器)
ArrayList和LinkedList的区别
cat /proc/kallsyms 发现内核符号表值都为0
Four ways to traverse a Map