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

grsecurity: add support for proprietary nvidia video driver #25276

Closed
wants to merge 1 commit into from
Closed

grsecurity: add support for proprietary nvidia video driver #25276

wants to merge 1 commit into from

Conversation

ghost
Copy link

@ghost ghost commented Apr 27, 2017

Motivation for this change

Nixos currently lacks off combatibility between the grsecurity enabled linux kernel and the proprietary nvidia video driver.
Two main changes were needed:

  1. Apply the grsecurity pax patch for nvidia from the gentoo hardened project.
  2. Disabling PAX_RAP and PAX_KERNEXEC_PLUGIN_METHOD_OR in the gsecurity kernel config because nvidia currently are not supporting this features.

Both changes affects only if the combination grsecurity kernel + proprietary nvidia is in use.

Tests are done on my main desktop computer with and without sandboxing (state: channel 17.03-small and channel unstable).

Things done
  • Tested using sandboxing
    (nix.useSandbox on NixOS,
    or option build-use-sandbox in nix.conf
    on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • Linux
  • 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/)
  • Fits CONTRIBUTING.md.

@mention-bot
Copy link

@thineye, thanks for your PR! By analyzing the history of the files in this pull request, we identified @joachifm, @thoughtpolice and @abbradar to be potential reviewers.

@copumpkin
Copy link
Member

See also #25277

Copy link
Contributor

@joachifm joachifm left a comment

Choose a reason for hiding this comment

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

While this probably won't be integrated, I've added a few notes for you to consider.

@@ -59,7 +59,12 @@ let
]
else [ (fetchurl {
url = https://git.archlinux.org/svntogit/packages.git/plain/trunk/kernel_4.10.patch?h=packages/nvidia; sha256 = "0zhpx3baq2pca2pmz1af5cp2nzjxjx0j9w5xrdy204mnv3v2708z";
}) ];
})
(optional (kernel.features.grsecurity or false) (fetchurl {
Copy link
Contributor

Choose a reason for hiding this comment

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

optional expands to a singleton list so you'd ideally append it to the patches list; as it is, it creates a list-of-lists.



# Grsecurity kernel for proprietary nvidia driver
linux_grsec_nvidia = linux_grsec_nixos.override (old: {
Copy link
Contributor

Choose a reason for hiding this comment

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

I believe this mixes override and overrideAttrs; the former affects the parameters passed to the original expression; the latter affects the inner mkDerivation call. With override you typically pass a plain record parameter.

@ghost ghost closed this Apr 27, 2017
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants