3 ms·
This is great, for the fun of course, but also and mainly because it is a simple example of a working kernel module, which is not something one can see very oft
by p4bl0 15y ago
This is great, for the fun of course, but also and mainly because it is a simple example of a working kernel module, which is not something one can see very often.
- JoachimSchipper 15y agoDo read http://news.ycombinator.com/item?id=2973012 http://news.ycombinator.com/item?id=2973012 (various security issues), though.
- p4bl0 15y agoYep yep I saw that too. But this kind of security issue is not specific to kernel module, it's something every C programmer should be aware of already. (I don't think it's that important here tho, because if the kernel crashes because of this module it's "lol" too :-p). What's interesting here is the C file structure (the #includes and the MODULE_* and module_* macros and functions) and the Makefile.
- KonradKlause 15y agoManipulating the cr0 register is _very_ kernel specific.
- p4bl0 15y agoOh right I didn't see that before posting my previous comment, I thought it was just the `p = (char *)(path + strlen(path) - 4);` thing, which I had also spotted on my own. Thanks for the warning!
- seclorum 15y agoWhat are you talking about? The linux sources are full of simple examples of working kernel modules.