Skip to content

Commit

Permalink
config: Set CONFIG_LIBCRC32C=y
Browse files Browse the repository at this point in the history
Both nf_tables.ko and xfs.ko relying on libcrc32c.ko. But for some
reason, modprobe isn't able to automatically load libcrc32c.ko as a
dependency.

When I look at my host's modprobe.d config, I see some alias logic:

```
$ modprobe -c | rg crc32c
softdep ext4 pre: crc32c
softdep btrfs pre: crc32c
softdep bcachefs pre: crc32c
softdep libcrc32c pre: crc32c
alias cpu:type:x86,ven*fam*mod*:feature:*0094* crc32c_intel
alias crc32c crc32c_intel
alias crc32c crc32c_generic
alias crc32c_generic crc32c_generic
alias crc32c_intel crc32c_intel
alias crypto_crc32c crc32c_intel
alias crypto_crc32c crc32c_generic
alias crypto_crc32c_generic crc32c_generic
alias crypto_crc32c_intel crc32c_intel
alias symbol:crc32c libcrc32c
```

I imagine there are arch specific optimizations. And there's non trivial
logic to handle it.

Rather than figure it out, just build into the kernel libcrc32c.ko. Now
something like this will just work:

```
$ vmtest -k bzImage -- modprobe -d. -a nf_tables xfs
```
  • Loading branch information
danobi committed Jan 3, 2025
1 parent 7145bcf commit 2b911f9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions config/config
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y
CONFIG_IPV6=y
CONFIG_KEYS=y
CONFIG_LIBCRC32C=y
CONFIG_MODULE_SIG=y
CONFIG_MODULE_SRCVERSION_ALL=y
CONFIG_MODULE_UNLOAD=y
Expand Down

0 comments on commit 2b911f9

Please sign in to comment.