Linux kernel Linux驱动程序phys_mem_access_prot未定义

Linux kernel Linux驱动程序phys_mem_access_prot未定义,linux-kernel,linux-device-driver,Linux Kernel,Linux Device Driver,我有一个可加载的模块,它在Ubuntu 9.10(Linux 2.6.31-22-server)下构建时会抛出一个关于phys_mem_access_prot的警告 该函数确实显示在System.map-2.6.31-22-server文件中 [667] grep phys_mem_access_prot /boot/System.map-2.6.31-22-server ffffffff8103fb40 T phys_mem_access_prot ffffffff8103fb50 T ph

我有一个可加载的模块,它在Ubuntu 9.10(Linux 2.6.31-22-server)下构建时会抛出一个关于phys_mem_access_prot的警告

该函数确实显示在System.map-2.6.31-22-server文件中

[667] grep phys_mem_access_prot /boot/System.map-2.6.31-22-server 
ffffffff8103fb40 T phys_mem_access_prot
ffffffff8103fb50 T phys_mem_access_prot_allowed

驱动程序加载,所以我不明白为什么
modpost
不开心。这是一个问题,因为内核没有使用
export\u SYMBOL()
导出函数吗?

您已经回答了自己的问题!模块使用的任何内核函数都需要由各种EXPORT_SYMBOL()宏之一导出


如果非GPL模块需要使用EXPORT\U SYMBOL\U GPL导出的函数,您也会看到问题。

谢谢您的确认!LDD解释EXPORT_符号的方式,我不确定它是只应用了模块->内核还是同时应用了这两种方式。
[667] grep phys_mem_access_prot /boot/System.map-2.6.31-22-server 
ffffffff8103fb40 T phys_mem_access_prot
ffffffff8103fb50 T phys_mem_access_prot_allowed