因此,您想編寫一個(gè)內(nèi)核模塊。您知道C,您已經(jīng)編寫了一些可以作為進(jìn)程運(yùn)行的常規(guī)程序,現(xiàn)在您想知道真正的動(dòng)作在哪里,一個(gè)通配指針可以擦掉文件系統(tǒng),核心轉(zhuǎn)儲(chǔ)意味著重新啟動(dòng)。內(nèi)核模塊到底是什么?模塊是可以根據(jù)需要加載和卸載的代碼段。它們擴(kuò)展了內(nèi)核的功能,而無(wú)需重新引導(dǎo)系統(tǒng)。例如。模塊驅(qū)動(dòng)程序的一種類型是設(shè)備驅(qū)動(dòng)程序,它允許內(nèi)核訪問(wèn)沒(méi)有模塊的系統(tǒng)硬件,我們將不得不構(gòu)建單片內(nèi)核并將新功能直接添加到內(nèi)核映像中,除了具有更大的內(nèi)核之外,這還具有缺點(diǎn)每次我們想要新功能時(shí)都要求我們重建并重新啟動(dòng)內(nèi)核的過(guò)程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
標(biāo)簽:
linux
上傳時(shí)間:
2022-03-30
上傳用戶: