无效的内存地址页故障处理程序更新

发布于 2025-02-02 21:40:18 字数 291 浏览 2 评论 0原文

我目前正在尝试在某些无效的内存地址范围内更新中断处理程序的页面故障。最终目标是我们可以使用自己的定义处理程序而不是默认处理程序。我想的几种方法:

  1. 找到IDT(中断描述符表),并更新表中的页面故障的处理程序地址。我试图使用“ lidt”指令使用内联汇编,但最终以segfault进行了内线组件。

  2. 使用UserFaultFD定义用户页面故障处理程序,但似乎无法与无效的内存地址一起使用。

是否有人有一些有希望的建议或可行的想法来修改用户空间中的中断处理程序?多谢!

I am currently trying to update the interrupt handler for page fault in a certain invalid range of memory addresses. The ultimate goal is that we can use our own defined handler instead of default one. There are several ways I am thinking of:

  1. Find the IDT (interrupt descriptor table) and update the handler address for page fault in the table. I tried to use inline assembly with "lidt" instruction, but ended up with segfault for that inline assembly.

  2. Use userfaultfd to define a user page fault handler, but it seems not to work with an invalid memory address.

Does anyone have some promising suggestions or viable ideas for modifying the interrupt handler in user space? Thanks a lot!

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

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

发布评论

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