Commit Graph

178 Commits

Author SHA1 Message Date
Justin Cormack
e7b9428589 set -j on kernel build again
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-10-11 16:27:55 +01:00
Justin Cormack
18a55e64f5 Merge pull request #601 from justincormack/ipsec
Add more network and crypto modules including enough for ipsec
2016-10-11 16:26:04 +01:00
Justin Cormack
cfbdc7d067 do not remove build containers
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-10-11 16:12:40 +01:00
Justin Cormack
c66ce62266 Add more network and crypto modules including enough for ipsec
CRYPTO_ECHAINIV took the longest to find, which is needed.

Fix #598

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-10-11 16:04:05 +01:00
Justin Cormack
a68ad29880 Update Linux to 4.4.24
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-10-08 13:48:29 +02:00
Justin Cormack
8de1b3d040 update kernel to 4.4.23
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-10-01 21:03:47 +01:00
Justin Cormack
e1454f0249 add ncurses to C build for menuconfig
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-10-01 18:26:38 +01:00
Justin Cormack
fa19d3259b Use build container id rather than tagging builds
This means that multiple builds will not conflict, so we can
remove the lock from the CI. Also quieter when no errors.

Some still left to do, only done the ones used in build and CI
initially. Some of the others will be cleaned up anyway later.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-09-29 20:21:17 +01:00
Justin Cormack
0214c41ff3 Use patched aufs-utils so can compile kernel with alpine
This is going to be submitted upstream.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-09-29 16:17:46 +01:00
Justin Cormack
a80281b5e9 Update Linux kernel to 4.4.22
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-09-26 00:01:53 +01:00
Rolf Neugebauer
593d3f907e linux: update kernel to 4.4.21
- removed some Hyper-V patches which were picked up
  between 4.4.20 and 4.4.21
- udate aufs

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2016-09-19 18:20:28 +01:00
Justin Cormack
b1c0981634 Merge pull request #510 from justincormack/nolog
No log driver for large copies
2016-09-14 12:35:25 +01:00
Ian Campbell
81b86d111a kernel: Replace vsock email series with upstream patches
The vsock patches were merged into mainline in v4.8-rc1, replace the patches
based on the email posting with cherry-picks. The patches appear identical so
the only change here is to the annotation of the origin which now references an
upstream commit instead of a message-id.

Add one new upstream patch b226acab2f6a "VSOCK: Use kvfree()"

Signed-off-by: Ian Campbell <ian.campbell@docker.com>
2016-09-14 10:03:10 +01:00
Ian Campbell
8c015fd22c kernel: Update vsock patches to RFC v6
Series is at <1469716595-13591-1-git-send-email-stefanha@redhat.com>.

This corresponds to v7 of the spec, posted in
<1470324277-19300-1-git-send-email-stefanha@redhat.com>

Also add a "cherry-picked from" to the "vsock: make listener child lock
ordering explicit" patch and move it to the head of the series with the other
vsock backports.

Finally backport three new upstream fixes:
3fda5d6e5801 vhost/vsock: fix vhost virtio_vsock_pkt use-after-free
28ad55578b8a virtio-vsock: fix include guard typo
21bc54fc0cdc vhost/vsock: drop space available check for TX vq

These were made on top of the version of the vsock patches which were added to
Linux master in v4.8-rc1. This commit is based on the email posting, will
replace with with proper cherry-pick separately.

Requires corresponding backend changes in Hyperkit

Signed-off-by: Ian Campbell <ian.campbell@docker.com>
2016-09-14 10:03:10 +01:00
Justin Cormack
72a2e4b90f No log driver for large copies
Takes 75% of the time without logs.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-09-14 09:05:36 +01:00
Justin Cormack
6c0a0bf2fe fix kernel build missing arch
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-09-13 22:30:26 +01:00
Justin Cormack
a0b1153d93 Rework kernel Makefile
Do not delete build container on `make clean`, as it should be fine
to reuse cached layers.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-09-13 21:49:14 +01:00
Justin Cormack
654e47ad1c reorder kernel Dockerfile
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-09-13 21:15:34 +01:00
Justin Cormack
955aad6276 Use a random tag for Debian kernel build base
To store all the old images they need a different tag, so use a
random one.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-09-12 16:36:01 +01:00
Justin Cormack
35070c03f7 Use a base image for building kernel
As we do not have a simple way to hash Debian, use the Docker
sha256 until we switch to Alpine.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-09-12 16:36:01 +01:00
Justin Cormack
91fbb9c245 revert to debian for kernel build
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-09-12 16:36:01 +01:00
Justin Cormack
b392bf0a2e Simplify kernel output and main Dockerfile
Signed-off-by: Justin Cormack <justin@specialbusservice.com>
2016-09-12 16:02:07 +01:00
Justin Cormack
30275af07e Update kernel and aufs
- kernel 4.4.20
- aufs 20160905

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-09-07 22:51:51 +01:00
Justin Cormack
4b4f133620 remove arm dtb now we no longer build arm kernel
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-08-31 16:51:03 +01:00
Justin Cormack
07bf4888c1 quieter kernel build
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-08-31 15:53:16 +01:00
Justin Cormack
69f290d28f Remove support for arm kernel build
See #449. Plan is to use upstream Alpine kernel for Arm, as
does not need vsock, hvsock or aufs.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-08-31 14:23:40 +01:00
Justin Cormack
e643a4b758 Unlimit max CPU cores in config
See https://github.com/docker/for-win/issues/59

