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

Projects
None yet
4 participants
@fpletz
Copy link
Member

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

cryptsetup: enable kernel crypto api support again
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.

@fpletz fpletz requested a review from yegortimoshenko Jun 7, 2019

@fpletz

This comment has been minimized.

Copy link
Member Author

commented Jun 7, 2019

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

@yegortimoshenko

This comment has been minimized.

Copy link
Member

commented Jun 7, 2019

Tests timed out, trying again.

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

@fpletz

This comment has been minimized.

Copy link
Member Author

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
nixos/tests: fix luksroot installer test name
Both tests were previously called "luksroot-luks2".
@zarelit
Copy link
Contributor

left a comment

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

@cript0nauta

This comment has been minimized.

Copy link
Contributor

commented Jun 10, 2019

@fpletz it works ok in my machine

@fpletz fpletz merged commit 9b2ee2c into NixOS:master Jun 12, 2019

15 of 16 checks passed

cryptsetup on x86_64-darwin No attempt
Details
Evaluation Performance Report Evaluator Performance Report
Details
cryptsetup on aarch64-linux Success
Details
cryptsetup on x86_64-linux Success
Details
grahamcofborg-eval ^.^!
Details
grahamcofborg-eval-check-maintainers matching changed paths to changed attrs...
Details
grahamcofborg-eval-check-meta config.nix: checkMeta = true
Details
grahamcofborg-eval-darwin nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A darwin-tested
Details
grahamcofborg-eval-nixos nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./nixos/release-combined.nix -A tested
Details
grahamcofborg-eval-nixos-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./nixos/release.nix -A manual
Details
grahamcofborg-eval-nixos-options nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./nixos/release.nix -A options
Details
grahamcofborg-eval-nixpkgs-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A manual
Details
grahamcofborg-eval-nixpkgs-tarball nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A tarball
Details
grahamcofborg-eval-nixpkgs-unstable-jobset nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A unstable
Details
grahamcofborg-eval-package-list nix-env -qa --json --file .
Details
grahamcofborg-eval-package-list-no-aliases nix-env -qa --json --file . --arg config { allowAliases = false; }
Details

@fpletz fpletz deleted the mayflower:fix/cryptsetup-kernel-crypto branch Jun 12, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.