学号144原创作品转载请注明出处
本实验来源 https://github.com/mengning/linuxkernel/
实验要求
举例跟踪分析Linux内核5.0系统调用处理过程
-
编译内核5.0
-
qemu -kernel linux-5.0.1/arch/x86/boot/bzImage -initrd rootfs.img
-
选择系统调用号后两位与您的学号后两位相同的系统调用进行跟踪分析
-
给出相关关键源代码及实验截图,撰写一篇博客(署真实姓名或学号最后3位编号),并在博客文章中注明“原创作品转载请注明出处 +
https://github.com/mengning/linuxkernel/ ”,博客内容的具体要求如下:1、题目自拟,内容围绕系统调用进行; 2、博客中需要使用实验截图 3、博客内容中需要仔细分析系统调用、保护现场与恢复现场、系统调用号及参数传递过程 4、总结部分需要阐明自己对系统调用工作机制的理解。
实验环境
Ubuntu 18
gcc 4.8
编译内核5.0
1.下载内核5.0内核代码,配置编译Linux内核,使之携带调试信息
-
mkdir LinuxKernel
-
下载内核源码:Linux内核5.0 source code
-
解压到LinuxKernel目录下,cd linux-5.0.1
-
make menuconfig,找到kernel hacking,->Compile-time checks and compiler
options,选择 [*]compile the kernel with debug info -
make