Commit Graph

576 Commits

Author SHA1 Message Date
Rolf Neugebauer
9502197456 kernel: Add support for building v5.x kernels
Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
2019-03-10 23:28:37 +00:00
Rolf Neugebauer
00b0abcf59 kernel: Update to 4.20.14/4.19.37/4.14.105/4.9.162
Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
2019-03-08 00:52:36 +00:00
Rolf Neugebauer
7d31ea1135 kernel: Reorder build targets to be in numerical order
Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
2019-03-08 00:52:36 +00:00
Rolf Neugebauer
05c8849a97 kernel: Build a 4.19 debug kernel on x86 (instead of 4.14)
We switched to 4.19.x as the default kernel and debug
kernel build was not updated. Fix it.

Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
2019-03-08 00:52:36 +00:00
Rolf Neugebauer
043faae78e Merge pull request #3298 from TiejunChina/master-dev
Enable Preempt-RT Linux 4.19.x into Linuxkit
2019-03-07 20:16:17 +00:00
Rolf Neugebauer
3228d21abf kernel: Update gcc version in 4.19.x and 4.20 kernel config
Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
2019-03-06 20:12:00 +00:00
Rolf Neugebauer
94cdfb55b6 kernel: Skip perf build for now
See https://github.com/linuxkit/linuxkit/issues/3299

Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
2019-03-06 01:04:54 +00:00
Rolf Neugebauer
d041e7d2bf kernel: Factor our perf build from main kernel build
The build of the perf utility has been quite bothersome,
with different arches and kernel versions failing.

Since we now have the ful kernel source in the package,
factor out the actual build into Dockerfile.perf

Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
2019-03-06 00:37:31 +00:00
Rolf Neugebauer
94516fe2a8 kernel: Remove libressl from kernel build Dockerfile
Alpine 3.9 no longer uses libressl

Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
2019-03-05 23:18:58 +00:00
Tiejun Chen
92ebe10a62 enable 4.19.x-rt with preempt-rt Linux 4.19.15
Signed-off-by: Tiejun Chen <tiejun.china@gmail.com>
2019-03-04 13:43:55 -08:00
Tiejun Chen
daab1a1ecc remove 4.14.x-rt stuff
Signed-off-by: Tiejun Chen <tiejun.china@gmail.com>
2019-03-04 13:43:48 -08:00
Rolf Neugebauer
9a9d9670e8 kernel: Update build to use the latest linuxkit/alpine
Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
2019-03-03 11:18:21 +00:00
Rolf Neugebauer
1e916001f0 kernel: Adjust kernel config
Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
2019-03-01 08:33:49 +00:00
Rolf Neugebauer
5a1e83e639 kernel: Update to 4.20.13/4.19.26/4.14.104/4.9.161
Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
2019-03-01 08:06:52 +00:00
Jason A. Donenfeld
572c7c221a wireguard: upgrade to 0.0.20190227
* wg-quick: freebsd: allow loopback to work

FreeBSD adds a route for point-to-point destination addresses. We don't
really want to specify any destination address, but unfortunately we
have to. Before we tried to cheat by giving our own address as the
destination, but this had the unfortunate effect of preventing
loopback from working on our local ip address. We work around this with
yet another kludge: we set the destination address to 127.0.0.1. Since
127.0.0.1 is already assigned to an interface, this has the same effect
of not specifying a destination address, and therefore we accomplish the
intended behavior. Note that the bad behavior is still present in Darwin,
where such workaround does not exist.

* tools: remove unused check phony declaration
* highlighter: when subtracting char, cast to unsigned
* chacha20: name enums
* tools: fight compiler slightly harder
* tools: c_acc doesn't need to be initialized
* queueing: more reasonable allocator function convention

Usual nits.

* systemd: wg-quick should depend on nss-lookup.target

Since wg-quick(8) calls wg(8) which does hostname lookups, we should
probably only run this after we're allowed to look up hostnames.

* compat: backport ALIGN_DOWN
* noise: whiten the nanoseconds portion of the timestamp

This mitigates unrelated sidechannel attacks that think they can turn
WireGuard into a useful time oracle.

* hashtables: decouple hashtable allocations from the main device allocation

The hashtable allocations are quite large, and cause the device allocation in
the net framework to stall sometimes while it tries to find a contiguous
region that can fit the device struct. To fix the allocation stalls, decouple
the hashtable allocations from the device allocation and allocate the
hashtables with kvmalloc's implicit __GFP_NORETRY so that the allocations fall
back to vmalloc with little resistance.

* chacha20poly1305: permit unaligned strides on certain platforms

The map allocations required to fix this are mostly slower than unaligned
paths.

* noise: store clamped key instead of raw key

This causes `wg show` to now show the right thing. Useful for doing
comparisons.

* compat: ipv6_stub is sometimes null

On ancient kernels, ipv6_stub is sometimes null in cases where IPv6 has
been disabled with a command line flag or other failures.

* Makefile: don't duplicate code in install and modules-install
* Makefile: make the depmod path configurable

* queueing: net-next has changed signature of skb_probe_transport_header

A 5.1 change. This could change again, but for now it allows us to keep this
snapshot aligned with our upstream submissions.

* netlink: don't remove allowed ips for new peers
* peer: only synchronize_rcu_bh and traverse trie once when removing all peers
* allowedips: maintain per-peer list of allowedips

This is a rather big and important change that makes it much much faster to do
operations involving thousands of peers. Batch peer/allowedip addition and
clearing is several orders of magnitude faster now.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-02-28 00:35:24 +01:00
Rolf Neugebauer
9440e48f4f kernels: Update to 4.20.12/4.19.25/4.14.103/4.9.160
Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
2019-02-24 19:48:17 +00:00
Rolf Neugebauer
882ee6afb5 kernels: Update to 4.20.11/4.19.24/4.14.102/4.9.159
Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
2019-02-24 13:12:28 +00:00
Rolf Neugebauer
402d712ed6 kernel: Adjust 4.9.x kernel config
Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
2019-02-24 10:20:43 +00:00
Rolf Neugebauer
0ebc73d57f kernels: Update to 4.20.10/4.19.23/4.14.101/4.9.158
This skiks 4.20.9/4.19.22/4.14.100/4.9.157 because they
contained a bug. See:
https://lwn.net/Articles/779934/

Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
2019-02-23 13:26:12 +00:00
Rolf Neugebauer
fee4e492fd kernels: Update to 4.20.8/4.19.21/4.14.99/4.19.156
Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
2019-02-23 09:47:19 +00:00
Rolf Neugebauer
5ffa60f639 kernel: Update to 4.20.7/4.19.20/4.14.98/4.9.155
Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
2019-02-08 23:25:28 +00:00
Rolf Neugebauer
1c49fa2c8f kernels: Update to 4.20.6/4.19.19/4.14.97/4.9.154
Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
2019-02-01 19:34:57 +00:00
Rolf Neugebauer
405500aac0 kernels: Adjust 4.14.x config
Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
2019-01-28 19:34:27 +00:00
Rolf Neugebauer
ab527e7afb kernels: Update to 4.2.5/4.19.18/4.14.96/4.9.153
Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
2019-01-28 18:20:01 +00:00
Rolf Neugebauer
f85b16e0bd kernel: Update to 4.20.4/4.19.17/4.14.95/4.9.152
Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
2019-01-25 20:16:00 +00:00
Jason A. Donenfeld
a94099639e wireguard: upgrade to 0.0.20190123
* tools: curve25519: handle unaligned loads/stores safely

This should fix sporadic crashes with `wg pubkey` on certain architectures.

* netlink: auth socket changes against namespace of socket

In WireGuard, the underlying UDP socket lives in the namespace where the
interface was created and doesn't move if the interface is moved. This
allows one to create the interface in some privileged place that has
Internet access, and then move it into a container namespace that only
has the WireGuard interface for egress. Consider the following
situation:

1. Interface created in namespace A. Socket therefore lives in namespace A.
2. Interface moved to namespace B. Socket remains in namespace A.
3. Namespace B now has access to the interface and changes the listen
port and/or fwmark of socket. Change is reflected in namespace A.

This behavior is arguably _fine_ and perhaps even expected or
acceptable. But there's also an argument to be made that B should have
A's cred to do so. So, this patch adds a simple ns_capable check.

* ratelimiter: build tests with !IPV6

Should reenable building in debug mode for systems without IPv6.

* noise: replace getnstimeofday64 with ktime_get_real_ts64
* ratelimiter: totalram_pages is now a function
* qemu: enable FP on MIPS

Linux 5.0 support.

* keygen-html: bring back pure javascript implementation

Benoît Viguier has proofs that values will stay well within 2^53. We
also have an improved carry function that's much simpler. Probably more
constant time than emscripten's 64-bit integers.

* contrib: introduce simple highlighter library

This is the highlighter library being used in:
- https://twitter.com/EdgeSecurity/status/1085294681003454465
- https://twitter.com/EdgeSecurity/status/1081953278248796165

It's included here as a contrib example, so that others can paste it into
their own GUI clients for having the same strictly validating highlighting.

* netlink: use __kernel_timespec for handshake time

This readies us for Y2038. See https://lwn.net/Articles/776435/ for more info.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2019-01-23 14:50:55 +01:00
Ilya Dmitrichenko
872a92849b Use latest stable release of ZFS
Signed-off-by: Ilya Dmitrichenko <errordeveloper@gmail.com>
2019-01-19 10:04:34 +00:00
Rolf Neugebauer
ffd8d19cfd kernel: Update to 4.20.3/4.19.16/4.14.94/4.9.151
Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
2019-01-17 19:51:32 +00:00
Rolf Neugebauer
3b4f70dd76 kernel: Update to 4.20.2/4.19.15/4.14.93/4.9.150
Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
2019-01-16 22:28:57 +00:00
Tiejun Chen
ef9302bc01 update -rt to 4.14.87-rt50
Signed-off-by: Tiejun Chen <tiejunc@vmware.com>
2019-01-14 20:49:28 -08:00
Rolf Neugebauer
be99dbcda2 kernel: Adjust the 4.20/4.19 configs for x86 and arm64
Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
2019-01-12 13:28:22 +00:00
Rolf Neugebauer
d9504a7904 kernel: Update to 4.20.1/4.19.14/4.14.92/4.9.149
Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
2019-01-12 11:55:36 +00:00
Tiejun Chen
e7481213e4 update -rt to 4.14.87-rt49
Signed-off-by: Tiejun Chen <tiejunc@vmware.com>
2019-01-06 13:29:54 -08:00
Rolf Neugebauer
77422d26c0 kernel/arm64: Enable ENA driver
The new AWS A1 instances use the ENA network driver.
Enable it.

Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
2019-01-02 22:17:36 +00:00
Rolf Neugebauer
ae1f2dd6af kernel/x86_64,arm64: Enable STACKLEAK GCC plugin
Enable the STACKLEAK GCC plugin which erases the
kernel stack before returning from system calls.
This security options has a reported performance
hit of around 1% which seem like a reasonable amount.

For more details see: https://outflux.net/blog/archives/2018/12/24/security-things-in-linux-v4-20/

Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
2019-01-02 22:17:36 +00:00
Rolf Neugebauer
ce3dc79509 kernel: Add support for 4.20.x kernels
The kernel config was derived from the 4.19.13 kernel config
run through the 'make oldconfig' with all defaults accepted,
except for:
- NET_VENDOR_MICROCHIP (defauly 'y', set to 'n')

Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
2019-01-02 22:17:36 +00:00
Rolf Neugebauer
6c59e083f4 kernel: Simplify perf and bcc build logic
Since we removed the 4.4.x kernel, simply don't build
perf and bcc for 4.9.x kernels.

Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
2019-01-02 22:17:36 +00:00
Rolf Neugebauer
2ab3b0a24e Remove 4.4 kernel
We already have 4.9.x, 4.14.x, and 4,19.x as LTS releases.
4.9.x has a longer lifetime as 4.4.x as well and fewer security
fixes can be backported to 4.4.x. Remove it.

Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
2019-01-01 17:06:06 +00:00
Rolf Neugebauer
8ba5e2416d kernel: Update to 4.19.13/4.14.92/4.9.148
Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
2018-12-30 21:06:50 +00:00
Rolf Neugebauer
4863059b7e kernels: Enable Netronome drivers for x86/arm64
packet.net will soon have x86 and arm64 machines with NFPs.
Enable the driver for it.

The 4.9 kernel only has support for the NFP VF driver,
so don't enable it there.

Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
2018-12-22 11:11:27 +00:00
Rolf Neugebauer
6bda9db3fc kernel: Adjust kernel config
Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
2018-12-22 11:04:51 +00:00
Rolf Neugebauer
cdcfcb7347 kernel: Update to 4.19.12/4.14.90/4.9.147/4.4.169
Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
2018-12-22 10:19:45 +00:00
Rolf Neugebauer
4ae342c097 kernel: Update to 4.19.11/4.14.89/4.9.146/4.4.168
Note this skips 4.19.10. The diff is pretty small.

Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
2018-12-19 22:28:00 +00:00
Jason A. Donenfeld
4621b91939 wireguard: upgrade to 0.0.20181218
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-12-18 18:06:35 +01:00
Rolf Neugebauer
65e2c50b88 kernel: Update to 4.19.9/4.14.88/4.9.145/4.4.167
Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
2018-12-13 23:24:01 +00:00
Rolf Neugebauer
a26ff89ce8 kernel: Update to 4.19.8/4.14.87/4.9.144
Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
2018-12-09 13:46:31 +00:00
Rolf Neugebauer
055c0f8403 kernel: Tweak the x86 kernel config
Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
2018-12-06 21:55:49 +00:00
Rolf Neugebauer
765cf6c917 kernel: Update to 4.19.7/4.14.86/4.9.143
Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
2018-12-06 20:38:45 +00:00
Rolf Neugebauer
2b6a0e15bb kernel: Update to 4.19.6/4.14.85/4.9.142/4.4.166
Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
2018-12-03 23:51:48 +00:00
Rolf Neugebauer
1d405ae5cf kernel: Update to 4.19.5/4.14.84/4.9.141/4.4.165
Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
2018-12-03 22:03:55 +00:00