Open nickchen120235 opened 1 year ago
@nickchen120235, I am writing another ebook about Linux CPU scheduler in which Ftrace was covered. I can send the draft for your reference. If you would like to contribute, please make a rough list.
If you would like to contribute, please make a rough list.
Sure I would like to write this portion of the book.
Since Ftrace will also be covered in the aforementioned book, in lkmpg only function-hooking-related stuff will be (roughly) introduced, i.e. more of an introduction to hooking using Ftrace rather than a deep-dive into it. It'll be a section after the sys_call_table
example (or just something like "Another technique we can utilize to control the flow of execution of a syscall is Ftrace. ").
Currently I'm think of dividing the section into three parts:
sys_open(at)
example rewritten using FtraceThe length of content won't be more than a section.
The planned content is similar to this, of course the kprobe
part will be omitted and the rest will be revised.
In the syscall chapter, syscall hooking is introduced, so I think it may be a good opportunity to go a step deeper to talk about Ftrace and hooking, and maybe kernel live patching.
I can provide some introductory text and sample code for syscall hooking if anyone is interested.