中断描述符表(IDT)修改
在linux内核的控制流程中,发现控制转移到了有中断位置的IDT(例如:0x80系统调用)。然后控制权转移到适当的系统调用。另请注意,IDT 仅在启动时初始化。
我想了解更多有关真实内核的 IDT 信息,例如它的位置。还想知道,其他时候是否会被修改?
请帮忙。
In the flow of control in linux kernel, found that control moves to IDT which has the location of interrupts(ex: 0x80 system call). And then control moves to the appropriate System call. Also read that IDT is initialized at boot time only.
I would like to know more about the IDT information from a real kernel, like its location. Also like to know, wthether at any other time its being modified?
Please help.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
写一个菜鸟,是吗?
无论如何,您可以使用 LIDT/SIDT x86 指令直接查找和操作 IDT。
您还可以在一些好的 phrack 文章 正是关于这个主题的。
Writing a rooktit, are we ?
Anyways, you can use the LIDT/SIDT x86 instructions to directly find and manipulate the IDT.
You can also find some information about IDT hooking on some good phrack articles about exactly this subject.
在 Linux 中,IRQ 处理函数的声明可以在 include 中找到/linux/interrupt.h。通用处理代码可以在 kernel/irq/ 和平台中找到arch/ 目录下的具体代码 - 看看例如 arch/x86/kernel/irq.c 以及该目录中的其他 irq*.c 文件。
您应该阅读 kernel/irc/*.c 文件中的注释来了解 Linux 中有关 IRQ 的锁定规则和机制。请注意,其他操作系统可以并且将会有不同的锁定规则。祝你好运!
In Linux, the declarations for IRQ-handling functions can be found in include/linux/interrupt.h. Generic handling code can be found in kernel/irq/, and platform specific code under the arch/ directories - take a look at eg, arch/x86/kernel/irq.c and the other irq*.c files in that directory.
You should read the comments in the kernel/irc/*.c files to understand locking rules and mechanisms regarding IRQs in Linux. Note that other OSes can and will have different locking rules. Good luck!