This week I started watching scull again, hoping to do some interesting things at the kernel level
I didn’t want to post this csdn, but I still insist on writing it down to record the troubleshooting process.
After the make module was successful today, it suddenly appeared
ERROR: could not insert module main.ko: Operation not permitted
Oh my God, what is the reason? Is there insufficient authority? Oneself
sudo make
sudo insmod main.ko
Found this problem, so I sudo dmesg -c
The Linux dmesg command is used to display boot information.
The kernel will store the boot information in the ring buffer. If you do not have time to view the information when you turn on the computer, you can use dmesg to view it. The boot information is also stored in the /var/log directory, in a file named dmesg.
Found a very important buffer content
Lockdown: insmod: unsigned module loading is restricted; see man kernel_lock
I understand that Secure Boot is at fault
Then turn on and hold F2, turn off Secure Boot, load the kernel driver module again, and complete the loading