nixpkgs/pkgs/build-support
Joachim Fasting 75b9a7beac
grsecurity: implement a single NixOS kernel
This patch replaces the old grsecurity kernels with a single NixOS
specific grsecurity kernel.  This kernel is intended as a general
purpose kernel, tuned for casual desktop use.

Providing only a single kernel may seem like a regression compared to
offering a multitude of flavors.  It is impossible, however, to
effectively test and support that many options.  This is amplified by
the reality that very few seem to actually use grsecurity on NixOS,
meaning that bugs go unnoticed for long periods of time, simply because
those code paths end up never being exercised.  More generally, it is
hopeless to anticipate imagined needs.  It is better to start from a
solid foundation and possibly add more flavours on demand.

While the generic kernel is intended to cover a wide range of use cases,
it cannot cover everything.  For some, the configuration will be either
too restrictive or too lenient.  In those cases, the recommended
solution is to build a custom kernel --- this is *strongly* recommended
for security sensitive deployments.

Building a custom grsec kernel should be as simple as
```nix
linux_grsec_nixos.override {
  extraConfig = ''
    GRKERNSEC y
    PAX y
    # and so on ...
  '';
}
```

The generic kernel should be usable both as a KVM guest and host.  When
running as a host, the kernel assumes hardware virtualisation support.
Virtualisation systems other than KVM are *unsupported*: users of
non-KVM systems are better served by compiling a custom kernel.

Unlike previous Grsecurity kernels, this configuration disables `/proc`
restrictions in favor of `security.hideProcessInformation`.

Known incompatibilities:
- ZFS: can't load spl and zfs kernel modules; claims incompatibility
  with KERNEXEC method `or` and RAP; changing to `bts` does not fix the
  problem, which implies we'd have to disable RAP as well for ZFS to
  work
- `kexec()`: likely incompatible with KERNEXEC (unverified)
- Xen: likely incompatible with KERNEXEC and UDEREF (unverified)
- Virtualbox: likely incompatible with UDEREF (unverified)
2016-06-14 00:08:20 +02:00
..
agda
build-dotnet-package
build-fhs-chrootenv buildFHSEnv: use separate gcc for 64- and 32-bit 2016-05-29 23:22:58 +03:00
build-fhs-userenv buildFHSUserEnv: don't run bash in login mode for .env 2016-05-20 14:17:49 +03:00
buildenv buildEnv: fix #14682 evaluation in some edge cases 2016-04-17 08:57:17 +02:00
builder-defs
cc-wrapper cc-wrapper: add -B flag with cc.lib 2016-05-04 14:23:54 +02:00
docker no more goPackages 2016-06-09 13:08:00 +02:00
dotnetbuildhelpers Remove all-packages.nix helperFunctions dependency. 2016-03-20 16:41:20 +00:00
dotnetenv
emacs emacs: hide wrapper dependencies 2016-05-12 22:43:30 +02:00
fetchadc
fetchbower bower2nix: 2.1.0 -> 3.0.1 2016-03-28 08:23:06 +01:00
fetchbzr
fetchcvs
fetchdarcs
fetchegg
fetchfile
fetchgit Merge pull request #15469 from NixOS/fetchgit 2016-05-16 16:44:55 +02:00
fetchgitlocal
fetchgitrevision
fetchhg
fetchmtn
fetchnuget
fetchpatch
fetchsvn
fetchsvnrevision
fetchsvnssh
fetchurl fetchurl mirrors: fix gnupg URLs 2016-05-17 11:35:49 +02:00
fetchzip fetchzip: improve error message 2016-05-17 17:32:53 +01:00
gcc-cross-wrapper
gcc-wrapper-old gcc-wrapper-old: fix binutils and coreutils' paths 2016-04-25 14:27:51 +03:00
grsecurity grsecurity: implement a single NixOS kernel 2016-06-14 00:08:20 +02:00
icon-conv-tools icon-conv-tools: init at 0.0.0 (#13905) 2016-04-25 13:16:47 +02:00
kdewrapper
kernel
libredirect
make-desktopitem
make-startupitem
make-symlinks
mono-dll-fixer
nuke-references
ocaml
release debian-build: fix checkinstall invocation (#15538) 2016-05-19 09:41:10 +01:00
rust Fix buildRustPackage edge cases 2016-06-02 17:15:52 +02:00
setup-hooks setup-hooks: do not pass missing dirs to find (close #15405) 2016-05-22 12:08:01 +02:00
src-only
substitute doc/stdenv.xml document substitution env variables 2016-04-23 21:41:35 +02:00
substitute-files
templaterpm
upstream-updater
vm add CentOS 7.1 2016-05-24 11:35:39 +01:00
vsenv
build-maven.nix
build-pecl.nix
replace-dependency.nix nix: Add a "dev" output 2016-04-18 21:13:18 +02:00
source-from-head-fun.nix
trivial-builders.nix symlinkJoin: allow arbitrary additional attributes 2016-05-27 13:42:22 +03:00