Cannot install modules with 5.12 kernel


I’ve just switched to a new vagrant box with 5.12 kernel ( ) and find out that now I cannot install even the simplest kernel modules with only module_init/module_exit methods.

So, insmod fails with:
insmod: ERROR: could not insert module ./my-module.ko: Invalid parameters

And dmesg shows:
kernel read not supported for file /my-module.ko (pid: 6289 comm: insmod)

Here is the patch with this message:…a2f3cdf95aaadf

Frankly, I don’t understand what additionally I should specify in my module to make it work. When I tried another distributives (for example ubuntu), everything worked fine.

Any ideas what I do wrong and how to fix this?
Thanks a lot!

Do you switch off secure-boot in the BIOS/UEFI?

No, I’ve just use the vagrant box as it is without any additional configuration. Btw, I’ve tried to use Leap-15.2 ( ) and everything runs smooth with it.
Leap works, most probably, because it has older kernel (5.3.18-lp152.72-default ) and don’t have that patch on board.

So your filesystem does not support ->read_iter method.

I’m just trying to insert a very simple kernel module. There is no any interactions with filesystems. Or you mean that the system cannot read my .ko file since it’s located on a filesystem that doesn’t support read iterators? Hmm, I’ll check this. Thanks!

static int __init module_init(void)
printk(KERN_INFO "Hello, World!
return 0;

static void __exit module_exit(void)
printk(KERN_INFO "Goodbye, World!



Thank you very much! Indeed, virtualbox uses its own fs - vboxsf and most probably it’s not yet updated to follow new rules. I’ve copied my .ko file to /var/tmp folder and insmod successfully loaded the module!

NIce you have a solution.

Please next time check that we have a Virtualization sub section. I guess that this one should have belonged there.