0

I am trying to build a scull device, and have build a .ko file without problem. But when insmoded, then cat of /var/log/kern.log:

May 14 00:33:06 XLM kernel: [ 4251.407594] scull: loading out-of-tree module taints kernel.
May 14 00:33:06 XLM kernel: [ 4251.407680] scull: module verification failed: signature and/or required key missing - tainting kernel

So therefor this error occured bash: /dev/scull: No such device or address (because I have tried to write to /dev/scull0 after mknod /dev/scull 245 0,. But as seen from log, I have not even register the device, because the module is marked as out-of-tree and also no signature.) I do not know why I have signature enabled, when I have disable secure boot in bios. Nevertheless, how can I enable kernel to accept the module in order to use the device? I have MODULE_LICENSE("Dual BSD/GPL"); in source, so the licensing should not be the problem.

autistic456
  • 183
  • 1
  • 10
  • Did the module fail to load? Does the module's _init_ function get called (you can check by adding a `printk` in the init function to write something to the kernel log)? – Ian Abbott May 14 '20 at 15:58
  • 1
    @IanAbbott, no need to repeat `printk()` that core already have, simple add *initcall_debug* to the kernel command line. – 0andriy May 14 '20 at 17:57
  • You need to sign it, basically in the same way as Ubuntu does. But I have no idea where to get the key (I only know you may rebuilt kernel without this feature). – 0andriy May 14 '20 at 17:58
  • @0andriy I don't think Ubuntu signed kernels _enforce_ module signature verification unless running in a secure boot environment, but will issue a warning. That's why I wanted to know if the module's init function was being called. – Ian Abbott May 15 '20 at 09:37
  • @IanAbbott, @0andriy, I have added printk to `scull_init_module`, but it did not load, because no output in kern.log. Question here: https://stackoverflow.com/questions/62019834/why-does-module-failed-to-load-dev-scull0-no-such-device-or-address – autistic456 May 26 '20 at 10:19
  • @autistic456 Stuff may get filtered out of kern.log depending on the loglevel of the message. You can run `dmesg` to see the unfiltered, recent messages. – Ian Abbott May 26 '20 at 10:37
  • @IanAbbott edditted it, take a look – autistic456 May 26 '20 at 11:17

0 Answers0