mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-09-05 17:02:00 +00:00
Merge pull request #2900 from rn/kern-up
Update kernels to 4.14.16/4.9.79/4.4.114 and add 4.15 kernels
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
kernel:
|
||||
image: linuxkit/kernel:4.9.78
|
||||
image: linuxkit/kernel:4.9.79
|
||||
cmdline: "console=ttyS0"
|
||||
init:
|
||||
- linuxkit/init:e650be6c21ef9ecb33534858fc63fb8bc5028c6e
|
||||
|
@@ -1,5 +1,5 @@
|
||||
kernel:
|
||||
image: linuxkit/kernel:4.9.78
|
||||
image: linuxkit/kernel:4.9.79
|
||||
cmdline: "console=ttyS0"
|
||||
init:
|
||||
- linuxkit/init:e650be6c21ef9ecb33534858fc63fb8bc5028c6e
|
||||
|
@@ -1,5 +1,5 @@
|
||||
kernel:
|
||||
image: linuxkit/kernel:4.9.78
|
||||
image: linuxkit/kernel:4.9.79
|
||||
cmdline: "console=tty0 console=ttyS0 console=ttyAMA0"
|
||||
init:
|
||||
- linuxkit/init:e650be6c21ef9ecb33534858fc63fb8bc5028c6e
|
||||
|
@@ -1,6 +1,6 @@
|
||||
# This is an example for building the open source components of Docker for Mac
|
||||
kernel:
|
||||
image: linuxkit/kernel:4.9.78
|
||||
image: linuxkit/kernel:4.9.79
|
||||
cmdline: "console=ttyS0 page_poison=1"
|
||||
init:
|
||||
- linuxkit/vpnkit-expose-port:v0.2 # install vpnkit-expose-port and vpnkit-iptables-wrapper on host
|
||||
|
@@ -1,5 +1,5 @@
|
||||
kernel:
|
||||
image: linuxkit/kernel:4.9.78
|
||||
image: linuxkit/kernel:4.9.79
|
||||
cmdline: "console=tty0 console=ttyS0 console=ttyAMA0"
|
||||
init:
|
||||
- linuxkit/init:e650be6c21ef9ecb33534858fc63fb8bc5028c6e
|
||||
|
@@ -1,5 +1,5 @@
|
||||
kernel:
|
||||
image: linuxkit/kernel:4.9.78
|
||||
image: linuxkit/kernel:4.9.79
|
||||
cmdline: "console=ttyS0"
|
||||
init:
|
||||
- linuxkit/init:e650be6c21ef9ecb33534858fc63fb8bc5028c6e
|
||||
|
@@ -1,5 +1,5 @@
|
||||
kernel:
|
||||
image: linuxkit/kernel:4.9.78
|
||||
image: linuxkit/kernel:4.9.79
|
||||
cmdline: "console=tty0 console=ttyS0 console=ttyAMA0"
|
||||
init:
|
||||
- linuxkit/init:e650be6c21ef9ecb33534858fc63fb8bc5028c6e
|
||||
|
@@ -1,5 +1,5 @@
|
||||
kernel:
|
||||
image: linuxkit/kernel:4.9.78
|
||||
image: linuxkit/kernel:4.9.79
|
||||
cmdline: "console=tty0 console=ttyS0 console=ttyAMA0"
|
||||
init:
|
||||
- linuxkit/init:e650be6c21ef9ecb33534858fc63fb8bc5028c6e
|
||||
|
@@ -1,5 +1,5 @@
|
||||
kernel:
|
||||
image: linuxkit/kernel:4.9.78
|
||||
image: linuxkit/kernel:4.9.79
|
||||
cmdline: "console=tty0 console=ttyS0 console=ttyAMA0"
|
||||
init:
|
||||
- linuxkit/init:e650be6c21ef9ecb33534858fc63fb8bc5028c6e
|
||||
|
@@ -1,5 +1,5 @@
|
||||
kernel:
|
||||
image: linuxkit/kernel:4.9.78
|
||||
image: linuxkit/kernel:4.9.79
|
||||
cmdline: "console=tty0 console=ttyS0"
|
||||
init:
|
||||
- linuxkit/init:e650be6c21ef9ecb33534858fc63fb8bc5028c6e
|
||||
|
@@ -1,5 +1,5 @@
|
||||
kernel:
|
||||
image: linuxkit/kernel:4.9.78
|
||||
image: linuxkit/kernel:4.9.79
|
||||
cmdline: "console=ttyS0"
|
||||
init:
|
||||
- linuxkit/init:e650be6c21ef9ecb33534858fc63fb8bc5028c6e
|
||||
|
@@ -5,7 +5,7 @@
|
||||
# for arm64 then the 'ucode' line in the kernel section can be left
|
||||
# out.
|
||||
kernel:
|
||||
image: linuxkit/kernel:4.9.78
|
||||
image: linuxkit/kernel:4.9.79
|
||||
cmdline: "console=ttyAMA0"
|
||||
ucode: ""
|
||||
onboot:
|
||||
|
@@ -1,5 +1,5 @@
|
||||
kernel:
|
||||
image: linuxkit/kernel:4.9.78
|
||||
image: linuxkit/kernel:4.9.79
|
||||
cmdline: console=ttyS1
|
||||
ucode: intel-ucode.cpio
|
||||
init:
|
||||
|
@@ -1,7 +1,7 @@
|
||||
# Minimal YAML to run a redis server (used at DockerCon'17)
|
||||
# connect: nc localhost 6379
|
||||
kernel:
|
||||
image: linuxkit/kernel:4.9.78
|
||||
image: linuxkit/kernel:4.9.79
|
||||
cmdline: "console=tty0 console=ttyS0 console=ttyAMA0"
|
||||
init:
|
||||
- linuxkit/init:e650be6c21ef9ecb33534858fc63fb8bc5028c6e
|
||||
|
@@ -1,5 +1,5 @@
|
||||
kernel:
|
||||
image: linuxkit/kernel:4.9.78
|
||||
image: linuxkit/kernel:4.9.79
|
||||
cmdline: "console=tty0 console=ttyS0 console=ttyAMA0"
|
||||
init:
|
||||
- linuxkit/init:e650be6c21ef9ecb33534858fc63fb8bc5028c6e
|
||||
|
@@ -1,5 +1,5 @@
|
||||
kernel:
|
||||
image: linuxkit/kernel:4.9.78
|
||||
image: linuxkit/kernel:4.9.79
|
||||
cmdline: "console=tty0 console=ttyS0 console=ttyAMA0"
|
||||
init:
|
||||
- linuxkit/init:e650be6c21ef9ecb33534858fc63fb8bc5028c6e
|
||||
|
@@ -1,5 +1,5 @@
|
||||
kernel:
|
||||
image: linuxkit/kernel:4.9.78
|
||||
image: linuxkit/kernel:4.9.79
|
||||
cmdline: "console=tty0"
|
||||
init:
|
||||
- linuxkit/init:e650be6c21ef9ecb33534858fc63fb8bc5028c6e
|
||||
|
@@ -1,5 +1,5 @@
|
||||
kernel:
|
||||
image: linuxkit/kernel:4.9.78
|
||||
image: linuxkit/kernel:4.9.79
|
||||
cmdline: "console=ttyS0"
|
||||
init:
|
||||
- linuxkit/init:e650be6c21ef9ecb33534858fc63fb8bc5028c6e
|
||||
|
@@ -1,5 +1,5 @@
|
||||
kernel:
|
||||
image: linuxkit/kernel:4.9.78
|
||||
image: linuxkit/kernel:4.9.79
|
||||
cmdline: "console=ttyS0"
|
||||
init:
|
||||
- linuxkit/init:e650be6c21ef9ecb33534858fc63fb8bc5028c6e
|
||||
|
@@ -1,5 +1,5 @@
|
||||
kernel:
|
||||
image: linuxkit/kernel:4.9.78
|
||||
image: linuxkit/kernel:4.9.79
|
||||
cmdline: "console=ttyS0"
|
||||
init:
|
||||
- linuxkit/init:e650be6c21ef9ecb33534858fc63fb8bc5028c6e
|
||||
|
@@ -1,5 +1,5 @@
|
||||
kernel:
|
||||
image: linuxkit/kernel:4.9.78
|
||||
image: linuxkit/kernel:4.9.79
|
||||
cmdline: "console=tty0 console=ttyS0 console=ttyAMA0"
|
||||
init:
|
||||
- linuxkit/init:e650be6c21ef9ecb33534858fc63fb8bc5028c6e
|
||||
|
@@ -204,11 +204,12 @@ endef
|
||||
# Build Targets
|
||||
# Debug targets only for latest stable and LTS stable
|
||||
#
|
||||
$(eval $(call kernel,4.14.15,4.14.x,$(EXTRA)))
|
||||
$(eval $(call kernel,4.14.15,4.14.x,-dbg))
|
||||
$(eval $(call kernel,4.9.78,4.9.x,$(EXTRA)))
|
||||
$(eval $(call kernel,4.9.78,4.9.x,-dbg))
|
||||
$(eval $(call kernel,4.4.113,4.4.x,$(EXTRA)))
|
||||
$(eval $(call kernel,4.15,4.15.x,$(EXTRA)))
|
||||
$(eval $(call kernel,4.14.16,4.14.x,$(EXTRA)))
|
||||
$(eval $(call kernel,4.14.16,4.14.x,-dbg))
|
||||
$(eval $(call kernel,4.9.79,4.9.x,$(EXTRA)))
|
||||
$(eval $(call kernel,4.9.79,4.9.x,-dbg))
|
||||
$(eval $(call kernel,4.4.114,4.4.x,$(EXTRA)))
|
||||
|
||||
# Target for kernel config
|
||||
kconfig: | sources
|
||||
|
@@ -1,6 +1,6 @@
|
||||
#
|
||||
# Automatically generated file; DO NOT EDIT.
|
||||
# Linux/arm64 4.14.15 Kernel Configuration
|
||||
# Linux/arm64 4.14.16 Kernel Configuration
|
||||
#
|
||||
CONFIG_ARM64=y
|
||||
CONFIG_64BIT=y
|
||||
@@ -199,6 +199,7 @@ CONFIG_SIGNALFD=y
|
||||
CONFIG_TIMERFD=y
|
||||
CONFIG_EVENTFD=y
|
||||
CONFIG_BPF_SYSCALL=y
|
||||
CONFIG_BPF_JIT_ALWAYS_ON=y
|
||||
CONFIG_SHMEM=y
|
||||
CONFIG_AIO=y
|
||||
CONFIG_ADVISE_SYSCALLS=y
|
||||
|
@@ -1,6 +1,6 @@
|
||||
#
|
||||
# Automatically generated file; DO NOT EDIT.
|
||||
# Linux/x86 4.14.15 Kernel Configuration
|
||||
# Linux/x86 4.14.16 Kernel Configuration
|
||||
#
|
||||
CONFIG_64BIT=y
|
||||
CONFIG_X86_64=y
|
||||
@@ -224,6 +224,7 @@ CONFIG_SIGNALFD=y
|
||||
CONFIG_TIMERFD=y
|
||||
CONFIG_EVENTFD=y
|
||||
CONFIG_BPF_SYSCALL=y
|
||||
CONFIG_BPF_JIT_ALWAYS_ON=y
|
||||
CONFIG_SHMEM=y
|
||||
CONFIG_AIO=y
|
||||
CONFIG_ADVISE_SYSCALLS=y
|
||||
|
4371
kernel/config-4.15.x-aarch64
Normal file
4371
kernel/config-4.15.x-aarch64
Normal file
File diff suppressed because it is too large
Load Diff
4220
kernel/config-4.15.x-x86_64
Normal file
4220
kernel/config-4.15.x-x86_64
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,6 @@
|
||||
#
|
||||
# Automatically generated file; DO NOT EDIT.
|
||||
# Linux/arm64 4.4.113 Kernel Configuration
|
||||
# Linux/arm64 4.4.114 Kernel Configuration
|
||||
#
|
||||
CONFIG_ARM64=y
|
||||
CONFIG_64BIT=y
|
||||
|
@@ -1,6 +1,6 @@
|
||||
#
|
||||
# Automatically generated file; DO NOT EDIT.
|
||||
# Linux/x86 4.4.113 Kernel Configuration
|
||||
# Linux/x86 4.4.114 Kernel Configuration
|
||||
#
|
||||
CONFIG_64BIT=y
|
||||
CONFIG_X86_64=y
|
||||
|
@@ -1,6 +1,6 @@
|
||||
#
|
||||
# Automatically generated file; DO NOT EDIT.
|
||||
# Linux/arm64 4.9.78 Kernel Configuration
|
||||
# Linux/arm64 4.9.79 Kernel Configuration
|
||||
#
|
||||
CONFIG_ARM64=y
|
||||
CONFIG_64BIT=y
|
||||
@@ -188,6 +188,7 @@ CONFIG_SIGNALFD=y
|
||||
CONFIG_TIMERFD=y
|
||||
CONFIG_EVENTFD=y
|
||||
CONFIG_BPF_SYSCALL=y
|
||||
CONFIG_BPF_JIT_ALWAYS_ON=y
|
||||
CONFIG_SHMEM=y
|
||||
CONFIG_AIO=y
|
||||
CONFIG_ADVISE_SYSCALLS=y
|
||||
|
@@ -1,6 +1,6 @@
|
||||
#
|
||||
# Automatically generated file; DO NOT EDIT.
|
||||
# Linux/x86 4.9.78 Kernel Configuration
|
||||
# Linux/x86 4.9.79 Kernel Configuration
|
||||
#
|
||||
CONFIG_64BIT=y
|
||||
CONFIG_X86_64=y
|
||||
@@ -217,6 +217,7 @@ CONFIG_SIGNALFD=y
|
||||
CONFIG_TIMERFD=y
|
||||
CONFIG_EVENTFD=y
|
||||
CONFIG_BPF_SYSCALL=y
|
||||
CONFIG_BPF_JIT_ALWAYS_ON=y
|
||||
CONFIG_SHMEM=y
|
||||
CONFIG_AIO=y
|
||||
CONFIG_ADVISE_SYSCALLS=y
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From 2852924b8f1df7aaa4fb53613f1f96470cff6b3c Mon Sep 17 00:00:00 2001
|
||||
From d89e6ec087e2b1e7ab5f5cb684026f07e5c359df Mon Sep 17 00:00:00 2001
|
||||
From: Cheng-mean Liu <soccerl@microsoft.com>
|
||||
Date: Tue, 11 Jul 2017 16:58:26 -0700
|
||||
Subject: [PATCH] NVDIMM: reducded ND_MIN_NAMESPACE_SIZE from 4MB to 4KB (page
|
||||
|
@@ -0,0 +1,80 @@
|
||||
From 6b7e072829a8b4e8b3c19f01138998a5d74558cf Mon Sep 17 00:00:00 2001
|
||||
From: Rolf Neugebauer <rolf.neugebauer@gmail.com>
|
||||
Date: Tue, 6 Feb 2018 13:02:57 +0000
|
||||
Subject: [PATCH] x86/microcode/intel: Avoid division by zero
|
||||
|
||||
The backport of 7e702d17ed1 ("x86/microcode/intel: Extend BDW
|
||||
late-loading further with LLC size check") introduced a division
|
||||
by zero panic on some platforms, specifically on machine types
|
||||
with one vCPU on Google Cloud (e.g., g1-small and n1-standard-1):
|
||||
|
||||
[ 1.591435] divide error: 0000 [#1] SMP
|
||||
[ 1.591961] Modules linked in:
|
||||
[ 1.592546] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.9.79-linuxkit #1
|
||||
[ 1.593461] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
|
||||
[ 1.595135] task: ffffa01b2b63c040 task.stack: ffffb24f40010000
|
||||
[ 1.596683] RIP: 0010:[<ffffffffb7d88ce3>] [<ffffffffb7d88ce3>] init_intel_microcode+0x49/0x5a
|
||||
[ 1.598018] RSP: 0000:ffffb24f40013e48 EFLAGS: 00010206
|
||||
[ 1.599016] RAX: 0000000001400000 RBX: 00000000ffffffea RCX: 0000000000000000
|
||||
[ 1.600093] RDX: 0000000000000000 RSI: ffffa01b2fffa9a8 RDI: ffffffffb7d8888b
|
||||
[ 1.601222] RBP: 00000000ffffffff R08: ffffa01b2fffa9a1 R09: 000000000000005f
|
||||
[ 1.602330] R10: 0000000000000067 R11: ffffa01b22164177 R12: 0000000000000000
|
||||
[ 1.603291] R13: ffffffffb7d787b6 R14: 0000000000000000 R15: 0000000000000000
|
||||
[ 1.604406] FS: 0000000000000000(0000) GS:ffffa01b2fc00000(0000) knlGS:0000000000000000
|
||||
[ 1.606154] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
|
||||
[ 1.607493] CR2: 0000000000000000 CR3: 000000002ac0a000 CR4: 0000000000040630
|
||||
[ 1.609310] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
|
||||
[ 1.611122] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
|
||||
[ 1.613008] Stack:
|
||||
[ 1.613445] ffffffffb7d888c1 0000000000000000 ffffffffb7d1ba40 0000000000000000
|
||||
[ 1.615423] 0000000000000000 ffffffffb7d787b6 0000000000000000 0000000000000000
|
||||
[ 1.617049] ffffffffb74fed89 00000000fffffff4 00000000ffffffff 4eae7bc133547c47
|
||||
[ 1.617904] Call Trace:
|
||||
[ 1.618198] [<ffffffffb7d888c1>] ? microcode_init+0x36/0x1de
|
||||
[ 1.619264] [<ffffffffb7d787b6>] ? set_debug_rodata+0xc/0xc
|
||||
[ 1.620143] [<ffffffffb74fed89>] ? driver_register+0xaf/0xb4
|
||||
[ 1.621841] [<ffffffffb7d8888b>] ? save_microcode_in_initrd+0x3c/0x3c
|
||||
[ 1.623424] [<ffffffffb70021b7>] ? do_one_initcall+0x98/0x130
|
||||
[ 1.624659] [<ffffffffb7d787b6>] ? set_debug_rodata+0xc/0xc
|
||||
[ 1.626303] [<ffffffffb7d79091>] ? kernel_init_freeable+0x166/0x1e7
|
||||
[ 1.627674] [<ffffffffb77ce3d7>] ? rest_init+0x6e/0x6e
|
||||
[ 1.628942] [<ffffffffb77ce3e1>] ? kernel_init+0xa/0xe6
|
||||
[ 1.630243] [<ffffffffb77d8587>] ? ret_from_fork+0x57/0x70
|
||||
[ 1.631592] Code: 16 0f b6 35 a0 ac fb ff 48 c7 c7 c4 ea 99 b7 e8 82 3e 41 ff 31 c0 c3 8b 05 3b ad fb ff 0f b7 0d 54 ad fb ff 31 d2 c1 e0 0a 48 98 <48> f7 f1 89 05 f4 6a 14 00 48 c7 c0 00 d8 c2 b7 c3 4c 8d 54 24
|
||||
[ 1.638875] RIP [<ffffffffb7d88ce3>] init_intel_microcode+0x49/0x5a
|
||||
[ 1.640382] RSP <ffffb24f40013e48>
|
||||
[ 1.641320] ---[ end trace e88ef332e19594b9 ]---
|
||||
[ 1.642418] Kernel panic - not syncing: Fatal exception
|
||||
[ 1.644581] Kernel Offset: 0x36000000 from 0xffffffff81000000 (relocation range: 0xffffffff80000000-0xffffffffbfffffff)
|
||||
[ 1.647312] ---[ end Kernel panic - not syncing: Fatal exception
|
||||
|
||||
On these platforms x86_max_cores is 0:
|
||||
|
||||
[ 0.227977] ftrace: allocating 35563 entries in 139 pages
|
||||
[ 0.273941] smpboot: x86_max_cores == zero !?!?
|
||||
[ 0.274645] smpboot: Max logical packages: 1
|
||||
|
||||
Here, we check x86_max_core before calculating the llc_size.
|
||||
|
||||
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
|
||||
---
|
||||
arch/x86/kernel/cpu/microcode/intel.c | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/arch/x86/kernel/cpu/microcode/intel.c b/arch/x86/kernel/cpu/microcode/intel.c
|
||||
index 2c76a1801393..2a581170ac0b 100644
|
||||
--- a/arch/x86/kernel/cpu/microcode/intel.c
|
||||
+++ b/arch/x86/kernel/cpu/microcode/intel.c
|
||||
@@ -1077,6 +1077,9 @@ static int __init calc_llc_size_per_core(struct cpuinfo_x86 *c)
|
||||
{
|
||||
u64 llc_size = c->x86_cache_size * 1024;
|
||||
|
||||
+ if (!c->x86_max_cores)
|
||||
+ return 0;
|
||||
+
|
||||
do_div(llc_size, c->x86_max_cores);
|
||||
|
||||
return (int)llc_size;
|
||||
--
|
||||
2.16.0
|
||||
|
@@ -1,7 +1,7 @@
|
||||
From 6609c1c5a06527da79adb9482d8a101bd2163970 Mon Sep 17 00:00:00 2001
|
||||
From d249c8a91517af30e63a8abfa7ce7c6ad998d7b7 Mon Sep 17 00:00:00 2001
|
||||
From: Arnaldo Carvalho de Melo <acme@redhat.com>
|
||||
Date: Thu, 2 Mar 2017 12:55:49 -0300
|
||||
Subject: [PATCH 01/12] tools build: Add test for sched_getcpu()
|
||||
Subject: [PATCH 01/13] tools build: Add test for sched_getcpu()
|
||||
|
||||
Instead of trying to go on adding more ifdef conditions, do a feature
|
||||
test and define HAVE_SCHED_GETCPU_SUPPORT instead, then use it to
|
||||
|
@@ -1,7 +1,7 @@
|
||||
From 397070619f51946b18d198d7d44632bfbde0a0b0 Mon Sep 17 00:00:00 2001
|
||||
From 8c548dd2caeed54dd02610cd4bae351b89682d8c Mon Sep 17 00:00:00 2001
|
||||
From: Arnaldo Carvalho de Melo <acme@redhat.com>
|
||||
Date: Thu, 13 Oct 2016 17:12:35 -0300
|
||||
Subject: [PATCH 02/12] perf jit: Avoid returning garbage for a ret variable
|
||||
Subject: [PATCH 02/13] perf jit: Avoid returning garbage for a ret variable
|
||||
|
||||
When the loop body isn't executed at all, then the 'ret' local variable,
|
||||
that is uninitialized will be used as the return value.
|
||||
|
@@ -1,7 +1,7 @@
|
||||
From 01a2e1c99ca586e581130087e6a358b890bb53ae Mon Sep 17 00:00:00 2001
|
||||
From f350364380d1ad3cc73df12265c8b6476dfe51fa Mon Sep 17 00:00:00 2001
|
||||
From: Dexuan Cui <decui@microsoft.com>
|
||||
Date: Sat, 23 Jul 2016 01:35:51 +0000
|
||||
Subject: [PATCH 03/12] hv_sock: introduce Hyper-V Sockets
|
||||
Subject: [PATCH 03/13] hv_sock: introduce Hyper-V Sockets
|
||||
|
||||
Hyper-V Sockets (hv_sock) supplies a byte-stream based communication
|
||||
mechanism between the host and the guest. It's somewhat like TCP over
|
||||
|
@@ -1,7 +1,7 @@
|
||||
From fc283d9a29218bcaee2d646c2108374914ffec83 Mon Sep 17 00:00:00 2001
|
||||
From c9e4562f53bd6a7276a2927b186d5b6bcefc9a78 Mon Sep 17 00:00:00 2001
|
||||
From: Rolf Neugebauer <rolf.neugebauer@gmail.com>
|
||||
Date: Mon, 23 May 2016 18:55:45 +0100
|
||||
Subject: [PATCH 04/12] vmbus: Don't spam the logs with unknown GUIDs
|
||||
Subject: [PATCH 04/13] vmbus: Don't spam the logs with unknown GUIDs
|
||||
|
||||
With Hyper-V sockets device types are introduced on the fly. The pr_info()
|
||||
then prints a message on every connection, which is way too verbose. Since
|
||||
|
@@ -1,7 +1,7 @@
|
||||
From 8bee13f3df81631672b58e63faf32da0539ed232 Mon Sep 17 00:00:00 2001
|
||||
From bfa241cc0ba86944ce412257f61d7397091dca50 Mon Sep 17 00:00:00 2001
|
||||
From: Alex Ng <alexng@messages.microsoft.com>
|
||||
Date: Sun, 6 Nov 2016 13:14:07 -0800
|
||||
Subject: [PATCH 05/12] Drivers: hv: utils: Fix the mapping between host
|
||||
Subject: [PATCH 05/13] Drivers: hv: utils: Fix the mapping between host
|
||||
version and protocol to use
|
||||
|
||||
We should intentionally declare the protocols to use for every known host
|
||||
|
@@ -1,7 +1,7 @@
|
||||
From ccc87ce9d6afd46e13c754252fc3ed266b8e8a80 Mon Sep 17 00:00:00 2001
|
||||
From e4e0219800f56fdabc70ab3979f1a4c47b2f6411 Mon Sep 17 00:00:00 2001
|
||||
From: Alex Ng <alexng@messages.microsoft.com>
|
||||
Date: Sun, 6 Nov 2016 13:14:10 -0800
|
||||
Subject: [PATCH 06/12] Drivers: hv: vss: Improve log messages.
|
||||
Subject: [PATCH 06/13] Drivers: hv: vss: Improve log messages.
|
||||
|
||||
Adding log messages to help troubleshoot error cases and transaction
|
||||
handling.
|
||||
|
@@ -1,7 +1,7 @@
|
||||
From e66f1fe20c6151c9b11ea185145526d17307bd1d Mon Sep 17 00:00:00 2001
|
||||
From 1c376d4e0a67bd1e7f46e88eec3d2d38aa18c367 Mon Sep 17 00:00:00 2001
|
||||
From: Alex Ng <alexng@messages.microsoft.com>
|
||||
Date: Sun, 6 Nov 2016 13:14:11 -0800
|
||||
Subject: [PATCH 07/12] Drivers: hv: vss: Operation timeouts should match host
|
||||
Subject: [PATCH 07/13] Drivers: hv: vss: Operation timeouts should match host
|
||||
expectation
|
||||
|
||||
Increase the timeout of backup operations. When system is under I/O load,
|
||||
|
@@ -1,7 +1,7 @@
|
||||
From 027257ec33f2d3dc8c22369f66d7b06452d3e370 Mon Sep 17 00:00:00 2001
|
||||
From 0620946a57585307071160fa5af71a23d3ff3a2c Mon Sep 17 00:00:00 2001
|
||||
From: Alex Ng <alexng@messages.microsoft.com>
|
||||
Date: Sat, 28 Jan 2017 12:37:17 -0700
|
||||
Subject: [PATCH 08/12] Drivers: hv: vmbus: Use all supported IC versions to
|
||||
Subject: [PATCH 08/13] Drivers: hv: vmbus: Use all supported IC versions to
|
||||
negotiate
|
||||
|
||||
Previously, we were assuming that each IC protocol version was tied to a
|
||||
|
@@ -1,7 +1,7 @@
|
||||
From b16f9d200445f5a61d2ea1b14a753d7b39a59db3 Mon Sep 17 00:00:00 2001
|
||||
From 41ce4da3ddbf2eb9790738a479ec4e50db46eebb Mon Sep 17 00:00:00 2001
|
||||
From: Alex Ng <alexng@messages.microsoft.com>
|
||||
Date: Sat, 28 Jan 2017 12:37:18 -0700
|
||||
Subject: [PATCH 09/12] Drivers: hv: Log the negotiated IC versions.
|
||||
Subject: [PATCH 09/13] Drivers: hv: Log the negotiated IC versions.
|
||||
|
||||
Log the negotiated IC versions.
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
From 323f44a4ac5368faeb471232e07bb51f4701e9da Mon Sep 17 00:00:00 2001
|
||||
From 3ffad6b5d1f3d4f0e49ea5eb352c97fb374c8aa0 Mon Sep 17 00:00:00 2001
|
||||
From: Dexuan Cui <decui@microsoft.com>
|
||||
Date: Sun, 26 Mar 2017 16:42:20 +0800
|
||||
Subject: [PATCH 10/12] vmbus: fix missed ring events on boot
|
||||
Subject: [PATCH 10/13] vmbus: fix missed ring events on boot
|
||||
|
||||
During initialization, the channel initialization code schedules the
|
||||
tasklet to scan the VMBUS receive event page (i.e. simulates an
|
||||
|
@@ -1,7 +1,7 @@
|
||||
From 17755d00ce960b93bc31878c33fd2570a095a2ac Mon Sep 17 00:00:00 2001
|
||||
From 1794bf5e96cff6dfb433840ede089040753339a7 Mon Sep 17 00:00:00 2001
|
||||
From: Dexuan Cui <decui@microsoft.com>
|
||||
Date: Wed, 29 Mar 2017 18:37:10 +0800
|
||||
Subject: [PATCH 11/12] vmbus: remove "goto error_clean_msglist" in
|
||||
Subject: [PATCH 11/13] vmbus: remove "goto error_clean_msglist" in
|
||||
vmbus_open()
|
||||
|
||||
This is just a cleanup patch to simplify the code a little.
|
||||
|
@@ -1,7 +1,7 @@
|
||||
From 7116d27c8966baf90e9acd71aad8e783d6dc1e97 Mon Sep 17 00:00:00 2001
|
||||
From 03bb29f91f12a6b134e632704aa5756ae5709f5d Mon Sep 17 00:00:00 2001
|
||||
From: Dexuan Cui <decui@microsoft.com>
|
||||
Date: Fri, 24 Mar 2017 20:53:18 +0800
|
||||
Subject: [PATCH 12/12] vmbus: dynamically enqueue/dequeue the channel on
|
||||
Subject: [PATCH 12/13] vmbus: dynamically enqueue/dequeue the channel on
|
||||
vmbus_open/close
|
||||
|
||||
Signed-off-by: Dexuan Cui <decui@microsoft.com>
|
||||
|
@@ -0,0 +1,80 @@
|
||||
From 5b1b8d01842d3e6799cf848519da43bc2a5d6edb Mon Sep 17 00:00:00 2001
|
||||
From: Rolf Neugebauer <rolf.neugebauer@gmail.com>
|
||||
Date: Tue, 6 Feb 2018 13:02:57 +0000
|
||||
Subject: [PATCH 13/13] x86/microcode/intel: Avoid division by zero
|
||||
|
||||
The backport of 7e702d17ed1 ("x86/microcode/intel: Extend BDW
|
||||
late-loading further with LLC size check") introduced a division
|
||||
by zero panic on some platforms, specifically on machine types
|
||||
with one vCPU on Google Cloud (e.g., g1-small and n1-standard-1):
|
||||
|
||||
[ 1.591435] divide error: 0000 [#1] SMP
|
||||
[ 1.591961] Modules linked in:
|
||||
[ 1.592546] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.9.79-linuxkit #1
|
||||
[ 1.593461] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
|
||||
[ 1.595135] task: ffffa01b2b63c040 task.stack: ffffb24f40010000
|
||||
[ 1.596683] RIP: 0010:[<ffffffffb7d88ce3>] [<ffffffffb7d88ce3>] init_intel_microcode+0x49/0x5a
|
||||
[ 1.598018] RSP: 0000:ffffb24f40013e48 EFLAGS: 00010206
|
||||
[ 1.599016] RAX: 0000000001400000 RBX: 00000000ffffffea RCX: 0000000000000000
|
||||
[ 1.600093] RDX: 0000000000000000 RSI: ffffa01b2fffa9a8 RDI: ffffffffb7d8888b
|
||||
[ 1.601222] RBP: 00000000ffffffff R08: ffffa01b2fffa9a1 R09: 000000000000005f
|
||||
[ 1.602330] R10: 0000000000000067 R11: ffffa01b22164177 R12: 0000000000000000
|
||||
[ 1.603291] R13: ffffffffb7d787b6 R14: 0000000000000000 R15: 0000000000000000
|
||||
[ 1.604406] FS: 0000000000000000(0000) GS:ffffa01b2fc00000(0000) knlGS:0000000000000000
|
||||
[ 1.606154] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
|
||||
[ 1.607493] CR2: 0000000000000000 CR3: 000000002ac0a000 CR4: 0000000000040630
|
||||
[ 1.609310] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
|
||||
[ 1.611122] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
|
||||
[ 1.613008] Stack:
|
||||
[ 1.613445] ffffffffb7d888c1 0000000000000000 ffffffffb7d1ba40 0000000000000000
|
||||
[ 1.615423] 0000000000000000 ffffffffb7d787b6 0000000000000000 0000000000000000
|
||||
[ 1.617049] ffffffffb74fed89 00000000fffffff4 00000000ffffffff 4eae7bc133547c47
|
||||
[ 1.617904] Call Trace:
|
||||
[ 1.618198] [<ffffffffb7d888c1>] ? microcode_init+0x36/0x1de
|
||||
[ 1.619264] [<ffffffffb7d787b6>] ? set_debug_rodata+0xc/0xc
|
||||
[ 1.620143] [<ffffffffb74fed89>] ? driver_register+0xaf/0xb4
|
||||
[ 1.621841] [<ffffffffb7d8888b>] ? save_microcode_in_initrd+0x3c/0x3c
|
||||
[ 1.623424] [<ffffffffb70021b7>] ? do_one_initcall+0x98/0x130
|
||||
[ 1.624659] [<ffffffffb7d787b6>] ? set_debug_rodata+0xc/0xc
|
||||
[ 1.626303] [<ffffffffb7d79091>] ? kernel_init_freeable+0x166/0x1e7
|
||||
[ 1.627674] [<ffffffffb77ce3d7>] ? rest_init+0x6e/0x6e
|
||||
[ 1.628942] [<ffffffffb77ce3e1>] ? kernel_init+0xa/0xe6
|
||||
[ 1.630243] [<ffffffffb77d8587>] ? ret_from_fork+0x57/0x70
|
||||
[ 1.631592] Code: 16 0f b6 35 a0 ac fb ff 48 c7 c7 c4 ea 99 b7 e8 82 3e 41 ff 31 c0 c3 8b 05 3b ad fb ff 0f b7 0d 54 ad fb ff 31 d2 c1 e0 0a 48 98 <48> f7 f1 89 05 f4 6a 14 00 48 c7 c0 00 d8 c2 b7 c3 4c 8d 54 24
|
||||
[ 1.638875] RIP [<ffffffffb7d88ce3>] init_intel_microcode+0x49/0x5a
|
||||
[ 1.640382] RSP <ffffb24f40013e48>
|
||||
[ 1.641320] ---[ end trace e88ef332e19594b9 ]---
|
||||
[ 1.642418] Kernel panic - not syncing: Fatal exception
|
||||
[ 1.644581] Kernel Offset: 0x36000000 from 0xffffffff81000000 (relocation range: 0xffffffff80000000-0xffffffffbfffffff)
|
||||
[ 1.647312] ---[ end Kernel panic - not syncing: Fatal exception
|
||||
|
||||
On these platforms x86_max_cores is 0:
|
||||
|
||||
[ 0.227977] ftrace: allocating 35563 entries in 139 pages
|
||||
[ 0.273941] smpboot: x86_max_cores == zero !?!?
|
||||
[ 0.274645] smpboot: Max logical packages: 1
|
||||
|
||||
Here, we check x86_max_core before calculating the llc_size.
|
||||
|
||||
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
|
||||
---
|
||||
arch/x86/kernel/cpu/microcode/intel.c | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/arch/x86/kernel/cpu/microcode/intel.c b/arch/x86/kernel/cpu/microcode/intel.c
|
||||
index f90f17610f62..a5dd9e5db4ce 100644
|
||||
--- a/arch/x86/kernel/cpu/microcode/intel.c
|
||||
+++ b/arch/x86/kernel/cpu/microcode/intel.c
|
||||
@@ -1134,6 +1134,9 @@ static int __init calc_llc_size_per_core(struct cpuinfo_x86 *c)
|
||||
{
|
||||
u64 llc_size = c->x86_cache_size * 1024;
|
||||
|
||||
+ if (!c->x86_max_cores)
|
||||
+ return 0;
|
||||
+
|
||||
do_div(llc_size, c->x86_max_cores);
|
||||
|
||||
return (int)llc_size;
|
||||
--
|
||||
2.16.0
|
||||
|
@@ -1,5 +1,5 @@
|
||||
kernel:
|
||||
image: linuxkit/kernel:4.9.78
|
||||
image: linuxkit/kernel:4.9.79
|
||||
cmdline: "console=tty0 console=ttyS0 console=ttyAMA0"
|
||||
init:
|
||||
- linuxkit/init:e650be6c21ef9ecb33534858fc63fb8bc5028c6e
|
||||
|
@@ -1,5 +1,5 @@
|
||||
kernel:
|
||||
image: linuxkit/kernel:4.9.78
|
||||
image: linuxkit/kernel:4.9.79
|
||||
cmdline: "console=ttyS0 page_poison=1"
|
||||
init:
|
||||
- linuxkit/init:e650be6c21ef9ecb33534858fc63fb8bc5028c6e
|
||||
|
@@ -1,5 +1,5 @@
|
||||
kernel:
|
||||
image: linuxkit/kernel:4.9.78
|
||||
image: linuxkit/kernel:4.9.79
|
||||
cmdline: "console=ttyS0 page_poison=1"
|
||||
init:
|
||||
- linuxkit/init:e650be6c21ef9ecb33534858fc63fb8bc5028c6e
|
||||
|
@@ -1,5 +1,5 @@
|
||||
kernel:
|
||||
image: linuxkit/kernel:4.9.78
|
||||
image: linuxkit/kernel:4.9.79
|
||||
cmdline: "console=ttyS0 console=tty0 page_poison=1"
|
||||
init:
|
||||
- linuxkit/init:e650be6c21ef9ecb33534858fc63fb8bc5028c6e # with runc, logwrite, startmemlogd
|
||||
|
@@ -1,5 +1,5 @@
|
||||
kernel:
|
||||
image: linuxkit/kernel:4.9.78
|
||||
image: linuxkit/kernel:4.9.79
|
||||
cmdline: "console=ttyS0 page_poison=1"
|
||||
init:
|
||||
- linuxkit/init:e650be6c21ef9ecb33534858fc63fb8bc5028c6e
|
||||
|
@@ -1,5 +1,5 @@
|
||||
kernel:
|
||||
image: linuxkit/kernel:4.9.78
|
||||
image: linuxkit/kernel:4.9.79
|
||||
cmdline: "console=ttyS0"
|
||||
init:
|
||||
- linuxkit/init:e650be6c21ef9ecb33534858fc63fb8bc5028c6e
|
||||
|
@@ -1,5 +1,5 @@
|
||||
kernel:
|
||||
image: linuxkit/kernel:4.9.78
|
||||
image: linuxkit/kernel:4.9.79
|
||||
cmdline: "console=ttyS0 console=ttyAMA0"
|
||||
init:
|
||||
- linuxkit/init:e650be6c21ef9ecb33534858fc63fb8bc5028c6e
|
||||
|
@@ -1,5 +1,5 @@
|
||||
kernel:
|
||||
image: linuxkit/kernel:4.9.78
|
||||
image: linuxkit/kernel:4.9.79
|
||||
cmdline: "console=ttyS0"
|
||||
init:
|
||||
- linuxkit/init:e650be6c21ef9ecb33534858fc63fb8bc5028c6e
|
||||
|
@@ -1,5 +1,5 @@
|
||||
kernel:
|
||||
image: linuxkit/kernel:4.9.78
|
||||
image: linuxkit/kernel:4.9.79
|
||||
cmdline: "console=ttyS0"
|
||||
init:
|
||||
- linuxkit/init:e650be6c21ef9ecb33534858fc63fb8bc5028c6e
|
||||
|
@@ -1,5 +1,5 @@
|
||||
kernel:
|
||||
image: linuxkit/kernel:4.9.78
|
||||
image: linuxkit/kernel:4.9.79
|
||||
cmdline: "console=ttyS0"
|
||||
init:
|
||||
- linuxkit/init:e650be6c21ef9ecb33534858fc63fb8bc5028c6e
|
||||
|
@@ -1,5 +1,5 @@
|
||||
kernel:
|
||||
image: linuxkit/kernel:4.9.78
|
||||
image: linuxkit/kernel:4.9.79
|
||||
cmdline: "console=ttyS0"
|
||||
init:
|
||||
- linuxkit/init:e650be6c21ef9ecb33534858fc63fb8bc5028c6e
|
||||
|
@@ -1,5 +1,5 @@
|
||||
kernel:
|
||||
image: linuxkit/kernel:4.9.78
|
||||
image: linuxkit/kernel:4.9.79
|
||||
cmdline: "console=ttyS0"
|
||||
init:
|
||||
- linuxkit/init:e650be6c21ef9ecb33534858fc63fb8bc5028c6e
|
||||
|
@@ -1,5 +1,5 @@
|
||||
kernel:
|
||||
image: linuxkit/kernel:4.9.78
|
||||
image: linuxkit/kernel:4.9.79
|
||||
cmdline: "console=ttyS0"
|
||||
init:
|
||||
- linuxkit/init:e650be6c21ef9ecb33534858fc63fb8bc5028c6e
|
||||
|
@@ -1,5 +1,5 @@
|
||||
kernel:
|
||||
image: linuxkit/kernel:4.9.78
|
||||
image: linuxkit/kernel:4.9.79
|
||||
cmdline: "console=ttyS0"
|
||||
init:
|
||||
- linuxkit/init:e650be6c21ef9ecb33534858fc63fb8bc5028c6e
|
||||
|
@@ -1,5 +1,5 @@
|
||||
kernel:
|
||||
image: linuxkit/kernel:4.9.78
|
||||
image: linuxkit/kernel:4.9.79
|
||||
cmdline: "console=ttyS0"
|
||||
init:
|
||||
- linuxkit/init:e650be6c21ef9ecb33534858fc63fb8bc5028c6e
|
||||
|
@@ -1,5 +1,5 @@
|
||||
kernel:
|
||||
image: linuxkit/kernel:4.4.113
|
||||
image: linuxkit/kernel:4.4.114
|
||||
cmdline: "console=ttyS0 console=ttyAMA0"
|
||||
init:
|
||||
- linuxkit/init:e650be6c21ef9ecb33534858fc63fb8bc5028c6e
|
||||
|
@@ -1,5 +1,5 @@
|
||||
kernel:
|
||||
image: linuxkit/kernel:4.9.78
|
||||
image: linuxkit/kernel:4.9.79
|
||||
cmdline: "console=ttyS0 console=ttyAMA0"
|
||||
init:
|
||||
- linuxkit/init:e650be6c21ef9ecb33534858fc63fb8bc5028c6e
|
||||
|
@@ -1,5 +1,5 @@
|
||||
kernel:
|
||||
image: linuxkit/kernel:4.14.15
|
||||
image: linuxkit/kernel:4.14.16
|
||||
cmdline: "console=ttyS0 console=ttyAMA0"
|
||||
init:
|
||||
- linuxkit/init:e650be6c21ef9ecb33534858fc63fb8bc5028c6e
|
||||
|
25
test/cases/020_kernel/007_config_4.15.x/test.sh
Normal file
25
test/cases/020_kernel/007_config_4.15.x/test.sh
Normal file
@@ -0,0 +1,25 @@
|
||||
#!/bin/sh
|
||||
# SUMMARY: Sanity check on the kernel config file
|
||||
# disabled for arm64: https://github.com/linuxkit/linuxkit/issues/2807
|
||||
# LABELS: amd64
|
||||
# REPEAT:
|
||||
|
||||
set -e
|
||||
|
||||
# Source libraries. Uncomment if needed/defined
|
||||
#. "${RT_LIB}"
|
||||
. "${RT_PROJECT_ROOT}/_lib/lib.sh"
|
||||
|
||||
NAME=kconfig
|
||||
|
||||
clean_up() {
|
||||
rm -rf ${NAME}-*
|
||||
}
|
||||
trap clean_up EXIT
|
||||
|
||||
# Test code goes here
|
||||
linuxkit build -format kernel+initrd -name "${NAME}" test.yml
|
||||
RESULT="$(linuxkit run ${NAME})"
|
||||
echo "${RESULT}" | grep -q "suite PASSED"
|
||||
|
||||
exit 0
|
15
test/cases/020_kernel/007_config_4.15.x/test.yml
Normal file
15
test/cases/020_kernel/007_config_4.15.x/test.yml
Normal file
@@ -0,0 +1,15 @@
|
||||
kernel:
|
||||
image: linuxkit/kernel:4.15
|
||||
cmdline: "console=ttyS0 console=ttyAMA0"
|
||||
init:
|
||||
- linuxkit/init:e650be6c21ef9ecb33534858fc63fb8bc5028c6e
|
||||
- linuxkit/runc:52ecfdef1ae051e7fd5ac5f1d0b7dd859adff015
|
||||
onboot:
|
||||
- name: check-kernel-config
|
||||
image: linuxkit/test-kernel-config:80bb1cd57205e47b5976f7fa4fb036384d012a1d
|
||||
- name: poweroff
|
||||
image: linuxkit/poweroff:f9a0a5e52fd2a97908bda33db2afffafe4a6a67d
|
||||
command: ["/bin/sh", "/poweroff.sh", "3"]
|
||||
trust:
|
||||
org:
|
||||
- linuxkit
|
@@ -3,7 +3,7 @@
|
||||
# In the last stage, it creates a package, which can be used for
|
||||
# testing.
|
||||
|
||||
FROM linuxkit/kernel:4.4.113 AS ksrc
|
||||
FROM linuxkit/kernel:4.4.114 AS ksrc
|
||||
|
||||
# Extract headers and compile module
|
||||
FROM linuxkit/alpine:d307c8a386fa3f32cddda9409b9687e191cdd6f1 AS build
|
||||
|
@@ -19,7 +19,7 @@ clean_up() {
|
||||
trap clean_up EXIT
|
||||
|
||||
# Make sure we have the latest kernel image
|
||||
docker pull linuxkit/kernel:4.9.78
|
||||
docker pull linuxkit/kernel:4.9.79
|
||||
# Build a package
|
||||
docker build -t ${IMAGE_NAME} .
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
kernel:
|
||||
image: linuxkit/kernel:4.4.113
|
||||
image: linuxkit/kernel:4.4.114
|
||||
cmdline: "console=ttyS0 console=ttyAMA0"
|
||||
init:
|
||||
- linuxkit/init:e650be6c21ef9ecb33534858fc63fb8bc5028c6e
|
||||
|
@@ -3,7 +3,7 @@
|
||||
# In the last stage, it creates a package, which can be used for
|
||||
# testing.
|
||||
|
||||
FROM linuxkit/kernel:4.9.78 AS ksrc
|
||||
FROM linuxkit/kernel:4.9.79 AS ksrc
|
||||
|
||||
# Extract headers and compile module
|
||||
FROM linuxkit/alpine:d307c8a386fa3f32cddda9409b9687e191cdd6f1 AS build
|
||||
|
@@ -19,7 +19,7 @@ clean_up() {
|
||||
trap clean_up EXIT
|
||||
|
||||
# Make sure we have the latest kernel image
|
||||
docker pull linuxkit/kernel:4.9.78
|
||||
docker pull linuxkit/kernel:4.9.79
|
||||
# Build a package
|
||||
docker build -t ${IMAGE_NAME} .
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
kernel:
|
||||
image: linuxkit/kernel:4.9.78
|
||||
image: linuxkit/kernel:4.9.79
|
||||
cmdline: "console=ttyS0 console=ttyAMA0"
|
||||
init:
|
||||
- linuxkit/init:e650be6c21ef9ecb33534858fc63fb8bc5028c6e
|
||||
|
@@ -3,7 +3,7 @@
|
||||
# In the last stage, it creates a package, which can be used for
|
||||
# testing.
|
||||
|
||||
FROM linuxkit/kernel:4.14.15 AS ksrc
|
||||
FROM linuxkit/kernel:4.14.16 AS ksrc
|
||||
|
||||
# Extract headers and compile module
|
||||
FROM linuxkit/alpine:d307c8a386fa3f32cddda9409b9687e191cdd6f1 AS build
|
||||
|
@@ -19,7 +19,7 @@ clean_up() {
|
||||
trap clean_up EXIT
|
||||
|
||||
# Make sure we have the latest kernel image
|
||||
docker pull linuxkit/kernel:4.9.78
|
||||
docker pull linuxkit/kernel:4.9.79
|
||||
# Build a package
|
||||
docker build -t ${IMAGE_NAME} .
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
kernel:
|
||||
image: linuxkit/kernel:4.14.15
|
||||
image: linuxkit/kernel:4.14.16
|
||||
cmdline: "console=ttyS0 console=ttyAMA0"
|
||||
init:
|
||||
- linuxkit/init:e650be6c21ef9ecb33534858fc63fb8bc5028c6e
|
||||
|
23
test/cases/020_kernel/017_kmod_4.15.x/Dockerfile
Normal file
23
test/cases/020_kernel/017_kmod_4.15.x/Dockerfile
Normal file
@@ -0,0 +1,23 @@
|
||||
# This Dockerfile extracts the kernel headers from the kernel image
|
||||
# and then compiles a simple hello world kernel module against them.
|
||||
# In the last stage, it creates a package, which can be used for
|
||||
# testing.
|
||||
|
||||
FROM linuxkit/kernel:4.15 AS ksrc
|
||||
|
||||
# Extract headers and compile module
|
||||
FROM linuxkit/alpine:d307c8a386fa3f32cddda9409b9687e191cdd6f1 AS build
|
||||
RUN apk add build-base libelf-dev
|
||||
|
||||
COPY --from=ksrc /kernel-dev.tar /
|
||||
RUN tar xf kernel-dev.tar
|
||||
|
||||
WORKDIR /kmod
|
||||
COPY ./src/* ./
|
||||
RUN make all
|
||||
|
||||
# Package
|
||||
FROM alpine:3.7
|
||||
COPY --from=build /kmod/hello_world.ko /
|
||||
COPY check.sh /check.sh
|
||||
ENTRYPOINT ["/bin/sh", "/check.sh"]
|
15
test/cases/020_kernel/017_kmod_4.15.x/check.sh
Executable file
15
test/cases/020_kernel/017_kmod_4.15.x/check.sh
Executable file
@@ -0,0 +1,15 @@
|
||||
#!/bin/sh
|
||||
function failed {
|
||||
printf "Kernel module test suite FAILED\n"
|
||||
/sbin/poweroff -f
|
||||
}
|
||||
|
||||
uname -a
|
||||
modinfo hello_world.ko || failed
|
||||
insmod hello_world.ko || failed
|
||||
[ -n "$(dmesg | grep -o 'Hello LinuxKit')" ] || failed
|
||||
rmmod hello_world || failed
|
||||
|
||||
printf "Kernel module test suite PASSED\n"
|
||||
|
||||
/sbin/poweroff -f
|
6
test/cases/020_kernel/017_kmod_4.15.x/src/Makefile
Normal file
6
test/cases/020_kernel/017_kmod_4.15.x/src/Makefile
Normal file
@@ -0,0 +1,6 @@
|
||||
obj-m += hello_world.o
|
||||
KVER=$(shell basename /usr/src/linux-headers-*)
|
||||
all:
|
||||
make -C /usr/src/$(KVER) M=$(PWD) modules
|
||||
clean:
|
||||
make -C /usr/src/$(KVER) M=$(PWD) clean
|
22
test/cases/020_kernel/017_kmod_4.15.x/src/hello_world.c
Normal file
22
test/cases/020_kernel/017_kmod_4.15.x/src/hello_world.c
Normal file
@@ -0,0 +1,22 @@
|
||||
/*
|
||||
* A simple Hello World kernel module
|
||||
*/
|
||||
#include <linux/module.h>
|
||||
#include <linux/kernel.h>
|
||||
|
||||
int init_hello(void)
|
||||
{
|
||||
printk(KERN_INFO "Hello LinuxKit\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
void exit_hello(void)
|
||||
{
|
||||
printk(KERN_INFO "Goodbye LinuxKit.\n");
|
||||
}
|
||||
|
||||
module_init(init_hello);
|
||||
module_exit(exit_hello);
|
||||
MODULE_AUTHOR("Rolf Neugebauer <rolf.neugebauer@docker.com>");
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_DESCRIPTION("A simple Hello World kernel module for testing");
|
31
test/cases/020_kernel/017_kmod_4.15.x/test.sh
Normal file
31
test/cases/020_kernel/017_kmod_4.15.x/test.sh
Normal file
@@ -0,0 +1,31 @@
|
||||
#!/bin/sh
|
||||
# SUMMARY: Test build and insertion of kernel modules
|
||||
# LABELS:
|
||||
# REPEAT:
|
||||
|
||||
set -e
|
||||
|
||||
# Source libraries. Uncomment if needed/defined
|
||||
#. "${RT_LIB}"
|
||||
. "${RT_PROJECT_ROOT}/_lib/lib.sh"
|
||||
|
||||
NAME=kmod
|
||||
IMAGE_NAME=kmod-test
|
||||
|
||||
clean_up() {
|
||||
docker rmi ${IMAGE_NAME} || true
|
||||
rm -rf ${NAME}-*
|
||||
}
|
||||
trap clean_up EXIT
|
||||
|
||||
# Make sure we have the latest kernel image
|
||||
docker pull linuxkit/kernel:4.9.79
|
||||
# Build a package
|
||||
docker build -t ${IMAGE_NAME} .
|
||||
|
||||
# Build and run a LinuxKit image with kernel module (and test script)
|
||||
linuxkit build -format kernel+initrd -name "${NAME}" test.yml
|
||||
RESULT="$(linuxkit run ${NAME})"
|
||||
echo "${RESULT}" | grep -q "Hello LinuxKit"
|
||||
|
||||
exit 0
|
20
test/cases/020_kernel/017_kmod_4.15.x/test.yml
Normal file
20
test/cases/020_kernel/017_kmod_4.15.x/test.yml
Normal file
@@ -0,0 +1,20 @@
|
||||
kernel:
|
||||
image: linuxkit/kernel:4.15
|
||||
cmdline: "console=ttyS0 console=ttyAMA0"
|
||||
init:
|
||||
- linuxkit/init:e650be6c21ef9ecb33534858fc63fb8bc5028c6e
|
||||
- linuxkit/runc:52ecfdef1ae051e7fd5ac5f1d0b7dd859adff015
|
||||
onboot:
|
||||
- name: check
|
||||
image: kmod-test
|
||||
binds:
|
||||
- /dev:/dev
|
||||
- /lib/modules:/lib/modules
|
||||
capabilities:
|
||||
- all
|
||||
- name: poweroff
|
||||
image: linuxkit/poweroff:f9a0a5e52fd2a97908bda33db2afffafe4a6a67d
|
||||
command: ["/bin/sh", "/poweroff.sh", "3"]
|
||||
trust:
|
||||
org:
|
||||
- linuxkit
|
@@ -1,5 +1,5 @@
|
||||
kernel:
|
||||
image: linuxkit/kernel:4.4.113
|
||||
image: linuxkit/kernel:4.4.114
|
||||
cmdline: "console=ttyS0 console=ttyAMA0"
|
||||
init:
|
||||
- linuxkit/init:e650be6c21ef9ecb33534858fc63fb8bc5028c6e
|
||||
|
@@ -1,5 +1,5 @@
|
||||
kernel:
|
||||
image: linuxkit/kernel:4.9.78
|
||||
image: linuxkit/kernel:4.9.79
|
||||
cmdline: "console=ttyS0 console=ttyAMA0"
|
||||
init:
|
||||
- linuxkit/init:e650be6c21ef9ecb33534858fc63fb8bc5028c6e
|
||||
|
@@ -1,5 +1,5 @@
|
||||
kernel:
|
||||
image: linuxkit/kernel:4.14.15
|
||||
image: linuxkit/kernel:4.14.16
|
||||
cmdline: "console=ttyS0 console=ttyAMA0"
|
||||
init:
|
||||
- linuxkit/init:e650be6c21ef9ecb33534858fc63fb8bc5028c6e
|
||||
|
@@ -1,5 +1,5 @@
|
||||
kernel:
|
||||
image: linuxkit/kernel:4.9.78
|
||||
image: linuxkit/kernel:4.9.79
|
||||
cmdline: "console=ttyS0"
|
||||
init:
|
||||
- linuxkit/init:e650be6c21ef9ecb33534858fc63fb8bc5028c6e
|
||||
|
@@ -1,5 +1,5 @@
|
||||
kernel:
|
||||
image: linuxkit/kernel:4.9.78
|
||||
image: linuxkit/kernel:4.9.79
|
||||
cmdline: "console=ttyS0 page_poison=1"
|
||||
init:
|
||||
- linuxkit/init:e650be6c21ef9ecb33534858fc63fb8bc5028c6e
|
||||
|
@@ -1,5 +1,5 @@
|
||||
kernel:
|
||||
image: linuxkit/kernel:4.9.78
|
||||
image: linuxkit/kernel:4.9.79
|
||||
cmdline: "console=ttyS0 console=ttyAMA0"
|
||||
init:
|
||||
- linuxkit/init:e650be6c21ef9ecb33534858fc63fb8bc5028c6e
|
||||
|
@@ -1,5 +1,5 @@
|
||||
kernel:
|
||||
image: linuxkit/kernel:4.9.78
|
||||
image: linuxkit/kernel:4.9.79
|
||||
cmdline: "console=ttyS0 console=ttyAMA0"
|
||||
init:
|
||||
- linuxkit/init:e650be6c21ef9ecb33534858fc63fb8bc5028c6e
|
||||
|
@@ -1,5 +1,5 @@
|
||||
kernel:
|
||||
image: linuxkit/kernel:4.9.78
|
||||
image: linuxkit/kernel:4.9.79
|
||||
cmdline: "console=ttyS0 console=ttyAMA0"
|
||||
init:
|
||||
- linuxkit/init:e650be6c21ef9ecb33534858fc63fb8bc5028c6e
|
||||
|
@@ -1,5 +1,5 @@
|
||||
kernel:
|
||||
image: linuxkit/kernel:4.9.78
|
||||
image: linuxkit/kernel:4.9.79
|
||||
cmdline: "console=ttyS0 console=ttyAMA0"
|
||||
init:
|
||||
- linuxkit/init:e650be6c21ef9ecb33534858fc63fb8bc5028c6e
|
||||
|
@@ -1,5 +1,5 @@
|
||||
kernel:
|
||||
image: linuxkit/kernel:4.9.78
|
||||
image: linuxkit/kernel:4.9.79
|
||||
cmdline: "console=ttyS0 console=ttyAMA0"
|
||||
init:
|
||||
- linuxkit/init:e650be6c21ef9ecb33534858fc63fb8bc5028c6e
|
||||
|
@@ -1,5 +1,5 @@
|
||||
kernel:
|
||||
image: linuxkit/kernel:4.9.78
|
||||
image: linuxkit/kernel:4.9.79
|
||||
cmdline: "console=ttyS0 console=ttyAMA0"
|
||||
init:
|
||||
- linuxkit/init:e650be6c21ef9ecb33534858fc63fb8bc5028c6e
|
||||
|
@@ -1,5 +1,5 @@
|
||||
kernel:
|
||||
image: linuxkit/kernel:4.9.78
|
||||
image: linuxkit/kernel:4.9.79
|
||||
cmdline: "console=ttyS0 console=ttyAMA0"
|
||||
init:
|
||||
- linuxkit/init:e650be6c21ef9ecb33534858fc63fb8bc5028c6e
|
||||
|
@@ -1,5 +1,5 @@
|
||||
kernel:
|
||||
image: linuxkit/kernel:4.9.78
|
||||
image: linuxkit/kernel:4.9.79
|
||||
cmdline: "console=ttyS0 console=ttyAMA0"
|
||||
init:
|
||||
- linuxkit/init:e650be6c21ef9ecb33534858fc63fb8bc5028c6e
|
||||
|
@@ -1,5 +1,5 @@
|
||||
kernel:
|
||||
image: linuxkit/kernel:4.9.78
|
||||
image: linuxkit/kernel:4.9.79
|
||||
cmdline: "console=ttyS0 console=ttyAMA0"
|
||||
init:
|
||||
- linuxkit/init:e650be6c21ef9ecb33534858fc63fb8bc5028c6e
|
||||
|
@@ -1,5 +1,5 @@
|
||||
kernel:
|
||||
image: linuxkit/kernel:4.9.78
|
||||
image: linuxkit/kernel:4.9.79
|
||||
cmdline: "console=ttyS0 console=ttyAMA0"
|
||||
init:
|
||||
- linuxkit/init:e650be6c21ef9ecb33534858fc63fb8bc5028c6e
|
||||
|
@@ -1,5 +1,5 @@
|
||||
kernel:
|
||||
image: linuxkit/kernel:4.9.78
|
||||
image: linuxkit/kernel:4.9.79
|
||||
cmdline: "console=ttyS0 console=ttyAMA0"
|
||||
init:
|
||||
- linuxkit/init:e650be6c21ef9ecb33534858fc63fb8bc5028c6e
|
||||
|
@@ -1,5 +1,5 @@
|
||||
kernel:
|
||||
image: linuxkit/kernel:4.9.78
|
||||
image: linuxkit/kernel:4.9.79
|
||||
cmdline: "console=ttyS0 console=ttyAMA0"
|
||||
init:
|
||||
- linuxkit/init:e650be6c21ef9ecb33534858fc63fb8bc5028c6e
|
||||
|
@@ -1,5 +1,5 @@
|
||||
kernel:
|
||||
image: linuxkit/kernel:4.9.78
|
||||
image: linuxkit/kernel:4.9.79
|
||||
cmdline: "console=ttyS0 console=ttyAMA0"
|
||||
init:
|
||||
- linuxkit/init:e650be6c21ef9ecb33534858fc63fb8bc5028c6e
|
||||
|
@@ -1,5 +1,5 @@
|
||||
kernel:
|
||||
image: linuxkit/kernel:4.9.78
|
||||
image: linuxkit/kernel:4.9.79
|
||||
cmdline: "console=ttyS0 console=ttyAMA0"
|
||||
init:
|
||||
- linuxkit/init:e650be6c21ef9ecb33534858fc63fb8bc5028c6e
|
||||
|
@@ -1,5 +1,5 @@
|
||||
kernel:
|
||||
image: linuxkit/kernel:4.9.78
|
||||
image: linuxkit/kernel:4.9.79
|
||||
cmdline: "console=ttyS0 console=ttyAMA0"
|
||||
init:
|
||||
- linuxkit/init:e650be6c21ef9ecb33534858fc63fb8bc5028c6e
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user