当前位置:网站首页>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);
边栏推荐
猜你喜欢
随机推荐
【LeetCode】232.用栈实现队列
图文手把手教程--ESP32 MQTT对接EMQX本地服务器(VSCODE+ESP-IDF)
ORB-SLAM3中的优化
萌宠来袭,如何让“吸猫撸狗”更有保障?
手搓一个“七夕限定”,用3D Engine 5分钟实现烟花绽放效果
线程必备内容
Advanced transcriptome analysis and R data visualization hot registration (2022.10)
helm安装
ROI LTV CPA ECPM体系讲解
Google Earth Engine APP ——制作上传GIF动图并添加全球矢量位置
使用.NET简单实现一个Redis的高性能克隆版(二)
使用.NET简单实现一个Redis的高性能克隆版(二)
Win11文件类型怎么改?Win11修改文件后缀的方法
SkiaSharp 之 WPF 自绘 粒子花园(案例版)
datax oracle to oracle增量同步
上帝空间——全球首个基于Web3.0的艺术协议创意平台,拓宽多元艺术融合边界
学会使用set和map的基本接口
*W3C* 标准组织
MySQL 45 讲 | 11 怎么给字符串字段加索引?
美摄问答室|美映 VS 美摄云剪辑