Tag Archives: Vermagic error

[Solved] Vermagic error and signature error in insmod

Handling of vermagic errors when insmod drives.
uname -a to see the vermagic on the environment
If the driver code is consistent, you can force to modify the UTS_RELEASE macro in include/generated/utsrelease.h to be consistent with the environment, and then compile the KO.
Signature error: signature and/or required key missing – tainting kernel
Reason: The kernel is enabled for signing, the driver is not signed.
Signature-related options in the kernel.
CONFIG_MODULE_SIG_FORMAT=y
CONFIG_MODULE_SIG=y
#CONFIG_MODULE_SIG_FORCE is not set
CONFIG_MODULE_SIG_ALL=y
#CONFIG_MODULE_SIG_SHA1 is not set
#CONFIG_MODULE_SIG_SHA224 is not set
#CONFIG_MODULE_SIG_SHA256 is not set
#CONFIG_MODULE_SIG_SHA384 is not set
CONFIG_MODULE_SIG_SHA512=y
CONFIG_MODULE_SIG_HASH=“sha512”
CONFIG_MODULE_SIG_KEY=“certs/signing_key.pem”
Signature method:
./scripts/sign-file sha512 ./certs/signing_key.pem ./certs/signing_key.x509 drivers/xxx.ko