[Solved] linux kernel load driver Error: module verification failed: signature and/or required key missing – tainting kernel

#insmod xx. ko

The following error reports

Cause of problem:

Since the 3.7 kernel, there has been a kernel signature mechanism.

When compiling the kernel, The options related to kernel signature in .config are as follows:

CONFIG_MODULE_SIG=y
CONFIG_MODULE_SIG_ALL=y

1. There is a method to sign Ko

/usr/src/linux-4.9.61/scripts/sign-file sha512 /usr/src/linux-4.9.61/certs/signing_key.pem /usr/src/linux-4.9.61/certs/signing_key.x509 hello.ko

 

2. The second method is to disable signing

Add it to your Makefile:

CONFIG_MODULE_SIG=n

Read More: