分析system_call中断处理过程

来源:互联网 发布:用淘宝联盟被发现了 编辑:程序博客网 时间:2024/05/16 09:52

In this blog, we will do the following tasks:

使用gdb跟踪分析一个系统调用内核函数(您上周选择的那一个系统调用),系统调用列表参见http://codelab.shiyanlou.com/xref/linux-3.18.6/arch/x86/syscalls/syscall_32.tbl ,推荐在实验楼Linux虚拟机环境下完成实验。

根据本周所学知识分析系统调用的过程,从system_call开始到iret结束之间的整个过程,并画出简要准确的流程图,

Michael He 原创作品转载请注明出处 :《Linux内核分析》MOOC课程http://mooc.study.163.com/course/USTC-1000029000 ”

内容的具体要求如下:

  • 题目自拟,内容围绕系统调用system_call的处理过程进行;
  • 博客内容中需要仔细分析system_call对应的汇编代码的工作过程,特别注意系统调用返回iret之前的进程调度时机等。
  • 总结部分需要阐明自己对“系统调用处理过程”的理解,进一步推广到一般的中断处理过程。

my understanding of interrupt processing

  • interrupt(ex:int 0x80) - save cs:eip/esp/eflags(current) to kernel stack,then load cs:eip(entry of a specific ISR) and ss:esp(point to kernel stack).
  • SAVE_ALL
  • RESTORE_ALL
  • iret - pop cs:eip/ss:esp/eflags from kernel stack
0 0