![]() ![]() That location is readable by user processes, it is not writable by them). What happens is that the process fills the registers with theĪppropriate values and then calls a special instruction which jumps to a previously defined location in the kernel (of course, System calls are an exception to this general rule. The hardware of the CPU enforces this (that's the reason why it's called `protected mode'). It can't access kernel memory and it can't call In general, a process is not supposed to be able to access the kernel. If you want to change the behaviour of the kernel in interesting ways, this is the place to do it.īy the way, if you want to see which system calls a program uses, run strace. WhenĪ process requests a service from the kernel (such as opening a file, forking to a new process, or requesting more memory), The real process to kernel communication mechanism, the one used by all processes, is system calls. To ensure you won't loseĪny files either, please run sync right before you do the insmod and theįorget about /proc files, forget about device files. This meant I couldn't open any files, I couldn't run any programs, and I couldn't While writing the example below, I killed the This is where kernel programming gets dangerous. System in some way? Then, you're mostly on your own. ![]() But what if you want to do something unusual, to change the behavior of the ![]() Thought you'd want, such as write a device driver. This is fine if you want to do something the kernel programmers So far, the only thing we've done was to use well defined kernel mechanisms to register /proc files and device handlers. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |