insmod插入内核模块失败
发表于 : 2019-11-04 21:54
在执行sudo insmod global_test.ko后,dmesg显示插入失败
[ 124.116841] global_test: loading out-of-tree module taints kernel.
[ 124.116883] global_test: module verification failed: signature and/or required key missing - tainting kernel
按照网上的说法,将设置CONFIG_MODULE_SIG设置为n。但是依然解决不了问题。也尝试了将内核路径中.config的CONFIG_MODULE_SIG设置为n。结果也是一样的
obj-m:=global_test.o #产生global_test模块的目标文件
CURRENT_PATH:=$(shell pwd) #模块所在的当前路径
LINUX_KERNEL:=$(shell uname -r) #linux内核代码的当前版本
LINUX_KERNEL_PATH:=/usr/src/linux-headers-$(LINUX_KERNEL)
CONFIG_MODULE_SIG=n
all:
make -C $(LINUX_KERNEL_PATH) M=$(CURRENT_PATH) modules
clean:
make -C $(LINUX_KERNEL_PATH) M=$(CURRENT_PATH) clean
[ 124.116841] global_test: loading out-of-tree module taints kernel.
[ 124.116883] global_test: module verification failed: signature and/or required key missing - tainting kernel
按照网上的说法,将设置CONFIG_MODULE_SIG设置为n。但是依然解决不了问题。也尝试了将内核路径中.config的CONFIG_MODULE_SIG设置为n。结果也是一样的
obj-m:=global_test.o #产生global_test模块的目标文件
CURRENT_PATH:=$(shell pwd) #模块所在的当前路径
LINUX_KERNEL:=$(shell uname -r) #linux内核代码的当前版本
LINUX_KERNEL_PATH:=/usr/src/linux-headers-$(LINUX_KERNEL)
CONFIG_MODULE_SIG=n
all:
make -C $(LINUX_KERNEL_PATH) M=$(CURRENT_PATH) modules
clean:
make -C $(LINUX_KERNEL_PATH) M=$(CURRENT_PATH) clean