Commit Graph

276 Commits

Author SHA1 Message Date
Rolf Neugebauer
183fcf0970 kernel: Add new retpoline option to the x86 4.4.x kernel
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-01-24 12:32:15 +00:00
Rolf Neugebauer
5de66f4fd9 kernel: Update to 4.14.15/4.9.78/4.4.113
While at it, also update to latest alpine base

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-01-24 11:56:34 +00:00
Jason A. Donenfeld
290d014959 wireguard: update to 0.0.20180118
* receive: treat packet checking as irrelevant for timers

Small simplification to the state machine, as discussed with Mathias
Hall-Andersen.

* socket: check for null socket before fishing out sport
* wg-quick: ifnames have max len of 15
* tools: plug memleak in config error path

Important bug fixes.

* external-tests: add python implementation

Piotr Lizonczyk has contributed a test vector written in Python.

* poly1305: remove indirect calls

From Samuel Neves, we now are in a better position to mitigate speculative
execution attacks.

* curve25519: modularize implementation
* curve25519: import 32-bit fiat-crypto implementation
* curve25519: import 64-bit hacl-star implementation
* curve25519: resolve symbol clash between fe types
* curve25519: wire up new impls and remove donna
* tools: import new curve25519 implementations
* contrib: keygen-html: update curve25519 implementation

Two of our Curve25519 implementations now use formally verified C. Read this
mailing list post for more information:
https://lists.zx2c4.com/pipermail/wireguard/2018-January/002304.html

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-01-19 11:53:18 +01:00
Rolf Neugebauer
130c6222bb kernel: Adjust kernel config with new options
- Enable RETPOLINE by default. Note, however, this will
  only be used if the compiler supports it.
- Enable sysfs interface for vulnerabilities

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-01-17 14:36:30 +00:00
Rolf Neugebauer
bfceb1dfbb kernel: Update to 4.14.14/4.9.77/4.4.112
The 4.4.14 has a number of important fixes/additions:
- New support for retpolines (enabled but requires newer gcc
  to take advantage of). This provides mitigation for Spectre
  style attacks.
- Various KPTI fixes including fixes for EFI booting
- More eBPF fixes around out-of-bounds and overflow of
  maps. These were used for variant 1 of CVE-2017-5753.
- Several KVM related to CVE-2017-5753, CVE-2017-5715,
  CVE-2017-17741.
- New sysfs interface listing vulnerabilities:
  /sys/devices/system/cpu/vulnerabilities

The 4.9.77 kernel also has seems to have most/all of the above
back-ported.

See https://lwn.net/SubscriberLink/744287/1fc3c18173f732e7/
for more details on the Spectre mitigation.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-01-17 14:31:54 +00:00
Rolf Neugebauer
2ed5334823 kernel: Fix up README.md
The content about debug was no longer valid.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-01-14 13:07:27 +00:00
Rolf Neugebauer
430bea64c3 kernel: Build the Intel ucode cpio archive and add to the kernel package
DOwnload and verify the Intel microcode package and convert it
to a cpio archive which can be prepended to the initrd.

It also adds the license file to the kernel package.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-01-14 13:07:27 +00:00
Rolf Neugebauer
9a101d1136 kernel: Update to 4.14.13/4.9.76/4.4.111
This looks like there are a couple of minor fixes to the
recent KPTI changes but nothing major...

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-01-10 11:12:27 +00:00
Rolf Neugebauer
682f6d8819 kernel: Enable KPTI on 4.9.x and 4.4.x kernels
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-01-06 11:24:43 +00:00
Rolf Neugebauer
d86d43fe40 kernel: Update to 4.14.12/4.9.75/4.4.110
4.9.75 and 4.4.10 now have KPTI backported as well

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-01-06 10:00:13 +00:00
Rolf Neugebauer
821cb0b829 kernel: Enable KPTI for 4.14 on x86_64
This is the new Lernel Page Table Isolation (KPTI,
formerly KAISER) introduced with 4.14.11 (and in
4.15.rcX).

KPTI runs the kernel and userspace off separate
pagetables (and uses PCID on more recent processors
to minimise the TLB flush penalty). It comes with
a performance hit but is enabled by default as a
workaround around some serious, not yet disclosed,
bug in Intel processors.

When enabled in the kernel config, KPTI will be
be dynamically enabled at boot time deping on the
CPU it is executing (currently all Intel x86 CPUs).

Depending on the environment, you may choose to
disable it using 'pti=off' on the kernel commandline.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-01-03 11:21:04 +00:00
Rolf Neugebauer
7abc1df0ad kernel: Update to 4.14.11/4.9.74/4.4.109
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-01-03 11:03:52 +00:00
Rolf Neugebauer
37291f5967 kernel: Update to 4.14.10/4.9.73
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-12-30 16:11:10 +00:00
Rolf Neugebauer
57c8383ce0 kernel: Update WireGuard to 0.0.20171221
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-12-30 16:08:43 +00:00
Rolf Neugebauer
8419b030c0 kernel: Adjust 4.14.x config for x86_64
The UNWINDER config options where renamed in:
8af220c9e240 ("x86/unwind: Rename unwinder config options to 'CONFIG_UNWINDER_*'")

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-12-28 17:57:43 +00:00
Rolf Neugebauer
dfb1982c65 kernel: Update to 4.14.9/4.9.72/4.4.108
This contains the fixes to the eBPF verifier which allowed
privilege escalation in 4.9 and 4.14 kernels.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-12-28 16:43:14 +00:00
Rolf Neugebauer
e140ab4acc kernel: Update to 4.14.8/4.9.71/4.4.107
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-12-28 14:48:20 +00:00
Rolf Neugebauer
467c1af0e2 kernel: Update to 4.14.7/4.9.70/4.4.106
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-12-18 16:59:21 +00:00
Rolf Neugebauer
36e46a55c8 kernel: Add forcepush/forcebuild targets for kernel and perf packages
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-12-18 16:59:21 +00:00
Rolf Neugebauer
1cf58d95b1 kernel: Update to 4.14.6/4.9.69
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-12-14 11:21:07 +00:00
Rolf Neugebauer
4df1c0ea56 kernel: Fix 4.14.x kernel config
Commit 340d45d70850 ("locking/refcounts, x86/asm: Enable
CONFIG_ARCH_HAS_REFCOUNT") re-enabled the ARCH_HAS_REFCOUNT
again as default. Pick it up in our kernel config.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-12-11 11:41:29 +00:00
Rolf Neugebauer
6a15459665 kernel: Update to 4.14.5/4.9.68/4.4.105
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-12-11 11:24:38 +00:00
Jason A. Donenfeld
584e3ac7b3 wireguard: update to 0.0.20171211
* curve25519: explictly depend on AS_AVX
* curve25519: modularize dispatch

It's now much cleaner to see which implementation we're calling, and it will
be simpler to add more implementations in the future.

* compat: support RAP in assembly

This should fix PaX/Grsecurity support.

* device: do not clear keys during sleep on Android

While we want to clear keys when going to sleep on ordinary Linux, this
doesn't make sense in the Android world, where phones often sleep but are
woken up every few milliseconds by the radios to process packets.

* compat: fix 3.10 backport

Important compat fixes for non-x86.

* device: clear last handshake timer on ifdown

When bringing up an interface, we don't want the rate limiting to handshakes
to apply.

* netlink: rename symbol to avoid clashes

Allows coexistance with horrible Android drivers.

* kernel-tree: jury rig is the more common spelling
* tools: no need to put this on the stack
* blake2s-x86_64: fix spacing

Small fixes.

* contrib: keygen-html for generating keys in the browser

This was covered here:
https://lists.zx2c4.com/pipermail/wireguard/2017-December/002127.html

* tools: remove undocumented unused syntax

Not only did nobody know about this or use it, but the implementation actually
exposed compiler bugs in Qualcomm's "Snapdragon Clang".

* poly1305: update x86-64 kernel to AVX512F only

From Samuel Neves, this pulls in Andy Polyakov's changes to only require F and
not VL for the Poly implementation.

* chacha20-arm: fix with clang -fno-integrated-as.

This pulls in David Benjamin's clang fix.

* global: add SPDX tags to all files

From Greg KH, we now have SPDX annotations on all files, matching upstream
kernel's new approach to file licenses.

* chacha20poly1305: cleaner generic code

This entirely removes the last remains of Martin Willi's ChaCha
implementation, and now the generic C implementation is extremely small and
clearly written, while delivering a small performance boost too.

* poly1305: fix avx512f alignment bug

Unlucky people may have had their linkers misalign a constant. This fixes that
potential.

* chacha20: avx512vl implementation

From Samuel Neves, this imports Andy Polyakov's AVX512VL implementation of
ChaCha which should have a ~50% performance improvement over AVX2, though it
is still much slower than our AVX512F implementation.

* chacha20poly1305: wire up avx512vl for skylake-x

Some Skylake machines do not have two FMA units (though others do), so we
prefer the AVX512VL implementation over the should-be-faster AVX512F
implementation on those machines. What's needed now is to read the PIROM in
order to determine at runtime whether the particular Skylake-X machine
actually has the second FMA unit or not, but until that happens, we just fall
back to the VL implementation for all Skylake-X.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-12-11 05:11:56 +01:00
Rolf Neugebauer
4254c91c9f kernel: Update build to use the alpine:3.7 base image
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-12-08 16:25:13 +00:00
Rolf Neugebauer
53127d7209 kernel: Update to 4.14.4/4.9.67/4.4.104
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-12-06 10:11:50 +00:00
Rolf Neugebauer
5eee692887 kernel: Add NVDIMM size patch to 4.14.x
This change hasn't made it upstream but seems to be required
for LCOW to work.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-12-05 10:32:33 +00:00
Rolf Neugebauer
3ed38c59f4 kernel: Update to 4.14.3/4.9.66/4.4.103
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-12-01 15:28:09 +00:00
Rolf Neugebauer
e7960ee0df kernel: Remove the 4.13.x kernel
4.13 has been EOLed with 4.13.16 being the last one.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-12-01 15:28:09 +00:00
Jason A. Donenfeld
62b5917526 wireguard: update to 0.0.20171122 to 0.0.20171127
This is a double bump.

Changes 0.0.20171122:

  * chacha20poly1305: fast primitives from Andy Polyakov

  Samuel Neves and I have spent considerable time and headaches porting,
  reworking, and partially rewriting Andy's optimized implementations of
  ChaCha20 and Poly1305. We now support the following:

  On x86_64:
    - Poly1305: integer unit
    - ChaCha20: SSSE3
    - HChaCha20: SSSE3
    - Poly1305: AVX
    - ChaCha20: AVX2
    - Poly1305: AVX2
    - ChaCha20: AVX512
    - Poly1305: AVX512

  On ARM:
    - Poly1305: integer unit
    - ChaCha20: NEON
    - Poly1305: NEON

  On ARM64:
    - Poly1305: integer unit
    - ChaCha20: NEON
    - Poly1305: NEON

  On MIPS64:
    - Poly1305: integer unit

  All others:
    - ChaCha20: generic C
    - Poly1305: generic C

  This is a pretty substantial amount of new handrolled assembly. It will
  perhaps MURDER KITTENS, so please tread lightly with this snapshot and adjust
  expectations accordingly. I'm looking forward to quickly fixing any issues
  folks find while testing.

  Performance-wise, this should see increases all around. The biggest speedups
  will be on ARM and ARM64, but x86_64 and MIPS64 should also see modest speed
  improvements too, especially on Skylake systems supporting AVX512.

  * chacha20poly1305: add more test vectors, some of which are weird

  Test vectors are pretty important, so we added more to catch odd edge cases
  using the following butcher's code:

    from cryptography.hazmat.primitives.ciphers.aead import ChaCha20Poly1305
    import os

    def encode_blob(blob):
        a = ""
        for i in blob:
            a += "\\x" + hex(i)[2:]
        return a

    enc = [ ]
    dec = [ ]

    def make_vector(plen, adlen):
        key = os.urandom(32)
        nonce = os.urandom(8)
        p = os.urandom(plen)
        ad = os.urandom(adlen)
        c = ChaCha20Poly1305(key).encrypt(nonce=bytes(4) + nonce, data=p, associated_data=ad)

        out = "{\n"
        out += "\t.key\t= \"" + encode_blob(key) + "\",\n"
        out += "\t.nonce\t= \"" + encode_blob(nonce) + "\",\n"
        out += "\t.assoc\t= \"" + encode_blob(ad) + "\",\n"
        out += "\t.alen\t= " + str(len(ad)) + ",\n"
        out += "\t.input\t= \"" + encode_blob(p) + "\",\n"
        out += "\t.ilen\t= " + str(len(p)) + ",\n"
        out += "\t.result\t= \"" + encode_blob(c) + "\"\n"
        out += "}"
        enc.append(out)

        out = "{\n"
        out += "\t.key\t= \"" + encode_blob(key) + "\",\n"
        out += "\t.nonce\t= \"" + encode_blob(nonce) + "\",\n"
        out += "\t.assoc\t= \"" + encode_blob(ad) + "\",\n"
        out += "\t.alen\t= " + str(len(ad)) + ",\n"
        out += "\t.input\t= \"" + encode_blob(c) + "\",\n"
        out += "\t.ilen\t= " + str(len(c)) + ",\n"
        out += "\t.result\t= \"" + encode_blob(p) + "\"\n"
        out += "}"
        dec.append(out)

    make_vector(0, 0)
    make_vector(0, 8)
    make_vector(1, 8)
    make_vector(1, 0)
    make_vector(129, 7)
    make_vector(256, 0)
    make_vector(512, 0)
    make_vector(513, 9)
    make_vector(1024, 16)
    make_vector(1933, 7)
    make_vector(2011, 63)

    print("======== encryption vectors ========")
    print(", ".join(enc))

    print("\n\n\n======== decryption vectors ========")
    print(", ".join(dec))

  * wg-quick: document localhost exception and v6 rule

  Probably a "kill switch" wants this too:
     -m addrtype ! --dst-type LOCAL
  so that basic local services can continue to work.

  * selftest: allowedips: randomized test mutex update
  * allowedips: do not write out of bounds
  * device: uninitialize socket first in destruction
  * tools: tighten up strtoul parsing

  Small fixups.

  * qemu: update kernel
  * qemu: use unprefixed strip when not cross-compiling

  Fedora/Redhat doesn't ship with a prefixed strip, and we don't need
  to use it anyway when we're not cross compiling, so don't.

  * compat: 3.16.50 got proper rt6_get_cookie
  * compat: stable finally backported fix
  * compat: new kernels have netlink fixes
  * compat: fix compilation with PaX

  Usual set of compatibility updates.

  * curve25519-neon: compile in thumb mode

  In thumb mode, it's not possible to use sp as an operand of and, so
  we have to muck around with r3 as a scratch register.

  * socket: only free socket after successful creation of new

  When an interface is down, the socket port can change freely. A socket
  will be allocated when the interface comes up, and if a socket can't be
  allocated, the interface doesn't come up.

  However, a socket port can change while the interface is up. In this
  case, if a new socket with a new port cannot be allocated, it's
  important to keep the interface in a consistent state. The choices are
  either to bring down the interface or to preserve the old socket. This
  patch implements the latter.

  * global: switch from timeval to timespec

  This gets us nanoseconds instead of microseconds, which is better, and
  we can do this pretty much without freaking out existing userspace,
  which doesn't actually make use of the nano/microseconds field. The below
  test program shows that this won't break existing sizes:

    zx2c4@thinkpad ~ $ cat a.c
    void main()
    {
        puts(sizeof(struct timeval) == sizeof(struct timespec) ?
          "success" : "failure");
    }
    zx2c4@thinkpad ~ $ gcc a.c -m64 && ./a.out
    success
    zx2c4@thinkpad ~ $ gcc a.c -m32 && ./a.out
    success

Changes 0.0.20171127:

  * compat: support timespec64 on old kernels
  * compat: support AVX512BW+VL by lying
  * compat: fix typo and ranges
  * compat: support 4.15's netlink and barrier changes
  * poly1305-avx512: requires AVX512F+VL+BW

  Numerous compat fixes which should keep us supporting 3.10-4.15-rc1.

  * blake2s: AVX512F+VL implementation
  * blake2s: tweak avx512 code
  * blake2s: hmac space optimization

  Another terrific submission from Samuel Neves: we now have an implementation
  of Blake2s using AVX512, which is extremely fast.

  * allowedips: optimize
  * allowedips: simplify
  * chacha20: directly assign constant and initial state

  Small performance tweaks.

  * tools: fix removing preshared keys
  * qemu: use netfilter.org https site
  * qemu: take shared lock for untarring

  Small bug fixes.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-11-27 20:55:31 +01:00
Rolf Neugebauer
43b2caf69e kernel: Update to 4.4.102/4.9.65/4.13.16/4.14.2
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-11-24 13:55:21 +00:00
Rolf Neugebauer
c6721e5343 kernel: Update to 4.4.101
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-11-24 13:55:21 +00:00
Rolf Neugebauer
4aa1845b96 kernel: Fix 4.14.x/4.13.x config for aarch64
The update in 6ede240737 ("kernel: Update to
4.14.1/4.13.15/4.9.64/4.4.100") failed to build on aarch64.
This fixes it.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-11-24 13:55:21 +00:00
Dennis Chen
b0cbfe1988 kernel: Fixing kernel_perf and kernel_zfs build issue
For 'build_perf_' and 'build_zfs_' targets in the Makefile,
since both of them are dependends on the build_$(2)$(3) target,
So, we pull the image with DCT as part of the dependency on build_$(2)$(3)
and then build with DOCKER_CONTENT_TRUST explicitly set to 0.

Signed-off-by: Dennis Chen <dennis.chen@arm.com>
2017-11-23 10:34:54 +00:00
Rolf Neugebauer
6ede240737 kernel: Update to 4.14.1/4.13.15/4.9.64/4.4.100
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-11-21 17:05:35 +00:00
Rolf Neugebauer
57226034e6 kernel: Move KEYS_COMPAT
Commit 31c8c4942820 ("security/keys: add CONFIG_KEYS_COMPAT
to Kconfig") moved the KEYS_COMPAT config option to a different
section. Adjust config file.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-11-21 15:55:47 +00:00
Rolf Neugebauer
f5e970b7fb kernel: Update to 4.13.14/4.9.63/4.4.99
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-11-21 15:54:15 +00:00
Rolf Neugebauer
717829ea89 kernel: Don't build a debug kernel for 4.13
We already have too many kernels to build and 4.13 will be EOLed soon

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-11-21 15:53:34 +00:00
Rolf Neugebauer
f79c392ce3 kernel: Enable REFCOUNT_FULL on kernels supporting it
REFCOUNT_FULL enables full reference count validation. There is a
potential slow down but ti protects against certain use-after-free
attacks.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-11-21 14:02:33 +00:00
Rolf Neugebauer
66342d0646 kernel: Enable GCC_PLUGIN_RANDSTRUCT on kernels supporting it
On 4.13 and 4.14 kernels GCC_PLUGIN_RANDSTRUCT can be use to randomise
some kernel data structures such as structs with function pointers.

We also select GCC_PLUGIN_RANDSTRUCT_PERFORMANCE which
tries harder to restrict randomisation to cache-lines in order to reduce
performance impact.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-11-21 14:02:33 +00:00
Rolf Neugebauer
8d16426644 kernel: Enable GCC_PLUGIN_STRUCTLEAK on kernels supporting it
The 4.13 and 4.14 kernels support GCC_PLUGIN_STRUCTLEAK, a GCC plugin
to zero initialise any structures with the __user attribute to prevent
information exposure.

On 4.14 kernels also enable GCC_PLUGIN_STRUCTLEAK_BYREF_ALL which is
an extension of the above

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-11-21 14:02:33 +00:00
Rolf Neugebauer
b0db43567e kernel: Enable GCC_PLUGIN on kernels supporting it
Subsequent commits will enable selected sub options.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-11-21 14:02:33 +00:00
Rolf Neugebauer
2c1fdc7b47 kernel: Use latest linuxkit/alpine and install mpc1-dev/mpfr-dev
The GCC_PLUGINS config options enabled in the next commits
require mpc1-dev/mpfr-dev

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-11-21 14:02:33 +00:00
Rolf Neugebauer
5995d9a10d kernel: Fix Dockerfile.kbuild
Patches were not applied and this fixes it as well as tidying
up the error handling.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-11-21 14:02:33 +00:00
zlim
8e5006f8f9
kernel: update README.md
Update description to reflect link to ../doc/kernels.md.

Signed-off-by: Zi Shen Lim <zlim.lnx@gmail.com>
2017-11-19 22:19:49 -08:00
Rolf Neugebauer
98025f4649 kernel: Update to 4.13.13/4.9.62/4.4.98
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-11-16 17:35:43 +00:00
Jason A. Donenfeld
5c6d73d7f1 wireguard: update to 0.0.20171111
Routine version bump that also removes the necessity of carrying that
extra patch. Changes:

  * Kconfig: remove trailing whitespace
  * allowedips: rename from routingtable
  * tools: remove ioctl cruft
  * global: revert checkpatch.pl changes

  Cleanliness.

  * device: please lockdep
  * device: wait for all peers to be freed before destroying

  These make the various checkers happy.

  * netlink: plug memory leak
  * qemu: check for memory leaks

  There was a small memory leak on the netlink configuration layer that's now
  been fixed.

  * receive: hoist fpu outside of receive loop

  Should be a small speedup on x86_64.

  * qemu: more debugging
  * qemu: bump kernel version

  Significantly more debugging checkers have been turned on.

  * wg-quick: stat the correct enclosing folder of config file
  * wg-quick: allow for tabs in keys

  Minor fixups for wg-quick(8).

  * compat: 4.4.0 has strange ECN function

  Nobody actually runs base 4.4.0, but this is more correct anyway.

  * netlink: make sure we reserve space for NLMSG_DONE

  A rather important change - due to an upstream kernel bug, that's existed
  since the advent of netlink itself, sometimes wg(8) failed to receive valid
  data back from kernelspace, resulting in "ENOBUFS" when trying to dump all
  peers. This patch works around it while we wait for upstream to commit the
  fix.

  * curve25519: reject deriving from NULL private keys
  * tools: allow for NULL keys everywhere

  A null 25519 private point isn't a valid point (prior to normalization), which
  is why we use it as the "unsetting" value. Conversely, however, except for
  psk, we should be using the existence of it in the netlink message being an
  indication of whether or not it's set, for the tools.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-11-15 17:48:24 +01:00
Rolf Neugebauer
eb4bb1fa39 kernel: Tweak the 4.14.x kernel config
- aarch64/x86_64: Disable RC_CORE: Don't need support for remote controls
- aarch64/x86_64: Enable RESET_ATTACK_MITIGATION (clear contents of RAM
  after reboot)
- x86_64: Disable NET_VENDOR_HUAWEI
- x86_64: Use ORC_UNWINDER for stack traces
- aarch64: Enable GPIO_THUNDERX
- aarch64: Enable BUG_ON_DATA_CORRUPTION

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-11-14 14:09:04 +00:00
Rolf Neugebauer
a6a46c8fcf kernel: 4.14.x config after oldconfig
The previous commit used the 4.13.x config files as the
4.14.x config files. This commit stashes the result of
running the 4.14.x oldconfig over them.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-11-14 14:09:03 +00:00
Rolf Neugebauer
c486675df0 kernel: Add initial support for 4.14 kernels
The kernel config files are a copy of the 4.13 kernel configs,
which will be refined in subsequent commits.

This does not yet include any patches which may
be required for LCOW.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-11-14 14:09:03 +00:00
Rolf Neugebauer
ca3e9edb00 kernel: Don't include firmware from linux source tree
4.14.x has dropped 'make firmware_install' and according to [1]
the in-tree firmware has not been updated since 2013, so drop it
for all kernels.

We will need to find another way to add firmware blobs to a
LinuxKit image (see [2])

[1] https://lkml.org/lkml/2017/9/15/343
[2] https://github.com/linuxkit/linuxkit/issues/2714

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-11-14 14:09:03 +00:00