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

Use a deterministic seed for kernel RANDSTRUCT, and re-enable in hardened kernels #53802

Merged
merged 2 commits into from Jan 11, 2019

Conversation

Projects
None yet
4 participants
@delroth
Copy link
Contributor

commented Jan 11, 2019

Motivation for this change

First step in addressing #53592. Does not allow users to configure their own seed just yet, but fixes the incompatibility issue with out-of-tree modules.

I think I'll attempt to contribute something upstream that adds an environment variable for users to inject a non-random RANDSTRUCT seed. I've looked through a few distros and everyone does it differently.

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 nox --run "nox-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.

delroth added some commits Jan 8, 2019

Revert "Revert "Revert "linux-hardened: Disable GCC_PLUGIN_RANDSTRUCT"""
The issue with out-of-tree modules has been addressed and the feature
should now be good to re-enable again.

This reverts commit 865f7a1.
@delroth

This comment has been minimized.

Copy link
Contributor Author

commented Jan 11, 2019

@joachifm

This comment has been minimized.

Copy link
Contributor

commented Jan 11, 2019

@GrahamcOfBorg test hardened

@joachifm

This comment has been minimized.

Copy link
Contributor

commented Jan 11, 2019

@GrahamcOfBorg build linux_hardened

@joachifm joachifm merged commit 11cd6ae into NixOS:master Jan 11, 2019

11 of 15 checks passed

nix-build -A linux_hardened --argstr system x86_64-darwin Build Results
Details
nix-build -A linux_hardened --argstr system x86_64-linux Build Results
Details
nix-build -A tests.hardened --argstr system aarch64-linux Build Results
Details
nix-build -A tests.hardened --argstr system x86_64-linux Build Results
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-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
nix-build -A linux_hardened --argstr system aarch64-linux Build Results
Details
@NeQuissimus

This comment has been minimized.

Copy link
Member

commented Jan 11, 2019

Thank you for this :)

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.