Raspberry PI 中的 Linux KProbe

发布于 2025-01-13 16:39:17 字数 220 浏览 3 评论 0原文

我正在尝试在 Raspberry pi 上使用 kprobes,并尝试使用寄存器 struct pt_regs 在 k_probe 的后处理程序中存储获取文件结构。我似乎无法弄清楚从哪个寄存器中获取它。在 x86 中它是 axe,所以使用下面的方法可以。

struct file *file = (struct file *)regs->ax;

请帮帮我。

I am trying to use kprobes on Raspberry pi and and trying to store get the file struct from in the post handler of k_probe using the register struct pt_regs. I can't seem to figure out what register to fetch it from. In x86 it's ax so using below works.

struct file *file = (struct file *)regs->ax;

Please help me out.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文