Commit Graph

752 Commits

Author SHA1 Message Date
Sukchan Lee
aa7d5fc942 kernel: SCTP support
Enable SCTP protocol as a kernel module

Signed-off-by: Sukchan Lee <acetcom@gmail.com>
2018-05-01 23:04:29 +09:00
Rolf Neugebauer
b22d4000a3 kernel: Adjust s390x kernel config
the 4.14.38 kernel backported the Spectre mitigation requiring
a change of the kernel config.

Might as well enabled the mitigations by default.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-04-30 13:34:11 +01:00
Rolf Neugebauer
7a4233dec5 kernel: Add USB storage support for x86_64 and arm64
This is useful for some baremetal configs, such as using
USB sticks on a RPi3. I enabled it for x86_64 as well
to keep the differences smaller.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@gmail.com>
2018-04-30 10:35:33 +01:00
Rolf Neugebauer
551e00630c kernel: Enable SERIAL_DEV_BUS on arm64
Note, the depeding SERIAL_DEV_CTRL_TTYPORT defaults to
'N' with the 4.14.x kernel and 'Y' for the 4.16.x kernel.
I chose to stick with the defaults.

This may fix the serial console issue, I've seen on the RPi3
with 4.14.x kernels.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@gmail.com>
2018-04-30 10:35:33 +01:00
Rolf Neugebauer
262b25f874 kernel: Update to 4.16.6/4.14.38/4.9.97/4.4.130
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-04-30 10:35:33 +01:00
Rolf Neugebauer
f1046b9a29 kernel: Adjust 4.4.x kernel config
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@gmail.com>
2018-04-27 18:52:12 +01:00
Rolf Neugebauer
54ed15ccce kernel: Update to 4.16.5/4.14.37/4.9.96/4.4.129
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-04-27 16:45:36 +01:00
Rolf Neugebauer
865c6691b1 kernel: Update to 4.16.4/4.14.36
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-04-27 15:01:42 +01:00
Rolf Neugebauer
c255821674 kernel: EOL 4.15.x
See http://lkml.iu.edu/hypermail/linux/kernel/1804.2/03399.html

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-04-27 14:58:23 +01:00
Rolf Neugebauer
d56d66a7aa kernel: Update to 4.9.95
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-04-23 11:52:12 +01:00
Rolf Neugebauer
c08fe57306
Merge pull request #3010 from TiejunChina/master-dev
update -rt to 4.14.34-rt27
2018-04-22 21:38:13 +01:00
Jason A. Donenfeld
bfad9ad0e9 wireguard: upgrade to 0.0.20180420
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-04-20 20:39:14 +02:00
Tiejun Chen
ff23b35c5f update -rt to 4.14.34-rt27
Signed-off-by: Tiejun Chen <tiejun.china@gmail.com>
2018-04-20 22:30:03 +08:00
Rolf Neugebauer
deaa4b855c kernel: Fix perf compile
This was broken with commit ae6a739ac0 ("kernel: Skip
compiling perf for 4.9.x") [by me]

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-04-19 15:41:43 +01:00
Rolf Neugebauer
e09023d723 kernel: Update build to latest linuxkit/alpine
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-04-19 13:52:26 +01:00
Rolf Neugebauer
24050c5817 kernel: Drop 4.15.x for s390x
The s390x build VM we have access to is quite slow. Dropping
the 4.15.x kernel, which soon will be EOLed anyway, to
save some time.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-04-19 13:48:30 +01:00
Rolf Neugebauer
2a9d21bee7 kernel: Update to 4.16.3/4.15.18/4.14.35
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-04-19 13:46:35 +01:00
Justin Cormack
ccd9d711c0
Some kernel builds need openssl binary for key generation
For example kernel module signatures if you do not provide a key. So add
to the dependencies for kernel builds.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2018-04-17 14:16:13 +01:00
Jason A. Donenfeld
60fd3c062e wireguard: upgrade to 0.0.20180413
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-04-17 00:18:42 +02:00
Rolf Neugebauer
ae6a739ac0 kernel: Skip compiling perf for 4.9.x
4.9.93 broke the compile:

  tests/code-reading.c: In function 'read_object_code':
  tests/code-reading.c:228:19: error: 'KMOD_DECOMP_LEN' undeclared (first use in this function)
    char decomp_name[KMOD_DECOMP_LEN];
                     ^~~~~~~~~~~~~~~
  tests/code-reading.c:228:19: note: each undeclared identifier is reported only once for each function it appears in
  tests/code-reading.c:291:7: error: implicit declaration of function 'dso__decompress_kmodule_path' [-Werror=implicit-function-declaration]
    if (dso__decompress_kmodule_path(al.map->dso, objdump_name,
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
  tests/code-reading.c:291:3: error: nested extern declaration of 'dso__decompress_kmodule_path' [-Werror=nested-externs]
    if (dso__decompress_kmodule_path(al.map->dso, objdump_name,
    ^~
  tests/code-reading.c:228:7: error: unused variable 'decomp_name' [-Werror=unused-variable]
    char decomp_name[KMOD_DECOMP_LEN];
         ^~~~~~~~~~~
  cc1: all warnings being treated as errors
  mv: can't rename '/build/perf/tests/.code-reading.o.tmp': No such file or directory
  make[3]: *** [/linux/tools/build/Makefile.build:101: /build/perf/tests/code-reading.o] Error 1
  make[3]: *** Waiting for unfinished jobs....
  make[2]: *** [/linux/tools/build/Makefile.build:144: tests] Error 2
  make[2]: *** Waiting for unfinished jobs....
  make[2]: *** [/linux/tools/build/Makefile.build:144: util] Error 2
  make[1]: *** [Makefile.perf:559: /build/perf/libperf-in.o] Error 2
  make[1]: *** Waiting for unfinished jobs....
  make[1]: *** [Makefile.perf:396: /build/perf/perf-in.o] Error 2
  make: *** [Makefile:69: all] Error 2
  make: Leaving directory '/linux/tools/perf'

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@gmail.com>
2018-04-14 12:21:53 +01:00
Rolf Neugebauer
054b9bb924 kernel: Update to 4.9.94/4.4.128
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@gmail.com>
2018-04-14 11:18:33 +01:00
Rolf Neugebauer
4454c7b854 kernel: Enable MPLS_ROUTING and MPLS_IPTUNNEL as modules
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-04-13 15:21:57 +01:00
Rolf Neugebauer
d1b73f7cf3 kernel: Update to 4.16.2/4.15.17/4.14.34
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-04-13 14:53:19 +01:00
Rolf Neugebauer
a5c039f7ad kernel: Add bison/flex to kconfig Dockerfile
These are required for the 4.16.x kernel configuration.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-04-09 11:21:13 +01:00
Rolf Neugebauer
b69fc45955 kernel: Add the 4.16.1 kernel
The kernel config is based on the 4.15.x kernel config
run through 'make defconfig && make oldconfig' and then
tweaked a little by hand.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-04-09 11:20:19 +01:00
Rolf Neugebauer
fa9452af09 kernel: Update to 4.15.16/4.14.33/4.9.93/4.4.127
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-04-09 10:35:34 +01:00
Rolf Neugebauer
a8cc4f4f42 kernel: Don't compile -rt kernels on s390x
Looks like commit 9a88a5e986 ("Upgrade -rt patches to
v4.14.29-rt25") accidentally added compiling -rt kernels
for s390x. Remove it.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@gmail.com>
2018-04-04 22:51:07 +01:00
Rolf Neugebauer
a5a685750d kernel: Update to 4.15.15/4.14.32/4.9.92/4.4.126
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@gmail.com>
2018-04-01 17:52:14 +01:00
Tiejun Chen
9a88a5e986 Upgrade -rt patches to v4.14.29-rt25
Signed-off-by: Tiejun Chen <tiejun.china@gmail.com>
2018-03-30 21:10:01 -07:00
Rolf Neugebauer
462961d5c9 kernel: Update to 4.15.14/4.14.31/4.9.91/4.4.125
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@gmail.com>
2018-03-30 13:29:03 +01:00
Rolf Neugebauer
7f12cb577a kernel: Update to 4.15.13/4.14.30/4.9.90/4.4.124
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@gmail.com>
2018-03-30 12:19:02 +01:00
Rolf Neugebauer
9cb6f2d802 kernel: Enable CONFIG_FB_EFI for x86_64 and arm64
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@gmail.com>
2018-03-30 12:18:31 +01:00
Rolf Neugebauer
913f31e150 kernel: Drop 4.9.x for arm64
There are too many kernels to compile and arm64 takes a bit
too long to compile even on a beefy arm64 server.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@gmail.com>
2018-03-30 12:18:05 +01:00
Rolf Neugebauer
80f5f228e0 kernel: Cherry-pick two Hyper-V SCSI driver patche
These fix some issues around hot-unplugging devices which may be the cause
of some LCOW issues we are seeing.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@gmail.com>
2018-03-22 20:00:20 +00:00
Rolf Neugebauer
208811355a kernel: Update to 4.15.12/4.14.29/4.9.89/4.4.123
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@gmail.com>
2018-03-22 19:55:57 +00:00
Rolf Neugebauer
45b613e668 kernel: Update to 4.15.11/4.14.28/4.9.88/4.4.122
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-03-20 12:05:27 +00:00
Rolf Neugebauer
513e368880 kernel: Enable CEPH, DRBD, and RBD
All enabled as modules

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-03-15 13:50:18 +00:00
Rolf Neugebauer
1ff6f2eea5 kernel: Update Intel CPU firmware to 20180312
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-03-15 13:50:18 +00:00
Rolf Neugebauer
627e982b79 kernel: Update rt kernel to 4.14.24
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-03-15 11:22:11 +00:00
Rolf Neugebauer
28f1ae2e77 kernel: Update to 4.15.10/4.14.27
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-03-15 11:22:11 +00:00
Rolf Neugebauer
9a5727f5e4 kernel: Update to latest alpine base image
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-03-15 11:22:11 +00:00
Rolf Neugebauer
659f877da6 kernel: Update to 4.15.9/4.14.26/4.9.87/4.4.121
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-03-12 17:00:06 +00:00
Rolf Neugebauer
c573eee0ff kernel: Update kernels to 4.14.25/4.15.26
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-03-12 15:30:51 +00:00
Rolf Neugebauer
48251e8bcf kernel: Enable IMA for 4.14.x and 4.15.x
Enable the Integrity Measurement Architecture (IMA) for 4.14.x
and 4.15.x kernels. This pretty much uses the defaults except we
also enable INTEGRITY_ASYMMETRIC_KEYS and IMA_READ_POLICY. The
latter may be useful for debugging.

For s390x we also needed to enable TPM support.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-03-12 15:26:23 +00:00
Justin Ko
2eefd62710 Non-existent target check is marked phony
The non-existent target "check" is marked phony.

Signed-off-by: Justin Ko <oknitsuj@gmail.com>
2018-03-09 09:13:59 -08:00
Rolf Neugebauer
ae30674227 kernel: Update to 4.14.24/4.9.86/4.4.120
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-03-09 12:39:11 +00:00
Rolf Neugebauer
eee71f46e0 kernel: Adjust s390x kernel config
- Disable all network device driver apart from Mellanox, which
  is the only support NIC on s390x
- Disable Fusion MPT
- Disable DAX/NVMEM/NVME
- Disable USB

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-03-09 12:39:11 +00:00
Rolf Neugebauer
35c6e782e3 kernel: Make it clearer which kernels are compiled per arch
While this now has some duplication, it is clearer as to which
kernels are compiled for each architecture.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-03-09 11:35:58 +00:00
Jason A. Donenfeld
dc92ae7e39 wireguard: update to 0.0.20180304
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-03-05 13:47:34 +01:00
Alice Frosi
db0045b0c9 Add s390 support for linuxkit kernel
Update building process to add s390 support.

The patch serial-forbid-8250-on-s390.patch has been added to disable
8250 serial for s390.

The patch is available upstream https://patchwork.kernel.org/patch/10106437/
but it is not backported.

Signed-off-by: Alice Frosi <alice@linux.vnet.ibm.com>
2018-03-01 12:18:16 +00:00
Rolf Neugebauer
c08a2f19a8 kernel: Update alpine base to latest
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-02-28 16:35:23 +00:00
Rolf Neugebauer
fcba3e2350 kernel: Update to 4.15.7/4.4.23/4.9.85/4.4.119
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-02-28 11:02:15 +00:00
Rolf Neugebauer
afd255d6c9 kernel: Adjust 4.4.x config file
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-02-26 14:37:44 +00:00
Rolf Neugebauer
75ac2563f5 kernel: Update to 4.15.6/4.14.22/4.9.84/4.4.118
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-02-26 12:16:51 +00:00
Rolf Neugebauer
89c5941b88 kernel: Adjust kernel config files for 4.14
- KMEMCHECK has been removed
- PROFILE_ALL_BRANCHES was added (but is disabled)

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-02-23 18:33:21 +00:00
Rolf Neugebauer
5c68ca489d kernel: Update to 4.15.5/4.14.21/4.9.83/4.4.117
Also remove the 4.4 patch which should have been removed by
231cead2cc ("kernel: Update to 4.15.4/4.14.20/4.9.82/4.4.116")

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-02-23 18:06:18 +00:00
Rolf Neugebauer
cfc9c49269 kernel: Handle non-existing config file for 'make kconfig'
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-02-21 13:24:29 +00:00
Rolf Neugebauer
dbb14dfb69 kernel: Introduce per arch kernels and drop 4.4.x for arm64
We may soon get another arch, so wanted to set the template
for having per arch list of kernels to compile.

While at it also drop the 4.4.x kernel for arm64. We never really
tested it and folks should be on 4.9 or 4.14 anyway. I'll leave
4.4.x for x86 for now as it might be useful to test for regressions.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-02-21 13:24:28 +00:00
Rolf Neugebauer
bcc72c3502 kernel: Remove the 4.9.x and 4.14.x-rt debug kernels from build
In order to cut the number of kernels we build, remove the debug
kernel for the now non-default 4.9.x series.

Also remove the -rt debug kernel. Users who need it can build
it themselves with 'make EXTRA=-rt DEBUG=-dbg build_4.14.x'

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-02-21 10:44:22 +00:00
Rolf Neugebauer
1e9b769d65 kernel: Enable KAISER and Hardened Branch predictor for arm64
These are part of the Meltdown/Spectre mitigations for arm64
now available for 4.14 and 4.15

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-02-19 14:23:31 +00:00
Rolf Neugebauer
231cead2cc kernel: Update to 4.15.4/4.14.20/4.9.82/4.4.116
The 4.14.20 update has Meltdown/Spectre fixes for arm64

The 4.4.116 update incorporates the proper fix for the
div by zero crash in the firmware loader, so the patch
with the hackish workaround was dropped.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-02-19 14:06:11 +00:00
Rolf Neugebauer
1baf815c9a
Merge pull request #2897 from TiejunChina/master-dev
Support Preempt-RT Linux kernel
2018-02-19 14:00:54 +00:00
Jason A. Donenfeld
82ec5cd4e7 wireguard: update to 0.0.20180218
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-02-18 21:46:59 +01:00
Tiejun Chen
0e5d447f07 Support Preempt-RT Linux kernel
In order to get such a preempt-rt Linux kerne, we grab -rt patch via
https://www.kernel.org/pub/linux/kernel/projects/rt/. So far we just enable it
over 4.14.x.

Signed-off-by: Tiejun Chen <tiejun.china@gmail.com>
2018-02-16 05:47:22 -08:00
Rolf Neugebauer
bf18c1366b kernel: Add Hyper-V socket trace points to 4.14 kernel
This should make debugging a lot easier. Note, 991f8f1c6eb6
("hyper-v: trace channel events"), patch 18, required some
minor modifications from upstream as another patch was not easy
to cherry-pick.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-02-13 18:00:39 +00:00
Rolf Neugebauer
43ba6de147 kernel: Update to 4.15.3/4.14.19/4.9.81
Drop the hack for the microcode division by 0 on GCP as
a proper fix is in upstream as:
2760f452a718 ("x86/microcode: Do the family check first")

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-02-13 17:22:23 +00:00
Rolf Neugebauer
acfca26038 kernel: Update to 4.15.2/4.14.18
These kernels have significant changes/addition for Spectre
mitigation as well as the usual other set of fixes.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-02-08 11:50:17 +00:00
Rolf Neugebauer
d0d7738efa kernel: Tighten patching of the kernel
- Disable any fuzzing. Patches should apply cleanly
- Assume unified diffs

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-02-08 11:50:17 +00:00
Rolf Neugebauer
334334cea9 kernel: Adjust 4.4 kernel config
The CONFIG_BPF_JIT_ALWAYS_ON option has now been back-ported
to 4.4.115 as well. Enable it.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-02-06 18:43:34 +00:00
Rolf Neugebauer
ee0f182014 kernel: Update to 4.15.1/4.14.17/4.9.80/4.4.115
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-02-06 18:06:25 +00:00
Rolf Neugebauer
9ccfe3cef7 kernel: Add the 4.15.x kernel series
The kernel config was derived from the 4.14.x config being run
through make oldconfig

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-02-06 13:23:40 +00:00
Rolf Neugebauer
e4c4737548 kernel: Add patch to prevent division by zero panic
This adds a patch to avoid a division by zero panic for 4.4.x
and 4.9.x kernels on single vCPU machine types on Google Cloud.

4.14.x and 4.15.x kernels seem to work fine.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-02-06 13:23:40 +00:00
Rolf Neugebauer
82f3f9ae9a kernel: Enable new BPF_JIT_ALWAYS_ON
This option is not enabled by default, but disables the
BPF interpreter which can be used to inject speculative
execution into the kernel. Enabled it as it seems
like a good security measure.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-02-06 13:23:40 +00:00
Rolf Neugebauer
a6a5f69c8d kernel: Update to 4.14.16/4.9.79/4.4.114
The 4.14 and 4.9 kernels have a significant number of
fixes to eBPF and also a fix for kernel level sockets
and namespace removals, ie fixes some aspects of
https://github.com/moby/moby/issues/5618
"unregister_netdevice: waiting for lo to become free"

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-02-06 13:23:40 +00:00
Jason A. Donenfeld
fa77458231 wireguard: update to 0.0.20180202
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-02-02 19:12:19 +01:00
Emily Casey
e0374afb54 Use microcode-20171117 in kernel build as microcode-20180108 is no longer available
Signed-off-by: Emily Casey <ecasey@pivotal.io>
Signed-off-by: Steve Hiehn <shiehn@pivotal.io>
2018-01-30 17:51:40 -05:00
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
Rolf Neugebauer
f103145050 kernel: Switch Dockerfile.kconfig to bsdtar
I got error when un-tarring the linux-4.14 kernel:
tar: linux-4.14/arch/arm64/boot/dts/arm: Directory renamed before its status could be extracted
tar: linux-4.14/arch/arm64/boot/dts: Directory renamed before its status could be extracted
tar: linux-4.14/arch/arm64/boot: Directory renamed before its status could be extracted
tar: linux-4.14/arch/arm64: Directory renamed before its status could be extracted
tar: linux-4.14/arch: Directory renamed before its status could be extracted

Using bsdtar, this error goes away.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-11-14 14:09:03 +00:00
Rolf Neugebauer
7a67aaf7db kernel: Update to 4.13.12/4.9.61/4.4.97
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-11-10 13:29:34 +00:00
Rolf Neugebauer
fe1c723011 kernel: Disable CMA for aarch64 kernels
We don't have it enabled on x86_64 and according to
https://github.com/linuxkit/linuxkit/issues/2434#issuecomment-342370982
may cause the ThunderX NIC driver from working.

Note, this also disables MEMORY_ISOLATION and ARCH_HAS_GIGANTIC_PAGE
which are internal config variables no longer needed.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-11-10 13:29:34 +00:00
Rolf Neugebauer
48ddaf9f44 kernel: Disable CONFIG_SCSI_PROC_FS on all kernels
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-11-06 15:04:05 +00:00
Rolf Neugebauer
8500ac20ca kernel: Enable DSAF for HiSilicon arm64 servers
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-11-06 14:58:27 +00:00
Rolf Neugebauer
cb7699ee5a kernel: Temporarily patch wireguard
Version 0.0.20171101 errors out when compiled for
debug kernels. This will be fixed in the next release.

In the meantime pull in the patch which fixes the
compile error.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-11-03 15:11:06 +00:00
Rolf Neugebauer
1ea69cbcf3 kernel: Update to 4.13.11/4.9.60/4.4.96
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-11-03 15:11:06 +00:00
Jason A. Donenfeld
220a85c176 wireguard: update to 0.0.20171101
20171031, the Halloween edition, had a show stopper bug, which was
neither security related, nor did it affect LinuxKit kernels, but
was important enough for me to bump the snapshot. This is the
corresponding LinuxKit bump. Changes:

* wg-quick: save all hooks on save

Tiny bug fix for 'wg-quick save'.

* timers: switch to kees' new timer_list functions

Shiny new things for Linux 4.14.

* compat: unbreak unloading on kernels 4.6 through 4.9

The real motivation for this extra snapshot bump. Before we would run into
some issues when unloading the module, which was not good.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-11-01 01:07:14 +01:00
Jason A. Donenfeld
2e1f9f1782 wireguard: update to 0.0.20171031
Simple version bump. Changes:

* netns: use read built-in instead of ncat hack for dmesg
* netns: use time-based test instead of quantity-based
* qemu: allow for cross compilation
* qemu: work around ccache bugs
* qemu: test using four cores
* selftest: initialize mutex in routingtable selftest

We now cross compile and run in QEMU for x86_64, i686,
ARMv7, Aarch64, and MIPS. You can see the current build
status on: https://www.wireguard.com/build-status/

* stats: more robust accounting
* compat: fix up stat calculation for udp tunnel

The statistics from `ip link -stats` or from `wg show` are
now much more accurate.

* global: accept decent check_patch.pl suggestions
* global: infuriating kernel iterator style
* global: style nits
* global: use fewer BUG_ONs
* global: get rid of useless forward declarations
* blake2: include headers for macros
* tools: correct type for CTRL_ATTR_FAMILY_ID

Lots of style cleanups.

* crypto/avx: make sure we can actually use ymm registers

This fixes an issue on some Xen platforms that expose
conflicting CPU features.

* peer: get rid of peer_for_each magic
* peer: store total number of peers instead of iterating

A major cleanup of our peer iteration logic, getting rid
of a big ugly macro and clarifying our locking semantics.

* compat: be sure to include header before testing

* wg-quick: allow specifiying multiple hooks

You can now specify {Post,Pre}{Down,Up} multiple times, and
the commands will then run in succession.

* wg-quick: remember to rewind DNS settings on failure

Small consistency fix.

* wg-quick: allow for saving existing interface

There is now a 'save' option for saving an existing
configuration without having to bring down the device.

* wg-quick: fsync the temporary file before renaming

In case the system looses power, you are now left with
either the old file or the new file but not an empty file.

* wg-quick: allow for the hatchet, but not by default

In order to account for distributions that do not have an
implementation of resolvconf(8), the contrib directory ships
with an alternative implementation that may be patched in.
This was extensively discussed and debated on the mailing
list.

* device: only take reference if netns is different

Solves an important memory leak when tearing down network
namespaces that haven't moved the wireguard device.

* device: expand scope of destruct lock
* timers: guard entire setting in block

Just to be certain.

* curve25519: only enable int128 if compiler support is sound

Allows building for Aarch64 with old gcc (such as that used
by Android) where we don't want to branch to a __multi3.

* contrib: add reresolve-dns

A small script that's been passed around for a while now for
reresolving DNS entries from a cronjob.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-10-31 19:33:21 +01:00
Rolf Neugebauer
17e5b55d17 kernel: Update to 4.13.10/4.9.59/4.4.95
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-10-28 17:46:23 +01:00
Ian Campbell
6c7b1c0251 Bump all packages to newest alpine.
Signed-off-by: Ian Campbell <ijc@docker.com>
2017-10-24 10:11:24 +01:00
Rolf Neugebauer
89af138f18 kernel: Update to 4.13.9/4.9.58/4.4.94
Note: There were more conflicts in applying the
vmbus patches to 4.13. For now I've just skipped the
conflicting patches so the end-result may be that
Hyper-V sockets on 4.13 may break (if they were not
already broken by the update to 4.13.6).

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-10-22 19:49:15 +01:00
Rolf Neugebauer
12b8d9d6bd kernel: Update to 4.13.8/4.9.57/4.4.93
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-10-22 19:49:15 +01:00
Rolf Neugebauer
b4d2d36866 kernel: Remove the 4.4.x patches
The patches are for vsock and hvsock and anyone using these
should be using more modern kernels.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-10-22 19:49:14 +01:00
Rolf Neugebauer
4005564228 kernel: Drop 'kernel_' prefix from kernel config files
It's kinda obvious that these are kernel configuration files
and, looking at various other distros it seems more common
to call the files 'config-<foo>'.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-10-22 19:49:14 +01:00
Rolf Neugebauer
5afc16f275 kernel: Enable building kernels without patches
Copying the entire local directory into the container allows
us to check for the existence of the patch directory and
only apply the patches if the directory exists.

An alternative would have been to re-arrange the patch directory
into a sub-directory, but in terms of copying wouldn't have
made that much if a difference.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-10-22 19:49:14 +01:00
Rolf Neugebauer
ddbdb0aad7 kernel: Update to 4.13.7
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-10-22 19:49:14 +01:00
Rolf Neugebauer
571dba104d kernel: Update to 4.13.6/4.9.56/4.4.92
NOTE: Some of the 4.13.x VMBus patches did not apply cleanly and they
were dropped for now. This may break LCOW and other Windows support.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-10-20 20:22:03 +01:00
Rolf Neugebauer
5609cdeae7 kernel: Update to 4.9.55
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-10-20 20:22:03 +01:00
Rolf Neugebauer
847ae9d220 kernel: Add dtbs files to kernel.tar under /boot/dtb
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-10-19 09:20:21 +02:00
Rolf Neugebauer
ef67a145d9 kernel: Add minimal kernel config for the Raspberry Pi 3b
- Enable ARCH_BCM2835
- Enable USB_NET_SMSC95XX.
- Compile in MII and USB_USBNET. These are needed
  by the onboard network driver
- Enable the DWC2 USB controller.
- Enabled MMC, MMC_SDHCI, MMC_BCM2835 for SD card access
- Enable various BCM2835 platform devices: HW_RANDOM_BCM2835,
  I2C_BCM2835, PINCTRL_BCM2835, DMA_BCM2835,BCM2835_MBOX,
  WM_BCM2835, ...
- Enable SERIAL_8250 and friends.
- Enable FB_SIMPLE to get console output

The above configuration gives a minimal working system
with serial console access (via the GPIO pins), networking
and SD storage. The smsc95xx network driver does not
seem to get autoloaded. This is likely a mdev issue.

We specifically do not configure any WLAN,
sound or graphics drivers as they would pull in
too many other cruft into the kernel. To enable
these we consider adding a -rpi3 config similar
to the -dbg config to provide additional kernel
config options.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-10-19 09:20:21 +02:00
Jason A. Donenfeld
5db1bbeef6 wireguard: update to 0.0.20171017
Simple version bump. Changes:

  * noise: handshake constants can be read-only after init
  * noise: no need to take the RCU lock if we're not dereferencing
  * send: improve dead packet control flow
  * receive: improve control flow
  * socket: eliminate dead code
  * device: our use of queues means this check is worthless
  * device: no need to take lock for integer comparison
  * blake2s: modernize API and have faster _final
  * compat: support READ_ONCE
  * compat: just make ro_after_init read_mostly

  Assorted cleanups to the module, including nice things like marking our
  precomputations as const.

  * Makefile: even prettier output
  * Makefile: do not clean before cloc
  * selftest: better test index for rate limiter
  * netns: disable accept_dad for all interfaces

  Fixes in our testing and build infrastructure. Now works on the 4.14 rc
  series.

  * qemu: add build-only target
  * qemu: work on ubuntu toolchain
  * qemu: add more debugging options to main makefile
  * qemu: simplify shutdown
  * qemu: open /dev/console if we're started early
  * qemu: phase out bitbanging
  * qemu: always create directory before untarring
  * qemu: newer packages
  * qemu: put hvc directive into configuration

  This is the beginning of working out a cross building test suite, so we do
  several tricks to be less platform independent.

  * tools: encoding: be more paranoid
  * tools: retry resolution except when fatal
  * tools: don't insist on having a private key
  * tools: add pass example to wg-quick man page
  * tools: style
  * tools: newline after warning
  * tools: account for padding being in zero attribute

  Several important tools fixes, one of which suppresses a needless warning.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-10-17 22:18:45 +02:00
Jason A. Donenfeld
055db2d542 wireguard: bump version
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-10-11 16:41:47 +02:00
Rolf Neugebauer
38c37276a2 kernel: Update to 4.9.54/4.4.91
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-10-11 13:12:49 +01:00
Rolf Neugebauer
b294171311 kernel: Add the firmware to the result tarball
'make firmware_install' adds the firmware blobs creating
during the build to '/lib/firmware' in the result tarball.

This should be installed along with the kernel modules.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-10-11 13:12:49 +01:00
Rolf Neugebauer
6f81297da6 kernel: Enable RANDOMIZE_BASE on arm64 kernels as well
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-10-11 13:12:49 +01:00
Ian Campbell
a237b51511 Bump alpine base across the board.
By running:

    ./scripts/update-component-sha.sh --image linuxkit/alpine ad35b6ddbc70faa07e59a9d7dee7707c08122e8d

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-10-10 09:55:45 +01:00
Ian Campbell
13d11f49ba Rename "tag*" Makefile targets to "build*"
This better matches the `linuxkit pkg build` nomenclature.

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-10-09 16:48:48 +01:00
Rolf Neugebauer
267017f484 Merge pull request #2568 from zx2c4/wireguard-bump
kernel/wireguard: version bump
2017-10-06 14:39:02 +01:00
Jason A. Donenfeld
c14e9e205b kernel/wireguard: version bump
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-10-06 03:42:57 +02:00
Rolf Neugebauer
06b09fb6a8 kernel: Update kernel to 4.13.5/4.9.53/4.4.90
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-10-05 12:01:12 +01:00
Rolf Neugebauer
ec06cfe69c kernel: Delete accidentally commit temporary files
Introduced with: fb98564e ("Add squashfs support to the kernel config")

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-10-05 11:56:52 +01:00
Rolf Neugebauer
074541f79c Merge pull request #2551 from zx2c4/wireguard-bump
wireguard: version bump
2017-10-05 11:51:58 +01:00
Justin Cormack
fb98564ecc Add squashfs support to the kernel config
This is a useful read only filesystem for images that is efficient and
small as it supports compression.

For many use cases, when you are writing to media, it makes more sense than
using an initramfs as it does not require RAM, and it is more suitable for
disk media than ISO.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-10-03 15:09:27 +01:00
Rolf Neugebauer
d9bd133f58 kernel: Remove 4.12 kernel
4.12 has been EOLed:
http://lkml.iu.edu/hypermail/linux/kernel/1709.2/02589.html
Remove it and the related tests.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-10-02 16:20:02 +01:00
Rolf Neugebauer
6f535f866a kernel: Enable FORTIFY_SOURCE for 4.13 kernels
This new feature was disabled by default, enable it as it seems
sensible to have. From the documentation:
  Detect overflows of buffers in common string and memory functions
  where the compiler can determine and validate the buffer sizes.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-10-02 16:20:02 +01:00
Rolf Neugebauer
d0e55af229 kernel: Add support for 4.13 kernels
The patches from 4.12 applied cleanly, except for 81304747d9
("Drivers: hv: vmbus: Fix rescind handling"), which was already
in upstream so has been dropped from the patch series.

The kernel config is from 4.12 run through defconfig/oldconfig to
pick up any new defaults.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-10-02 16:20:02 +01:00
Rolf Neugebauer
6e540241c8 kernel: Update alpine base image for kernel builds
Since we are rebuilding the kernels might as well update the base

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-10-02 16:20:02 +01:00
Jason A. Donenfeld
43db718f14 wireguard: version bump
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-10-02 03:39:11 +02:00
Rolf Neugebauer
35fde3ec7d kernel: Update to 4.9.52/4.4.89
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-09-28 15:44:04 +01:00
Rolf Neugebauer
e75289e4e1 kernel: Update 4.12.x to latest VMBus/Hyper-V socket patches
Notie, the instructions added in: https://github.com/Microsoft/opengcs/pull/147
add a commit to revert another patch in this series. Instead of applying
c15d7f606f8 ("Revert "vmbus: destroy a hv_sock device only after the RESCIND_OFFER
is received"") we simply drop the orginal commit e37da6e7a52ea6 ("vmbus: destroy a
hv_sock device only after the RESCIND_OFFER is received") from our list.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-09-25 11:36:46 +01:00
Rolf Neugebauer
bd4723d1aa kernel: Update kernels to 4.12.14/4.9.51
While at it might as well update the alpine base...

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-09-20 12:13:26 +01:00
Rolf Neugebauer
f2a73dcd01 kernel: Enable HPSA and SMARTPQI SCSI driver modules
These drivers are for HPE SCSI cards and enabling them subsequently
enabled RAID_ATTRS and CHECK_SIGNATURE.

Only enabled for 4.9 and 4.12 kernels.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-09-20 11:59:06 +01:00
Jason A. Donenfeld
bd4775cf6f wireguard: version bump
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-09-19 03:43:14 +02:00
Rolf Neugebauer
ac18bbfda0 Merge pull request #2514 from matjohn2/zfs-depmod-fix
Ensure depmod is run on ZFS module builds (fixes ZFS modprobe)
2017-09-18 11:31:15 +01:00
Matt Johnson
fdc1c0edc8 Enable modprobe zfs by running depmod on the new kernel build.
Depmod in the zfs makefiles will never run as `/boot/` and relevant map files dont exist in our build environments.
Included style suggestions by @rn

Signed-off-by: Matt Johnson <matjohn2@cisco.com>
2017-09-18 08:55:17 +01:00
Rolf Neugebauer
7ba00c001b kernel: Update 4.12.x kernel patches
These are the recommended patches for 4.12 for Hyper-V sockets
and LCOW. Based on: https://github.com/Microsoft/opengcs/pull/138

This also includes a cherry-pick from upstream which fixes the
ext4/nvdimm/pax failures we have seen since 4.11.2.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-09-15 14:46:25 +01:00
Rolf Neugebauer
59782d502e kernel: Update to 4.12.13/4.9.50/4.4.88
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-09-14 17:19:43 +01:00
Rolf Neugebauer
3ed92e7497 kernel: Enable TASK_XACCT and TASK_IO_ACCOUNTING
This enables per task (IO) accounting which is useful
for monitoring IO activity and the like.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-09-12 11:47:05 +01:00
Rolf Neugebauer
7bc93a6c46 kernel: Update to 4,9.49/4.12.12
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-09-12 11:23:41 +01:00
Justin Cormack
ca4ee13fca Merge pull request #2499 from zx2c4/wireguard-bump
wireguard: bump to new snapshot with better RTS semantics
2017-09-11 20:51:34 +02:00
Jason A. Donenfeld
7fa39b172e wireguard: bump to new snapshot with better RTS semantics
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-09-11 18:46:07 +02:00
Rolf Neugebauer
5427147e3b kernel: Update to 4.12.11/4.9.48/4.4.87
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-09-08 14:44:44 +01:00
Rolf Neugebauer
c6af2f4d6b kernel: Update to 4.12.10
I must have missed the update earlier this week

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-09-08 14:08:04 +01:00
Rolf Neugebauer
8d45a96f34 kernel: Add zfs kmod build to the kernel build
This adds building the zfs-kmod package to the kernel build.
The zfs-kmod packages contains the matching ZFS kernel modules
for a given kernel in /lib/modules/$(uname -r)/extra.

The zfs-kmod package also contains the standard kernel modules
and depmod is run over them so that modprobe works

The zfs-kmod package is not build by default due to unclarity
about licenses. Users will have to build it themselves.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-09-06 15:32:12 +01:00
Rolf Neugebauer
c9ead45731 kernel: Add Dockerfile to compile the ZFS kernel module
Note this is not the latest ZFS version but the version matched
by the current alpine zfs utilities.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-09-06 15:32:12 +01:00
Rolf Neugebauer
6da35660a9 kernel: Update kernel build to latest alpine base
Since we have to recompile kernels, might as well.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-09-04 17:58:16 +01:00
Rolf Neugebauer
8ce9ead839 kernel: Enable CGROUP_RDMA and CGROUP_BPF for 4.12 kernels
These are new options introduced with 4.11.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-09-04 17:58:16 +01:00
Rolf Neugebauer
a8839d91db kernel: Enable ISCSI_TCP and DM_MULTIPATH for all kernels
These are enabled as modules and are useful for iSCSI storage backends.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-09-04 17:58:16 +01:00
Rolf Neugebauer
8be4a2b2c4 kernel: Update to 4.9.47/4.4.86
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-09-04 17:58:16 +01:00
Rolf Neugebauer
3fe863e8e6 kernel: Update kernels to 4.9.46/4.4.85
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-08-30 19:23:45 +01:00
Rolf Neugebauer
279d3f05bd kernel: Update to 4.4.84/4.9.45/4.12.9
Note, on x86_64 for 4.12.9 a new kernel option,
HARDLOCKUP_CHECK_TIMESTAMP was added which defaults to enabled. It enables
a low pass filter to compensate for perf based hard lockup detection.

Added this option to the x86_64 4.12.x kernel confog file.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-08-30 19:23:45 +01:00
Rolf Neugebauer
bdd4789598 kernel: Fix docker content trust for perf builds
Due to https://github.com/moby/moby/issues/34199 we can't supply
the FROM image via --build-arg and use DOCKER_CONTENT_TRUST=1 for build.

So we pull the image with DCT and then explicitly build it without.

This regression was introduced with 8b84baf2 ("kernel: Allow disabling content trust")

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-08-30 19:23:45 +01:00
Rolf Neugebauer
7209afb758 kernel: Enable custom kernel config additions
For some use cases, we may want to add additional kernel
configuration options (e.g. when adding AUFS). This commit
enables it by:
- renaming DEBUG to EXTRA
- append kernel_config${EXTRA} to the kernel config
- allowing passing in an EXTRA argument to the make file

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-08-24 18:26:46 +01:00
Rolf Neugebauer
e75cf2f611 kernel: Use -dbg instead of _dbg as suffix for debug kernels
Otherwise we have a eird mixture of _ and - in the names.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-08-24 18:26:46 +01:00
Rolf Neugebauer
15d3ce25aa kernel: Add contents of ${DEBUG} to the LOCALVERSION
This way 'uname -r' will report something like
4.9.44-linuxkit_dbg on debug kernels.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-08-24 15:10:53 +01:00
Rolf Neugebauer
8b84baf226 kernel: Allow disabling content trust
specifying NOTRUST=1 on the make command line disables
content trust just like with packages.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-08-24 15:10:53 +01:00
Rolf Neugebauer
677bf96dff kernel: Fix warning about empty continuation
Without this change, recent Docker build produce this warning:
[WARNING]: Empty continuation line found in:
    RUN apk add     xz     xz-dev     zlib-dev &&     if [ $(uname -m) == x86_64 ]; then         apk add libunwind-dev;
    fi
[WARNING]: Empty continuation lines will become errors in a future release.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-08-24 11:06:28 +01:00
Rolf Neugebauer
cc67c08667 kernel: Add kernel config and build support for 4.12 kernels
- The x86_64 kernel config was derived from our 4.11 config
  and then adjusted with the recent changes
- The arm64 kernel config was derived from the 4.9 config

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-08-23 14:33:25 +01:00
Rolf Neugebauer
6fc9a32c15 kernel: Add patches for the 4.12 kernel
The VMBus/Hyper-V socket patches were partly taken from the now
defunct 4.11 tree and partly form the WIP 4.12 tree at:
https://github.com/dcui/linux/commits/decui/msft-4.12.y

From the 4.11 tree:
- 0001-tools-build-Add-test-for-sched_getcpu.patch
  Does not apply, may not be needed anymore to compile perf
- 0002-vmbus-vmbus_open-reset-onchannel_callback-on-error.patch
  From https://github.com/dcui/linux/commits/decui/msft-4.12.y
- 0003-vmbus-add-the-matching-tasklet_enable-in-vmbus_close.patch
  Already upstream: 5116f5e2e05cf("vmbus: re-enable channel tasklet")
- 0004-vmbus-remove-goto-error_clean_msglist-in-vmbus_open
  From https://github.com/dcui/linux/commits/decui/msft-4.12.y
- 0005-vmbus-dynamically-enqueue-dequeue-a-channel-on-vmbus.patch
  From the 4.11 patches
- 0006-hv_sock-implements-Hyper-V-transport-for-Virtual-Soc.patch
  From https://github.com/dcui/linux/commits/decui/msft-4.12.y
- 0007-VMCI-only-try-to-load-on-VMware-hypervisor.patch
  From https://github.com/dcui/linux/commits/decui/msft-4.12.y
- 0008-hv_sock-add-the-support-of-auto-loading.patch
  From https://github.com/dcui/linux/commits/decui/msft-4.12.y
- 0009-tools-hv_sock-2-simple-test-cases.patch
  Dropped, this was just test code
- 0010-vmbus-introduce-in-place-packet-iterator.patch
  Already upstream: f3dd3f4797652("vmbus: introduce in-place packet iterator")
- 0011-hvsock-fix-a-race-in-hvs_stream_dequeue.patch
  From https://github.com/dcui/linux/commits/decui/msft-4.12.y
- 0012-hvsock-fix-vsock_dequeue-enqueue_accept-race.patch
  From https://github.com/dcui/linux/commits/decui/msft-4.12.y
- 0013-Drivers-hv-vmbus-Fix-rescind-handling.patch
  From the 4.11 patches
- 0014-vmbus-fix-hv_percpu_channel_deq-enq-race.patch
  From the 4.11 patches
- 0015-vmbus-add-vmbus-onoffer-onoffer_rescind-sync.patch
  From the 4.11 patches
- 0016-hv-sock-a-temporary-workaround-for-the-pending_send_.patch
  DROPPED. Does not apply at all anymore. Was a hack anyway
- 0017-vmbus-fix-the-missed-signaling-in-hv_signal_on_read.patch
  Applied manually from the 4.11 patches
- 0018-hv-sock-avoid-double-FINs-if-shutdown-is-called.patch
  From https://github.com/dcui/linux/commits/decui/msft-4.12.y
- 0019-Added-vsock-transport-support-to-9pfs.patch
  From the 4.11 patches
- 0020-NVDIMM-reducded-ND_MIN_NAMESPACE_SIZE-from-4MB-to-4K.patch
  From the 4.11 patches

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-08-23 14:33:25 +01:00
Rolf Neugebauer
0f5825fc32 kernel: Improve kconfig Docker file
Be a bit more verbose and error on error.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-08-23 14:33:25 +01:00
Rolf Neugebauer
aec0d5a702 kernel: Disable VHOST_VSOCK on 4.4 kernels
The host side VSOCK implementation introduced with
0009-VSOCK-Introduce-vhost_vsock.ko.patch
does not compile due to vhost_vq_init_access not being defined.

VHOST support (including VHOST_VSOCK) was enabled with
86deeaff ("kernel: Bring 4.4 x86_64 kernel config more in line
with 4.9") but not compile tested. Having VHOST support in
itself is fine, it's just the VHOST_VSOCK portion which is not
avail.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-08-23 14:33:25 +01:00
Rolf Neugebauer
20cc4b3ddf kernel: Don't check kernel config for debug kernels
The kernel config for debug kernels is created by concatenating
config files, so we can't use diff to check it.

This fixes a regression introduced by:
9362de0a ("kernel: Verify kernel config")

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-08-23 14:33:25 +01:00
Rolf Neugebauer
119cc56fcf kernel: Align arm64 4.4 kernel config with 4.9
Note, vhost vsock is disabled on arm64 because it failed to compile.
'vhost_vq_init_access' was not defined, but with a quick check
I could not find where it was supposed to be defined.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-08-21 20:43:30 +01:00
Rolf Neugebauer
86deeaff90 kernel: Bring 4.4 x86_64 kernel config more in line with 4.9
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-08-21 20:43:30 +01:00
Rolf Neugebauer
ba2e6a5bb8 kernel: Add a Dockerfile to make it easier to configure kernels
The new Dockerfile.kconfig can be used, via the 'kconfig' make target
to build a 'linuxkit/kconfig' images. This images contains the patched
source and default kernel configs for all supported kernels.

It's useful to updating the kernel config files.

While at it, also update the alpine base.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-08-21 20:43:30 +01:00
Rolf Neugebauer
ffcf5db6ee kernel: Use local kernel source if available
The kernel build currently downloads the source tar ball every
time, which is a little tedious when experimenting with kernel
configs or when compiling the kernel multiple times.

This commit adds a new 'fetch' make target which downloads the
kernel sources into ./sources. Then in the Dockerfile we add
the directory and only download the source if it is not present.

The tarballs signature is till checked on each build.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-08-20 11:41:59 +01:00
Rolf Neugebauer
9362de0adb kernel: Verify kernel config
Since we supply a full .config file we can check that after
make defconfig/oldconfig it hasn't changed. This should catch
cases where a config option has changed between releases.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-08-20 11:05:35 +01:00
Rolf Neugebauer
72ed2b3a06 kernel: Rename kernel_config-4.x.x to kernel_config-4.x.x-x86_64
Consistently arch suffixes for kernel config.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-08-20 10:46:28 +01:00
Rolf Neugebauer
5898bc9f0d kernel: Update to 4.9.44/4.4.83
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-08-18 18:08:32 +01:00
Rolf Neugebauer
516b11d262 kernel: Set DEFAULT_MMAP_MIN_ADDR to 65536/32768
This is a recommended security measure to protect the low portion
of virtual memory. On x86_64 the recommended value is 65536 while
for arm it shouldn't be higher than 32768.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-08-18 15:18:38 +01:00
Rolf Neugebauer
edf74c249a kernel: Enable CONFIG_ENABLE_MUST_CHECK
This is a compile time option enabling __must_check annotations
for return values.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-08-18 15:18:38 +01:00
Rolf Neugebauer
3e5ba03cdc kernel: Enable Ethernet Team driver support
While at it also disable an un-used NIC vendor (Netronome).

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-08-18 15:18:38 +01:00
Rolf Neugebauer
ec7c2fe82d kernel: Align arm64 kernel config more with x86
The resulting kernel boots fine on qemu and on Cavium Thunder,
though the latter still has some issues.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-08-18 15:18:38 +01:00
Rolf Neugebauer
72c2c7f85b kernel: Set LOCALVERSION to "-linuxkit" on arm64 as well
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-08-14 11:01:22 +01:00
Rolf Neugebauer
1882939623 kernel: Update to 4.9.43/4.4.82
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-08-14 10:58:54 +01:00
Rolf Neugebauer
3889f198e5 kernel: Update to 4.9.42/4.4.81
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-08-14 10:45:56 +01:00
Jason A. Donenfeld
f74477def2 wireguard: version bump
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-08-10 23:17:22 +02:00
Dennis Chen
7f313870a9 arm64: kernel 4.4.x bringup enablement
Enable DEVPTS_MULTIPLE_INSTANCES in kernel configuration file
to avoid the devpts mounting hang issue during bootup when
running LinuxKit.

Signed-off-by: Dennis Chen <dennis.chen@arm.com>
2017-08-09 02:56:36 +00:00
Rolf Neugebauer
4f5582edf2 kernel: Update to 4.9.41/4.4.80
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-08-08 17:46:21 +01:00
Alex Johnson
97b91cf5f2 Installed the MEGARAID_SAS driver as a kernel module to support the RAID controller in Packet.net type 2 servers
Fixes #1245

Signed-off-by: Alex Johnson <hello@alex-johnson.net>
2017-08-07 13:09:02 -07:00
Rolf Neugebauer
a1892cd8f1 kernel: Convert kernel build to a multi-arch image
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-08-03 17:36:22 +01:00
Rolf Neugebauer
0714aa7380 kernel: Remove 4.11.x
It has been EOLed today and won't receive any further updates.

The images are still on hub so can be continued to be used
for the time being.

4.12 support is coming soon.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-07-28 20:14:01 +01:00
Rolf Neugebauer
57659aa5dd kernel: Update to 4.9.40/4.4.79
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-07-28 19:25:55 +01:00
Dave Freitag
9152d065b6 Add NFS Debug Modules
- Adding NFS debug modules to kernel_config.debug
- Also updating some dead links in the kernels.md doc file

Signed-off-by: Dave Freitag <dcfreita@us.ibm.com>
2017-07-28 10:48:10 -05:00
Jason A. Donenfeld
5b875bd1d4 wireguard: version bump
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-07-26 04:01:29 +02:00
Rolf Neugebauer
4e4594cb2e kernel: Update to 4.11.12/4.9.39/4.4.78
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-07-24 10:53:45 +01:00
Jason A. Donenfeld
e24cc5c77f wireguard: add into default kernel
This integrates the WireGuard module directly into the kernel build
system.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2017-07-20 16:51:18 +02:00
Rolf Neugebauer
90d1866bdc Merge pull request #2234 from deitch/kernel-tpm-modules
[WIP] Add TPM module builder options to kernel
2017-07-18 09:59:47 +01:00
Avi Deitcher
19ce7e18a2 Add TPM module builder options to kernel
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2017-07-18 11:01:40 +03:00
Rolf Neugebauer
e1bc6e4c55 kernel: Update to 4.11.11/4.9.38/4.4.77
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-07-17 11:02:12 +01:00
Rolf Neugebauer
759e5a8a51 kernel: Update to 4.11.10/4.9.37
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-07-17 10:54:49 +01:00
Rolf Neugebauer
98615f43e7 kernel: Add 4.11 kernel config options for LCOW
This is a semi-educated guess of which kernel config options
may be needed to run LCOW based on the config file posted here:
2e5c2fac44/kernelconfig/4.11/kconfig_for_4_11

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-07-12 18:16:42 +01:00
Rolf Neugebauer
ed18d81191 kernel: Enable more hardware drivers and KVM
- Enables module for some common 10/40G NICs
  from Broadcom, Intel, and Mellanox
- Enable KVM and related modules

These are targeted to support more bare metal
configuration with LinuxKit.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-07-12 18:16:42 +01:00
Rolf Neugebauer
11e06d3d63 kernel: Update 4.11.x patches
Incorporate the update for the Hyper-V socket patches from
https://github.com/dcui/linux/commits/decui/hv_sock/v4.11/20170511-debug-0628-with-signed-off-by-of-dexuan-fixed
as well as the additional pLCOW requires patches from
2e5c2fac44

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-07-12 18:16:41 +01:00
Rolf Neugebauer
c1e48c37ac Merge pull request #2190 from arm64b/kernel-Makefile-config
ARM64: Add kernel config file for aarch64
2017-07-12 18:12:51 +01:00
Dennis Chen
fb8eb41623 ARM64: Add kernel config file for aarch64
Add the kernel configuration file of arm64.

Signed-off-by: Dennis Chen <dennis.chen@arm.com>
2017-07-12 09:10:17 +00:00
Justin Cormack
4b3fc038b7 Merge pull request #2188 from justincormack/never-metadata-i-didnt-like
Add labels for repo and commit to packages
2017-07-11 18:22:15 +01:00
Justin Cormack
ed38adbc90 Add labels for repo and commit to packages
- use image spec metadata https://github.com/opencontainers/image-spec/blob/master/annotations.md
- omit commit if dirty

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-07-11 14:33:59 +01:00
Dennis Chen
e0a8a1d4df ARM64: Adapt the kernel Dockerfile to multiarch support
The original kernel Dockerfile hardcodes the amd64 as the
only arch supported, this patch removes this kind of hardcode
and make the Dockerfile is ready to support both amd64 and
arm64 by using the runtime arch type.

Signed-off-by: Dennis Chen <dennis.chen@arm.com>
2017-07-11 12:39:27 +00:00
Rolf Neugebauer
aa9b718d8a kernel: Update to 4.11.9/4.9.36/4.4.76
Added a new patch to the 4.11 and 4.9 kernels based on a patch
submitted to stable: https://patchwork.kernel.org/patch/9829039/

This patch fixes a off-by-one error in the VMBus code.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-07-07 18:41:33 +01:00
Ian Campbell
fe918f8a31 pkg: Run git update-index --refresh before git diff-index.
Otherwise files which have an updated timestamp but no actual changes are
marked as changes because `git diff-index` only uses the `lstat` result and not
the actual file contents. Running `git update-index --refresh` updates the
cache.

Signed-off-by: Ian Campbell <ian.campbell@docker.com>
2017-07-03 10:27:31 +01:00
Ian Campbell
c9b5cbf89b kernel: Calculate HASH and DIRTY in the same way as pkg/package.mk
The definition of `$(TAG)` differs from pkg/package.mk and is only the
HASH+DIRTY since the full tag is defined by the kernel macro and varies for
each kernel.

Also `show-tag` is `show-tags` here due to the multiple builds. Individual
`show-tag_FOO` rules are provided similar to the `build_FOO` rules.

Signed-off-by: Ian Campbell <ian.campbell@docker.com>
2017-07-03 10:27:31 +01:00
Rolf Neugebauer
699a864302 pkg: Update to new Alpine base
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-07-01 18:11:45 +01:00
Rolf Neugebauer
8cee2cd68b kernel: Update to 4.11.8/4.9.35/4.4.75
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-06-30 18:23:29 +01:00
Rolf Neugebauer
40ea10065c kernel: Tweak kernel build
- Combine 'sign' and 'push' targets like it is done for
  package builds.
- Append '-dirty' to the tag if the repository is dirty.
- Don't push to hub if the repository is dirty.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-06-27 17:43:57 +01:00
Rolf Neugebauer
c12eafeeb2 kernel: Update to 4.11.7/4.9.34/4.4.74
In particular this contains 1be7107fbe18eed3e319 ("mm: larger stack
guard gap, between vmas") which is a fix for CVE-2017-1000364.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-06-27 10:39:23 +01:00
Rolf Neugebauer
492b6c3fdb kernel: Move some less commonly used features to modules
Module loading on hotplug and boot seems to work now, so
move some less commonly used kernel features and drivers
out of the kernel into drivers. Specifically:
- Devices: All non-virtual network device drivers
- Networking: GRE, GENEVE, PPP, non-essential IPv6 protos,
  L2TP, MPLS_GSO, bonding, IPSec (XFRM), openvswitch,
  queueing/schedulers
- FS: SUNRPC, NFS, NFSD, LOCKD, NTFS
- Misc: ATA over Ethernet

Remove Nozomi serial driver. It doesn't seem to be used
on any of our platforms.

The config files were also run through 'make defconfig &&
make oldconfig' to update any missing options.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-06-22 19:32:13 +01:00
Rolf Neugebauer
4d8f8956b3 kernel: Update to 4.11.6/4.9.33/4.4.73
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-06-22 19:32:13 +01:00
Rolf Neugebauer
974bc56886 kernel: Remove elfutils-dev package
It clashes with libelf-dev but libelf-dev is sufficient
to compile the kernel. This also allows us to remove the
'|| true' from the 'apk add', catching errors with the
tools installation.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-06-22 19:32:12 +01:00
Riyaz Faizullabhoy
130800446a alpine: add zfs package
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2017-06-21 17:54:45 -07:00
Riyaz Faizullabhoy
6b5ef8c70e alpine: include gnupg package
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2017-06-21 17:49:51 -07:00
Riyaz Faizullabhoy
503c08a6fb Add PGP key for 00411886 (torvalds@linux-foundation.org)
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2017-06-20 10:05:33 -07:00
Justin Cormack
324605c48c Merge pull request #2068 from mscribe/master
Verify kernel with GPG and sha256 checksum
2017-06-20 09:50:47 -07:00
Nathan Dautenhahn
4c73320c75 Fix spelling errors
inuxkit/kernel -> linuxkit/kernel

sourcs -> sources

Signed-off-by: Nathan Dautenhahn <ndd@cis.upenn.edu>
2017-06-20 05:54:26 -04:00
Bill Kerr
1e1afd77d2
Add PGP keys for 589DA6B1 (greg@kroah.com) and 6092693E (autosigner@kernel.org).
Verify kernel with GPG and sha256 checksum.

Signed-off-by: Bill Kerr <bill@generalbill.com>
2017-06-19 16:29:53 -04:00
Justin Cormack
fc5d707e97 Merge pull request #2043 from m4rcu5/feature/enable-usb-support
Enabling USB drivers on the 4.4.x, 4.9.x and 4.11.x kernels
2017-06-16 09:31:18 -07:00
Marcus van Dam
306b79de4c
Switching the USB drivers to modules
Signed-off-by: Marcus van Dam <marcus@marcusvandam.nl>
2017-06-16 12:03:23 +02:00
Rolf Neugebauer
db2491cac3 kernel: Update to 4.11.5/4.9.32/4.4.72
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-06-15 13:14:54 -07:00
Rolf Neugebauer
ad3456d4d1 Merge pull request #2047 from rn/perf
Remove kernel-compile and add perf package
2017-06-15 11:42:27 -07:00
Tycho Andersen
a4e0a594b1 add a static usermode helper
The binary is used in tandem with CONFIG_STATIC_USERMODEHELPER=y in 4.11+,
see the big comment in the binary for the current whitelist of binaries.

Signed-off-by: Tycho Andersen <tycho@docker.com>
2017-06-15 10:39:52 -07:00
Rolf Neugebauer
0b6f1a72b6 kernel: Build a perf package for 4.11/4.9 kernels
Extract the perf binary from the kernel package and create
a new perf package for each kernel. The perf package uses the
same tags as the kernel package and only contains the perf
binary under /usr/bin. The perf package can be added to the
init section or included as a stage in a multi-stage build
for other packages.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-06-15 10:39:32 -07:00
Rolf Neugebauer
baf32846d8 kernel: Build the perf utility as part of the kernel build
The perf utility is somewhat kernel specific so might as well
compile it when we compile the kernel. The resulting binary
is statically linked (and stripped for size) and is added the
resulting kernel packages.

Although we add alpine packages such as libunwind and other,
it seems that the config detection code for perf/tools does
not detect them.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-06-15 10:39:32 -07:00
Rolf Neugebauer
06c857fb16 kernel: Fix perf compile on 4.11.x/4.9.x kernels
This cherry-picks 120010cb1eea151d38a3e66f5ffc79a0c3110292 ("tools build:
Add test for sched_getcpu()") which replaces a #ifdef based test with
a proper test for the sched_getcpu() function. The macro based condition
does not work on Alpine as it is conditional on GLIBC.

For 4.9 the cherry-pick needed some manual adjustment and also required
commit ef2c3e76d98dfb69a46d870b47656e8e5bac6e2b ("perf jit: Avoid returning
garbage for a ret variable")

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-06-15 10:39:32 -07:00
Rolf Neugebauer
45938186df kernel: Use the alpine base image to compile the kernel
Also add additional tools and libraries useful/needed for
compiling some of the ./tools in the kernel source.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-06-15 10:39:32 -07:00
Marcus van Dam
6df0fd616c
Enabling USB drivers on the 4.4.x, 4.9.x and 4.11.x kernels
Signed-off-by: Marcus van Dam <marcus@marcusvandam.nl>
2017-06-15 08:24:28 +02:00
Justin Cormack
d5ee981a0a re-enable CONFIG_BUG_ON_DATA_CORRUPTION on 4.11 kernel
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-06-12 14:44:20 +02:00
Rolf Neugebauer
477435f42b kernel: Update to 4.11.4/4.9.31./4.4.71
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-06-07 22:27:16 +01:00
Nico Di Rocco
f9da106c46 Add tg3 module for Broadcom NIC support
Signed-off-by: Nico Di Rocco <dirocco.nico@gmail.com>
2017-06-06 20:55:36 +02:00
Rolf Neugebauer
8d0182e17c kernel: Update to 4.11.3/4.9.30/4.4.70, remove 4.10.x
4.10.x has been EOLed. Remove it from the build and tests.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-05-30 12:32:09 +01:00
Rolf Neugebauer
6f394920a7 kernel: Update to 4.11.2/4.10.17/4.9.29/4.4.69
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-05-22 13:59:03 +01:00
Rolf Neugebauer
fbea0d9fd0 kernel: Remove toybox from kernel Dockerfile
You cna extract/inspect the contents with 'docker save' + 'tar'

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-05-18 18:55:22 +01:00
Rolf Neugebauer
e6f2b68419 kernel: Add vmlinux to debug builds
The vmlinux image is the un-stripped kernel image containing
full debug information which is useful for kernel debugging.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-05-17 11:40:56 +01:00
Rolf Neugebauer
4b50134bde kernel: Make the Docker Hub organisation configurable
For local testinf it is useful to store packages under a different
organisation on the hub (or indeed to select a different registry).
This is enabled by making the ORG configurable when calling make.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-05-16 16:28:16 +01:00
Rolf Neugebauer
0f9ec7f1d2 kernel: Update Hyper-V socket patches for 4.11
While testing the patches on Windows we found some issues
which commit d0e6020dd2b25f8880 ("hvsock: fix a race in
hvs_stream_dequeue()") (cherry-picked as 0009) attempts to
fix.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-05-16 16:24:50 +01:00
Rolf Neugebauer
5f5c27cbba kernel: Update to 4.11.1/4.10.16/4.9.28/4.4.68
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-05-15 10:34:02 +01:00
Rolf Neugebauer
5d88623faf kernel: Fix Hyper-V socket support in 4.11 kernels
In order to enable Hyper-V sockets, the CONFIG_HYPERV_VSOCKETS
option must be set. This is different to the older kernel patches.

In order for the Hyper-V socket code to compile, f3dd3f4797652c311df
("vmbus: introduce in-place packet iterator") needed cherry-picking.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-05-09 20:49:24 +01:00
Rolf Neugebauer
a4c95be30a Merge pull request #1785 from rneugeba/kern-v4.11
kernel: Add initial support for the 4.11 kernel
2017-05-08 17:31:52 +01:00
Rolf Neugebauer
d633913c92 kernel: Add initial support for the 4.11 kernel
This add a new version of the Hyper-V socket support based on
https://github.com/dcui/linux/commits/decui/hv_sock/next-20170504

Note, this changes the Linux side API to Hyper-V sockets as the
support is now based on the VMware/virtio socket implementation.
This means that the Address Family and the addressing changes.

Other patches from the 4.10 kernel are no longer needed as they
were already upstream.

The new Hyper-V socket code has not been tested, but the kernel
boots fine on HyperKit and Hyper-V.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-05-08 17:12:00 +01:00
Rolf Neugebauer
f0e289439f kernel: Update to use new toybox image
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-05-08 16:46:47 +01:00
Rolf Neugebauer
0a3cb6d8ce kernel: Update to 4.4.67/4.9.27/4.10.15
Note, the bugfix for the memory leak on a missing disk on Hyper-V
has been incorporated into 4.9 and 4.10 so has been removed from
our patch queue.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-05-08 10:39:09 +01:00
Rolf Neugebauer
566bb2a1f0 kernel: Update to 4.4.66/4.9.26/4.10.14
This also adds the cherry-picked commit f1c635b439a5c017 ("scsi: storvsc: Workaround
for virtual DVD SCSI version") from 4.11 for the 4.9 and 4.10 kernels. This commit
fixes a crash/memory leak on Hyper-V when no disk drives are attached and if one
boots of a CD-ROM drive.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-05-04 10:58:32 +01:00
Rolf Neugebauer
ffc0ed6a7c kernel: Fix kernel header build
Add more files to 'kernel-dev.tar' to enable building kernel
modules against the kernel.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-05-03 16:46:12 +01:00
Rolf Neugebauer
c9a123ba54 kernel: Update to 4.4.65
The 4.9 and 4.10 series did not get updates

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-05-02 15:20:04 +01:00
Rolf Neugebauer
f44421042e kernel: Fix DEBUG builds and add default debug targets/images
Building debug kernels (with additional run time checks and debugging)
was broken a few commits back. This adds back support for building debug
kernels.

In addition, it builds and uploads debug kernels for selected kernel
series (4.9.x LTS and latest stable). The tag for these kernels has
a "_dbg" suffix.

Update documentation.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-05-02 14:17:01 +01:00
Rolf Neugebauer
5ab5f31e14 kernel: Simplify/restructure Dockerfile
- Use a RUN command per artefact created
- Use WORKDIR to avoid "cd /linux" on every RUN command
- Copy all relevant build artefacts to /out
- Only create one additional layer in final stage
- Add System.map to output image

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-05-02 10:33:45 +01:00
Justin Cormack
6155e8c8bc Change to use kernel not bzImage everywhere
Previously we hardcoded `bzImage` which is not used for all
use cases or architectures.

fix #1630

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-04-28 16:24:15 +01:00
Rolf Neugebauer
14b92b363a kernel: Update to 4.4.64/4.9.25/4.10.13
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-04-27 08:54:17 +01:00
Rolf Neugebauer
6dcb0c1c97 kernel: Update to 4.4.63/4.9.24/4.10.12
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-04-27 00:43:02 +01:00
Rolf Neugebauer
c2dbeaa932 kernel: Update to 4.4.62/4.9.23/4.10.11
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-04-26 23:38:59 +01:00
Rolf Neugebauer
35045cdb6b docs: Update kernel documentation
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-04-26 22:29:47 +01:00
Rolf Neugebauer
6336022fca kernel: Change the kernel suffix to -linuxkit
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-04-26 22:29:47 +01:00
Rolf Neugebauer
43d981094d kernel: Rework the kernel build
- Use multi-stage builds
- Use a single Dockerfile for all kernels
  Kernel version and series are passed in as arguments
- Use a separate kernel config per kernel version
  These have been copied from kernel_config and ran
  through oldconfig to tidy them up
- Rename patch directories
- Refactor the Makefile to use a template
  - Allows building of all kernels without arguments to make
  - Use git tree hash as the image tag
  - Don't build the image if the tag already exists

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-04-26 22:29:47 +01:00
Justin Cormack
8e71b5624c Merge pull request #1707 from linuxkit/new-kernel-opts
Add additional kernel options
2017-04-26 14:09:43 +01:00
Justin Cormack
8687ade204 Add additional kernel options
- XFS filesystem support, as we plan to support this
- Quota support, as XFS has good support
- NVMe PCI support
- Per file encryption
- Device Mapper support, with main options
- BTRFS support (as a module, as it slows boot otherwise by several seconds).

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-04-26 13:57:45 +01:00
Ian Campbell
20cfa2af2c Switch fallback hostname to linuxkit-* from moby-*
This was missed when things were renamed.

The intention with this code was (apparently) to provide a (pseudo)unique
hostname in the case where something more specific was not provided (e.g. by
DHCP). Make this a little clearer by using '(none)' rather than 'linuxkit' as
the default, in the normal case this will be overwritten by something more
specific and if it isn't we will change it to something somewhat unique derived
from the MAC address (as before). nb: '(none)' is already used by Debian so I
think it is a safe choice as the sentinel value.

The use of both CONFIG_DEFAULT_HOSTNAME and the explicit /etc/hostname from
mkimage.sh is likely to be redundant in some cases, but neither seems to
completely cover all cases so keep both.

Signed-off-by: Ian Campbell <ian.campbell@docker.com>
2017-04-25 14:09:38 +01:00
Thomas Shaw
e5f929a344 Fix link. Cosmetic. 2017-04-21 20:56:18 -05:00
Rolf Neugebauer
648b6a8a57 kernel: Update to 4.10.10/4.9.22/4.4.61
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-04-13 23:32:39 -05:00
Rolf Neugebauer
b8b8307725 kernel: Push kernels to the linuxkit org
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-04-13 18:19:58 -05:00
Tycho Andersen
98666053fa kernel: remove unused makefile line
Going through some unrelated stuff and noticed this.

Signed-off-by: Tycho Andersen <tycho@docker.com>
2017-04-13 15:26:40 -06:00
Rolf Neugebauer
85d6492d5d kernel: Use linuxkit images for compilingi/packaging the kernel
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-04-12 21:28:17 +01:00
Rolf Neugebauer
201f89de74 kernel: Update to 4.10.9/4.9.21/4.4.60
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-04-09 22:50:18 +01:00
Riyaz Faizullabhoy
53a7e096dd Sign and verify kernel image on make push
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2017-04-04 08:33:48 -07:00
Justin Cormack
7cb524029c Add support for AWS ENA network driver
This is a new PV style high performance network driver, added to
4.9 kernel, supporting 20Gb, see
http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/enhanced-networking.html

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-04-03 11:14:34 +01:00
Rolf Neugebauer
43bd19620f kernel: Update to 4.10.8/4.9.20/4.4.59
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-04-03 11:05:10 +01:00
Ian Campbell
80b3f45973 kernel Enable support for RTL8139 NIC
This is the default NIC provided by virt-install, I think it is also pretty
common on other virtualisation platforms since both the drivers and the
emulation are pretty widespread (IIRC Xen HVM guests used to get this by
default, and may still do).

Personally I'd probably try and remember to switch to virtio (or even e1000) in
preference, but that's one more thing to do.

Bump the image number.

Signed-off-by: Ian Campbell <ian.campbell@docker.com>
2017-03-31 15:54:27 +01:00
Ian Campbell
5e293f8479 kernel: Rerun make oldconfig on default kernel config
... and accept the defaults. Doing so enables some hw monitoring on Intel
(which enables some I2C thing) and explicitly disables a few Mellanox options.

Signed-off-by: Ian Campbell <ian.campbell@docker.com>
2017-03-31 15:54:22 +01:00
Rolf Neugebauer
87c4092b26 kernel: Add patches to fix VMBus channel ID re-use
On some hv_sock workloads which quickly open/close many connections
occasionally, channel IDs would get re-used while still having work
pending. This can cause a kernel crash on a NULL pointer exception.

The three patches added to the 4.9.x and 4.10.x kernels fixes
these bugs. The patches are being prepared to be upstreamed, but for
now we cherry-picked them from the developers tree.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-03-30 10:54:05 +01:00
Rolf Neugebauer
730e11757c kernel: Update to 4.4.58/4.9.19/4.10.7
The 4.9.19/4.10.7 kernels include the fix for the VMBus
memory leak, so we don't need to carry these patches anymore.

The patches against 4.9.x/4.10.x now also all have added a
"Origin" line pointing to the git tree the patches were cherry
picked from.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-03-30 10:29:50 +01:00
Ian Campbell
a83ecd1d45 Enable CONFIG_PRINTK_TIME
This adds a timestamp to the start of the kernel command line. Like this (from
a random system I have lying around, line truncated by me):
[    0.000000] tsc: Detected 2665.038 MHz processor
[    0.000021] Calibrating delay loop (skipped), value calculated using tim...
[    0.000023] pid_max: default: 32768 minimum: 301
[    0.000041] ACPI: Core revision 20160831
[    0.003782] ACPI: 2 ACPI AML tables successfully acquired and loaded

This would be handy in relation to #1403.

Signed-off-by: Ian Campbell <ian.campbell@docker.com>
2017-03-28 14:54:13 +01:00
Rolf Neugebauer
d10a41a70a kernel: Update to 4.9.18/4.10.6/4.4.57
For 4.9.18 and 4.10.6 cherry-picked the VMBus leak fix
from Linus' tree instead of char-misc.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-03-28 13:43:21 +01:00
Justin Cormack
400f4b6c56 Remove syslinux from kernel build deps
Unused. This should not affect anything, and I didnt actually bump
the kernel version; am working on te build in CI for this...

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-03-27 12:17:09 +01:00
Rolf Neugebauer
130e546fcf kernel: Update kernel to 4.4.45/4.9.17/4.10.5
In 4.10.5 and 4.9.17 include a fix for the VMBus memory leak,
cherry-picked from char-misc: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git/commit/?h=char-misc-linus&id=5e030d5ce9d99a899b648413139ff65bab12b038

This patch was tested with the 4.10.5 kernel and the Hyper-V
Socket stress test. It was forwarded to stable@vger to be
included in one of the next stable releases.

Also remove the CPU ACCT revert as 17.03.1-rc1 is out and has a fix

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-03-23 17:20:30 +01:00
Rolf Neugebauer
e671d4664f kernel: Add initial support for 4.10.x kernels
Note, this also removes the LTS4.4 build options and replaces
it with a KERNEL= build option to select the kernel to build.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-03-20 13:50:27 +00:00
Rolf Neugebauer
56bb8a0617 kernel: Update kernel to 4.9.16/4.4.55
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-03-20 10:36:26 +00:00
Rolf Neugebauer
0dc52bb387 kernel: Remove remaining AUFS bits
Commit c3fc6faa35 removed AUFS support bit missed the kernel
config and a mentioned in the main Makefile.

This commit removes these also.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-03-19 08:53:40 +00:00
Anil Madhavapeddy
778236fb39 kernel: activate the Mellanox network driver suite
This builds a family of drivers for various Mellonox
cards, sufficient to get a DHCP lease on packet.net
Type2/3 machines (see #1245).

Signed-off-by: Anil Madhavapeddy <anil@docker.com>
2017-03-17 16:10:30 +00:00
Justin Cormack
3de1be069b Merge pull request #1314 from avsm/kernel-docs
Update Kernel README
2017-03-15 18:49:58 +00:00
Anil Madhavapeddy
8f5e7eb2e9 docs: More updates to the kernel README
Signed-off-by: Anil Madhavapeddy <anil@docker.com>
2017-03-15 17:26:47 +00:00
Anil Madhavapeddy
8a8495e86f docs: Update kernel/README to point to ../docs
Signed-off-by: Anil Madhavapeddy <anil@docker.com>
2017-03-15 15:24:57 +00:00
Rolf Neugebauer
158db9950d kernel: Make 'tag' the default target
This is a stop-gap to prevent accidental push of kernel
images to hub until we sort out doing this from CI.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-03-15 14:31:27 +00:00
Anil Madhavapeddy
38b2fff68b kernel: add igb and ixgb drivers, with vf variants
This lets us boot on packet.net machines and successfully gives
a DHCP lease when installed via iPXE.  See #1245

Signed-off-by: Anil Madhavapeddy <anil@docker.com>
2017-03-15 14:13:54 +00:00
Rolf Neugebauer
a1a45db3d5 kernel: Update kernels to 4.9.15/4.4.54
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-03-15 10:32:24 +00:00
Rolf Neugebauer
7185191736 kernel: Add the kernel version to the hub image
A given image is pushed to hub twice, once as
kernel:<kernel version>.<major version>.x and once as
kernel:<kernel version>.<major version>.<minor version>-<n>.

The latter is used to decide if a new kernel image is pushed to hub.

Most users should use the former to pick up the latest kernel.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-03-14 10:54:01 +00:00
Rolf Neugebauer
a968fcde4d kernel: Remove AUFS kernel
We default to overlay, so no need to carry AUFS patches and kernel.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-03-14 10:51:52 +00:00
Rolf Neugebauer
54cb00edd8 kernel: Pass kernel version as build-arg to docker
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-03-13 20:15:13 +00:00
Rolf Neugebauer
7020a2d975 kernel: Add Makefile to kernel build dependencies
This will also include it in the sha1 calculation

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-03-13 20:15:13 +00:00
Rolf Neugebauer
1c10c56138 kernel: Update to 4.9.14/4.4.53
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-03-13 10:26:28 +00:00
Justin Cormack
edeaf1c7f6 Add back code to push kernel to hub
- Accidentally removed from top level Makefile, now in kernel Makefile.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-03-07 23:48:46 +00:00
Rolf Neugebauer
1041f95a6e kernel: Update 4.9.x patches
- Remove patch to prevent non-host network namespace to use VSOCK
  This is now handled by SECOMP profiles by docker
- rebase the VMBUS version cherry-picks to Linus' tree.
  This will make it easier to get them into stable

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-03-07 14:04:53 +00:00
Riyaz Faizullabhoy
e24c8098ff kernel: Update kernel to 4.9.13 and 4.4.52
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2017-02-28 08:11:07 -08:00
Rolf Neugebauer
e3502065d9 kernel: Update kernel to 4.4.51
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-02-27 13:55:53 -08:00
Rolf Neugebauer
90895783c0 kernel: Update kernel to 4.9.12
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-02-27 13:49:47 -08:00
Justin Cormack
f4a112dc21 Change kernel upload for new tooling
The mobylinux/kernel image now has the bzImage (no longer named vmlinuz64)
and a tarball of the files needed for the initrd, ie modules etc.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-02-20 15:54:02 +00:00
Justin Cormack
5af24d0d8f Kernel 4.9.11, 4.4.50 and AUFS update
Security update, importance low.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-02-20 12:15:39 +00:00
Justin Cormack
c6cfa0e4d3 Clean up kernel Makefile so it has no repetition
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-02-17 17:43:35 +00:00
Ian Campbell
31cf45bfc3 Revert "sched/cpuacct: Show all possible CPUs in cpuacct output" in 4.9 kernel
This change (5ca3726 added in v4.7-rc1) exposed issues described in
https://github.com/docker/docker/issues/28941, since we don't support CPU
hotplug anyway revert the change while we decide on a proper fix.

Signed-off-by: Ian Campbell <ian.campbell@docker.com>
2017-02-17 13:19:18 +00:00
Justin Cormack
0b5cad4f14 Update Linux 4.4 to 4.4.49
Security update, low importance.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-02-16 08:47:52 +00:00
Rolf Neugebauer
6396ecdeee kernel: Update to 4.9.10
4.9.10 included several of the VMBus patches we no longer
need to carry.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-02-15 16:50:31 +00:00
Riyaz Faizullabhoy
4daa3b5c88 Bump kernel config test and revert IA32_EMULATION
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2017-02-13 11:38:14 -08:00
Riyaz Faizullabhoy
87b4688923 Harden kernel config with page poisoning, randomized mem, disabling ia32 and ldt syscall modification
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2017-02-13 10:13:48 -08:00
Riyaz Faizullabhoy
331719f098 Bump kernel config to 4.9.8
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2017-02-13 10:13:48 -08:00
Justin Cormack
e25ee0b142 alpine-build-c is only used for kernel builds so rename
Also remove some unecessary packages.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-02-13 16:59:38 +00:00
Justin Cormack
dc8b41eb3f Update kernel to 4.9.9, 4.4.48
Security update, severity low.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-02-13 11:13:34 +00:00
Rolf Neugebauer
5af19ac52b kernel: Rebase kernel patches proper
Regenerate the kernel patches from
https://github.com/rneugeba/linux-stable/

Note, the last two 4.9 patches are no properly
cherry-picked from linux-next. We previously had
0011-Drivers-hv-vmbus-Use-all... from an email.
0012-Drivers-hv-Log-the... is new, but may further aid
debugging version mismatch issues.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-02-06 17:57:26 +00:00
Riyaz Faizullabhoy
46fde10eaf Update kernel to 4.9.8 and 4.4.47
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2017-02-06 09:14:35 -08:00
Justin Cormack
2470af59a0 Update aufs to 20170206
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-02-06 11:57:30 +00:00
Justin Cormack
3f81edee37 Move kernel directory to top level
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-02-04 09:17:16 +01:00
Justin Cormack
70d8143e48 move kernel under rest of build and pull through aufs tools
Signed-off-by: Justin Cormack <justin.cormack@unikernel.com>
2015-12-17 15:26:42 +00:00
Justin Cormack
fdeb106f3a Build aufs support
Signed-off-by: Justin Cormack <justin.cormack@unikernel.com>
2015-12-17 13:51:43 +00:00
Justin Cormack
b7a7a2e850 tweak kernel config
Signed-off-by: Justin Cormack <justin.cormack@unikernel.com>
2015-12-11 17:44:22 +00:00
Justin Cormack
d89b06a71f slim down kernel config some more; make it support modules, but not ship with any
Signed-off-by: Justin Cormack <justin.cormack@unikernel.com>
2015-12-11 15:43:14 +00:00
Justin Cormack
5e5e4b5549 fix kernel make clean
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2015-12-10 23:49:18 +00:00
Justin Cormack
8693ca9c64 remove -i option since pinata fixed
Signed-off-by: Justin Cormack <justin.cormack@unikernel.com>
2015-12-09 15:48:09 +00:00
Justin Cormack
a9b3c89290 more gitignore files
Signed-off-by: Justin Cormack <justin.cormack@unikernel.com>
2015-12-09 15:35:59 +00:00
Justin Cormack
33056820a4 Add a (non modular) upstream kernel build, for pinata alpha and general testing
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2015-12-02 10:17:51 +00:00