Linux Project. 中央大學資工系 碩士二年級 江瑞敏. Outline. How to compile linux kernel How to add a new system call Some Projects Example and Way to Solve it System Call Hooking by Module Project about Memory Project about Process. Download Link.
An Image/Link below is provided (as is) to download presentation
Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.Content is provided to you AS IS for your information and personal use only.Download presentation by click this link.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.During download, if you can't get a presentation, the file might be deleted by the publisher.
Outline • How to compile linux kernel • How to add a new system call • Some Projects Example and Way to Solve it • System Call Hooking by Module • Project about Memory • Project about Process
Download Link • wgethttps://kernel.org/pub/linux/kernel/linux-2.6.18.tar.bz2 • tar xvf linux-2.6.18.tar.bz2
Config file • Determine which kind of kernel you are compiling • Determine which modules you want the kernel to compile. • Misconfiguration will lead to kernel crash.
make –j[n] • Compile the whole source code according to your configuration
make modules_install • Install the modules into the necessary folder. • /lib/modules/`uname –r`/
make install • Install the image into the boot directory. • Sometimes, update grub is necessary.
Add a System Call • 1. cd $kernel_src • 2. cd arch/i386/kernel/syscall_table.S • 3. • …. • .long sys_tee /* 315 */.long sys_vmsplice.long sys_move_pages.long sys_project /* 318 */ • Kernel.org/pub/linux/kernel
Add a System Call • cd linux/include/asm-i386/unistd.h • #define __NR_vmsplice 316#define __NR_move_pages 317#define __NR_project 318#ifdef __KERNEL__#define NR_syscalls 319
Add a System Call • cd linux/include/linux/syscalls.h • asmlinkagelong sys_set_robust_list(structrobust_list_head __user *head,size_tlen);asmlinkage long sys_project( inti );#endif