Even on desktop we have users with more than 8 cores!

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-08-25 09:32:23 +01:00
Justin Cormack
3628e60d54 Update build containers to Ubuntu 16.10
Should update to Alpine in future.

Signed-off-by: Justin Cormack <justin@specialbusservice.com>
2016-08-23 19:53:11 +01:00
Justin Cormack
32acad99a7 Update kernel and aufs
- Linux 4.4.19
- AUFS 20160822

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-08-22 11:05:07 +01:00
David Sheets
296d1e10c7 kernel: apply debug configuration to all kernels
Signed-off-by: David Sheets <dsheets@docker.com>
2016-08-10 17:08:07 +01:00
David Sheets
661c19649a kernel: add a Makefile DEBUG variable and a kernel_config for debugging
Signed-off-by: David Sheets <dsheets@docker.com>
2016-08-10 17:07:48 +01:00
Justin Cormack
55e15928ff Update kernel and aufs
- Linux 4.4.17
- AUFS 20160808

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-08-10 15:03:36 +01:00
Justin Cormack
e30cb91bce Update kernel to 4.4.16
This contains a lot of fixes for overlay.

Fix #374

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-07-29 16:21:24 +01:00
Natanael Copa
66ba586cac Move built kernel to arch specific subdir
We want be able to build kernels for different archs without that they
clash with each other so we but the generated files into an $arch subdir.

Signed-off-by: Natanael Copa <natanael.copa@docker.com>
2016-07-25 17:18:02 +02:00
Justin Cormack
4c68383d56 Remove some VMWare devices
In particular vsock causes issues with virtio vsock

We are not supporting VMWare platform at present so not relevant..

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-07-25 14:23:24 +01:00
Justin Cormack
993237bdcf Add default SCSI device used by VMWare Fusion
As this is the default emulation, nicer to have it work.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-07-22 13:41:45 +01:00
Justin Cormack
79076c4fbd Add VMWare kernel features
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-07-22 12:54:20 +01:00
Justin Cormack
ebca732d3d typo
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-07-21 13:41:56 +01:00
Justin Cormack
3dbf3280d5 Merge pull request #317 from dsheets/kernel-af_vsock-lockdep
kernel: backport af_vsock lockdep cleanliness patch from v4.7-rc6
2016-07-20 16:27:33 +01:00
David Sheets
ed0630dcf6 kernel: backport af_vsock lockdep cleanliness patch from v4.7-rc6
From torvalds/linux@4192f672fa which was
part of torvalds/linux@v4.7-rc6. The change is purely to ensure that vsock
is lockdep-clean.

Signed-off-by: David Sheets <dsheets@docker.com>
2016-07-20 16:22:21 +01:00
David Sheets
473765c04b kernel: apply the AUFS patch to integrate with lockdep
AUFS introduces new lockdep relations which are beyond the maximum variants
that lockdep ships with. Without this patch, AUFS triggers lockdep BUG sanity
checks and disables lockdep for the rest of the system.

The present value of the patch is:

```diff
aufs4.4 lockdep patch

diff --git a/include/linux/lockdep.h b/include/linux/lockdep.h
index c57e424..4153563 100644
--- a/include/linux/lockdep.h
+++ b/include/linux/lockdep.h
@@ -29,7 +29,7 @@ extern int lock_stat;
  */
 #define XXX_LOCK_USAGE_STATES		(1+3*4)

-#define MAX_LOCKDEP_SUBCLASSES		8UL
+#define MAX_LOCKDEP_SUBCLASSES		(8UL + 4)

 /*
  * NR_LOCKDEP_CACHING_CLASSES ... Number of classes
@@ -203,7 +203,7 @@ struct lock_chain {
 	u64				chain_key;
 };

-#define MAX_LOCKDEP_KEYS_BITS		13
+#define MAX_LOCKDEP_KEYS_BITS		(13 + 3)
 /*
  * Subtract one because we offset hlock->class_idx by 1 in order
  * to make 0 mean no class. This avoids overflowing the class_idx
diff --git a/kernel/locking/lockdep_internals.h b/kernel/locking/lockdep_internals.h
index 51c4b24..fba7557 100644
--- a/kernel/locking/lockdep_internals.h
+++ b/kernel/locking/lockdep_internals.h
@@ -54,9 +54,9 @@ enum {
  * table (if it's not there yet), and we check it for lock order
  * conflicts and deadlocks.
  */
-#define MAX_LOCKDEP_ENTRIES	32768UL
+#define MAX_LOCKDEP_ENTRIES	(32768UL << 5)

-#define MAX_LOCKDEP_CHAINS_BITS	16
+#define MAX_LOCKDEP_CHAINS_BITS	(16 + 5)
 #define MAX_LOCKDEP_CHAINS	(1UL << MAX_LOCKDEP_CHAINS_BITS)

 #define MAX_LOCKDEP_CHAIN_HLOCKS (MAX_LOCKDEP_CHAINS*5)
@@ -65,7 +65,7 @@ enum {
  * Stack-trace: tightly packed array of stack backtrace
  * addresses. Protected by the hash_lock.
  */
-#define MAX_STACK_TRACE_ENTRIES	524288UL
+#define MAX_STACK_TRACE_ENTRIES	(524288UL << 5)

 extern struct list_head all_lock_classes;
 extern struct lock_chain lock_chains[];
```

Signed-off-by: David Sheets <dsheets@docker.com>
2016-07-20 16:08:00 +01:00
David Sheets
1b43354bcb kernel: make sure to gitignore vmlinux
Signed-off-by: David Sheets <dsheets@docker.com>
2016-07-20 15:40:54 +01:00
David Sheets
25f3d06b7b kernel: add vmlinux target to make kernel debugging easier
With this patch, it is easy to get an unstripped kernel object to use with
gdb.

Signed-off-by: David Sheets <dsheets@docker.com>
2016-07-20 15:37:04 +01:00
Natanael Copa
907d1f8c0c improve kernel build makefile
- create an empty dummy file to indicate that docker image is built
- reuse same make rule to extract the different files from docker image
- make sure that we remove empty files on failure

This makes build more robust and improves parallelism.

Signed-off-by: Natanael Copa <natanael.copa@docker.com>
2016-07-13 18:03:16 +02:00
Rolf Neugebauer
9d5797cdd3 kernel: Update to 4.4.15
patches from: https://github.com/rneugeba/linux-stable/tree/v4.4.15-moby

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2016-07-12 10:36:57 +01:00
David Sheets
bd33169d49 linux: allow kernel module unloading
The ability to unload kernel modules helps with rapid development of kernel
modules or Moby-integrated functionality. It has no negative side effects
as far as I am aware.

Signed-off-by: David Sheets <dsheets@docker.com>
2016-07-11 11:48:46 -07:00
Justin Cormack
94d603971c Merge pull request #255 from justincormack/e1000
add e1000 drivers, allows qemu default setup to find an ethernet, and…
2016-07-08 16:28:24 +01:00
Justin Cormack
c8b5ffcef0 add e1000 drivers, allows qemu default setup to find an ethernet, and used frequently in emulated environments
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-07-08 16:26:16 +01:00
Rolf Neugebauer
f829fef36b linux: properly update kernel patches to v4.4.14
When we updated from 4.4.10 to 4.4.14 we copied the patches over.
This changeset properly updates the patches so that they apply cleanly.
0039-VSOCK-do-not-disconnect-socket-when-peer-has-shutdow.patch was
removed as it made it into 4.4.14 already.

Compile tested only

For reference the patches were generated from:
https://github.com/rneugeba/linux-stable/tree/v4.4.14-moby

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2016-07-08 16:10:51 +01:00
Justin Cormack
880966311c Updated kernel config
Remove one module, Xen ones not removeable. Make oldconfig.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-07-04 17:03:10 +01:00