nixos-bsd / nixbsd

An unofficial NixOS fork with a FreeBSD kernel
MIT License
502 stars 17 forks source link

kldload: Cannot load some modules #15

Closed astro closed 9 months ago

astro commented 9 months ago

I get this error when trying to load any module:

kldload: unexpected relocation type 42, symbol index 456
link_elf_obj: symbol __stack_chk_guard undefined
linker_load_file: /nix/store/r13san988d8yjicihlbp452rBy3vzjn3-sys-x86_64-unknown-freebsd-14.8/kernel/pf.ko - unsupported file type
kldload: an error occurred while loading module pf. Please check dmesg(8) for more details.
artemist commented 9 months ago

We disable the hardening flags that we think would cause this in our sys package but it doesn't seem to work for all modules.

Some modules, like nullfs, do still load properly, but most I've tested don't.

artemist commented 9 months ago

Should be fixed in https://github.com/rhelmot/nixpkgs/commit/ed74f89b99f84f070c496efba69860de56d27ddb, try nix flake update to get it. It might be a good idea to investigate why disabling the stackprotector hardening flag didn't work though.