因此,您想編寫一個內核模塊。您知道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
上傳用戶: