当前位置: 首页 > news >正文

linux kernel ptr dump

指针如何打印和调试

Plain Pointers
%p      abcdef12 or 00000000abcdef12
Pointers printed without a specifier extension (i.e unadorned %p) are hashed to prevent leaking information about the kernel memory layout. This has the added benefit of providing a unique identifier. On 64-bit machines the first 32 bits are zeroed. The kernel will print (ptrval) until it gathers enough entropy. If you really want the address see %px below.

Symbols/Function Pointers
%pS     versatile_init+0x0/0x110
%ps     versatile_init
%pF     versatile_init+0x0/0x110
%pf     versatile_init
%pSR    versatile_init+0x9/0x110
        (with __builtin_extract_return_addr() translation)
%pB     prev_fn_of_versatile_init+0x88/0x88

The S and s specifiers are used for printing a pointer in symbolic format. They result in the symbol name with (S) or without (s) offsets. If KALLSYMS are disabled then the symbol address is printed instead.

Note, that the F and f specifiers are identical to S (s) and thus deprecated. We have F and f because on ia64, ppc64 and parisc64 function pointers are indirect and, in fact, are function descriptors, which require additional dereferencing before we can lookup the symbol. As of now, S and s perform dereferencing on those platforms (when needed), so F and f exist for compatibility reasons only.

The B specifier results in the symbol name with offsets and should be used when printing stack backtraces. The specifier takes into consideration the effect of compiler optimisations which may occur when tail-calls are used and marked with the noreturn GCC attribute.

Kernel Pointers
%pK     01234567 or 0123456789abcdef
For printing kernel pointers which should be hidden from unprivileged users. The behaviour of %pK depends on the kptr_restrict sysctl - see Documentation/sysctl/kernel.txt for more details.

Unmodified Addresses
%px     01234567 or 0123456789abcdef


For printing pointers when you really want to print the address. Please consider whether or not you are leaking sensitive information about the kernel memory layout before printing pointers with %px. %px is functionally equivalent to %lx (or %lu). %px is preferred because it is more uniquely grep’able. If in the future we need to modify the way the kernel handles printing pointers we will be better equipped to find the call sites.

相关文章:

  • 北京网站建设多少钱?
  • 辽宁网页制作哪家好_网站建设
  • 高端品牌网站建设_汉中网站制作
  • python 知识点累积
  • js逆向-webpack-python
  • YOLOv8损失函数改进-增加MPDIoU提升边界框回归精度【附代码】
  • 苹果入局,AI手机或将实现“真智能”?
  • Spring懒加载Bean机制
  • 昇思25天学习打卡营第19天 | 基于MindSpore通过GPT实现情感分类
  • PGCCC|【PostgreSQL】PCA认证考试大纲#postgresql认证
  • GitHub 站点打不开
  • JVM原理(二十):JVM虚拟机内存的三特性详解
  • spark shuffle写操作——SortShuffleWriter
  • 将具有多个sheet的excel表格中所有sheet某一列翻译成中文,且保留原始样式
  • [Python学习篇] Python进程和线程
  • QT程序异常结束解决方法
  • rancher管理多个集群
  • 科技云报道:产业为根大模型应用为擎,容联云推动企业营销服场景重塑
  • JavaScript 如何正确处理 Unicode 编码问题!
  • iOS 系统授权开发
  • Java程序员幽默爆笑锦集
  • Mysql5.6主从复制
  • webpack4 一点通
  • 面试遇到的一些题
  • 前端相关框架总和
  • 使用Envoy 作Sidecar Proxy的微服务模式-4.Prometheus的指标收集
  • 数据结构java版之冒泡排序及优化
  • ​HTTP与HTTPS:网络通信的安全卫士
  • ​决定德拉瓦州地区版图的关键历史事件
  • #vue3 实现前端下载excel文件模板功能
  • (32位汇编 五)mov/add/sub/and/or/xor/not
  • (CVPRW,2024)可学习的提示:遥感领域小样本语义分割
  • (Mac上)使用Python进行matplotlib 画图时,中文显示不出来
  • (附源码)spring boot基于小程序酒店疫情系统 毕业设计 091931
  • (附源码)springboot 房产中介系统 毕业设计 312341
  • (免费领源码)Java#ssm#MySQL 创意商城03663-计算机毕业设计项目选题推荐
  • (四) 虚拟摄像头vivi体验
  • (四)Linux Shell编程——输入输出重定向
  • (已解决)报错:Could not load the Qt platform plugin “xcb“
  • (转)Android学习笔记 --- android任务栈和启动模式
  • .bat批处理(七):PC端从手机内复制文件到本地
  • .gitignore文件设置了忽略但不生效
  • .NET Core 控制台程序读 appsettings.json 、注依赖、配日志、设 IOptions
  • .Net IE10 _doPostBack 未定义
  • .net redis定时_一场由fork引发的超时,让我们重新探讨了Redis的抖动问题
  • .NET/C# 判断某个类是否是泛型类型或泛型接口的子类型
  • .NetCore+vue3上传图片 Multipart body length limit 16384 exceeded.
  • .NET建议使用的大小写命名原则
  • .NET精简框架的“无法找到资源程序集”异常释疑
  • .set 数据导入matlab,设置变量导入选项 - MATLAB setvaropts - MathWorks 中国
  • @RequestBody与@RequestParam:Spring MVC中的参数接收差异解析
  • [ C++ ] STL---stack与queue
  • [Angular] 笔记 16:模板驱动表单 - 选择框与选项
  • [Delphi]一个功能完备的国密SM4类(TSM4)[20230329更新]
  • [Docker]四.Docker部署nodejs项目,部署Mysql,部署Redis,部署Mongodb
  • [EULAR文摘] 利用蛋白组学技术开发一项蛋白评分用于预测TNFi疗效
  • [Excel]如何找到非固定空白格數列的條件數據? 以月份報價表單為例
  • [Flex][问题笔记]TextArea滚动条问题