nixpkgs/pkgs/os-specific/linux/kernel
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
..
chromiumos-patches linux_chromiumos_3_14: init at 3.14.0 2016-01-13 22:43:19 +03:00
bridge-stp-helper.patch kernel: Fix path to stp bridge helper 2015-01-14 10:34:28 -08:00
common-config.nix kernel: set virtualization options regardless of grsec 2016-06-10 19:27:59 +02:00
crc-regression.patch linux_3_{10,12,14}: fix upstream regression, fixes #6231 2015-02-10 13:45:20 +01:00
gcc5-link-apm.patch kernel: fix build of 3.10 and 3.12 on i686 2016-04-06 10:36:04 +01:00
gcc5-link-lguest.patch kernel: fix build of 3.10 and 3.12 on i686 2016-04-06 10:36:04 +01:00
generate-config.pl Implement generic kernel build via manual-config 2014-01-01 09:21:25 -05:00
generic.nix linux: Use $SOURCE_DATE_EPOCH as the build timestamp 2016-02-01 18:19:23 +01:00
genksyms-fix-segfault.patch linux_chromiumos_3_18: init at 3.18.0 2016-01-13 22:43:19 +03:00
grsecurity-nixos-config.nix grsecurity: implement a single NixOS kernel 2016-06-14 00:08:20 +02:00
grsecurity-nixos-kmod.patch grsecurity: implement a single NixOS kernel 2016-06-14 00:08:20 +02:00
linux-3.10.nix kernel: 3.10.99 -> 3.10.101 2016-03-19 18:25:24 +00:00
linux-3.12.nix kernel: 3.12.55 -> 3.12.57 2016-03-19 18:27:41 +00:00
linux-3.14.nix kernel: 3.14.63 -> 3.14.65 2016-03-19 18:29:40 +00:00
linux-3.18.nix kernel: 3.18.28 -> 3.18.29 (close #14057) 2016-03-21 12:39:29 +01:00
linux-4.1.nix kernel: 4.1.20 -> 4.1.25 2016-06-07 09:57:07 -04:00
linux-4.3.nix linux_4_3: 4.3.5 -> 4.3.6 (close #13408) 2016-02-24 08:15:34 +01:00
linux-4.4.nix kernel: 4.4.11 -> 4.4.12 2016-06-07 09:57:47 -04:00
linux-4.5.nix kernel: 4.5.5 -> 4.5.6 2016-06-07 09:58:24 -04:00
linux-4.6.nix kernel: 4.6.0 -> 4.6.1 2016-06-07 09:59:19 -04:00
linux-chromiumos-3.14.nix Fix lots of fetchgit hashes (fallout from #15469) 2016-06-03 17:17:08 +03:00
linux-chromiumos-3.18.nix Fix lots of fetchgit hashes (fallout from #15469) 2016-06-03 17:17:08 +03:00
linux-grsecurity.nix grsecurity: implement a single NixOS kernel 2016-06-14 00:08:20 +02:00
linux-mptcp.nix Fix misspelled meta.maintainers attributes 2016-02-10 14:59:50 +01:00
linux-rpi.nix Update linux raspberry-pi to 4.1.y. 2016-03-22 15:09:57 +01:00
linux-testing.nix linux-testing: 4.6-rc5 -> 4.6-rc6 2016-05-02 02:29:42 +01:00
manual-config.nix Adding vmlinux to linux kernel 'dev' derivation. 2016-05-06 18:11:03 +02:00
mips-ext3-n32.patch mips linux: Adding a patch to fix an ext3 bug in 3.5 and 3.6 2012-11-06 00:16:13 +01:00
mips-fpu-sigill.patch Fixing the mips patch for sigill fpu cases. 2012-06-16 15:37:04 +00:00
mips-fpureg-emulation.patch Adding two kernel patches for mips, that make the life easier on loongson2f 2012-06-16 10:49:03 +00:00
no-xsave.patch Linux no-xsave.patch: commit patch into Nixpkgs since fetchurl no longer works 2012-07-02 16:53:53 +02:00
patches.nix grsecurity: implement a single NixOS kernel 2016-06-14 00:08:20 +02:00
perf.diff linux-perf: Fix build (unportable shell hack broke). 2014-01-25 16:30:14 +01:00
perf.nix perf: fix build 2016-03-26 18:18:40 +01:00
qat_common_Makefile.patch linux kernel 4.4: fix race during build 2016-04-12 22:45:57 +01:00
ubuntu-fan-4.4.patch fan-networking: updated patches from Ubuntu 2016-04-10 16:07:03 -04:00
ubuntu-unprivileged-overlayfs.patch Unprivileged overlayfs mounts kernel patch from ubuntu 2015-09-26 00:42:16 +03:00
update.sh kernel: Add update script 2014-10-30 14:37:22 -07:00