Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cryptsetup: enable kernel crypto api support again #62838

Merged
merged 2 commits into from Jun 12, 2019

Conversation

fpletz
Copy link
Member

@fpletz fpletz commented Jun 7, 2019

Motivation for this change

This is needed for tcrypt and the benchmark subcommand. If enabled,
it is also used to unlock LUKS2 volumes and therefore the kernel modules
providing this feature need to be available in our initrd.

Fixes #42163. #54019.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Assured whether relevant documentation is up to date
  • Fits CONTRIBUTING.md.

cc @cript0nauta @zarelit @hlandau

This is needed for tcrypt and the benchmark subcommand. If enabled,
it is also used to unlock LUKS2 volumes and therefore the kernel modules
providing this feature need to be available in our initrd.

Fixes NixOS#42163. NixOS#54019.
@fpletz
Copy link
Member Author

fpletz commented Jun 7, 2019

@GrahamcOfBorg test installer.luksroot-format1 installer.luksroot-format2

@lukateras
Copy link
Member

Tests timed out, trying again.

@GrahamcOfBorg test installer.luksroot-format1 installer.luksroot-format2

@fpletz
Copy link
Member Author

fpletz commented Jun 8, 2019

Timed out again. Unfortunately they probably just take too long for ofborg. Ran both tests locally though.

I'd like to wait for @cript0nauta to maybe test this on his machine.

There are more algif modules and I wasn't sure which ones are needed. I deduced algif_skcipher was needed by looking at which modules were loaded after some cryptsetup operations were executed. I just noticed that cryptsetup also supports AEAD modes with LUKS2 but they are experimental. For this to work the algif_aead module is required. Not sure if we want to include it now or later when it is marked as stable.

For completeness, there are two more algif modules that are not needed according to cryptsetup's source code:

  • algif_hash
  • algif_rng

Both tests were previously called "luksroot-luks2".
Copy link
Member

@zarelit zarelit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FWIW I can confirm this fixes the sub-issue about cryptsetup benchmark. Thanks for looking into it!

@cript0nauta
Copy link
Contributor

@fpletz it works ok in my machine

@fpletz fpletz merged commit 9b2ee2c into NixOS:master Jun 12, 2019
@fpletz fpletz deleted the fix/cryptsetup-kernel-crypto branch June 12, 2019 05:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enable initrd modules required by cryptsetup --kernel-crypto
4 participants