因此,您想编写一个内核模块。您知道C,您已经编写了一些可以作为进程运行的常规程序,现在您想知道真正的动作在哪里,一个通配指针可以擦掉文件系统,核心转储意味着重新启动。内核模块到底是什么?模块是可以根据需要加载和卸载的代码段。它们扩展了内核的功能,而无需重新引导系统。例如。模块驱动程序的一种类型是设备驱动程序,它允许内核访问没有模块的系统硬件,我们将不得不构建单片内核并将新功能直接添加到内核映像中,除了具有更大的内核之外,这还具有缺点每次我们想要新功能时都要求我们重建并重新启动内核的过程So, you want to write a kernel module. You know C, you, ve written a few normal programs to run as processes, and now you want to get to where the real action is, to where a single wild pointer can wipe out your file system and a core dump means a reboot.What exactly is a kernel module? Modules are pieces of code that can be loaded and unloaded into th upon demand. They extend the functionality of the kernel without the need to reboot the system. For example.one type of module is the device driver, which allows the kernel to access hardware connected to the syste without modules, we would have to build monolithic kernels and add new functionality directly into the em ernel image, Besides having larger kernels
标签:
linux
上传时间:
2022-03-30
上传用户: