Commit Graph

202 Commits

Author SHA1 Message Date
Riyaz Faizullabhoy
a1b6171677 Update to 4.9.4 and 4.4.43
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2017-01-16 16:59:31 +00:00
David Sheets
2da133ab9a linux: patch fuse to fix a dcache timeout bug
Introduced in torvalds/linux@bcb6f6d2b9 to
check that nsec values are sane, a max was used where a min should have
been.

Fixes #923.

Signed-off-by: David Sheets <dsheets@docker.com>
2017-01-13 16:59:36 +00:00
Justin Cormack
c1786ecfdd Update to Linux 4.9.3 and 4.4.42
- security update, severity low.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-01-12 20:08:10 +00:00
Justin Cormack
cb44fd12cd Merge pull request #987 from justincormack/reinstate-4.4
Reinstate 4.4 support
2017-01-12 11:18:14 +00:00
Justin Cormack
c73d6f1721 Add an LTS 4.4 kernel
This is the same as aufs variant, but without AUFS patches. Looks like
GCP may need this, at least initially.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-01-12 09:47:32 +00:00
Rolf Neugebauer
aa885f3bb3 kernel: update kernel patches
On older Windows builds (e.g. 10586) the 4.9.x TimeSync integration
service spams the logs with multiple messages a second of the form:
hv_utils: Using TimeSync version 4.0

It seems that a new protocol version was introduced with newer
Windows 10 builds but the kernel patches don't negotiate the
protocol version based on what the host supports, but instead
simply use the Windows version of the host.

Added two new patches:
- the first one is a cherry-pick from upstream which fixes some
  of the TimeSync protocol negotiation, but does not fix the issue.
- the second one forces the TimeSync protocol to version 3.0 even on
  Windows 10 hosts.

Patches based on: https://github.com/rneugeba/linux-stable/tree/v4.9.2-moby

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-01-12 00:14:23 +00:00
Justin Cormack
4996ec700c Backport transparent binfmt_misc to 4.4
As we released this in the beta channel, and it is a nice feature that our users love,
backporting this to 4.4 so we don't have to revert it or conditionally behave differently.

This is upstream Linux commits
- 9a08c352d05305ca7651540c3b107da1e4e1f40b fs: add filp_clone_open API
- 948b701a607f123df92ed29084413e5dd8cda2ed binfmt_misc: add persistent opened binary handler for containers

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-01-11 16:09:37 +00:00
Justin Cormack
3358f57891 Reinstate Linux 4.4 LTS series support
- Add back Linux kernel 4.4.x support, only for AUFS at present.
- Add back config options that are different for 4.4 series

See #923 for discussion on whether we need to do this.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-01-11 16:08:14 +00:00
Justin Cormack
4fc616491a Update to Linux 4.9.2
- security update, priority low.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-01-09 15:59:04 +00:00
Justin Cormack
c77fabb9da Merge pull request #960 from justincormack/no-kernel-workdir
Do not set WORKDIR in kernel builds
2017-01-06 18:29:46 +00:00
Justin Cormack
1a13a90f16 Do not set WORKDIR in kernel builds
This is a temporary workaround for https://github.com/docker/docker/issues/29950
which has broken caching and therefore is very annoying for development, but we
don't really need to set it, so it can stay...

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-01-06 18:03:09 +00:00
Justin Cormack
6dd377145d Update kernel to 4.9.1
This has various security updates which do potentially affect
containerised application security see
https://cdn.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.9.1

estimated medium severity.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-01-06 18:02:06 +00:00
Riyaz Faizullabhoy
97040931c3 Set CONFIG_UBSAN, add to grep test
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2017-01-05 09:03:21 -08:00
Justin Cormack
f034ae66aa Merge pull request #941 from rneugeba/kern-up
kernel: properly update 4.9 patches
2017-01-04 15:09:59 +00:00
Rolf Neugebauer
4e252c524a kernel: properly update 4.9 patches
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-01-04 13:50:05 +00:00
Justin Cormack
e955457195 Add a kernel-dev tarball with kernel headers
These headers are needed for defining kernel probes etc, tested with
eBPF. Could also be used for perf, building kernel modules etc. Saved
to the media tarball at present, may add to base image or container.

Also rationalise the paths in the headers tarball a little to match.

Will add an eBPF container using these later.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-01-04 12:10:30 +00:00
Justin Cormack
309e2e2872 Add the additional bpf options to kernel config
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-12-28 21:29:07 +00:00
Justin Cormack
9cab656fc8 Merge pull request #932 from justincormack/alpine-3.5
Update base images to Alpine 3.5
2016-12-28 19:58:59 +00:00
Justin Cormack
00b3924067 Update base images to Alpine 3.5
excludes
- Go base images as not yet available
- perf which does not build with latest image

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-12-28 18:09:08 +00:00
Riyaz Faizullabhoy
c6222bdba6 Edit kernel_config to include some KSPP recommendations
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2016-12-22 10:00:22 -08:00
Riyaz Faizullabhoy
62b42b7814 Bump kernel config for 4.9
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2016-12-22 10:00:22 -08:00
Justin Cormack
90c375a044 Update AUFS kernel to 4.9
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-12-21 21:59:07 +00:00
Rolf Neugebauer
0c38fd266e build: update packages to new alpine-build-c base
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2016-12-16 16:21:39 +00:00
Justin Cormack
a7f6bba295 Use exact build context for kernel build
Saves passing too much context, less error prone and should
mean builds are faster if not clean, consistent with elsewhere.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-12-15 11:27:41 -08:00
Justin Cormack
136b7e38d6 Merge pull request #892 from justincormack/kernelup
Update AUFS kernel to 4.8.15
2016-12-15 10:54:12 -08:00
Justin Cormack
64ae794897 Create all directories for kernel
Non AUFS kernels do not create `sbin/` and `/usr` directories as they
do not provide the AUFS directories. Just create empty directories to
avoid a warning.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-12-15 10:26:00 -08:00
Justin Cormack
3cb41448c7 Update AUFS kernel to 4.8.15
- minor update

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-12-15 10:13:01 -08:00
Justin Cormack
ac15af0396 Merge pull request #836 from justincormack/yama
Add Yama LSM
2016-12-14 17:49:27 -08:00
Justin Cormack
2b92b100ea Add Yama LSM
Default config is restricted ptrace, processes can only ptrace
related processes, such as child processes, rather than any process
with the same uid.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-12-14 17:04:36 -08:00
Justin Cormack
42e45bd3b2 Tweak kernel networking options
In 4.9 IPVLAN support needs NET_L3_MASTER_DEV to work.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-12-14 16:41:12 -08:00
Justin Cormack
5567606fd0 Make AUFS optional and ship choice of kernels
This seems the best option, although none are great

- build with `make AUFS=1` to build with AUFS support, currently with 4.8 kernel
- default is to build without AUFS support, with 4.9 kernel

This recognises that AUFS supprot is temporary #620 and only there until
we can phase it out on desktop editions, and allow the other editions that
never shipped with AUFS to ship something very close to mainline.

However we do still apply the patches so that the non AUFS branch runs fine on
all platforms, so it can be tested elsewhere.

We may be able to move the kernel versions back in line when 4.9 aufs support is out.

Plan is to shift CI to build both sets of images, and get the Desktop editions to
pick up the aufs set automatically, once this is merged.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-12-13 18:23:45 -08:00
Justin Cormack
2f558885f0 Kernel scanning now fixed, only needs vmlinuz64
- The scanning process was not ignoring the kernel extraversion before,
so was only sometimes picking up issues.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-12-12 09:54:02 -08:00
Justin Cormack
4aa8cffb13 Update to Linux 4.8.14
Includes fix for CVE-2016-8655 Linux af_packet.c race condition.

This gives a container escape with default container capabilities.

This now has the slow network namespace patch backported, so this
is removed.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-12-10 16:18:47 -08:00
Riyaz Faizullabhoy
a470b655d1 Set CONFIG_LEGACY_VSYSCALL to NONE and vsyscall=emulate
Regenerated the kernel config from container, which bumped the kernel
version and included some other fixes.  Also bumps the check-config
container to check for VSYSCALL_NATIVE

Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2016-12-09 12:09:35 -08:00
Justin Cormack
15522201ea Keep kernel headers from build
Also upload some kernel artefacts to a private repo at mobylinux/kernel on Hub for scanning.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-12-08 17:32:59 -08:00
Riyaz Faizullabhoy
2e8a6143dd Disable kexec from kernel_config, revert sysctl config because key is now unknown
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2016-12-07 11:43:10 -08:00
Justin Cormack
9352523bdb Update to Linux 4.8.12
- security update

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-12-02 14:12:06 +00:00
Riyaz Faizullabhoy
8b7cdd41dc Use digests instead of tags where possible
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2016-12-01 09:39:02 -08:00
Justin Cormack
12322d362c Update to Linux 4.8.11
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-11-28 15:00:20 +00:00
Rolf Neugebauer
df67417538 kernel: update/fix patches for 4.8.10
In particular 8e0e003b50
seem to have remove the net/Kconfig changes

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2016-11-21 21:37:05 +00:00
Justin Cormack
994eeadb1c Merge pull request #761 from ijc25/kernel-patch-whitespace
Fixup kernel patch whitepace
2016-11-21 15:20:57 +00:00
Justin Cormack
a08e06bc44 Upgrade Linux to 4.8.10
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-11-21 15:03:48 +00:00
Ian Campbell
8e0e003b50 Fixup kernel patch whitepace
Some of git's whitespace fixup option corrupts the patches by (at least)
stripping trailing spaces (which are present for empty lines in context) and
changing leading <space><tab> into just <tab>. `patch(1)` used by the build
here seems to tolerate this, but `git am` and/or `git apply` do not.

Fix this up by running git am and at each failure point (i.e. every patch)
applying the relevant patch using `patch(1)` (which works because `git am` was
unable to even partially apply the patches) before regenerating the whole lot
with `git format-patch`.

Signed-off-by: Ian Campbell <ian.campbell@docker.com>
2016-11-21 11:43:48 +00:00
Justin Cormack
b8dbdaaf8a Update Linux to 4.8.9
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-11-19 22:37:22 +00:00
Justin Cormack
88eafcc239 update c build base image
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-11-18 23:32:47 +00:00
Rolf Neugebauer
a804ac8399 kernel: limit number of CPUs to 128
128 CPUs seems plenty for now and it allows for the
debug kernels to boot on Hyper-V without modifications. It may
also have the added benefit of reducing some data structures
allocated per CPU (in particular for Debug kernels).

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2016-11-18 16:36:23 +00:00
Justin Cormack
444e01d703 Make oldconfig for 4.8.8 kernel
Most new options disabled, a few picked.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-11-18 13:46:29 +00:00
Rolf Neugebauer
c782a2244e kernel: update to 4.8.8
This removes all the patches which have been upstreamed since 4.4.x
and only leaves patches for a minor fix to AF_VSOCK, the Hyper-V socket patch
and a new patch for fixing delays on creating netns with tunnel interfaces.

The latter has been accecpted into the upstream netdev branch and will
likely appear in 4.9.0 and we can cherry pick from there then.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2016-11-18 12:58:17 +00:00
Justin Cormack
9480827b98 Disable EFI framebuffer
Azure only uses the Hyper-V framebuffer, so we should not need this.

Simplify setup for graphics options we are not using.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-11-16 10:42:19 -05:00
Justin Cormack
b20125d3ab Update to Linux 4.4.32
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-11-15 10:27:18 +00:00