RSSArchive About LinkedIn flickr Links to previous projects

[bizkit|張至] good coders code, great steal.

*
Tag
23
Nov
#geek   #linux   #kernel   #syscall   #hooking   #kernel module  

Linux Kernel Development / Debugging (2) - Hooking system calls on 2.6 kernels

昨晚失眠,其實已經累的半死。但看了 The Social Network 之後忍不著帶起耳機,放著洞雌洞雌的 AvB 與 Tiësto 又繼續摸摸 Linux kernel。用電影裡的說法就是 ─ Wired In!!!

修課的作業要求在核心新增一個 system call 提供一個分析記憶體狀態的介面,不過助教學長說我們也可以寫成 kernel module,於是便起了在 kernel module 中寫 system call 的想法。查了一下,要達到這樣的效果要靠 system call hooking 來達成,也就是去 hijack 目前存在的 system call,讓所有程式在呼叫該 system call 時都會變成執行到 module 中的某個 function,該 function 最後會再去呼叫正常的 system call routine。

目前的計畫是在 kernel 中新增一個 system call 來給自己的 module 來 hijack,不知道會不會是很沒有道理開發模式。

Read More

Comments
Page 1 of 1