551 Commits
v0.2 ... v0.5

Author SHA1 Message Date
Rolf Neugebauer
811ba12cb0 Merge pull request #3104 from rn/rel_v0.5
Preparation for v0.5 release
2018-07-10 23:58:09 +01:00
Rolf Neugebauer
3181a8f182 Update Authors
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@gmail.com>
2018-07-10 18:46:57 +01:00
Rolf Neugebauer
3ab5e19b2f Update CHANGELOG
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@gmail.com>
2018-07-10 18:44:37 +01:00
Rolf Neugebauer
88afbcae15 build: Bump version to v0.5
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@gmail.com>
2018-07-10 18:32:57 +01:00
Rolf Neugebauer
ea9b29bd19 Update package tags to v0.5
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-07-10 18:16:02 +01:00
Rolf Neugebauer
b4c3f9db1f pkg/tss: Switch SF repository to our mirror hosted on github
sourceforge git access is not very reliable...

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-07-10 18:00:00 +01:00
Rolf Neugebauer
5b4059fcfd docs: Update release documentation
Add notes to update various external packages.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-07-10 16:53:49 +01:00
Rolf Neugebauer
4debffafa4 examples/docker: Update to 18.05.0-ce-dind
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-07-10 16:53:49 +01:00
Rolf Neugebauer
3672843dc9 pkg/node_exporter: Update to 0.16.0
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-07-10 16:53:49 +01:00
Rolf Neugebauer
1a6b6b2db9 pkg/firmware,firmware-all: Update to latest version
Update the the firmware packages to the latest commit
of the upstream linux-firmware repository.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-07-10 16:53:49 +01:00
Rolf Neugebauer
46184e258b pkg/cadvisor: Update to 0.30.2
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-07-10 16:53:49 +01:00
Rolf Neugebauer
c1e10002b0 pkgs: Update packages to latest alpine base
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-07-10 15:49:20 +01:00
Rolf Neugebauer
1b22e1e2be Update use of test packages to latest
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-07-10 15:37:09 +01:00
Rolf Neugebauer
ccc6e48f38 tests: Update packages to latest alpine base
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-07-10 15:14:12 +01:00
Rolf Neugebauer
a0a4ec5449 Update use of tools to latest
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-07-10 15:13:58 +01:00
Rolf Neugebauer
cd4d50920a tools: Update to latest alpine base
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-07-10 14:59:45 +01:00
Rolf Neugebauer
4eddd90ae2 Merge pull request #3103 from rn/kup
Update kernel to 4.17.5/4.14.54
2018-07-10 14:21:06 +01:00
Rolf Neugebauer
4ee42d63b9 Merge pull request #3102 from ijc/containerd-v1.1.1
Containerd v1.1.1
2018-07-10 13:05:11 +01:00
Rolf Neugebauer
a90d4a92d5 Update YAMLs to the latest kernels
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-07-10 13:03:09 +01:00
Rolf Neugebauer
6a7b336ade kernel: Update to 4.17.5/4.14.54
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-07-10 10:58:18 +01:00
Ian Campbell
ec2dfa6625 Revert "tests: Temporarily disable containerd test"
This reverts commit 177008fe0c. The underlying
issue was fixed in containerd v1.1.1.

Signed-off-by: Ian Campbell <ijc@docker.com>
2018-07-10 10:46:42 +01:00
Ian Campbell
93496067ea Bump yml to pickup containerd v1.1.1
Signed-off-by: Ian Campbell <ijc@docker.com>
2018-07-10 10:19:14 +01:00
Ian Campbell
18f11b2834 Bump packages to new alpine w/ containerd v1.1.1
Signed-off-by: Ian Campbell <ijc@docker.com>
2018-07-10 09:53:11 +01:00
Ian Campbell
8ad9f65ec8 alpine: Bump to containerd v1.1.1
Signed-off-by: Ian Campbell <ijc@docker.com>
2018-07-10 04:52:57 -04:00
Rolf Neugebauer
20bd54c6b0 Merge pull request #3095 from djs55/more-logging
Support log rotation and logging of /dev/kmsg
2018-07-09 22:34:43 +01:00
David Scott
facadbf548 examples/logging: add kmsg to read /dev/kmsg
Signed-off-by: David Scott <dave.scott@docker.com>
2018-07-09 20:36:58 +01:00
David Scott
9344473ba5 pkg/kmsg: add simple test case
Signed-off-by: David Scott <dave.scott@docker.com>
2018-07-09 20:36:58 +01:00
David Scott
e7fc5b59a3 pkg/kmsg: re-run vndr
Signed-off-by: David Scott <dave.scott@docker.com>
2018-07-09 20:36:58 +01:00
David Scott
793dd1b257 Add pkg/kmsg
This very simple program reads from `/dev/kmsg` and logs the output.

Signed-off-by: David Scott <dave.scott@docker.com>
2018-07-09 20:36:58 +01:00
David Scott
565f787bb3 Add pkg/logwrite which writes and rotates log files
This process connects to memlogd and streams logs to individual files,
one per log. It keeps track of how many bytes have been written to each
file and rotates when the file size exceeds a defined threshold.

By default the maximum size of each file before rotation is 1MiB and
we keep up to 10 files per log.

Signed-off-by: David Scott <dave.scott@docker.com>
2018-07-09 20:36:51 +01:00
Rolf Neugebauer
4b4d56913d Merge pull request #3100 from zx2c4-forks/wireguard-bump
wireguard: upgrade to 0.0.20180708
2018-07-09 08:39:50 +01:00
Jason A. Donenfeld
05753e7341 wireguard: upgrade to 0.0.20180708
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-07-08 19:43:03 +02:00
Rolf Neugebauer
b305db0ae5 Merge pull request #3098 from rn/alpine3.8
Update to Alpine 3.8
2018-07-07 23:54:07 +01:00
Rolf Neugebauer
177008fe0c tests: Temporarily disable containerd test
Looks like brtfs-prog v4.17 as shipped with alpine:3.8 requires
a loopback device of 109MB while the containerd tests only
create a 100MB device. This causes the test to fail.

Disable it until https://github.com/containerd/containerd/issues/2447
is fixed.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@gmail.com>
2018-07-07 21:59:40 +01:00
Rolf Neugebauer
8301540809 Update remaining uses of alpine:3.7 to alpine:3.8
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@gmail.com>
2018-07-07 19:26:58 +01:00
Rolf Neugebauer
63ae346152 Update YAMLs to latest pkg versions
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@gmail.com>
2018-07-07 19:25:21 +01:00
Rolf Neugebauer
6045ddaf51 pkg: Use alpine 3.8 version of go (no need for go1.10)
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@gmail.com>
2018-07-07 18:24:56 +01:00
Rolf Neugebauer
a9acdd827e pkg: Update packages to latest alpine base
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@gmail.com>
2018-07-07 18:05:29 +01:00
Rolf Neugebauer
d7d995cab5 kernel: Update build to use updated alpine base
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@gmail.com>
2018-07-07 17:51:08 +01:00
Rolf Neugebauer
21f65528d2 Update use of test packages to latest
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@gmail.com>
2018-07-07 17:50:34 +01:00
Rolf Neugebauer
38636e80d9 tests: Use go (not go1.10) for containerd test
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@gmail.com>
2018-07-07 14:05:42 +01:00
Rolf Neugebauer
c6c502c631 tests: Update packages to latest alpine base
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@gmail.com>
2018-07-07 14:03:01 +01:00
Rolf Neugebauer
5c8df3837d Update use of tools to latest
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@gmail.com>
2018-07-07 14:00:07 +01:00
Rolf Neugebauer
48ca3f1302 tools: Update to latest alpine base
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@gmail.com>
2018-07-07 13:27:48 +01:00
Rolf Neugebauer
20e71cf09e tools/alpine: Update alpine base
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@gmail.com>
2018-07-07 08:21:54 -04:00
Rolf Neugebauer
1b23313bb3 tools/alpine: Remove gummiboot for arm64
The package does not exist any more in 3.8 and I can't
see any uses for it.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@gmail.com>
2018-07-07 11:43:06 +01:00
Rolf Neugebauer
53af0ce80c tools/alpine: Remove go1.10
alpine:3.8 comes with go 1.10 as default

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@gmail.com>
2018-07-07 09:30:51 +01:00
Rolf Neugebauer
3c492fe40a tools/alpine: Update to alpine:3.8
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@gmail.com>
2018-07-07 09:29:59 +01:00
Rolf Neugebauer
29c3ef0aa0 Merge pull request #3085 from djs55/update-logging
Support pluggable logging systems
2018-07-07 09:21:13 +01:00
David Scott
5d614468a0 Update linuxkit/init and linuxkit/memlogd yamls
Signed-off-by: David Scott <dave@recoil.org>
2018-07-06 21:51:04 +01:00
David Scott
9bbc0ecbee projects/logging: delete the remaining unused bits
Signed-off-by: David Scott <dave.scott@docker.com>
2018-07-06 21:49:26 +01:00
David Scott
92a9a64a1b examples: add the example from projects/logging
This simplifies the example by adding a service which writes to the
log every 1s and a getty for introspection.

To see the logs:

  /proc/1/root/usr/bin/logread -F

Signed-off-by: David Scott <dave.scott@docker.com>
2018-07-06 21:49:26 +01:00
David Scott
a07ecf60d5 memlogd: use kmsg format for reading the logs
Switch to a more formally-specified `kmsg`-style format for reading
the logs.

- update the spec in docs/logging.md
- check for bad names in pkg/memlogd with unit test

Signed-off-by: David Scott <dave.scott@docker.com>
2018-07-06 21:49:26 +01:00
David Scott
fe64f33430 memlogd: add test cases
- check writing to the log does not block
- check the log doesn't expand -- it should be finite
- check that client connections don't buffer arbitrary amounts of
  data if the client is slow

Signed-off-by: David Scott <dave.scott@docker.com>
2018-07-06 21:49:26 +01:00
David Scott
6aca715ad8 memlogd: replace an unbounded buffer with bounded channel
Previously we had a per-connection

  bytes.Buffer // to be written to the connection
  sync.Cond    // to allow us to Wait for more data

This had the major disadvantage that the buffer was unbounded and so
a slow client could cause memory exhaustion in the server. This patch
replaces these with a single

  chan *logEntry

which is naturally bounded and supports blocking read. We make write
non-blocking using select i.e. we drop messages rather than allocate
more space.

Signed-off-by: David Scott <dave.scott@docker.com>
2018-07-06 21:49:26 +01:00
David Scott
3e742018d6 memlogd: use net.Conn rather than *net.UnixConn
There's no need to be so specific about the connection implementation.

Signed-off-by: David Scott <dave.scott@docker.com>
2018-07-06 21:49:25 +01:00
David Scott
c92af038fb projects/logging: promote pkg/memlogd to a toplevel package
This is an example external logging service which can be enabled by
adding it to the `init` section of the .yml, for example:

    ...
    init:
      - linuxkit/init:35866bb276c264a5f664bfac7456f4b9eeb87a4d
      - linuxkit/runc:v0.4
      - linuxkit/containerd:f2bc1bda1ab18146967fa1a149800aaf14bee81b
      - linuxkit/ca-certificates:v0.4
      - linuxkit/memlogd:cc035e5c9e4011ec1ba97a181a6689fc90965ce9
    onboot:
    ...

Signed-off-by: David Scott <dave.scott@docker.com>
2018-07-06 21:49:25 +01:00
David Scott
638c455dd2 docs: document how to use an external logging service
This is an updated version of projects/logging/README.md

Signed-off-by: David Scott <dave.scott@docker.com>
2018-07-06 21:49:25 +01:00
David Scott
f4bbce7a6c service: use the logging system with runc
If external logging is enabled, this patch sets the stdout and stderr
of the `runc` invocations to one end of a socketpair and the other end is
sent to the logging service. Otherwise we log to files as before.

Signed-off-by: David Scott <dave.scott@docker.com>
2018-07-06 21:49:21 +01:00
David Scott
4dc75bc67b service: use the logging system with containerd
An external logging system exists if the socket

  /var/run/linuxkit-external-logging.sock

exists.

If an external logging system is enabled then create FIFOs for
containerd and send the other end of the FIFOs to the logging service.
Otherwise use /var/log files as before.

Signed-off-by: David Scott <dave.scott@docker.com>
2018-07-06 21:48:57 +01:00
David Scott
1795c15276 projects/logging: start memlogd from init.d
Previously memlogd would always run in the foreground. This patch
adds a `-daemonize` option which binds the /var/run sockets, forks
and execs itself and immediately returns. Therefore the program won't
block (important for an init.d script) but guarantees the sockets will
be available for any program started afterwards.

This also removes the alpine base from the memlogd image as `init`
"containers" are treated as simple file overlays.

Signed-off-by: David Scott <dave.scott@docker.com>
2018-07-06 21:47:50 +01:00
David Scott
6dfd40a639 projects/linuxkit: bind /var/run in the memlogd container
We will place the control sockets in the root /var/run and then share
with all services who need access.

Signed-off-by: David Scott <dave.scott@docker.com>
2018-07-06 21:47:50 +01:00
David Scott
d09fbe04fb projects/logging: use /var/run for sockets by default
Previously we used /tmp, but /var/run is a better place for these.

Signed-off-by: David Scott <dave.scott@docker.com>
2018-07-06 21:47:49 +01:00
David Scott
8727bcb4f3 projects/logging: fix govet composite literal error
This fixes the error

net.UnixAddr composite literal uses unkeyed fields

Signed-off-by: David Scott <dave.scott@docker.com>
2018-07-06 21:47:49 +01:00
David Scott
6eabfdcb96 projects/logging: add modern build.yml and Dockerfile
Signed-off-by: David Scott <dave@recoil.org>
2018-07-06 21:47:49 +01:00
Rolf Neugebauer
2c8438f64b Merge pull request #3093 from TiejunChina/master-dev
update -rt to 4.14.53-rt34
2018-07-06 11:11:03 +01:00
Tiejun Chen
a1d47ff766 update -rt to 4.14.53-rt34
Signed-off-by: Tiejun Chen <tiejun.china@gmail.com>
2018-07-06 14:02:07 +08:00
Rolf Neugebauer
9088e3f843 Merge pull request #3088 from rn/kernel-up
Update kernel to 4.17.4/4.14.53/4.9.11/4.4.139
2018-07-05 10:15:07 +01:00
Justin Cormack
e1cff3614a Merge pull request #3090 from rn/june-report
June 2018 LinuxKit report
2018-07-05 10:00:06 +01:00
Rolf Neugebauer
91bed426f1 Merge pull request #3089 from masterzen/fix/3087-faq-and-motd
Some FAQ and motd update
2018-07-04 15:05:54 +01:00
Brice Figureau
9a1d9fb1eb Add FAQ entries to help troubleshoot running containers
Since I struggled to understand and find information about how to
troubleshoot a running linuxkit instance, I propose to add these two
FAQ entries.
The first one explains why it is possible to not see the `containerd` or
`init` outputs at boot in the console.
The second one gives a few `ctr` example to list containers, running
containers or how to open a shell in a given container.

Signed-off-by: Brice Figureau <brice@daysofwonder.com>
2018-07-04 13:51:19 +02:00
Rolf Neugebauer
b859e7ab4d June 2018 LinuxKit report
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-07-04 11:24:25 +01:00
Rolf Neugebauer
498d4f1a91 Update YAMLs to latest kernels
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-07-04 10:38:55 +01:00
Brice Figureau
f7ff31382b Make sure motd contains the correct ctr command
The listed namespace wasn't correct, and thus the given `ctr` command
wasn't working.

Signed-off-by: Brice Figureau <brice@daysofwonder.com>
2018-07-04 11:32:36 +02:00
Rolf Neugebauer
909a9fac68 Merge pull request #3086 from mat007/fix-windows-build
Fix windows build
2018-07-03 18:19:46 +01:00
Rolf Neugebauer
dcc4a5e799 kernel: Update to 4.17.4/4.14.53/4.9.111/4.4.139
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-07-03 11:49:36 +01:00
Mathieu Champlon
d3e3df3d73 Append .exe to binaries on Windows
Signed-off-by: Mathieu Champlon <mathieu.champlon@docker.com>
2018-07-03 12:03:43 +02:00
Mathieu Champlon
82867aa114 Set proper GOOS for Windows
Signed-off-by: Mathieu Champlon <mathieu.champlon@docker.com>
2018-07-03 12:02:35 +02:00
Rolf Neugebauer
9dac66b831 Merge pull request #3078 from justincormack/dhcp-hook-fix
Fix dhcpcd hooks config
2018-06-29 19:02:24 +01:00
Justin Cormack
f6af74b6bf Update hashes
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2018-06-29 16:40:52 +01:00
Justin Cormack
157c73cfed Fix dhcpcd hooks config
These were being added to the incorrect directory.

Also move config file to /etc to be more standard.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2018-06-29 16:31:44 +01:00
Ian Campbell
380e24391d Merge pull request #3084 from ijc/containerd-v1.1.0-rc.2
Containerd v1.1.0-rc.2
2018-06-29 13:30:04 +01:00
Ian Campbell
ad85828d87 Bump yml to pickup containerd v1.1.0-rc.2
Signed-off-by: Ian Campbell <ijc@docker.com>
2018-06-29 10:48:10 +01:00
Ian Campbell
34666cd87d Bump packages to new alpine w/ containerd v1.1.0-rc.2
Signed-off-by: Ian Campbell <ijc@docker.com>
2018-06-28 17:35:04 +01:00
Ian Campbell
779a611d6b alpine: Bump to containerd v1.1.0-rc.2
Signed-off-by: Ian Campbell <ijc@docker.com>
2018-06-28 12:34:50 -04:00
Rolf Neugebauer
b37527c23d Merge pull request #3082 from rn/kup
Update kernels to 4.17.3/4.16.18/4.14.52/4.9.110 and then remove 4.16.x (EOLed)
2018-06-27 16:25:57 +01:00
Rolf Neugebauer
0ee4ab7b7f Update YAMLs to latest kernels
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-06-27 14:52:26 +01:00
Rolf Neugebauer
f7cf178ead kernel: Remove 4.16.x as it is EOLed
The previous commit updated to 4.16.18, which is the last
4.16.x kernel. The 4.16.18 kernel was compiled and pushed
but we may as well now remove it as it has been EOLed.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-06-27 14:49:08 +01:00
Rolf Neugebauer
e7a7fe9339 kernels: Update to 4.17.3/4.16.18/4.14.52/4.9.110
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-06-27 13:10:44 +01:00
Rolf Neugebauer
e5a3b36d38 Merge pull request #3080 from alanraison/3079-apk-architecture
Use apk --print-arch to discover architecture
2018-06-27 13:03:26 +01:00
Alan Raison
412857be96 Use apk --print-arch to discover architecture
When dealing with apk, `uname -m` doesn't always match the architecture
name that apk uses. Instead `apk --print-arch` is used.

Signed-off-by: Alan Raison <alanraison@users.noreply.github.com>
2018-06-26 23:16:20 +01:00
Rolf Neugebauer
ef47cd9c98 Merge pull request #3077 from zx2c4-forks/wireguard-bump
wireguard: upgrade to 0.0.20180625
2018-06-25 23:28:57 +01:00
Jason A. Donenfeld
bfd0ba0983 wireguard: upgrade to 0.0.20180625
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-06-25 19:58:49 +02:00
Rolf Neugebauer
8f962b9e4a Merge pull request #3076 from rn/kernel-up
kernel update to 4.16.17/4.14.51/4.4.137/4.4.138
2018-06-22 17:55:07 +01:00
Rolf Neugebauer
e36eae4820 Update YAMLs to latest kernels
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-06-22 16:12:34 +01:00
Justin Cormack
561e9375e8 Merge pull request #3075 from justincormack/binfmt_mount
Binfmt fixes
2018-06-22 16:09:34 +01:00
Justin Cormack
8ac642e4e0 Update yaml files for new package
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2018-06-22 14:18:31 +01:00
Justin Barrick
14ba30f418 Workaround DNS issue with qemu-user-static on alpine by using Debian in the first stage #2710
DNS lookups fail in qemu-user when it is built on Alpine: https://bugs.alpinelinux.org/issues/8131

Until this is resolved, we fetch the binaries from Debian and use those instead. The final stage
of the Dockerfile is still based on scratch.

We can revert this once the Alpine issue is fixed.

Signed-off-by: Justin Barrick <jbarrick@cloudflare.com>
2018-06-22 14:10:50 +01:00
Justin Cormack
a6dbe8ceba Rather than bind mounting binfmt_misc filesystem, mount a copy.
For some reason, bind mounting does not always seem to work,
sometimes the filesystem is empty. Mounting a fresh copy seems
a better solution, and simplifies things. The container does
need `CAP_SYS_ADMIN` but only on boot.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2018-06-22 14:10:43 +01:00
Rolf Neugebauer
2eec092862 kernel: Adjust kernel configs
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-06-22 10:01:18 +01:00
Rolf Neugebauer
9f1f99026d kernel: Update to 4.16.17/4.14.51/4.4.138
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-06-22 10:01:18 +01:00
Rolf Neugebauer
ef5c128a8c kernel: Update to 4.4.137
Somehow I missed this kernel update when it happened...

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-06-21 16:17:29 +01:00
Rolf Neugebauer
f347ba9412 Merge pull request #3074 from rn/kup
Kernel update to 4.17.2/4.16.16/4.14.50/4.9.109
2018-06-21 08:10:58 +01:00
Rolf Neugebauer
aed5328d2b Update YAMLs to latest kernels
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-06-20 15:36:12 +01:00
Rolf Neugebauer
2ff0491ac1 kernel: Update to 4.17.2/4.16.16/4.14.50/4.9.109
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-06-20 13:50:23 +01:00
Rolf Neugebauer
268b5269f9 kernel: Update to 4.9.108
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-06-20 13:19:24 +01:00
Rolf Neugebauer
9817d7eb3c Merge pull request #3073 from ijc/containerd-v1.1.1-rc.1
Containerd v1.1.1-rc.1
2018-06-20 08:17:18 +01:00
Ian Campbell
bb307079b0 Bump yml to pickup containerd v1.1.1-rc.1
Signed-off-by: Ian Campbell <ijc@docker.com>
2018-06-19 16:50:56 +01:00
Ian Campbell
90f7d1bed9 Bump packages to new alpine w/ containerd v1.1.1-rc.1
Signed-off-by: Ian Campbell <ijc@docker.com>
2018-06-19 16:01:20 +01:00
Ian Campbell
a5ed0cf40a alpine: Bump to containerd v1.1.1-rc.1
Signed-off-by: Ian Campbell <ijc@docker.com>
2018-06-19 11:00:45 -04:00
Rolf Neugebauer
fe4c7cdb75 Merge pull request #3070 from zx2c4-forks/wireguard-bump
wireguard: upgrade to 0.0.20180613
2018-06-15 00:12:54 +01:00
Jason A. Donenfeld
8ce01c5736 wireguard: upgrade to 0.0.20180613
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-06-14 18:26:41 +02:00
Rolf Neugebauer
ccfdc71a2f Merge pull request #3068 from rn/kernel-up
Update kernel to 4.17.1/4.16.15/4.14.49
2018-06-14 16:45:05 +01:00
Rolf Neugebauer
b698d26c87 Merge pull request #3018 from Sh4d1/scaleway_provider
Add Scaleway provider to linuxkit
2018-06-14 13:18:49 +01:00
Patrik Cyvoct
f088b05e9a Update examples yaml to use new metadata package
Signed-off-by: Patrik Cyvoct <patrik@ptrk.io>
2018-06-14 12:27:41 +02:00
Patrik Cyvoct
8d5ced3a1d Add documentation for scaleway provider
Signed-off-by: Patrik Cyvoct <patrik@ptrk.io>
2018-06-14 11:51:06 +02:00
Patrik Cyvoct
3c6434e022 Add scaleway yaml examples
Signed-off-by: Patrik Cyvoct <patrik@ptrk.io>
2018-06-14 11:51:05 +02:00
Patrik Cyvoct
a6783261f3 Add Scaleway support for linuxkit command line tool
Signed-off-by: Patrik Cyvoct <patrik@ptrk.io>
2018-06-14 11:51:04 +02:00
Patrik Cyvoct
f8d399490e Add new dependencies
Signed-off-by: Patrik Cyvoct <patrik@ptrk.io>
2018-06-14 11:51:04 +02:00
Patrik Cyvoct
5ab6b88029 Add Scaleway provider in metadata package
Signed-off-by: Patrik Cyvoct <patrik@ptrk.io>
2018-06-14 11:51:03 +02:00
Rolf Neugebauer
3a3b487907 Merge pull request #3069 from justincormack/aws-meta
Add support for aws metadata and security groups in linuxkit run
2018-06-14 08:17:11 +01:00
Justin Cormack
068df79031 Add support for aws metadata and security groups in linuxkit run
- set userdata for AWS
- set security group

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2018-06-13 19:07:12 -07:00
Rolf Neugebauer
1ff88a957c Update YAMLs to latest kernels
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-06-13 13:31:27 +01:00
Avi Deitcher
15b5057a8b Merge pull request #3063 from justinbarrick/master
Add a restart and stop command to service.
2018-06-12 16:54:13 -07:00
justinbarrick
338b1bb017 Update init image hashes.
Signed-off-by: justinbarrick <jbarrick@cloudflare.com>
2018-06-12 15:10:54 -07:00
Justin Barrick
9821180548 Add a restart and stop command to service.
Signed-off-by: justinbarrick <jbarrick@cloudflare.com>
2018-06-12 15:04:16 -07:00
Rolf Neugebauer
45f563fc66 kernel: Update to 4.17.1/4.16.15/4.14.49
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-06-12 17:18:11 +01:00
Rolf Neugebauer
a6f50ff565 Merge pull request #3066 from rn/auth
Update authors
2018-06-11 22:19:38 +01:00
Rolf Neugebauer
e0c411f5ef Update authors
Also add another alias for @ijc

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@gmail.com>
2018-06-11 20:14:30 +01:00
Rolf Neugebauer
a4420a789d Merge pull request #3030 from kmjohansen/kmj-reboot
Reboot should reboot instead of powering off.
2018-06-11 19:54:41 +01:00
Krister Johansen
45222dfaaf Move init image to fbcbbe3ace0b3e9455300017dd07625293a0d4d4.
This attempts to work around a CI issue where we're running out of disk
space when rebuilding the init package.

Signed-off-by: Krister Johansen <krister.johansen@oracle.com>
2018-06-11 08:29:20 -07:00
Krister Johansen
16604bc039 Reboot should reboot instead of powering off.
When busybox's reboot processing occurs in init, it runs all SHUTDOWN
actions that are defined in inittab.  Once those are complete, it will
trigger either a halt, poweroff, or reboot, depending upon what signal
is received.  The mechanism that's used to shell out through inittab
does not allow us to pass through exactly which invocation was
requested.

Due to the way that rc.shutdown works, it invokes the poweroff action
for any and all SHUTDOWN callbacks, whether they're a reboot, poweroff,
or halt.  Instead of handling the reboot(2) syscall in rc.shutdown,
return after killing and unmounting and let busybox's init process
decide which reboot(2) action to use.

Signed-off-by: Krister Johansen <krister.johansen@oracle.com>
2018-06-11 08:29:08 -07:00
Justin Cormack
154a5b3ea6 Merge pull request #3065 from rn/wireguard
tests: Fix wireguard test shutdown
2018-06-09 10:27:50 -07:00
Rolf Neugebauer
00c21a652a tests: Fix wireguard test shutdown
With PR #3030 the behaviour of poweroff/halt is changed. This
test relies on on-shutdown containers to be executed to display
the test result (service containers have their stdout redirected).
Use 'poweroff' (note, no '-f') to ensure that:
- the machine actually powers off
- the on-shutdown container is executed

Note, there are subtle differences between 'poweroff' and 'halt'
between hypervisors. With HyperKit, 'halt' actually works, but with
qemu/kvm, with 'halt' the process does not exit.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@gmail.com>
2018-06-09 12:47:46 +01:00
Rolf Neugebauer
3195451ec4 Merge pull request #3062 from rn/kern-up
Update kernels to 4.16.14/4.14.48/4.9.10[67]/4.4.136
2018-06-08 21:55:50 +01:00
Rolf Neugebauer
7dbd1a52cd Update YAML files to latest kernels
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-06-07 15:43:10 +01:00
Rolf Neugebauer
6b629fa30b kernel: Tweak 4.4.x kernel config file
Add new (disabled) option CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-06-07 13:54:53 +01:00
Rolf Neugebauer
4e830a35a1 kernel: Update to 4.16.14/4.14.48/4.9.107/4.4.136
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-06-07 12:10:22 +01:00
Rolf Neugebauer
17d9870dd7 kernel: Update to 4.9.106
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-06-07 11:42:54 +01:00
Rolf Neugebauer
6ad3055401 Merge pull request #3060 from rn/kern-src
Stash kernel source and WireGuard source in the package
2018-06-07 11:29:40 +01:00
Rolf Neugebauer
8a7ba7197e Merge pull request #3061 from justincormack/gcp-userdata
Add support for userdata on GCP plus custom name
2018-06-07 11:29:08 +01:00
Justin Cormack
42397f7f1d Add support for setting different name on GCP
Previously name and image were always the same so running two hosts
from one image was not possible!

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2018-06-06 16:22:20 -07:00
Justin Cormack
c9db3f0625 Add support for userdata on GCP
This was missing in the linuxkit CLI, even though we support it in the
metadata package.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2018-06-06 16:05:51 -07:00
Rolf Neugebauer
18ec668c91 kernel: Consistently use curl -f
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-06-06 18:32:23 +01:00
Rolf Neugebauer
5176ce7dd3 kernel: Stash kernel source and WireGuard source in the package
While we can re-create the kernel source code we don't have it
handily available in one place. This commit stashes the kernel
and the WireGuard source as /src/linux.tar.xz and
/src/wireguard.tar.xz in the kernel package.

This increases the size of the hub image by around 100MB.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-06-06 18:32:23 +01:00
Avi Deitcher
414b4c5275 Merge pull request #3059 from deitch/motd-namespace-warning
Add services.linuxkit warning to motd for sshd and getty
2018-06-06 17:16:23 +03:00
Rolf Neugebauer
a0e7417968 Merge pull request #3058 from rn/kup
kernel: Add 4.17, update 4.14.47/4.9.106/4.4.135, remove 4.16.x for arm64/s390x
2018-06-06 14:56:55 +01:00
Avi Deitcher
d85ce30e0e Change image sha tags to match latest
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2018-06-06 15:52:49 +03:00
Avi Deitcher
643414f6f4 Add services.linuxkit warning to motd for sshd and getty
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2018-06-06 14:32:12 +03:00
Rolf Neugebauer
193c4fa4da Update YAMLs to latest kernels
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@gmail.com>
2018-06-06 08:26:54 +01:00
Rolf Neugebauer
3792a61ccb test: Add 4.17.x kernel tests
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-06-06 08:26:54 +01:00
Rolf Neugebauer
fc6bcde1fd kernel: Remove 4.16 for arm64 and s390x
Trying to keep the number of kernels we compile for these
platforms small and 4.16 is likely to be EOLed soon anyway.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-06-06 08:26:54 +01:00
Rolf Neugebauer
25738c0768 kernel: Add support for 4.17.x kernels
The kernel configs are the 4.16.x configs run through
a 'make defconfig && make oldconfig' cycle.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-06-06 08:26:54 +01:00
Rolf Neugebauer
ba5e75a24e kernel: Update to 4.14.47/4.9.105/4.4.135
These releases are a single patch only, fixing  a bug.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-06-06 08:26:54 +01:00
Rolf Neugebauer
25c74cbfe8 Merge pull request #3056 from rn/sntpc
tools/alpine: Add sntpc to alpine base
2018-06-05 15:11:35 +01:00
Rolf Neugebauer
910d453769 tools/alpine: Add sntpc to alpine base
sntpc is a very simple ntpc client, which may be useful
for some setups.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-06-05 08:10:18 -04:00
Rolf Neugebauer
197f438d1e Merge pull request #3055 from rn/may-report
LinuxKit report May 2018
2018-06-03 15:56:01 +01:00
Rolf Neugebauer
b5a00f17ec LinuxKit report May 2018
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@gmail.com>
2018-06-03 14:26:17 +01:00
Ian Campbell
a6925908a6 Merge pull request #3054 from ijc/containerd-v1.1.1-rc.0
Bump to containerd v1.1.1-rc.0
2018-06-01 16:12:00 +01:00
Ian Campbell
56f7a8c9f3 Bump yml to pickup containerd v1.1.1-rc.0
Signed-off-by: Ian Campbell <ijc@docker.com>
2018-06-01 14:24:06 +01:00
Ian Campbell
525ff1c1a8 Bump packages to new alpine w/ containerd v1.1.1-rc.0
Signed-off-by: Ian Campbell <ijc@docker.com>
2018-06-01 14:09:05 +01:00
Ian Campbell
55d66b434f alpine: Bump to containerd v1.1.1-rc.0
Signed-off-by: Ian Campbell <ijc@docker.com>
2018-06-01 08:49:28 -04:00
Rolf Neugebauer
dae753cf0a Merge pull request #3053 from ndauten/memorizer-remove-poison
Memorizer: remove kasan poison on boot
2018-06-01 08:14:52 +01:00
Nathan Dautenhahn
3ddca63774 Memorizer: remove kasan poison on boot
Originally, Memorizer kernel fed inputs to add boot printouts from a debug tool, however, it creates unnecessary output. Remove the kernel boot option parameter.

Signed-off-by: Nathan Dautenhahn <ndd@cis.upenn.edu>
2018-05-31 16:49:27 -04:00
Rolf Neugebauer
81c9e9c58f Merge pull request #3051 from rn/test-wg
tests: Use poweroff instead of halt for wireguard test
2018-05-31 15:55:33 +01:00
Rolf Neugebauer
0676bc7592 tests: Use poweroff instead of halt for wireguard test
The proposed change in https://github.com/linuxkit/linuxkit/pull/3030
seems to timeout on the wireguard test. Try 'poweroff -f' instead
of 'halt' to stop the test VM.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-05-31 14:04:43 +01:00
Rolf Neugebauer
bd59dbf793 Merge pull request #3050 from zx2c4-forks/wireguard-bump
wireguard: upgrade to 0.0.20180531
2018-05-31 07:56:05 +01:00
Jason A. Donenfeld
5e10631fe2 wireguard: upgrade to 0.0.20180531
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-05-31 02:21:28 +02:00
Rolf Neugebauer
946712460b Merge pull request #3049 from rn/kern-up
Update kernels to 4.16.12/4.16.13/4.14.44/4.14.46/4.9.103/4.9.104/4.4.133/4.4.134
2018-05-30 20:09:15 +01:00
Rolf Neugebauer
932ed11e06 Update YAMLs to latest kernels.
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-05-30 18:34:10 +01:00
Rolf Neugebauer
9e8f458780 kernel: Adjust kernel config for arm64/x86 for 4.14.x and 4.16.x
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-05-30 16:14:53 +01:00
Rolf Neugebauer
acc059e6c8 kernel: Updatr to 4.16.13/4.14.46/4.9.104/4.4.134
Note, we skip 4.14.45 because 4.14.46 only has 3 patches
in it which unbreak 'perf' compilation.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-05-30 15:59:03 +01:00
Rolf Neugebauer
8acb257012 kernel: Fix s390x config for 4.16.x
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-05-30 14:51:45 +01:00
Rolf Neugebauer
d9a1ea45ce kernel: Update to 4.16.12/4.14.44/4.9.103/4.4.133
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-05-30 14:36:14 +01:00
Rolf Neugebauer
679edce979 Merge pull request #3047 from zx2c4-forks/wireguard-bump
wireguard: upgrade to 0.0.20180524
2018-05-24 15:39:44 +01:00
Rolf Neugebauer
78e974e04f Merge pull request #3048 from rn/kup
Update kernels to 4.16.10/4.16.11/4.14.42/4.14.43/4.9.101/4.9.102
2018-05-24 15:39:29 +01:00
Rolf Neugebauer
697b904803 Update YAMLs to latest kernels
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-05-24 14:00:34 +01:00
Jason A. Donenfeld
e945773f63 wireguard: upgrade to 0.0.20180524
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-05-24 14:45:29 +02:00
Rolf Neugebauer
00ce115df9 kernel: Update to 4.16.11/4.14.43/4.9.102
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-05-24 13:11:31 +01:00
Rolf Neugebauer
454d2142f3 kernel: Update to 4.16.10/4.14.42/4.9.101
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-05-24 10:54:45 +01:00
Rolf Neugebauer
8687c79482 Merge pull request #3045 from zx2c4-forks/wireguard-bump
wireguard: upgrade to 0.0.20180519
2018-05-23 16:28:28 +01:00
Avi Deitcher
250604a680 Merge pull request #3046 from mingrammer/readme
Add a missing right parenthesis in README.md
2018-05-22 18:26:50 +03:00
mingrammer
30795173b9 Add a missing right parenthesis
Signed-off-by: mingrammer <mingrammer@gmail.com>
2018-05-22 23:02:03 +09:00
Jason A. Donenfeld
6e04261450 wireguard: upgrade to 0.0.20180519
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-05-19 03:19:21 +02:00
Justin Cormack
653d9805a9 Merge pull request #3043 from rn/kernup
Kernel update to 4.16.9/4.14.41/4.9.100/4.4.132
2018-05-16 21:08:53 +01:00
Rolf Neugebauer
ec82c4989c Update YAMLs to latest kernels
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@gmail.com>
2018-05-16 19:44:07 +01:00
Rolf Neugebauer
bc7103d1a3 kernel: Fixup arm64 kernel config for 4.14.41
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-05-16 18:04:29 +01:00
Rolf Neugebauer
c4a265c77f kernel: Update to 4.16.9/4.14.41/4.9.100/4.4.132
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-05-16 17:55:10 +01:00
Rolf Neugebauer
a326f9e084 Merge pull request #3042 from TiejunChina/master-dev
update -rt to 4.14.40-rt30
2018-05-16 10:36:54 +01:00
Tiejun Chen
ccd9998461 update -rt to 4.14.40-rt30
Signed-off-by: Tiejun Chen <tiejun.china@gmail.com>
2018-05-15 13:46:26 +08:00
Rolf Neugebauer
90fb6316c2 Merge pull request #3041 from zx2c4-forks/wireguard-bump
wireguard: upgrade to 0.0.20180513
2018-05-14 08:11:58 +01:00
Jason A. Donenfeld
49c1f0007c wireguard: upgrade to 0.0.20180513
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2018-05-13 21:38:28 +02:00
Rolf Neugebauer
ce9c5eb6fb Merge pull request #3040 from TiejunChina/master-dev
update -rt to 4.14.39-rt29
2018-05-12 21:00:17 +01:00
Rolf Neugebauer
21cb73257b Merge pull request #3039 from rn/docs
docs: Add document on how to do releases
2018-05-12 18:53:16 +01:00
Justin Cormack
2d034db7f8 Merge pull request #3038 from rn/post_relv0.4
Bump version to v0.4+
2018-05-12 18:19:13 +01:00
Rolf Neugebauer
9af0179d1b docs: Add document on how to do releases
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@gmail.com>
2018-05-12 17:14:47 +01:00
Rolf Neugebauer
e920eea1c4 Bump version to v0.4+
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@gmail.com>
2018-05-12 16:55:27 +01:00
Tiejun Chen
ac2e5c53ec update -rt to 4.14.39-rt29
Signed-off-by: Tiejun Chen <tiejun.china@gmail.com>
2018-05-12 23:43:14 +08:00
Rolf Neugebauer
8d17887e11 Merge pull request #3037 from rn/rel_v0.4
Preparation for the v0.4 release
2018-05-12 16:39:03 +01:00
Justin Cormack
0297a035e1 Merge pull request #3035 from justincormack/containerd-conf-remove
Remove the containerd config from the example
2018-05-12 16:18:26 +01:00
Rolf Neugebauer
f84c13a5de Add entry in CHANGELOG.md for v0.4
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@gmail.com>
2018-05-12 14:51:54 +01:00
Rolf Neugebauer
d6d5a66a1c build: Bump version to v0.4
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@gmail.com>
2018-05-12 14:34:40 +01:00
Rolf Neugebauer
440ec4a4c4 Update package tags to v0.4
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@gmail.com>
2018-05-12 14:32:14 +01:00
Rolf Neugebauer
1de059188b pkgs: Update packages to latest alpine base
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@gmail.com>
2018-05-12 13:18:03 +01:00
Rolf Neugebauer
693b642761 Update use of test packages to latest
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@gmail.com>
2018-05-12 13:15:41 +01:00
Rolf Neugebauer
ea1e10297f tests: Update packages to latest alpine base
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@gmail.com>
2018-05-12 12:43:17 +01:00
Rolf Neugebauer
5de0a86293 Update use of tools to latest
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@gmail.com>
2018-05-12 12:38:05 +01:00
Rolf Neugebauer
d9c3e3fce2 tools: Update to latest alpine base
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@gmail.com>
2018-05-12 12:10:32 +01:00
Rolf Neugebauer
46b90f0dae tools/alpine: Update to latest
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@gmail.com>
2018-05-12 06:58:57 -04:00
Justin Cormack
abccb478bb Remove the containerd config from the example
It is very out of date and misleading. It was mainly there to
show Prometheus metrics.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2018-05-10 17:12:13 +01:00
Rolf Neugebauer
3bca52dc46 Merge pull request #3034 from justincormack/sock-rename
Update to allow the new locations for Docker for Mac socket paths
2018-05-10 14:52:10 +01:00
Rolf Neugebauer
e34fc3d582 Merge pull request #3033 from rn/kup
Update Intel ucode and kernel update to 4.16.8/4.14.40/4.9.99
2018-05-10 14:35:25 +01:00
Justin Cormack
415d0d3c32 Update to allow the new locations for Docker for Mac socket paths
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2018-05-10 13:32:38 +01:00
Rolf Neugebauer
aae1e864db Update YAMLs to latest kernels
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-05-10 13:06:28 +01:00
Rolf Neugebauer
a0b27bb442 kernel: Fix kernel config for arm64
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-05-10 13:06:28 +01:00
Rolf Neugebauer
2e2de63133 kernel: Update to 4.16.8/4.14.40/4.9.99
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-05-10 13:06:28 +01:00
Rolf Neugebauer
01a17392f8 kernel: Update Intel microcode to 20180425
This microcode bundle comes with a file called "list"
which seems to confuse the 'iucode_tool', so we just
remove it.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-05-10 13:06:28 +01:00
Justin Cormack
11ea1ed080 Merge pull request #3026 from rn/report
Add April 2018 report
2018-05-08 12:28:54 +02:00
Rolf Neugebauer
cbc7bfdb0e Merge pull request #3027 from rn/kern-up
Kernel update to 4.16.7/4.14.39/4.9.98/4.4.131 + SCTP fixes and alpine base update
2018-05-03 21:41:44 +01:00
Rolf Neugebauer
9356c0aee2 Update YAMLs to the latest kernels
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@gmail.com>
2018-05-03 19:34:03 +01:00
Rolf Neugebauer
be8929da30 kernel: Fix SCTP kernel config
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@gmail.com>
2018-05-03 18:48:02 +01:00
Rolf Neugebauer
655bb391ca kernel: Update to 4.16.7/4.14.39/4.9.98/4.4.131
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-05-03 17:22:26 +01:00
Rolf Neugebauer
d87820124e kernel: Fix comment on when the perf compile failed
The version in the comment was accidentally bumped during
the past kernel updates.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-05-03 17:19:14 +01:00
Rolf Neugebauer
52874a18f7 kernel: Update alpine base to latest
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-05-03 17:18:49 +01:00
Rolf Neugebauer
842c061536 Add April 2018 report
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@gmail.com>
2018-05-01 19:14:27 +01:00
Rolf Neugebauer
de1aff5399 Merge pull request #3025 from acetcom/master
Enable SCTP protocol as a default kernel config
2018-05-01 16:55:25 +01:00
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
0ae9985225 Merge pull request #3023 from rn/kernel-cfg
Update to 4.16.6/4.14.38/4.9.97/4.4.130 and enable USB_STORAGE
2018-04-30 16:27:02 +01:00
Rolf Neugebauer
2ad80b5b22 Update YAMLs to latest kernels
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-04-30 14:17:20 +01: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
d3da261158 docs: Add a note on how to enable USB storage on a RPi3b
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@gmail.com>
2018-04-30 10:35:33 +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
Justin Cormack
e6b396c448 Merge pull request #3021 from rn/kup
Kernel update to 4.16.4/4.16.5/4.14.36/4.14.37/4.9.96/4.4.129 + EOL 4.15.x
2018-04-29 11:33:32 +01:00
Rolf Neugebauer
521c875a96 Update YAMLs to latest kernels
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@gmail.com>
2018-04-27 20:10:43 +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
7b0b7dff84 Merge pull request #3017 from ijc/update-sha-handle-releases
update-component-sha.sh cleanups and fixes.
2018-04-25 15:23:14 +01:00
Ian Campbell
a9c33ca533 Merge pull request #3016 from ijc/containerd-v1.1.0
Containerd v1.1.0
2018-04-25 11:36:01 +01:00
Ian Campbell
6c1ba442b4 update-component-sha.sh: ignore changes in directories named "vendor"
src/cmd/linuxkit/vendor/github.com/moby/tool/src/moby/linuxkit.go embeds a yaml
fragement with some hashes in it, so avoid updating that since that would make
the vendoring unclean.

Signed-off-by: Ian Campbell <ijc@docker.com>
2018-04-25 10:52:09 +01:00
Ian Campbell
4320c3928f update-component-sha.sh: support update of image with tagged release.
This updates to support updating things like `linuxkit/runc:v0.3` to a new hash
(or tag).

Running:

    ./scripts/update-component-sha.sh --image linuxkit/runc 100d0d046c

Still DTRT and updates runc to that (bogus) sha.

Furthermore, running:

    ./scripts/update-component-sha.sh --image linuxkit/runc v0.4

Updates runc to that (bogus) release (this worked before) but now running:

    ./scripts/update-component-sha.sh --image linuxkit/runc acba8886e4

Inverts things and puts them back.

(this is not quote a nop because
src/cmd/linuxkit/vendor/github.com/moby/tool/src/moby/linuxkit.go has a
different sha in it which is not put back)

Signed-off-by: Ian Campbell <ijc@docker.com>
2018-04-25 10:50:26 +01:00
Ian Campbell
3ebd1769e2 update-component-sha.sh: use extended/modern regex for a complex case.
Right now the difference is rather minor, but I'm about to make this case more
complicated.

Running:

    ./scripts/update-component-sha.sh --image linuxkit/runc 100d0d046c

Still DTRT and updates runc to that (bogus) sha.

Signed-off-by: Ian Campbell <ijc@docker.com>
2018-04-25 10:41:39 +01:00
Ian Campbell
411698c16e update-component-sha.sh: simplify the quoting on sed expression
I think the intention was to use "" for bits with substititions and '' for bits
without, but that makes it hard to read and the bits in '' are safe in the ""
context anyway.

Running:

    ./scripts/update-component-sha.sh --image linuxkit/runc 100d0d046c

Still DTRT and updates runc to that (bogus) sha.

Signed-off-by: Ian Campbell <ijc@docker.com>
2018-04-25 10:40:00 +01:00
Ian Campbell
4281cbf87c Bump yml to pickup containerd v1.1.0
Signed-off-by: Ian Campbell <ijc@docker.com>
2018-04-25 10:14:52 +01:00
Ian Campbell
d563d78ac1 Bump packages to new alpine w/ containerd v1.1.0
Signed-off-by: Ian Campbell <ijc@docker.com>
2018-04-25 09:58:31 +01:00
Ian Campbell
56a93fb81a alpine: Bump to containerd v1.1.0
Signed-off-by: Ian Campbell <ijc@docker.com>
2018-04-25 04:58:17 -04:00
Rolf Neugebauer
74fc1db331 Merge pull request #3013 from w9n/cleanup
move pkg config from Dockerfile to build.yml
2018-04-24 23:55:45 +01:00
Robin Winkelewski
5e9b5878aa bump hashes 2018-04-24 22:35:39 +02:00
Robin Winkelewski
ffe9ac2319 move pkg config from Dockerfile to build.yml
Signed-off-by: Robin Winkelewski <w9ncontact@gmail.com>
2018-04-24 00:59:09 +02:00
Rolf Neugebauer
9d2c57564b Merge pull request #3012 from rn/kernel-up
Update kernel to 4.9.95
2018-04-23 15:11:47 +01:00
Rolf Neugebauer
fe9d2ce280 Update YAMLs to 4.9.95 kernel
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-04-23 13:12:51 +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
Rolf Neugebauer
3cc75ffa32 Merge pull request #3011 from zx2c4-forks/wireguard-bump
wireguard: upgrade to 0.0.20180420
2018-04-22 21:35:46 +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
0647441628 Merge pull request #3009 from rn/kup
Update kernels to 4.16.3/4.15.18/4.14.35
2018-04-20 08:04:17 +01:00
Rolf Neugebauer
e4f8b28fe3 Update YAMLs to latest kernels
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-04-19 17:11:37 +01: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
Ian Campbell
b58248edaf Merge pull request #3007 from ijc/containerd-v1.1.0-rc.2
containerd v1.1.0-rc.2
2018-04-18 15:29:48 +01:00
Ian Campbell
bb6f1c0f7c Bump yml to pickup containerd v1.1.0-rc.2
Also pick a newer version of runc.

Signed-off-by: Ian Campbell <ijc@docker.com>
2018-04-18 14:12:49 +01:00
Ian Campbell
c9e382ade0 Use go1.10 for containerd test package too
Signed-off-by: Ian Campbell <ijc@docker.com>
2018-04-18 14:10:10 +01:00
Ian Campbell
2aea82683e containerd: disable cri plugin by default
It complains/fails if CNI is not available.

Also drop two obsolete keys.

Signed-off-by: Ian Campbell <ijc@docker.com>
2018-04-18 13:20:51 +01:00
Rolf Neugebauer
a5b78948f2 Merge pull request #3006 from justincormack/keyctl
Add keyutils to packages
2018-04-18 11:27:17 +01:00
Ian Campbell
e8e28c27e9 Bump packages to new alpine w/ containerd v1.1.0-rc.2
Since we are building containerd v1.1.0 with go 1.10 (as it requires) to the
same for init and runc too for consistency. In the case of init it is actually
required since we use the containerd client library there.

The subreaper interfaces have been removed from containerd and replaced with a
similar interface in runc/libcontainer, update init to use that now.

Signed-off-by: Ian Campbell <ijc@docker.com>
2018-04-18 11:27:03 +01:00
Ian Campbell
6a4d0df63c alpine: Bump to containerd v1.1.0-rc.2
Requires libseccomp-dev and the go1.10 package

Signed-off-by: Ian Campbell <ijc@docker.com>
2018-04-18 06:25:55 -04:00
Justin Cormack
17fbdbb920 Add keyutils to packages
I am doing some upstream `runc` work with kernel keys and have
various other uses. No urgency so not updating the package
builds yet.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2018-04-18 09:56:25 +01:00
Rolf Neugebauer
34e6bc3632 Merge pull request #3005 from rn/crosvm
contrib: Notes and build support for crosvm
2018-04-17 16:21:28 +01:00
Justin Cormack
5e9b5718aa Merge pull request #3004 from justincormack/ima-prelim
Some kernel builds need openssl binary for key generation
2018-04-17 15:47:36 +01:00
Rolf Neugebauer
d2fab1f7cb contrib: Notes and build support for crosvm
crosvm is a VMM written on Rust which can run the device
backends in secomp isolated processes.

This adds build support for crosvm for x86 and arm64 as well
as some instructions on how to run LinuxKit built images on crosvm.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-04-17 14:51:20 +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
Rolf Neugebauer
0b5303cc66 Merge pull request #3003 from zx2c4-forks/wireguard-bump
wireguard: upgrade to 0.0.20180413
2018-04-17 08:17:29 +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
5778903cf1 Merge pull request #3002 from rn/squashfssupport
Support building and running with SquashFS root filesystem
2018-04-16 21:01:09 +01:00
Rolf Neugebauer
c1447193b3 tests: Add build/qemu/hyperkit tests for kernel+squashfs
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-04-16 18:39:32 +01:00
Rolf Neugebauer
59df6426e4 docs: Update qemu documentation
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-04-16 18:39:32 +01:00
Rolf Neugebauer
67a0664e50 docs: Update hyperkit documentation
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-04-16 18:39:32 +01:00
Rolf Neugebauer
0b5ea3fcc3 cmd: Add support for kernel+squashfs to the qemu runner
Unlike the hyperkit runner, the qemu runner already had better
support for auto-detecting the boot method so the changes
are less invasive (and backward compatible).

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-04-16 18:39:32 +01:00
Rolf Neugebauer
0e3c88d47c cmd: Add support for squashfs root filesystem to hyperkit runnner
Previous commits added support for building 'kernel+squashfs'.
This commit adds support for booting this build format on hyperkit.

The changes are a little bigger because some restructuring of the
code was required to support a third (after kernel+initrd and EFI
ISO) boot method.

To keep the code simpler this commit also removes some auto-detection
code for ISO booting. Users now have to specify '-iso -uefi' on the
command line to boot an EFI ISO. Previously, only '-uefi' was
required.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-04-16 18:39:31 +01:00
Rolf Neugebauer
c26a83011d vendor: Update hyperkit go bindings
This contains a small fix to the disk binadings and allows
booting with a kernel alone (no initrd).

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-04-16 18:39:31 +01:00
Rolf Neugebauer
ccb0007947 cmd: Register local mkimage- images with the vendored moby tool
This allows us to update tags for these locally without having
to re-vendor.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-04-16 18:39:31 +01:00
Rolf Neugebauer
69679d1db7 vendor: Update moby/tool vendoring
This includes two improvements:
- being able to specify the packages used for building images
- support for building squashfs images.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-04-16 18:39:31 +01:00
Rolf Neugebauer
c0377bf343 tools: Add mkimage-squashfs
This utility image takes a tarball as input and places the
contents into a read-only, compressed squashfs filesystem
which is produced on stdout.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-04-16 18:39:31 +01:00
Rolf Neugebauer
11db895b65 Merge pull request #3001 from rn/kup
Update to kernels to 4.9.94 and 4.4.128
2018-04-14 17:38:17 +01:00
Rolf Neugebauer
c675f1d214 Update YAMLs to latest kernels
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@gmail.com>
2018-04-14 12:21:53 +01: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
Justin Cormack
8a11bf255d Merge pull request #3000 from rn/kernel-up
Kenrel update to 4.16.2/4.15.17/4.14.34 plus MPLS_ROUTING/IPTUNNEL
2018-04-14 10:16:35 +01:00
Rolf Neugebauer
ed48e5adad Update YAML files to latest kernels
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-04-13 17:13:08 +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
78e0305666 Merge pull request #2996 from ijc/init-no-spurious-tty-files
Avoid writing to tty devices which don't actually exist.
2018-04-09 15:28:19 +01:00
Rolf Neugebauer
6576bd7355 Merge pull request #2995 from rn/kern-up
Update kernels to 4.15.16/4.14.33/4.9.93/4.4.127 and add 4.16.1
2018-04-09 15:27:50 +01:00
Ian Campbell
3301af529c Avoid writing to tty devices which don't actually exist.
$ git diff linuxkit.yml
    diff --git a/linuxkit.yml b/linuxkit.yml
    index e2ec829db..21b84e4ad 100644
    --- a/linuxkit.yml
    +++ b/linuxkit.yml
    @@ -1,6 +1,6 @@
     kernel:
       image: linuxkit/kernel:4.14.32
    -  cmdline: "console=tty0 console=ttyS0 console=ttyAMA0"
    +  cmdline: "console=ttyS0 console=foobar"
     init:
       - linuxkit/init:v0.3
       - linuxkit/runc:v0.3
    $ linuxkit  build linuxkit.yml
    [...]
    $ linuxkit run linuxkit
    [...]
    getty: cmdline has console=foobar but /dev/foobar is not a character device; not starting getty for foobar

    linuxkit-2ae2c420a11c login: root (automatic login)

    Welcome to LinuxKit!

    NOTE: This system is namespaced.
    The namespace you are currently in may not be the root.
    (ns: getty) linuxkit-2ae2c420a11c:~# ls -l /proc/1/root/dev/foobar
    -rw-r--r--    1 root     root           311 Apr  9 13:19 /proc/1/root/dev/foobar
    (ns: getty) linuxkit-2ae2c420a11c:~# cat /proc/1/root/dev/foobar

    Welcome to LinuxKit

                            ##         .
                      ## ## ##        ==
                   ## ## ## ## ##    ===
               /"""""""""""""""""\___/ ===
              {                       /  ===-
               \______ O           __/
                 \    \         __/
                  \____\_______/

Also added quotes around $tty for good measure.

Signed-off-by: Ian Campbell <ijc@docker.com>
2018-04-09 14:26:49 +01:00
Rolf Neugebauer
c45e747c81 Update YAMLs to the latest kernels
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-04-09 14:09:11 +01:00
Rolf Neugebauer
05e52f4269 tests: Add kernel module test for 4.16.x
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-04-09 14:07:37 +01:00
Rolf Neugebauer
141262f7f8 tests: Add kernel config test for 4.16.x
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-04-09 14:07:37 +01:00
Rolf Neugebauer
8b403d618a tests: Update kernel-config package
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-04-09 14:07:05 +01:00
Rolf Neugebauer
dfeaf8b5f6 tests: Adjust check for CONFIG_CC_STACKPROTECTOR
This option was removed in 4.16.x in favour of
CONFIG_CC_STACKPROTECTOR_AUTO. We do not check for
this option as we also force CONFIG_CC_STACKPROTECTOR_STRONG.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-04-09 13:59:57 +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
Ian Campbell
12c8195064 Merge pull request #2993 from ijc/pkg-build-no-release
pkg: build: do not infer a release if not pushing
2018-04-06 16:28:06 +01:00
Ian Campbell
3be156da13 pkg: build: do not infer a release if not pushing
If you happen to be exactly on a tag then:

    $ linuxkit pkg build --dev pkg/init
    Building "ijc/init:dev"
    Cannot release "v0.3" if not pushing

Do not try and infer a release if not pushing so this is possible again.

The subsequent check for `bo.release != "" && !bo.push` remains since the
caller could have used `WithRelease` but not `WithPush`. Our CLI never does
this, but a hypothetical other user of the library might.

Signed-off-by: Ian Campbell <ijc@docker.com>
2018-04-06 14:13:08 +01:00
Rolf Neugebauer
695a10489b Merge pull request #2992 from rn/post-release
build: Bump version to v0.3+
2018-04-05 22:23:49 +01:00
Rolf Neugebauer
649598cf94 build: Bump version to v0.3+
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@gmail.com>
2018-04-05 21:19:31 +01:00
Rolf Neugebauer
37e29b45b3 Merge pull request #2990 from rn/pre-release
Final preparation for v0.3 release
2018-04-05 21:17:59 +01:00
Rolf Neugebauer
ba1b7a40cb build: Fix circle CI name for s390x build step
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@gmail.com>
2018-04-05 20:04:03 +01:00
Rolf Neugebauer
1cbe0db4a9 Add CHANGELOG
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-04-05 20:03:31 +01:00
Justin Cormack
110bded295 Merge pull request #2991 from justincormack/local-build-options
Add more local build options and make static non-pie the default
2018-04-05 17:50:13 +01:00
Justin Cormack
4daeb1e997 Add more local build options and make static non-pie the default
static pie only seems to work on Alpine currently, but static is
a good default. Give the user choices...

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2018-04-05 16:55:47 +01:00
Rolf Neugebauer
db663d30a6 Update YAMLs to released packages
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-04-05 15:23:20 +01:00
Rolf Neugebauer
2d00440351 pkg: Update to latest alpine base
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-04-05 14:05:39 +01:00
Rolf Neugebauer
1695dfa3db build: Bump the version to v0.3
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-04-05 14:00:43 +01:00
Rolf Neugebauer
c4f613e047 cmd: Update the moby tool vendoring
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-04-05 14:00:10 +01:00
Rolf Neugebauer
2d699d4e9b tests: Update tests packages
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-04-05 11:42:39 +01:00
Rolf Neugebauer
3dd5cfcbc9 tests: Update to the latest alpine base
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-04-05 11:34:27 +01:00
Rolf Neugebauer
4a0813ec2e cmd: Update linuxkit/qemu to the latest
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-04-05 10:59:12 +01:00
Rolf Neugebauer
e03703dede build: Update go-compile to the latest
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-04-05 10:58:01 +01:00
Rolf Neugebauer
39b9ac9b7f tools: Update tools to the latest alpine base image
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-04-05 10:49:00 +01:00
Rolf Neugebauer
2810dfe951 build: Build the s390x linuxkit binary in CI
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-04-05 10:47:16 +01:00
Rolf Neugebauer
cfb7cfb8ec Merge pull request #2988 from rn/no-rt
kernel: Don't compile -rt kernels on s390x
2018-04-04 23:50:22 +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
Justin Cormack
046dc20836 Merge pull request #2986 from rn/docs-tests
Clarify s390x support in docs plus others small changes
2018-04-04 21:13:30 +01:00
Rolf Neugebauer
476fd491f1 Merge pull request #2987 from rn/less-tests
Remove the kernel version specific namespace tests
2018-04-04 20:50:02 +01:00
Justin Cormack
5313f13d51 Merge pull request #2985 from justincormack/mobyup
Update moby tool vendoring
2018-04-04 20:09:52 +01:00
Rolf Neugebauer
074ad8391c doc: Add s390x to packages doc
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@gmail.com>
2018-04-04 19:55:52 +01:00
Rolf Neugebauer
8f4f51c47f docs: Clarify s390x support and add details for hvf mode on macOS
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@gmail.com>
2018-04-04 19:55:28 +01:00
Rolf Neugebauer
b014388148 doc: Add links to more subprojects.
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@gmail.com>
2018-04-04 19:55:28 +01:00
Rolf Neugebauer
25e69c340c doc: Make supported architectures more explicit
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@gmail.com>
2018-04-04 19:55:28 +01:00
Rolf Neugebauer
58dd87a728 tests: Move the 4.14.x namespace tests up a level
Now that these are the only namespace tests, there is no
need to have them in their own subgroup.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@gmail.com>
2018-04-04 19:42:24 +01:00
Rolf Neugebauer
0f4cad6a5c tests: Remove namespace tests for 4.4.x and 4.9.x kernels
We do not run these tests as part of CI and when running them
manually it is easy to just change the kernel image common.yml.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@gmail.com>
2018-04-04 19:35:39 +01:00
Justin Cormack
7be989363b Update moby tool vendoring
This only includes https://github.com/moby/tool/pull/210 which
makes bind mounts into containers rshared not rprivate by default,
which makes debug easier as you can see them from the host.

Signed-off-by: Justin Cormack <justin@specialbusservice.com>
2018-04-04 19:00:48 +01:00
Rolf Neugebauer
641603957b doc: Remove security notice from README
We had the relevant fixes in all kernels for quite some
time, so no need to call it out explicitly at the top
level.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@gmail.com>
2018-04-04 18:55:04 +01:00
Rolf Neugebauer
28cd642798 Merge pull request #2983 from rn/notary-up
Use NOTARY_AUTH instead of the expect gymnastics
2018-04-03 17:39:49 +01:00
Rolf Neugebauer
d7d072b2a9 cmd: Update manifest_push_script.go
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-04-03 16:08:00 +01:00
Rolf Neugebauer
2de53a8962 script: Update push-manifest.sh to use NOTARY_AUTH
Prior to notary 0.6.0, notary expected a terminal and only accepted
username/password interactively. With notary 0.6.0 this can now be
passed as en environment variable 'NOTARY_AUTH' in the form of
a base64 encoded 'username:password'.

This commit removes the ugly 'expect' hack in favour of the much
cleaner use of an environment variable.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-04-03 16:02:42 +01:00
Ian Campbell
8b434f4d26 Merge pull request #2982 from ijc/containerd-v1.0.3
Bump to containerd v1.0.3
2018-04-03 14:52:08 +01:00
Ian
2d6b147854 Add rebuild info for tools/alpine for s390x
Missed previously.

Signed-off-by: Ian Campbell <ijc@docker.com>
2018-04-03 13:20:15 +01:00
Ian Campbell
e58300388a Bump yml to pickup containerd v1.0.3
Also pick a newer version of runc.

Signed-off-by: Ian Campbell <ijc@docker.com>
2018-04-03 11:25:22 +01:00
Ian Campbell
62d8e43fe4 Bump runc to version from containerd v1.0.3
Signed-off-by: Ian Campbell <ijc@docker.com>
2018-04-03 11:11:32 +01:00
Ian Campbell
98aed68d98 Bump packages to new alpine w/ containerd v1.0.3
Signed-off-by: Ian Campbell <ijc@docker.com>
2018-04-03 11:11:32 +01:00
Ian Campbell
7a48d9358c alpine: Bump to containerd v1.0.3
Signed-off-by: Ian Campbell <ijc@docker.com>
2018-04-03 10:11:31 +00:00
Justin Cormack
9f50d08ee5 Merge pull request #2979 from rn/kup
Update kernels to 4.15.15/4.14.32/4.9.92/4.4.126
2018-04-01 20:35:54 +01:00
Rolf Neugebauer
bad43d6eed Update YAMLs to latest kernels
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@gmail.com>
2018-04-01 19:18:42 +01:00
Justin Cormack
6c55c592de Merge pull request #2978 from rn/monthly
Add March 2018 report
2018-04-01 18:24:08 +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
Rolf Neugebauer
7685a2d4d0 Add March 2018 report
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@gmail.com>
2018-04-01 17:28:36 +01:00
Justin Cormack
de6725ad9d Merge pull request #2977 from rn/config
Update kernel config test
2018-03-31 07:24:16 -07:00
Rolf Neugebauer
2117b0dd82 Merge pull request #2970 from TiejunChina/master-dev
Upgrade -rt kernel version to 4.14.29-rt25.
2018-03-31 14:13:45 +01:00
Rolf Neugebauer
70b37c7047 Update test-kernel-config hash
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@gmail.com>
2018-03-31 14:00:06 +01:00
Rolf Neugebauer
b51c406e4f test: Build kernel config package only for x86 and arm64 for now
The test currently only works on these arches.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@gmail.com>
2018-03-31 13:53:07 +01:00
Rolf Neugebauer
350036e34d test: Update kernel config package to latest alpine base
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@gmail.com>
2018-03-31 13:51:36 +01:00
Rolf Neugebauer
fa51dea7fb Merge pull request #2974 from rn/kern-up
Kernel update to 4.15.13/4.15.14/4.14.30/4.14.31/4.9.90/4.9.91/4.4.124/4.4125
2018-03-31 09:43:09 +01:00
Justin Cormack
54a1e79833 Merge pull request #2976 from cji/cji-arm
Fix support for arm kernel config tests
2018-03-31 01:02:39 -07:00
Justin Cormack
aa51cb30e0 Merge pull request #2975 from rn/authors
Update AUTHORS
2018-03-31 00:54:29 -07:00
Tiejun Chen
3defc170ae update rt-for-vmware
Signed-off-by: Tiejun Chen <tiejun.china@gmail.com>
2018-03-30 21:10:13 -07: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
Craig Ingram
baef8f0d7c Fix support for arm kernel config tests
Signed-off-by: Craig Ingram <cingram@heroku.com>
2018-03-30 21:24:29 -04:00
Rolf Neugebauer
a9db5eaaff Update AUTHORS
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@gmail.com>
2018-03-30 14:45:19 +01:00
Rolf Neugebauer
401df21923 Update YAMLs to the latest kernels
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@gmail.com>
2018-03-30 14:28:26 +01: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
Justin Cormack
559e639ad9 Merge pull request #2969 from rn/update
Complete initial s390x support
2018-03-27 16:46:44 -07:00
Rolf Neugebauer
66c60d5cf9 Update YAMLs to the latest hashes
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@gmail.com>
2018-03-24 12:57:31 +00:00
Rolf Neugebauer
998eaa7dad pkg: Fix cgo CFLAGS for rngd
Go commit https://github.com/golang/go/issues/23672 introduced a
whitelist ofr flags passed into gcc to prevent arbitrary code
execution (CVE-2018-6574). The x86 rngd code uses two CFLAGS
not on the whitelist. Add them to 'CGO_CFLAGS_ALLOW'.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@gmail.com>
2018-03-24 09:23:15 +00:00
Rolf Neugebauer
7459bd1546 pkg: Disable cadvisor for s390x
I get a build error:

patching file build/build.sh
>> building assets
>> building binaries
>> building cadvisor
vendor/github.com/klauspost/crc32/crc32.go:157:10: undefined: updateCastagnoli
vendor/github.com/klauspost/crc32/crc32.go:159:10: undefined: updateIEEE
vendor/github.com/klauspost/crc32/crc32.go:182:48: undefined: updateIEEE
make: *** [Makefile:40: build] Error 2

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@gmail.com>
2018-03-23 21:00:37 +00:00
Rolf Neugebauer
68fb6d0951 pkg: Update kernel used for the firmware package
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@gmail.com>
2018-03-23 20:54:42 +00:00
Rolf Neugebauer
eb9e6cda93 pkg: Update to latest alpine base
This should enable s390x support for all package

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@gmail.com>
2018-03-23 20:20:13 +00:00
Rolf Neugebauer
a841354388 build: Update to latest rtf
This picks up the powershell support. Not terribly relevant here.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@gmail.com>
2018-03-23 20:16:59 +00:00
Rolf Neugebauer
0840aff18e cmd: Update moby/tool to latest
This picks up the updated mkimage tools

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@gmail.com>
2018-03-23 20:15:32 +00:00
Rolf Neugebauer
1936a22de2 Merge pull request #2966 from rn/kernel-up
Kernel update to 4.15.12/4.14.29/4.9.89/4.4.123 + Hyper-V SCSI fixes
2018-03-23 10:51:08 +00:00
Rolf Neugebauer
0aab05d777 Update YAMLs to latest kernels
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@gmail.com>
2018-03-22 22:25:37 +00: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
Ian Campbell
2dd0c9f63d Merge pull request #2965 from rn/kern-up
Kernel update to 4.15.11/4.14.28/4.9.88/4.4.122
2018-03-20 15:00:21 +00:00
Rolf Neugebauer
e85da365aa Update YAMLs to the latest kernels
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-03-20 13:48:48 +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
9508c90eb1 Merge pull request #2963 from rn/kups
Enable CEPH, Update CPU ucode, update kernels 4.15.10/4.14.27/4.14.24-rt
2018-03-15 15:55:14 +00:00
Rolf Neugebauer
61a9d72c76 Update YAMLs to latest kernels
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-03-15 14:16:43 +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
bc35b3c1c9 scripts: Rename the script to rename the rt patches
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-03-15 11:22:10 +00:00
Rolf Neugebauer
0c8022c173 Merge pull request #2962 from functor/master
A minor docs correction in 'Building and using custom kernels' section.
2018-03-15 00:07:21 +00:00
functor
0eeda63943 The name of the file with additional kernel options must include
the kernel series name. Otherwise the script in kernel/Dockerfile
will not apply it. So the example file name should be
`config-4.9.x-x86_64-foo` instead of `config-foo`.

Signed-off-by: functor <meehow@gmail.com>
2018-03-14 18:30:23 -04:00
Rolf Neugebauer
037d82caa1 Merge pull request #2959 from rn/tool-up
Update tools for s390x
2018-03-13 18:17:04 +00:00
Rolf Neugebauer
591c38aea3 build: Update go-compile package to the latest
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-03-13 16:29:21 +00:00
Rolf Neugebauer
a8d3ef2ca1 tools: Clarify the supported architectures
Most of the tools packages are not usable on s390x so
explicitly list them.

Also removed arm64 from mkimage-gcp as GCP does not
support arm machines and fixed a  minor inconsistency
the way the architecture was specified in mkimage-raw-bios.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-03-13 16:27:30 +00:00
Rolf Neugebauer
61727d3b50 tools: Update to the latest alpine base image
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-03-13 14:39:57 +00:00
Rolf Neugebauer
6ac582b6d3 tools/alpine: Update to latest
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-03-13 11:56:29 +00:00
Justin Cormack
692067d58d Merge pull request #2958 from rn/kern-up
Enable IMA and multiple kernel updates
2018-03-12 21:34:49 +00:00
Rolf Neugebauer
fa21e15e66 Update YAMLs to latest kernels
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@gmail.com>
2018-03-12 20:06:32 +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 Cormack
b218449d73 Merge pull request #2957 from kojustin/fix.typo
Non-existent target check is marked phony
2018-03-09 18:18:11 +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
5e0b1b22c4 Merge pull request #2955 from rn/kern
Tidy kernel build, tweak s390 config, and update kernels
2018-03-09 15:48:07 +01:00
Rolf Neugebauer
9de11f95db Update YAML files to latest kernels
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-03-09 13:32:14 +00: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
Rolf Neugebauer
018fb4e6f4 Merge pull request #2953 from deitch/package-docs
Add CI info and dependency to packages doc
2018-03-09 00:23:05 +01:00
Rolf Neugebauer
a6428c7dee Merge pull request #2952 from kojustin/serve
Subcommand serve should parse flags.
2018-03-08 11:21:53 +01:00
Avi Deitcher
c9169cbc70 Add CI info and dependency to packages doc
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2018-03-08 08:33:26 +02:00
Justin Ko
df660d35c7 Subcommand serve should parse flags.
Signed-off-by: Justin Ko <justin.ko@oracle.com>
2018-03-07 14:59:14 -08:00
Rolf Neugebauer
0a409c6ccb Merge pull request #2951 from justincormack/mobyup
Update moby tool
2018-03-07 22:04:41 +01:00
Justin Cormack
ee6d320706 Update moby tool
Also update its notary vendor as that was part of update.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2018-03-07 09:17:41 +00:00
Rolf Neugebauer
6445b5e290 Merge pull request #2946 from alicefr/support_s390_console
Add s390 console to examples
2018-03-06 14:53:31 +01:00
Alice Frosi
1eb8668103 Update docker.yml
The docker image docker:17.07.0-ce-dind does not support s390.
Update to docker:17.09.0-ce-dind

Signed-off-by: Alice Frosi <alice@linux.vnet.ibm.com>
2018-03-06 08:53:29 +00:00
Alice Frosi
34d2668640 Add s390 console to examples
On z platform, the kernel console is ttysclp0.

Signed-off-by: Alice Frosi <alice@linux.vnet.ibm.com>
2018-03-06 08:46:26 +00:00
Rolf Neugebauer
f17601f533 Merge pull request #2948 from pratikmallya/tss_readme_fix
Update README to include privileged flag
2018-03-06 09:35:50 +01:00
Pratik Mallya
8333ea0b5e Update README to include privileged flag
Without the privileged flag, the tcsd daemon does not have
access to the mounted host device files, especially the tpm
device file.

Signed-off-by: Pratik Mallya <pratik.mallya@gmail.com>
2018-03-06 01:32:04 -06:00
Rolf Neugebauer
d7140d92a0 Merge pull request #2947 from zx2c4-forks/wireguard-bump
wireguard: update to 0.0.20180304
2018-03-05 14:36:09 +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
Rolf Neugebauer
6de74c2883 Merge pull request #2939 from alicefr/support_s390_kernel
Add s390 support for linuxkit kernel
2018-03-02 15:56:11 +00:00
Avi Deitcher
5d30b45cbc Merge pull request #2942 from deitch/onboot-stream-logs
Add logging to /var/log for onboot containers
2018-03-02 16:47:54 +02:00
Avi Deitcher
6f524eb616 Update hashes for linuxkit/init
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2018-03-02 15:51:09 +02:00
Avi Deitcher
cc57288b64 Add logging to /var/log for onboot containers
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2018-03-02 15:29:23 +02:00
Rolf Neugebauer
465fff987a Merge pull request #2945 from rn/feb-rep
reports: Add February 2018 report
2018-03-01 21:51:38 +00:00
Rolf Neugebauer
eb72bd77ed reports: Add February 2018 report
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@gmail.com>
2018-03-01 19:58:26 +00: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
Justin Cormack
adebf0377c Merge pull request #2933 from pcfdev-forks/master
Configure guest with 9P mount and vsock port when using existing VPNKit instance
2018-03-01 11:22:41 +00:00
Rolf Neugebauer
860eac6ae4 Merge pull request #2943 from rn/base
Update tools/alpine (wireguard tools and s390x)
2018-03-01 11:08:21 +00:00
Rolf Neugebauer
6d4905ba2a cmd: Update generated code.
The source script changed

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-02-28 16:41:23 +00:00
Rolf Neugebauer
02e695e925 scripts: Update push-manifest.sh with new location of key chain utility
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-02-28 16:36:19 +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
afbd3a93d9 tools/alpine: Update alpine base to latest
Also add s390x images

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-02-28 16:35:23 +00:00
Rolf Neugebauer
03c3fd65c3 tools/alpine: Fix push-manifest.sh
- On macOS, docker-credential-osxkeychain.bin was renamed to
  docker-credential-osxkeychain
- Pass --ignore-missing to the manifest-tool invocation.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-02-28 16:35:23 +00:00
Rolf Neugebauer
2a984165fb tools/alpine: Add a dummy versions.s390x file
This is temporary to un-break the build until we have pushed
a alpine base image for s390x.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-02-28 14:59:59 +00:00
Rolf Neugebauer
e0e490d4c6 tools/alpine: Build our own wireguard-tools package
Currently, there is a conflict in musl versions between stable
(used for tools/alpine) and edge (where wireguard-tools is).
This cased the tools/alpine build to fail.

With this commit we build our own wireguard-tools package,
using the  APKBUILD file from edge, against the libraries
libraries from stable. We then add the wireguard-tools package
to the mirror.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-02-28 14:39:47 +00:00
Rolf Neugebauer
018f3602c0 Merge pull request #2941 from rn/kup
Kernel update to 4.15.7/4.4.23/4.9.85/4.4.119
2018-02-28 13:08:49 +00:00
Rolf Neugebauer
62eac7fd46 Update YAML files to latest kernels
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-02-28 12:12:40 +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
9dd07f6f79 Merge pull request #2938 from rn/reports
reports: Add Jan 2018 report
2018-02-28 07:45:12 +00:00
Justin Cormack
9036ad2839 Merge pull request #2937 from rn/author
Update AUTHORS
2018-02-27 23:20:38 +00:00
Rolf Neugebauer
7c92015dfc reports: Add Jan 2018 report
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@gmail.com>
2018-02-27 23:17:42 +00:00
Rolf Neugebauer
371c9f97b2 Update AUTHORS
Also tweak .mailmap to dedup w9n and fix Alice Frosi's email address

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-02-27 22:25:29 +00:00
Avi Deitcher
58f2644354 Merge pull request #2935 from garthy/qcow-efi-support
Adds support for building a qcow2 EFI image
2018-02-27 19:21:20 +00:00
Justin Cormack
cc137cfbf3 Merge pull request #2932 from garthy/support_http_proxy
Support http proxy environment variables in linuxkit build
2018-02-27 19:21:04 +00:00
Garth Bushell
73b608f8e6 Adds support for building a qcow2 EFI image
Signed-off-by: Garth Bushell <garth.bushell@oracle.com>
2018-02-27 16:58:42 +00:00
Rolf Neugebauer
78dc9b1156 Merge pull request #2934 from alicefr/support_s390_alpine
Add s390x support for linuxkit docker images
2018-02-27 16:35:22 +00:00
Alice Frosi
4591410607 Add s390x support for linuxkit docker images
Add support for s390 architecture for linuxkit/alpine and the
other docker images in tools and pkg.

Signed-off-by: Alice Frosi <alice@linux.vnet.ibm.com>
2018-02-27 15:16:58 +00:00
Emily Casey
4dde00b05c Configure guest with 9P mount and vsock port when using existing VPNKit instance
Signed-off-by: Emily Casey <ecasey@pivotal.io>
2018-02-27 09:21:28 -05:00
Rolf Neugebauer
0d8fab9ac9 Merge pull request #2927 from alicefr/support_s390
Add s390x support for Linuxkit binary and tools
2018-02-27 13:47:10 +00:00
Garth Bushell
10ec3c5803 Support http proxy environment variables in docker build
Signed-off-by: Garth Bushell <garth.bushell@oracle.com>
2018-02-27 13:28:11 +00:00
Alice Frosi
d6b44f7881 Add s390x support for Linuxkit binary
This PR adds the basic support for s390 architecture on linuxkit
command.

Signed-off-by: Alice Frosi <alice@linux.vnet.ibm.com>
2018-02-27 12:23:47 +00:00
Rolf Neugebauer
8999d8aada Merge pull request #2931 from functor/master
A minor update/hint to the docker-for-mac example documentation.
2018-02-27 10:15:48 +00:00
functor
1308eb8fe5 A minor update/hint to the docker-for-mac example documentation.
Signed-off-by: functor <meehow@gmail.com>
2018-02-26 18:54:11 -05:00
Justin Cormack
f6c7422142 Merge pull request #2930 from obergner/vbox-set-bridge-iface
Add cli option '--bridgeadapter' to 'linuxkit vbox run'
2018-02-26 22:18:57 +00:00
Olaf Bergner
f37a59bd1a Add cli option '--bridgeadapter' to 'linuxkit vbox run'
Starting a virtualbox vm in bridged networking mode requires the host's
network interface to attach to the bridge being specified. This commit
adds command line option '--bridgeadapter iface' to 'linuxkit vbox run',
where 'iface' is the host's network interface to use in bridged mode.

Fixes: #2929

Signed-off-by: Olaf Bergner <olaf.bergner@gmx.de>
2018-02-26 21:20:38 +01:00
Rolf Neugebauer
5fca700136 Merge pull request #2928 from rn/kern-up
Kernel updates to 4.15.6/4.14.22/4.9.84/4.4.118
2018-02-26 16:45:59 +00:00
Rolf Neugebauer
bed39bb6cf Update YAML files to latest kernels
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-02-26 15:33:51 +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
c1e464f0f8 Merge pull request #2926 from gianarb/feature/influxdb-os
Added InfluxDB OS an example
2018-02-26 10:22:18 +00:00
Gianluca Arbezzano
d2a0a234b5 Added InfluxDB OS as example
We tried to to build an OS with all the TICK stack
(https://www.influxdata.com/time-series-platform/): InfluxDB,
Chronograf, Kapacitor, Telegraf.

Very easy but I was curious to try it out after few months just reading
about linuxkit.

You can build the image with:

```
linuxkit build --format iso-bios examples/influxdb-os
```

And you can run it:

```
linuxkit run qemu -iso influxdb-os.iso -publish 8888:8888/tcp -publish
8086:8086/tcp
```

After that you can open your browser on `localhost:8888` to see
Chronograf (the dashboard up and running).

All the services are configured to talk with each other.

Signed-off-by: Gianluca Arbezzano <gianarb92@gmail.com>
Co-authored-by: Lorenzo Fontana <lo@linux.com>
2018-02-26 09:43:43 +01:00
Rolf Neugebauer
2707319c56 Merge pull request #2924 from TiejunChina/master-dev
Clarify to support Preempt-RT kernel
2018-02-25 09:03:49 +00:00
Tiejun Chen
4ee4933232 Update AUTHORS
Signed-off-by: Tiejun Chen <tiejun.china@gmail.com>
2018-02-24 08:07:10 -08:00
Tiejun Chen
0a35d388bc Clarify to support Preempt-RT kernel
Add one example yml to use Preempt-RT kernel, and mention -rt support
in docs/kernels.md.

Signed-off-by: Tiejun Chen <tiejun.china@gmail.com>
2018-02-24 08:07:10 -08:00
Tiejun Chen
2cffa7b455 Add one script to get patches prefixed by the term of number
Signed-off-by: Tiejun Chen <tiejun.china@gmail.com>
2018-02-24 08:07:10 -08:00
Rolf Neugebauer
6688d95496 Merge pull request #2925 from rn/kup
Kernel update to 4.15.5/4.14.21/4.9.83/4.4.117
2018-02-24 12:41:00 +00:00
Rolf Neugebauer
5525c4858c Update YAMLs to latest kernels
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-02-24 11:32:11 +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
f5d7b33986 Merge pull request #2923 from rn/kernel
Make 4.14.x the default and reduce number of kernels build
2018-02-21 15:45:27 +00:00
Rolf Neugebauer
69b6947bd7 Use a specific version of nginx in all tests
There is a hopefully temporary error with nginx:alpine
not being available for amd64. Pick a version which is...

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-02-21 14:34:07 +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
894bc2bad9 Switch the default kernel from 4.9.x to 4.14.x
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-02-21 10:36:49 +00:00
Rolf Neugebauer
ccd054ee5f tests: Fix the kmod tests
The kmod tests pull the kernel image to make sure they
have the latest version to build images against. Unfortunately
they were pulling the wrong kernel for non-4.9.x kernels.

This is not a big issue in most cases, but may have caused issues
when two different kernels packages were pushed with the same tag.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-02-21 10:36:49 +00:00
Rolf Neugebauer
52519fed67 Merge pull request #2920 from rn/kern-up
Update kernels to 4.15.4/4.14.20/4.9.82/4.4.116
2018-02-19 16:51:04 +00:00
Rolf Neugebauer
719ffabbb7 Merge pull request #2919 from rn/auth
Update Authors
2018-02-19 16:30:34 +00:00
Rolf Neugebauer
17734f29e4 Update Authors
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-02-19 15:22:09 +00:00
Rolf Neugebauer
0e6a5466a4 Update YAMLs to latest kernels
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-02-19 15:11:15 +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
Rolf Neugebauer
d25cf07628 Merge pull request #2915 from scotty-c/master
This commit adds the functionality to run the qemu container detached
2018-02-19 12:05:06 +00:00
Rolf Neugebauer
9910437606 Merge pull request #2916 from zx2c4-forks/wireguard-bump
wireguard: update to 0.0.20180218
2018-02-19 12:03:59 +00:00
Scott Coulton
a7ec17b08f Added a fail if the user sets detached to true when qemu is running locally 2018-02-19 11:53:13 +11: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
Scott Coulton
224ade8fea This commit adds the functionality to run the qemu container detached 2018-02-15 15:09:10 +11:00
Rolf Neugebauer
2a553dc644 Merge pull request #2913 from ijc/containerd-v1.0.2
Containerd v1.0.2
2018-02-14 15:33:51 +00:00
Rolf Neugebauer
c50ceaa8cd Merge pull request #2914 from ijc/bump-rtf
Bump rtf to f2409214ca3b719567aa15bb7b363f24876a4d98
2018-02-14 15:33:38 +00:00
Ian Campbell
f489adddde Update rtf run invocations use of -x flag
This applies the transformation implied by bfabb8a382
which is an update required by 3f574c7adb.

Signed-off-by: Ian Campbell <ijc@docker.com>
2018-02-14 14:37:35 +00:00
Ian Campbell
b32e7471eb Bump yml to pickup containerd v1.0.2
Also pick a newer version of runc

Signed-off-by: Ian Campbell <ijc@docker.com>
2018-02-14 13:50:47 +00:00
Ian Campbell
acd29e6106 Bump rtf to f2409214ca3b719567aa15bb7b363f24876a4d98
Pulls in a bumper crop of updates from last year and some recent improvements:

    $ git log --oneline 3e8ed35ca934..f2409214ca3b | cat
    f240921 Merge pull request #38 from ijc/timestamp-precision
    f626ffe Preserve full precision in nanoseconds part of log timestamp
    29c89e8 Merge pull request #37 from rn/ps1
    600ea59 Update documentation with new powershell features
    9fed685 Add powershell test and group templates and a stub library
    3ada6bd Don't use '#!/bin/sh' in tests or group initialisers
    dd187b4 Add test cases for powershell scripts
    4892754 Add support for writing tests in powershell (on Windows)
    00cdd1f Add the ability to execute powershell scripts
    00906da Add TestFilePath to the Test struct
    e6fdcb7 Add GroupFilePath to the Group struct
    c590dbc Make group member names for Pre/Post test scripts clearer
    5ca3d4f Add setEnv test
    d178af2 Improve environment variable setting in executeScript
    9c7cc94 Merge pull request #35 from rn/circle
    d464092 Use container builds on CircleCI and stash artefacts
    9a09cd5 Move CircleCI config file to .circleci
    9429279 Merge pull request #33 from rn/poule
    4de1f2c Add poule config
    88dcc27 Merge pull request #32 from mor1/extra-extra
    bfabb8a flags: update README for `-x` now as a local flag
    3f574c7 flags: make `-x` work
    ba442d6 Merge pull request #31 from dave-tucker/fix-panic
    6c7f09b local: Fix panic when no pattern is supplied
    617e977 Merge pull request #30 from dnephin/add-latest-link
    5829b2b Merge pull request #29 from dnephin/fix-command-descriptions
    d09a317 Add a link to the latest directory within results.
    c9a9a2a Remove some duplication between commands.
    7904cc7 Remove unused flags, and move run flags to run command.
    94e56a7 Update command descriptions
    faedeef Merge pull request #28 from dave-tucker/prepost
    a5f92ae local: Fix panic in PostTest
    23fbbea Merge pull request #26 from dave-tucker/fix-osx-vers
    156281e sysinfo: Fix OSX version parsing

Signed-off-by: Ian Campbell <ijc@docker.com>
2018-02-14 13:45:02 +00:00
Ian Campbell
1b07ca4d8c Bump runc to version from containerd v1.0.2
Signed-off-by: Ian Campbell <ijc@docker.com>
2018-02-14 13:10:42 +00:00
Ian Campbell
b72df17cb3 Bump packages to new alpine w/ containerd v1.0.2
Signed-off-by: Ian Campbell <ijc@docker.com>
2018-02-14 13:10:42 +00:00
Ian Campbell
046d74775e alpine: Bump to containerd v1.0.2
Signed-off-by: Ian Campbell <ijc@docker.com>
2018-02-14 12:11:21 +00:00
Justin Cormack
ade95a9a3a Merge pull request #2912 from rn/kup
Kernel update to 4.15.3/4.14.19/4.9.81
2018-02-14 11:17:32 +00:00
Rolf Neugebauer
1ebe545e81 Update YAMLs to latest kernels
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-02-14 09:48:57 +00: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
Justin Cormack
957d0a100e Merge pull request #2908 from cji/cji-kconftest
Extend kernel config test
2018-02-08 16:56:21 +00:00
Ian Campbell
7e262716bb Merge pull request #2909 from rn/kern-up
Update kernels to 4.15.2/4.14.18
2018-02-08 16:03:34 +00:00
Craig Ingram
18545f0596 Update kernel-config hashes with new build
Signed-off-by: Craig Ingram <cingram@heroku.com>
2018-02-08 10:37:29 -05:00
Rolf Neugebauer
8fd2e73cc6 Update YAMLs to latest kernels
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-02-08 14:09:56 +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
Craig Ingram
de60ec48f4 Extend kernel config test
This commit adds tests for KPTI, retpoline, bpf_jit_always_on, and
disabled scsi proc fs configs.

Signed-off-by: Craig Ingram <cingram@heroku.com>
2018-02-07 16:43:17 -05:00
Rolf Neugebauer
95f1fdd262 Merge pull request #2907 from justincormack/authorsup
Update Authors
2018-02-07 14:06:11 +00:00
Rolf Neugebauer
42f4106168 Merge pull request #2905 from rn/kup
Update kernels to 4.15.1/14.14.17/4.9.80/4.4.115
2018-02-07 13:09:19 +00:00
Justin Cormack
ff000dde07 Update Authors
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2018-02-07 11:51:46 +00:00
Rolf Neugebauer
3b4d7c1f4f Merge pull request #2904 from ijc/containerd-1.0.2-rc.1
Bump to Containerd v1.0.2-rc.1
2018-02-07 11:39:26 +00:00
Ian Campbell
72de57138b Bump yml to pickup containerd v1.0.2-rc.1
Signed-off-by: Ian Campbell <ijc@docker.com>
2018-02-07 10:13:52 +00:00
Ian Campbell
3157ff9976 Bump packages to new alpine w/ containerd v1.0.2-rc.1
Signed-off-by: Ian Campbell <ijc@docker.com>
2018-02-07 09:50:19 +00:00
Ian Campbell
39722f0982 alpine: Bump to containerd v1.0.2-rc.1
Signed-off-by: Ian Campbell <ijc@docker.com>
2018-02-07 09:49:23 +00:00
Rolf Neugebauer
700ef35c8c test: Update trust setting for remaining test YAMLs
The YAMLs in ./test/hack enumerated the images to pull with
content trust. All images in the 'linuxkit' org should
now have trust enabled.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-02-06 18:44:23 +00:00
Rolf Neugebauer
c79607a8a4 Update YAMLs to latest kernels
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-02-06 18:44:23 +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
536555f7d2 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
2018-02-06 16:08:10 +00:00
Rolf Neugebauer
a4907741af test: Add kerel tests for 4.15
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-02-06 13:23:40 +00:00
Rolf Neugebauer
f6bc92666a Update YAML files to latest kernels
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-02-06 13:23:40 +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
Rolf Neugebauer
46b20a2d0c Merge pull request #2899 from rn/qemu
Allow choice of qemu binary and acceleration
2018-02-05 10:20:26 +00:00
Rolf Neugebauer
685501ce70 Merge pull request #2902 from zx2c4-forks/wireguard-bump
wireguard: update to 0.0.20180202
2018-02-03 17:08:52 +00:00
Avi Deitcher
1c1d159e5e Merge pull request #2901 from rvs/master
Make it possible to key the package tags off of top level tree hash
2018-02-03 18:44:34 +02: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
Rolf Neugebauer
5d0e677397 cmd/qemu: Enable additional accelerators
Upstream qemu supports accelerators other than kvm. Allow the user
to choose. On Linux we still default to 'lvm' if available. On
macOS we try the new 'hvf' accelerator, if available.

Disable acceleration if the host arch does not match requested
qemu arch.

Also change the LINUXKIT_QEMU_KVM env var to LINUXKIT_QEMU_ACCEL
and use the functions in utils.go for env var overrides.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-02-02 18:05:39 +00:00
Roman Shaposhnik
528e3e6850 Make it possible to key the package tags off of top level tree hash
Closes #2887

Signed-off-by: Roman Shaposhnik <rvs@zededa.com>
2018-02-02 04:05:16 -08:00
Rolf Neugebauer
c5b3d088b0 cmd: Add option to override the qemu binary to use
It still defaults to whatever is in your PATH but it's
useful to override when experimenting with different
qemu builds.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-02-01 17:39:40 +00:00
Rolf Neugebauer
ca2e4f06a0 Merge pull request #2896 from pcfdev-forks/master
Use microcode-20171117 in kernel build as microcode-20180108 is no longer available
2018-01-31 13:18:55 +00:00
Ian Campbell
1091ae688d Merge pull request #2898 from ijc/containerd-1.0.2-rc.0
Bump to containerd v1.0.2-rc.0
2018-01-31 10:52:13 +00:00
Ian Campbell
c47a70aece Bump yml to pickup containerd v1.0.2-rc.0
Signed-off-by: Ian Campbell <ijc@docker.com>
2018-01-31 09:50:15 +00:00
Ian Campbell
46b0ab3d9b Bump runc to version from containerd v1.0.2-rc.0
Signed-off-by: Ian Campbell <ijc@docker.com>
2018-01-31 09:43:25 +00:00
Ian Campbell
726f967f2d Bump packages to new alpine w/ containerd v1.0.2-rc.0
Signed-off-by: Ian Campbell <ijc@docker.com>
2018-01-31 09:41:49 +00:00
Ian Campbell
2e5f24a2c0 alpine: Bump to containerd v1.0.2-rc.0
https://github.com/containerd/containerd/releases/tag/v1.0.2-rc.0

$ git log --oneline --no-merges v1.0.1..v1.0.2-rc.0
a67e9d27 release: prepare 1.0.2-rc.0
91c3b8bf content/testsuite: pass context to hold lease
c910b470 content/testsuite: ensure unique content per test
45e7aa52 Update copy to discard over truncate
d7a0e702 Add resume content test cases
5c21576e Fix duplicate directories entries on metadata change
af4455b3 vendor: update go-runc to reduce gc pressure
f042dc58 cmd/containerd-shim: aggressive memory reclamation
8cf32d34 cmd/containerd-shim, reaper: reduce channel allocation
367eddb4 archive, cio, cmd, linux: use buffer pools
852f989a Update runc to 9f9c96235cc97674e935002fc3d78361b69
a03fb1bd Fix NPE in dialer
d04746b4 Update metadata image store to be initialized once
5a67161d Update namespace empty check to use buckets

Signed-off-by: Ian Campbell <ijc@docker.com>
2018-01-31 09:40:52 +00: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
Justin Cormack
a7620b7604 Merge pull request #2892 from justincormack/no-commit
Do not print git commit if empty
2018-01-29 10:08:33 +00:00
Justin Cormack
e98cc7a328 Do not print git commit if empty
fix #2891

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2018-01-26 14:32:46 +00:00
Rolf Neugebauer
bbf39350fb Merge pull request #2888 from rn/after-rel
build: Bump linuxkit version to v0.2+
2018-01-25 23:47:23 +00:00
Rolf Neugebauer
85a6052fed build: Bump linuxkit version to v0.2+
To avoid confusion with master builds

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-01-25 21:39:43 +00:00
1281 changed files with 88464 additions and 8560 deletions

View File

@@ -33,6 +33,12 @@ jobs:
GOOS: linux
GOARCH: arm64
command: make LOCAL_TARGET=bin/linuxkit-$GOOS-$GOARCH local-build
- run:
name: Build s390x/linux
environment:
GOOS: linux
GOARCH: s390x
command: make LOCAL_TARGET=bin/linuxkit-$GOOS-$GOARCH local-build
- run:
name: Build amd64/darwin
environment:

View File

@@ -6,6 +6,7 @@
#
# For explanation on this file format: man git-shortlog
Alice Frosi <alice@linux.vnet.ibm.com> <alice@linux.vnet.ibm.comx>
Amir Chaudhry <amir.chaudhry@docker.com> <amirmc@gmail.com>
Anil Madhavapeddy <anil.madhavapeddy@docker.com> <anil@recoil.org>
Dan Finneran <dan@thebsdbox.co.uk> <dan@dev.fnnrn.me>
@@ -23,6 +24,7 @@ David Sheets <david.sheets@docker.com> <sheets@alum.mit.edu>
Ian Campbell <ian.campbell@docker.com> <ijc25@users.noreply.github.com>
Ian Campbell <ian.campbell@docker.com> <ijc@docker.com>
Ian Campbell <ian.campbell@docker.com> <ijc@users.noreply.github.com>
Ian Campbell <ian.campbell@docker.com> <ijc@lxdeb01.marist.edu>
Isaac Rodman <isaac@eyz.us> <isaac.rodman@healthtrio.com>
Isaac Rodman <isaac@eyz.us>
Istvan Szukacs <l1x@users.noreply.github.com>
@@ -30,10 +32,12 @@ Jeff Wu <jeff.wu.junfei@gmail.com> <JeffWuBJ@users.noreply.github.com>
Jeremy Yallop <yallop@docker.com> <yallop@gmail.com>
Justin Cormack <justin.cormack@docker.com> <justin.cormack@unikernel.com>
Justin Cormack <justin.cormack@docker.com> <justin@specialbusservice.com>
Justin Barrick <jbarrick@cloudflare.com>
Ken Cochrane <ken.cochrane@docker.com> <KenCochrane@gmail.com>
Magnus Skjegstad <magnus.skjegstad@docker.com> <magnus@skjegstad.com>
Marten Cassel <marten.cassel@gmail.com> <mcpop28@hotmail.com>
Mindy Preston <mindy.preston@docker.com> <meetup@yomimono.org>
MinJae Kwon <mingrammer@gmail.com>
Nathan Dautenhahn <ndd@seas.upenn.edu> <ndd@cis.upenn.edu>
Nathan LeClaire <nathan.leclaire@docker.com> <nathan.leclaire@gmail.com>
Nathan LeClaire <nathan.leclaire@docker.com> <nathanleclaire@gmail.com>
@@ -42,6 +46,7 @@ Pierre Gayvallet <pierre.gayvallet@docker.com> <pierre.gayvallet@gmail.com>
Radu Matei <matei.radu94@gmail.com>
Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com> <riyazdf@berkeley.edu>
Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com> <riyazdf@gmail.com>
Robin Winkelewski <w9ncontact@gmail.com>
Rolf Neugebauer <rolf.neugebauer@docker.com> <rneugeba@users.noreply.github.com>
Rolf Neugebauer <rolf.neugebauer@docker.com> <rn@users.noreply.github.com>
Rolf Neugebauer <rolf.neugebauer@docker.com> <rolf.neugebauer@gmail.com>
@@ -49,5 +54,6 @@ Sebastiaan van Stijn <sebastiaan.vanstijn@docker.com> <github@gone.nl>
Simon Ferquel <simon.ferquel@docker.com> <simon.ferquel@hotmail.fr>
Thomas Gazagnaire <thomas.gazagnaire@docker.com> <thomas@gazagnaire.com>
Thomas Gazagnaire <thomas.gazagnaire@docker.com> <thomas@gazagnaire.org>
Tiejun Chen <tiejun.china@gmail.com> <tiejunc@vmware.com>
Vincent Demeester <Vincent.Demeester@docker.com> <vincent@sbr.pm>
Vincent Demeester <Vincent.Demeester@docker.com> <vdemeester@docker.com>

21
AUTHORS
View File

@@ -3,12 +3,16 @@
Ajeet Singh Raina, Docker Captain, {Code} Catalysts, Dell EMC R&D <ajeetraina@gmail.com>
Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
Alan Raison <alanraison@users.noreply.github.com>
Alex Johnson <hello@alex-johnson.net>
Alice Frosi <alice@linux.vnet.ibm.com>
Amir Chaudhry <amir.chaudhry@docker.com>
Anil Madhavapeddy <anil.madhavapeddy@docker.com>
Avi Deitcher <avi@deitcher.net>
Bill Kerr <bill@generalbill.com>
Brice Figureau <brice-puppet@daysofwonder.com>
Carlton-Semple <carlton.semple@ibm.com>
Craig Ingram <cingram@heroku.com>
Damiano Donati <damiano.donati@gmail.com>
Dan Finneran <dan@thebsdbox.co.uk>
Daniel Caminada <daniel.caminada@ergon.ch>
@@ -24,8 +28,11 @@ David Sheets <david.sheets@docker.com>
Dennis Chen <dennis.chen@arm.com>
Dieter Reuter <dieter.reuter@me.com>
Edward Vielmetti <edward.vielmetti@gmail.com>
Emily Casey <ecasey@pivotal.io>
Eric Briand <eric.briand@gmail.com>
French Ben <frenchben@docker.com>
functor <meehow@gmail.com>
Garth Bushell <garth.bushell@oracle.com>
George Papanikolaou <g3orge.app@gmail.com>
Gianluca Arbezzano <gianarb92@gmail.com>
Guillaume Rose <guillaume.rose@docker.com>
@@ -42,8 +49,11 @@ Jes Ferrier <jes.ferrier@gmail.com>
Jesse Adametz <jesseadametz@gmail.com>
John Albietz <inthecloud247@gmail.com>
Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
Justin Barrick <jbarrick@cloudflare.com>
Justin Cormack <justin.cormack@docker.com>
Justin Ko <justin.ko@oracle.com>
Ken Cochrane <ken.cochrane@docker.com>
Krister Johansen <krister.johansen@oracle.com>
Kunal Kushwaha <kushwaha_kunal_v7@lab.ntt.co.jp>
Liqdfire <liqdfire@gmail.com>
Lorenzo Fontana <lo@linux.com>
@@ -53,6 +63,7 @@ Magnus Skjegstad <magnus.skjegstad@docker.com>
Marco Mariani <marco.mariani@alterway.fr>
Marcus van Dam <marcus@marcusvandam.nl>
marten <marten.cassel@gmail.com>
Mathieu Champlon <mathieu.champlon@docker.com>
Mathieu Pasquet <mathieu.pasquet@alterway.fr>
Matt Bajor <matt.bajor@workday.com>
Matt Bentley <matt.bentley@docker.com>
@@ -60,38 +71,46 @@ Matt Johnson <matjohn2@cisco.com>
Michel Courtine <michel.courtine@docker.com>
Mickaël Salaün <mic@digikod.net>
Mindy Preston <mindy.preston@docker.com>
MinJae Kwon <mingrammer@gmail.com>
Natanael Copa <natanael.copa@docker.com>
Nathan Dautenhahn <ndd@seas.upenn.edu>
Nathan LeClaire <nathan.leclaire@docker.com>
Nick Jones <nick@dischord.org>
Niclas Mietz <niclas@mietz.io>
Nico Di Rocco <dirocco.nico@gmail.com>
Olaf Bergner <olaf.bergner@gmx.de>
Olaf Flebbe <of@oflebbe.de>
Patrik Cyvoct <patrik@ptrk.io>
Phil Estes <estesp@linux.vnet.ibm.com>
Pierre Gayvallet <pierre.gayvallet@docker.com>
Pratik Mallya <mallya@us.ibm.com>
Radu Matei <matei.radu94@gmail.com>
Richard Mortier <mort@cantab.net>
Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
Robb Kistler <robb.kistler@docker.com>
Robin Winkelewski <w9ncontact@gmail.com>
Rolf Neugebauer <rolf.neugebauer@docker.com>
Roman Shaposhnik <rvs@zededa.com>
Rui Lopes <rgl@ruilopes.com>
Ryoga Saito <proelbtn@gmail.com>
Scott Coulton <scott.coulton@puppet.com>
Sebastiaan van Stijn <sebastiaan.vanstijn@docker.com>
Simon Ferquel <simon.ferquel@docker.com>
Sotiris Salloumis <sotiris.salloumis@gmail.com>
Stefan Bourlon <stefan.bourlon@ca.com>
Stephen J Day <stephen.day@docker.com>
Steve Hiehn <shiehn@pivotal.io>
Sukchan Lee <acetcom@gmail.com>
Theo Koulouris <theo.koulouris@hpe.com>
Thomas Conte <thomas@conte.com>
Thomas Gazagnaire <thomas.gazagnaire@docker.com>
Thomas Leonard <thomas.leonard@docker.com>
Thomas Shaw <tomwillfixit@users.noreply.github.com>
Tiago Pires <tandrepires@gmail.com>
Tiejun Chen <tiejun.china@gmail.com>
Tim Potter <tpot@hpe.com>
Tobias Klauser <tklauser@distanz.ch>
Tycho Andersen <tycho@docker.com>
Vincent Demeester <Vincent.Demeester@docker.com>
w9n <w9ncontact@gmail.com>
Zachery Hostens <zacheryph@gmail.com>
zlim <zlim.lnx@gmail.com>

76
CHANGELOG.md Normal file
View File

@@ -0,0 +1,76 @@
# Changelog
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
## [v0.5] - 2018-07-10
### Added
- New logging support with log rotation.
- Scaleway provider.
- Support for v4.17.x kernels.
- Kernel source are not included in the kernel packages.
- Improved documentation about debugging LinuxKit.
### Changed
- Switched to Alpine Linux 3.8 as the base.
- `containerd` updated to v1.1.1.
- `pkg/cadvisor` updated to v0.30.2
- `pkg/node_exporter` updated to 0.16.0
- WireGuard updated to 0.0.20180708.
- Linux firmware binaries update to latest.
- Improved support for building on Windows.
- Improved support for AWS/GCP metadata.
- Better handling of reboot/poweroff.
### Removed
- Support for v4.16.x. kernels as they have been EOLed.
## [v0.4] - 2018-05-12
### Added
- Support for v4.16.x kernels.
- Support for MPLS, USB_STORAGE, and SCTP support in the kernel config.
- Support for creating and booting from squashfs root filesystems.
- Super experimental support for crosvm.
- Support for compiling with go 1.10.
- Adjusted hyperkit support to be compatible with soon to be released Docker for Mac changes.
### Changed
- `containerd` updated to v1.1.0.
- WireGuard updated to 0.0.20180420.
- Intel CPU microcode update to 20180425.
### Removed
- Support for v4.15.x. kernels as they have been EOLed.
- `perf` support for 4.9.x kernels (the compile broke).
## [v0.3] - 2018-04-05
### Added
- Initial `s390x` support.
- Support for RealTime Linux kernels (`-rt`) on `x86_64` and `arm64`.
- Support for booting of `qcow2` disks via EFI.
- Support for CEPH filesystems in the kernel.
- Logging for `onboot` containers to `/var/log`
- Changelog file.
### Changed
- Switched the default kernel to 4.14.x.
- Update to `containerd` v1.0.3.
- Update to `notary` v0.6.0.
- Update WireGuard to 0.0.20180304.
### Removed
- Removed support for 4.4.x and 4.9.x kernels for `arm64`.
## [v0.2] - 2018-01-25
- Almost everything
## [v0.1] - 2017-??-??
- Sometime in 2017 we did a mini v0.1 release but we seem to have lost any trace of it :)
## [v0.0] - 2017-04-18
- Initial open sourcing of LinuxKit

View File

@@ -1,16 +1,17 @@
.DELETE_ON_ERROR:
.PHONY: default all
default: bin/linuxkit bin/rtf
all: default
VERSION="v0.2"
VERSION="v0.5"
GIT_COMMIT=$(shell git rev-list -1 HEAD)
GO_COMPILE=linuxkit/go-compile:8235f703735672509a16fb626d25c6ffb0d1c21d
GO_COMPILE=linuxkit/go-compile:49a2e8f8672ca95ad0159eebcc631773503465c1
ifeq ($(OS),Windows_NT)
LINUXKIT?=bin/linuxkit.exe
RTF?=bin/rtf.exe
GOOS?=windows
else
LINUXKIT?=bin/linuxkit
RTF?=bin/rtf
GOOS?=$(shell uname -s | tr '[:upper:]' '[:lower:]')
endif
GOARCH?=amd64
ifneq ($(GOOS),linux)
CROSS+=-e GOOS=$(GOOS)
@@ -21,16 +22,22 @@ endif
PREFIX?=/usr/local/
RTF_COMMIT=3e8ed35ca934259cb644c2492bf9b181954a07e1
.DELETE_ON_ERROR:
.PHONY: default all
default: $(LINUXKIT) $(RTF)
all: default
RTF_COMMIT=171155c375706f2616f0b9c96afe2240e15d1de1
RTF_CMD=github.com/linuxkit/rtf/cmd
RTF_VERSION=0.0
bin/rtf: tmp_rtf_bin.tar | bin
$(RTF): tmp_rtf_bin.tar | bin
tar xf $<
rm $<
touch $@
tmp_rtf_bin.tar: Makefile
docker run --rm --log-driver=none -e http_proxy=$(http_proxy) -e https_proxy=$(https_proxy) $(CROSS) $(GO_COMPILE) --clone-path github.com/linuxkit/rtf --clone https://github.com/linuxkit/rtf.git --commit $(RTF_COMMIT) --package github.com/linuxkit/rtf --ldflags "-X $(RTF_CMD).GitCommit=$(RTF_COMMIT) -X $(RTF_CMD).Version=$(RTF_VERSION)" -o bin/rtf > $@
docker run --rm --log-driver=none -e http_proxy=$(http_proxy) -e https_proxy=$(https_proxy) $(CROSS) $(GO_COMPILE) --clone-path github.com/linuxkit/rtf --clone https://github.com/linuxkit/rtf.git --commit $(RTF_COMMIT) --package github.com/linuxkit/rtf --ldflags "-X $(RTF_CMD).GitCommit=$(RTF_COMMIT) -X $(RTF_CMD).Version=$(RTF_VERSION)" -o $(RTF) > $@
# Manifest tool for multi-arch images
MT_COMMIT=bfbd11963b8e0eb5f6e400afaebeaf39820b4e90
@@ -44,13 +51,13 @@ tmp_mt_bin.tar: Makefile
docker run --rm --log-driver=none -e http_proxy=$(http_proxy) -e https_proxy=$(https_proxy) $(CROSS) $(GO_COMPILE) --clone-path github.com/estesp/manifest-tool --clone $(MT_REPO) --commit $(MT_COMMIT) --package github.com/estesp/manifest-tool --ldflags "-X main.gitCommit=$(MT_COMMIT)" -o bin/manifest-tool > $@
LINUXKIT_DEPS=$(wildcard src/cmd/linuxkit/*.go) $(wildcard src/cmd/linuxkit/*/*.go) Makefile src/cmd/linuxkit/vendor.conf
bin/linuxkit: tmp_linuxkit_bin.tar
$(LINUXKIT): tmp_linuxkit_bin.tar
tar xf $<
rm $<
touch $@
tmp_linuxkit_bin.tar: $(LINUXKIT_DEPS)
tar cf - -C src/cmd/linuxkit . | docker run --rm --net=none --log-driver=none -i $(CROSS) $(GO_COMPILE) --package github.com/linuxkit/linuxkit/src/cmd/linuxkit --ldflags "-X github.com/linuxkit/linuxkit/src/cmd/linuxkit/version.GitCommit=$(GIT_COMMIT) -X github.com/linuxkit/linuxkit/src/cmd/linuxkit/version.Version=$(VERSION)" -o bin/linuxkit > $@
tar cf - -C src/cmd/linuxkit . | docker run --rm --net=none --log-driver=none -i $(CROSS) $(GO_COMPILE) --package github.com/linuxkit/linuxkit/src/cmd/linuxkit --ldflags "-X github.com/linuxkit/linuxkit/src/cmd/linuxkit/version.GitCommit=$(GIT_COMMIT) -X github.com/linuxkit/linuxkit/src/cmd/linuxkit/version.Version=$(VERSION)" -o $(LINUXKIT) > $@
.PHONY: test-cross
test-cross:
@@ -62,23 +69,26 @@ test-cross:
$(MAKE) -j 3 GOOS=linux tmp_rtf_bin.tar tmp_mt_bin.tar tmp_linuxkit_bin.tar
$(MAKE) clean
ifeq ($(GOARCH)-$(GOOS),amd64-linux)
LOCAL_BUILDMODE?=pie
endif
LOCAL_BUILDMODE?=default
LOCAL_LDFLAGS += -X github.com/linuxkit/linuxkit/src/cmd/linuxkit/version.GitCommit=$(GIT_COMMIT) -X github.com/linuxkit/linuxkit/src/cmd/linuxkit/version.Version=$(VERSION)
LOCAL_TARGET ?= $(LINUXKIT)
LOCAL_LDFLAGS += -s -w -extldflags \"-static\" -X github.com/linuxkit/linuxkit/src/cmd/linuxkit/version.GitCommit=$(GIT_COMMIT) -X github.com/linuxkit/linuxkit/src/cmd/linuxkit/version.Version=$(VERSION)
LOCAL_TARGET ?= bin/linuxkit
.PHONY: local-check local-build local-test local
.PHONY: local-check local-build local-test local-static-pie local-static local-dynamic local
local-check: $(LINUXKIT_DEPS)
@echo gofmt... && o=$$(gofmt -s -l $(filter %.go,$(LINUXKIT_DEPS))) && if [ -n "$$o" ] ; then echo $$o ; exit 1 ; fi
@echo govet... && go tool vet -printf=false $(filter %.go,$(LINUXKIT_DEPS))
@echo golint... && set -e ; for i in $(filter %.go,$(LINUXKIT_DEPS)); do golint $$i ; done
@echo ineffassign... && ineffassign $(filter %.go,$(LINUXKIT_DEPS))
local-build: $(LINUXKIT_DEPS) | bin
go build -o $(LOCAL_TARGET) --buildmode $(LOCAL_BUILDMODE) --ldflags "$(LOCAL_LDFLAGS)" github.com/linuxkit/linuxkit/src/cmd/linuxkit
local-build: local-static
local-static-pie: $(LINUXKIT_DEPS) | bin
CGO_ENABLED=0 go build -o $(LOCAL_TARGET) --buildmode pie --ldflags "-s -w -extldflags \"-static\" $(LOCAL_LDFLAGS)" github.com/linuxkit/linuxkit/src/cmd/linuxkit
local-static: $(LINUXKIT_DEPS) | bin
CGO_ENABLED=0 go build -o $(LOCAL_TARGET) --ldflags "$(LOCAL_LDFLAGS)" github.com/linuxkit/linuxkit/src/cmd/linuxkit
local-dynamic: $(LINUXKIT_DEPS) | bin
go build -o $(LOCAL_TARGET) --ldflags "$(LOCAL_LDFLAGS)" github.com/linuxkit/linuxkit/src/cmd/linuxkit
local-test: $(LINUXKIT_DEPS)
go test $(shell go list github.com/linuxkit/linuxkit/src/cmd/linuxkit/... | grep -v ^github.com/linuxkit/linuxkit/src/cmd/linuxkit/vendor/)

View File

@@ -2,25 +2,6 @@
[![CircleCI](https://circleci.com/gh/linuxkit/linuxkit.svg?style=svg)](https://circleci.com/gh/linuxkit/linuxkit)
**Security Update 17/01/2018: All current LinuxKit `x86_64` kernels
have KPTI/KAISER enabled by default. This protects against
[Meltdown](https://meltdownattack.com/meltdown.pdf). Defences against
[Spectre](https://spectreattack.com/spectre.pdf) are work in progress
upstream and some have been incorporated into 4.14.14/4.9.77 onwards
but work is still ongoing. The kernels 4.14.14/4.9.77 onwards also
include various eBPF and KVM fixes to mitigate some aspects of
Spectre. The `arm64` kernels are not yet fixed. See [Greg KH's
excellent
blogpost](http://kroah.com/log/blog/2018/01/06/meltdown-status/) and
this [LWN.net
article](https://lwn.net/SubscriberLink/744287/1fc3c18173f732e7/) for
details.**
**If you run LinuxKit kernels on x86 baremetal we also strongly
recommend to add `ucode: intel-ucode.cpio` to the kernel section of
your YAML if you are using Intel CPUs and `linuxkit/firmware:<hash>` if
you are using AMD CPUs.**
LinuxKit, a toolkit for building custom minimal, immutable Linux distributions.
- Secure defaults without compromising usability
@@ -34,9 +15,15 @@ LinuxKit, a toolkit for building custom minimal, immutable Linux distributions.
- Designed to be managed by external tooling, such as [Infrakit](https://github.com/docker/infrakit) or similar tools
- Includes a set of longer-term collaborative projects in various stages of development to innovate on kernel and userspace changes, particularly around security
LinuxKit currently supports the `x86_64`, `arm64`, and `s390x` architectures on a variety of platforms, both as virtual machines and baremetal (see [below](#booting-and-testing) for details).
## Subprojects
- [LinuxKit kubernetes](https://github.com/linuxkit/kubernetes) aims to build minimal and immutable Kubernetes images. (previously `projects/kubernetes` in this repository).
- [LinuxKit LCOW](https://github.com/linuxkit/lcow) LinuxKit images and utilities for Microsoft's Linux Containers on Windows.
- [linux](https://github.com/linuxkit/linux) A copy of the Linux stable tree with branches LinuxKit kernels.
- [virtsock](https://github.com/linuxkit/virtsock) A `go` library and test utilities for `virtio` and Hyper-V sockets.
- [rtf](https://github.com/linuxkit/rtf) A regression test framework used for the LinuxKit CI tests (and other projects).
## Getting Started
@@ -75,25 +62,25 @@ Since `linuxkit build` is built around the [Moby tool](https://github.com/moby/t
### Booting and Testing
You can use `linuxkit run <name>` or `linuxkit run <name>.<format>` to execute the image you created with `linuxkit build <name>.yml`.
This will use a suitable backend for your platform or you can choose one, for example VMWare.
See `linuxkit run --help`.
You can use `linuxkit run <name>` or `linuxkit run <name>.<format>` to
execute the image you created with `linuxkit build <name>.yml`. This
will use a suitable backend for your platform or you can choose one,
for example VMWare. See `linuxkit run --help`.
Currently supported platforms are:
- Local hypervisors
- [HyperKit (macOS)](docs/platform-hyperkit.md)
- [Hyper-V (Windows)](docs/platform-hyperv.md)
- [qemu (macOS, Linux, Windows)](docs/platform-qemu.md)
- [VMware (macOS, Windows)](docs/platform-vmware.md)
- [HyperKit (macOS)](docs/platform-hyperkit.md) `[x86_64]`
- [Hyper-V (Windows)](docs/platform-hyperv.md) `[x86_64]`
- [qemu (macOS, Linux, Windows)](docs/platform-qemu.md) `[x86_64, arm64, s390x]`
- [VMware (macOS, Windows)](docs/platform-vmware.md) `[x86_64]`
- Cloud based platforms:
- [Amazon Web Services](docs/platform-aws.md)
- [Google Cloud](docs/platform-gcp.md)
- [Microsoft Azure](docs/platform-azure.md)
- [OpenStack](docs/platform-openstack.md)
- [packet.net](docs/platform-packet.md)
- [Amazon Web Services](docs/platform-aws.md) `[x86_64]`
- [Google Cloud](docs/platform-gcp.md) `[x86_64]`
- [Microsoft Azure](docs/platform-azure.md) `[x86_64]`
- [OpenStack](docs/platform-openstack.md) `[x86_64]`
- Baremetal:
- x86 and arm64 servers on [packet.net](docs/platform-packet.md)
- [Raspberry Pi Model 3b](docs/platform-rpi3.md)
- [packet.net](docs/platform-packet.md) `[x86_64, arm64]`
- [Raspberry Pi Model 3b](docs/platform-rpi3.md) `[arm64]`
#### Running the Tests
@@ -106,7 +93,7 @@ To run the test suite:
```
cd test
rtf -x run
rtf -v run -x
```
This will run the tests and put the results in a the `_results` directory!
@@ -115,13 +102,13 @@ Run control is handled using labels and with pattern matching.
To run add a label you may use:
```
rtf -x -l slow run
rtf -v -l slow run -x
```
To run tests that match the pattern `linuxkit.examples` you would use the following command:
```
rtf -x run linuxkit.examples
rtf -v run -x linuxkit.examples
```
## Building your own customised image

2
contrib/crosvm/.gitignore vendored Normal file
View File

@@ -0,0 +1,2 @@
/build
iid

36
contrib/crosvm/Dockerfile Normal file
View File

@@ -0,0 +1,36 @@
FROM rust:1.25.0-stretch
ENV CROSVM_REPO=https://chromium.googlesource.com/chromiumos/platform/crosvm
ENV CROSVM_COMMIT=7a7268faf0a43c79b6a4520f5c2f35c3e0233932
ENV MINIJAIL_REPO=https://android.googlesource.com/platform/external/minijail
ENV MINIJAIL_COMMIT=d45fc420bb8fd9d1fc9297174f3c344db8c20bbd
# Install deps
RUN apt-get update && apt-get install -y libcap-dev libfdt-dev
# Get source code
RUN git clone ${MINIJAIL_REPO} && \
cd /minijail && \
git checkout ${MINIJAIL_COMMIT} && \
cd / && \
git clone ${CROSVM_REPO} && \
cd crosvm && \
git checkout ${CROSVM_COMMIT}
# Compile and install minijail
WORKDIR /minijail
RUN make && \
cp libminijail.so /usr/lib/ && \
cp libminijail.h /usr/include/
# Compile crosvm
WORKDIR /crosvm
RUN cargo build --release
RUN mkdir /out && \
cp /minijail/libminijail.so /out && \
cp /crosvm/target/release/crosvm /out && \
cp -r /crosvm/seccomp /out
WORKDIR /out
ENTRYPOINT ["tar", "cf", "-", "libminijail.so", "crosvm", "seccomp"]

9
contrib/crosvm/Makefile Normal file
View File

@@ -0,0 +1,9 @@
.PHONY: extract
extract: iid
rm -rf ./build
mkdir -p ./build
docker run --rm $(shell cat iid) | tar xf - -C ./build
rm iid
iid: Makefile Dockerfile
docker build --no-cache --iidfile iid .

85
contrib/crosvm/README.md Normal file
View File

@@ -0,0 +1,85 @@
The Chrome OS Virtual Machine Monitor
[`crosvm`](https://chromium.googlesource.com/chromiumos/platform/crosvm/)
is a lightweight VMM written in Rust. It runs on top of KVM and
optionally runs the device models in separate processes isolated with
seccomp profiles.
## Build/Install
The `Makefile` and `Dockerfile` compile `crosvm` and a suitable
version of `libminijail`. To build:
```sh
make
```
You should end up with a `crosvm` and `libminijail.so` binaries as
well as the seccomp profiles in `./build`. Copy `libminijail.so` to
`/usr/lib` or wherever `ldd` picks it up. You may also need `libcap`
(on Ubuntu or Debian `apt-get install -y libcap-dev`).
You may also have to create an empty directory `/var/empty`.
## Use with LinuxKit images
You can build a LinuxKit image suitable for `crosvm` with the
`kernel+squashfs` build format. For example, using this LinuxKit
YAML file (`minimal.yml`):
```
kernel:
image: linuxkit/kernel:4.9.91
cmdline: "console=tty0 console=ttyS0 console=ttyAMA0"
init:
- linuxkit/init:v0.5
- linuxkit/runc:v0.5
- linuxkit/containerd:v0.5
services:
- name: getty
image: linuxkit/getty:v0.5
env:
- INSECURE=true
trust:
org:
- linuxkit
```
run:
```sh
linuxkit build -output kernel+squashfs minimal.yml
```
The kernel this produces (`minimal-kernel`) needs to be converted as
`crosvm` does not grok `bzImage`s. You can convert the LinuxKit kernel
image with
[extract-vmlinux](https://raw.githubusercontent.com/torvalds/linux/master/scripts/extract-vmlinux):
```sh
extract-vmlinux minimal-kernel > minimal-vmlinux
```
Then you can run `crosvm`:
```sh
./crosvm run --seccomp-policy-dir=./seccomp/x86_64 \
--root ./minimal-squashfs.img \
--mem 2048 \
--multiprocess \
--socket ./linuxkit-socket \
minimal-vmlinux
```
## Known issues
- With 4.14.x, a `BUG_ON()` is hit in `drivers/base/driver.c`. 4.9.x
kernels seem to work.
- Networking does not yet work, so don't include a `onboot` `dhcpd` service.
- `poweroff` from the command line does not work (crosvm does not seem
to support ACPI). So to stop a VM you can use the control socket
and: `./crosvm stop ./linuxkit-socket`
- `crosvm` and its dependencies compile on `arm64` but `crosvm` seems
to lack support for setting op the IRQ chip on the system I
tested. I got: `failed to create in-kernel IRQ chip:
CreateGICFailure(Error(19))`.

View File

@@ -1,4 +1,4 @@
FROM alpine:3.7 AS extract
FROM alpine:3.8 AS extract
ARG DEB_URLS

View File

@@ -1,4 +1,4 @@
FROM alpine:3.7 AS extract
FROM alpine:3.8 AS extract
ARG RPM_URLS

View File

@@ -30,3 +30,49 @@ of dependencies and functionality that we do not need. At present we are using t
`init` process, and a small set of minimal scripts, but we expect to replace that with a small
standalone `init` process and a small piece of code to bring up the system containers where the
real work takes place.
## Console not displaying init or containerd output at boot
If you're not seeing `containerd` logs in the console during boot, make sure that your kernel `cmdline` configuration doesn't list multiple consoles.
`init` and other processes like `containerd` will use the last defined console in the kernel `cmdline`. When using `qemu`, to see the console you need to list `ttyS0` as the last console to properly see the output.
## Troubleshooting containers
Linuxkit runs all services in a specific `containerd` namespace called `services.linuxkit`. To list all the defined containers:
```sh
(ns: getty) linuxkit-befde23bc535:~# ctr -n services.linuxkit container ls
CONTAINER IMAGE RUNTIME
getty - io.containerd.runtime.v1.linux
```
To list all running containers and their status:
```sh
(ns: getty) linuxkit-befde23bc535:~# ctr -n services.linuxkit task ls
TASK PID STATUS
getty 661 RUNNING
```
To list all processes running in a container:
```sh
(ns: getty) linuxkit-befde23bc535:/containers/services/getty# ctr -n services.linuxkit task ps getty
PID INFO
661 &ProcessDetails{ExecID:getty,}
677 -
685 -
686 -
687 -
1237 -
```
To attach a shell to a running container:
```sh
(ns: getty) linuxkit-befde23bc535:/containers/services/getty# ctr -n services.linuxkit tasks exec --tty --exec-id sh sshd /bin/ash -l
(ns: sshd) linuxkit-befde23bc535:/#
```
Containers are defined as OCI bundles in `/containers`.

View File

@@ -27,6 +27,11 @@ In addition to the official images, there are also some
from some Linux distributions into LinuxKit kernel packages. These are
mostly provided for testing purposes.
Note now linuxkit also embraces Preempt-RT Linux kernel to support more
use cases for the promising IoT scenarios. All -rt patches are grabbed from
https://www.kernel.org/pub/linux/kernel/projects/rt/. But so far we just
enable it over 4.14.x.
## Loading kernel modules
@@ -155,7 +160,7 @@ The kernel build system has some provision to allow local
customisation to the build.
If you want to override/add some kernel config options, you can add a
file called `config-foo` and then invoke the build with `make
file called `config-4.9.x-x86_64-foo` and then invoke the build with `make
EXTRA=-foo build_4.9.x-foo` and this will build an image with the
additional kernel config options enabled.

94
docs/logging.md Normal file
View File

@@ -0,0 +1,94 @@
# Logging
By default LinuxKit will write onboot and service logs directly to files in
`/var/log` and `/var/log/onboot`.
It is tricky to write the logs to a disk or a network service as no disks
or networks are available until the `onboot` containers run. We work around
this by splitting the logging into 2 pieces:
1. `memlogd`: an in-memory circular buffer which receives logs (including
all the early `onboot` logs)
2. a log writing `service` that starts later and can download and process
the logs from `memlogd`
To use this new logging system, you should add the `memlogd` container to
the `init` block in the LinuxKit yml. On boot `memlogd` will be started
from `init.d` and it will listen on a Unix domain socket:
```
/var/run/linuxkit-external-logging.sock
```
The `init`/`service` process will look for this socket and redirect the
`stdout` and `stderr` of both `onboot` and `services` to `memlogd`.
## memlogd: an in-memory circular buffer
The `memlogd` daemon reads the logs from the `onboot` and `services` containers
and stores them together with a timestamp and the name of the originating
container in a circular buffer in memory.
The contents of the circular buffer can be read over the Unix domain socket
```
/var/run/memlogq.sock
```
The circular buffer has a fixed size (overridden by the command-line argument
`-max-lines`) and when it fills up, the oldest messages will be overwritten.
To store the logs somewhere more permanent, for example a disk or a remote
network service, a service should be added to the yaml which connects to
`memlogd` and streams the logs. The `logwrite` service described below shows
how to do this.
### Message format
The format used to read logs is similar to [kmsg](https://www.kernel.org/doc/Documentation/ABI/testing/dev-kmsg):
```
<timestamp>,<log>;<body>
```
where `<timestamp>` is an RFC3339-formatted timestamp, `<log>` is the name of
the log (e.g. `docker-ce.out`) and `<body>` is the output. The `<log>` must
not contain the character `;`.
## logwrite: writing logs to disk
The service `pkg/logwrite` connects to `memlogd` and streams the logs to files
in `/var/log`. The logs are automatically rotated; by default each file has
a maximum size of 1 MiB and up to 10 files are kept per log. The arguments
`-max-log-files` and `-max-log-size` can be used to override these defaults.
Here is an example log file:
```
# cat /var/log/onboot.001-dhcpcd.out
2018-07-08T09:16:53Z onboot.001-dhcpcd.out eth0: waiting for carrier
2018-07-08T09:16:53Z onboot.001-dhcpcd.out eth0: carrier acquired
2018-07-08T09:16:53Z onboot.001-dhcpcd.out DUID 00:01:00:01:22:d4:93:05:02:50:00
:00:00:06
2018-07-08T09:16:53Z onboot.001-dhcpcd.out eth0: IAID 00:00:00:06
2018-07-08T09:16:53Z onboot.001-dhcpcd.out eth0: adding address fe80::f346:56a6:590d:5ea4
2018-07-08T09:16:53Z onboot.001-dhcpcd.out eth0: soliciting an IPv6 router
2018-07-08T09:16:53Z onboot.001-dhcpcd.out eth0: soliciting a DHCP lease
2018-07-08T09:16:53Z onboot.001-dhcpcd.out eth0: offered 192.168.65.8 from 192.168.65.1 `vpnkit'
2018-07-08T09:16:53Z onboot.001-dhcpcd.out eth0: leased 192.168.65.8 for 7200 se
conds
2018-07-08T09:16:53Z onboot.001-dhcpcd.out eth0: adding route to 192.168.65.0/24
2018-07-08T09:16:53Z onboot.001-dhcpcd.out eth0: adding default route via 192.16
8.65.1
2018-07-08T09:16:53Z onboot.001-dhcpcd.out exiting due to oneshot
2018-07-08T09:16:53Z onboot.001-dhcpcd.out dhcpcd exited
```
## Current issues and limitations:
- No docker logger plugin support yet - it could be nice to add support to
memlogd, so the docker container logs would also be gathered in one place
- No syslog compatibility at the moment and `/dev/log` doesnt exist. This
socket could be created to keep syslog compatibility, e.g. by using
https://github.com/mcuadros/go-syslog. Processes that require syslog should
then be able to log directly to memlogd.
- Currently no direct external hooks exposed - but options available that
could be added. Should also be possible to pipe output to e.g. `oklog`
from `logread` (https://github.com/oklog/oklog)

View File

@@ -13,6 +13,18 @@ All LinuxKit packages are:
- Derived from well-known (and signed) sources for repeatable builds.
- Built with multi-stage builds to minimise their size.
## CI and Package Builds
When building and merging packages, it is important to note that our CI process builds packages. The targets `make ci` and `make ci-pr` execute `make -C pkg build`. These in turn execute `linuxkit pkg build` for each package under `pkg/`. This in turn will try to pull the image whose tag matches the tree hash or, failing that, to build it.
We do not want the builds to happen with each CI run for two reasons:
1. It is slower to do a package build than to just pull the latest image.
2. If any of the steps of the build fails, e.g. a `curl` download that depends on an intermittent target, it can cause all of CI to fail.
Thus, if, as a maintainer, you merge any commits into a `pkg/`, even if the change is documentation alone, please do a `linuxkit package push`.
## Package source
A package source consists of a directory containing at least two files:
@@ -60,9 +72,9 @@ should also be set up with signing keys for packages and your signing
key should have a passphrase, which we call `<passphrase>` throughout.
All official LinuxKit packages are multi-arch manifests and most of
them are available for amd64 and aarm64. Official images *must* be
build on both architectures and they must be build *in sequence*, i.e.,
they can't be build in parallel.
them are available for `amd64`, `arm64`, and `s390x`. Official images
*must* be build on both architectures and they must be build *in
sequence*, i.e., they can't be build in parallel.
To build a package on an architecture:
@@ -138,4 +150,3 @@ linuxkit pkg build -org=wombat -disable-content-trust -hash=foo push
and this will create `wombat/<image>:foo-<arch>` and
`wombat/<image>:foo` for use in your YAML files.

View File

@@ -12,9 +12,19 @@ Alternatively, you can install HyperKit and VPNKit standalone and use it without
## Boot
The HyperKit backend currently supports booting the
`kernel+initrd` output from `moby`, and EFI ISOs using the EFI firmware.
The HyperKit backend currently supports booting:
- `kernel+initrd` output from `linuxkit build`.
- `kernel+squashfs` output from `linuxkit build`.
- EFI ISOs using the EFI firmware.
You need to select the boot method manually using the command line
options. The default is `kernel+initrd`. `kernel+squashfs` can be
selected using `-squashfs` and to boot a ISO with EFI you have to
specify `-iso -uefi`.
The `kernel+initrd` uses a RAM disk for the root filesystem. If you
have RAM constraints or large images we recommend using either the
`kernel+squashfs` or the EFI ISO boot.
## Console

View File

@@ -4,19 +4,27 @@ The `qemu` backend is the most versatile `run` backend for
`linuxkit`. It can boot both `x86_64` and `arm64` images, runs on
macOS and Linux (and possibly Windows), and can boot most types of
output formats. On Linux, `kvm` acceleration is enabled by default if
available.
available. On macOS, `hvf` acceleration (using the Hypervisor
framework) is used if your `qemu` version supports it (versions
released after Jan/Feb 2018 should support it). `s390x` is currently
only supported in `kvm` mode as the emulated `s390x` architecture (aka
`tcg` mode) does not seem to support several required platform
features. Further, on `s390x` platforms you need to set
`vm.allocate_pgste=1` via `sysctl` (or use `echo 1 >
/proc/sys/vm/allocate_pgste`).
## Boot
By default `linuxkit run qemu` will boot with the host architecture
(`x86_64` on `x86_64` machines and `aarch64` on `arm64` systems). The
architecture can be specified with `-arch` and currently accepts
`x86_64` and `aarch64` as arguments.
(e.g., `aarch64` on `arm64` systems). The architecture can be
specified with `-arch` and currently accepts `x86_64`, `aarch64`, and
`s390x` as arguments.
`linuxkit run qemu` can boot in different types of images:
- `kernel+initrd`: This is the default mode of `linuxkit run qemu` [`x86_64`, `arm64`]
- `kernel+initrd`: This is the default mode of `linuxkit run qemu` [`x86_64`, `arm64`, `s390x`]
- `kernel+squashfs`: `linuxkit run qemu -squashfs <path to directory>`. This expects a kernel and a squashfs image. [`x86_64`, `arm64`, `s390x`]
- `iso-bios`: `linuxkit run qemu -iso <path to iso>` [`x86_64`]
- `iso-efi`: `linuxkit run qemu -iso -uefi <path to iso>`. This looks in `/usr/share/ovmf/bios.bin` for the EFI firmware by default. Can be overwritten with `-fw`. [`x86_64`, `arm64`]
- `qcow-bios`: `linuxkit run qemu disk.qcow2` [`x86_64`]
@@ -25,6 +33,10 @@ architecture can be specified with `-arch` and currently accepts
The formats `qcow-efi` and `raw-efi` may also work, but are currently not tested.
The default `kernel+initrd` boot uses a RAM disk for the root
filesystem. If you have RAM constraints or large images we recommend
using one of the other methods, such as `kernel+squashfs` or booting
via a ISO image.
## Console

View File

@@ -46,6 +46,14 @@ partition as `ext4` (or similar), and use it for persistent storage.
**TODO:** Experiment with and document this set up.
To enable and external USB stick as disk, add the following to the
onboot section in your YAML:
```
- name: usb-storage
image: linuxkit/modprobe:<hash>
command: ["modprobe", "usb_storage"]
```
## Networking

62
docs/platform-scaleway.md Normal file
View File

@@ -0,0 +1,62 @@
# Using LinuxKit on Scaleway
This is a quick guide to run LinuxKit on Scaleway (only VPS x86_64 for now)
## Setup
Before you proceed it's recommanded that you set up the [Scaleway CLI](https://github.com/scaleway/scaleway-cli/)
and perform an `scw login`. This will create a `$HOME/.scwrc` file containing the required API token.
You can also use the `SCW_TOKEN` environment variable to set a Scaleway token.
The `-token` flag of the `linuxkit push scaleway` and `linuxkit run scaleway` can also be used.
The environment variable `SCW_TARGET_REGION` is used to set the region (there is also the `-region` flag)
## Build an image
Scaleway requires a `iso-efi` image. To create one:
```
$ linuxkit build -format iso-efi examples/scaleway.yml
```
### Changes needed in the yaml
* You have to set `root=/dev/vda` in the `cmdline` to have the right device set on boot
* The metadata package is not only used to set the metadata, but also to signal Scaleway that the instance has booted. So it is encouraged to use it (dhcpcd must be set before)
## Push image
You have to do `linuxkit push scaleway scaleway.iso` to upload it to your Scaleway images.
By default the image name is the name of the ISO file without the extension.
It can be overidden with the `-img-name` flag or the `SCW_IMAGE_NAME` environment variable.
**Note 1:** If an image (and snapshot) of the same name exists, it will be replaced.
**Note 2:** The image is region specific: if you create an image in `par1` you can't use is in `ams1`.
### Push process
Building a Scaleway image have a special process. Basically:
* Create an `image-builder` instance with an additional volume, based on Ubuntu Xenial (only x86_64 for now)
* Copy the ISO image on this instance
* Use `dd` to write the image on the additional volume (`/dev/vdb` by default)
* Terminate the instance, create a snapshot, and create an image from the snapshot
**Note 1:** An image is linked to a snapshot, so you can't delete a snapshot before the image.
**Note 2:** You can specify an already running instance to act as the image builder with the `-instance-id` flag. But if you don't specify the `-no-clean` flag it will be destroyed upon completion.
## Create an instance and connect to it
With the image created, we can now create an instance.
```
linuxkit run scaleway scaleway
```
By default, the instance name is `linuxkit`. It can be overidden with the `-instance-name` flag.
If you don't set the `-no-attach` flag, you will be connected to the serial port.
You can edit the Scaleway example to allow you to SSH to your instance in order to use it.

269
docs/releasing.md Normal file
View File

@@ -0,0 +1,269 @@
# Making a LinuxKit release
This document describes the steps to make a LinuxKit release. A
LinuxKit release consists of:
- A git tag of the form vX.Y on a specific commit.
- Packages on Docker hub, tagged with the release tag.
- All sample `YAML` files updated to use the release packages
- `linuxkit` binaries for all supported architectures.
- Changelog entry
Note, we explicitly do not tag kernel images with LinuxKit release
tags as we encourage users to stay current with the kernel
releases. We also do not tag test and `mkimage` packages as these are
not end-user facing.
## Pre-requisites
Releases can be done by any maintainer. Maintainers need to have
access to build machines for all architectures support by LinuxKit and
signing keys set up to sign Docker hub images.
## Release preparation
The release preparation is by far the most time consuming task as it
involves updating all packages and YAML files.
The release preparation is performed on a branch of your up-to-date
LinuxKit clone. This document assumes that your clone of the LinuxKit
repository is available as the `origin` remote in your local `git`
clone (in my setup the official LinuxKit repository is available as
`upstream` remote). If your setup is different, you may have to adjust
some of the commands below.
As a starting point you have to be on the update to date master branch
and be in the root directory of your local git clone. You should also
have the same setup on all build machines used.
To make the release steps below cut-and-pastable, define the following
environment variables:
```sh
LK_RELEASE=v0.4
LK_ROOT=$(pwd)
LK_REMOTE=origin
```
On one of the build machines (preferably the `x86_64` machine), create
the release branch:
```sh
git checkout -b rel_$LK_RELEASE
```
Also make sure that you have a recent version of the `linuxkit`
utility in the path. Either a previous release or compiled from
master.
### Update `linuxkit/alpine`
This step is not necessarily required if the alpine base image has
recently been updated, but it is good to pick up any recent bug
fixes. Updating the alpine base image is different to other packages
and it must be performed on `x86_64` first:
```sh
cd $LK_ROOT/tools/alpine
make push
```
This will update `linuxkit/alpine` and change the `versions.x86_64`
file. Check it in and push to GitHub:
```sh
git commit -a -s -m "tools/alpine: Update to latest"
git push $LK_REMOTE rel_$LK_RELEASE
```
Now, on each build machine for the other supported architectures, in turn:
```sh
git fetch
git checkout rel_$LK_RELEASE
cd $LK_ROOT/tools/alpine
make push
git commit -a --amend
git push --force $LK_REMOTE rel_$LK_RELEASE
```
With all supported architectures updated, head back to the `x86_64`
machine and update the release branch:
```sh
git fetch && git reset --hard $LK_REMOTE/rel_$LK_RELEASE
```
Stash the tag of the alpine base image in an environment variable:
```sh
LK_ALPINE=$(head -1 alpine/versions.x86_64 | sed 's,[#| ]*,,' | sed 's,\-.*$,,' | cut -d':' -f2)
```
### Update tools packages
On the `x86_64` machine, get the `linuxkit/alpine` tag and update the
other packages:
```sh
cd $LK_ROOT/tools
../scripts/update-component-sha.sh --image linuxkit/alpine:$LK_ALPINE
git checkout alpine/versions.aarch64 alpine/versions.s390x
git commit -a -s -m "tools: Update to latest alpine base"
git push $LK_REMOTE rel_$LK_RELEASE
make forcepush
```
Note, the `git checkout` reverts the changes made by
`update-component-sha.sh` to files which are accidentally updated and
the `make forcepush` will skip building the alpine base.
Then, on the other build machines in turn:
```sh
cd $LK_ROOT/tools
git fetch && git reset --hard $LK_REMOTE/rel_$LK_RELEASE
make forcepush
```
Back on the `x86_64` machine:
```sh
cd $LK_ROOT
for img in $(cd tools; make show-tag); do
./scripts/update-component-sha.sh --image $img
done
git commit -a -s -m "Update use of tools to latest"
```
### Update test packages
Next, we update the test packages to the updated alpine base on the `x86_64` system:
```sh
cd $LK_ROOT/test/pkg
../../scripts/update-component-sha.sh --image linuxkit/alpine:$LK_ALPINE
git commit -a -s -m "tests: Update packages to latest alpine base"
git push $LK_REMOTE rel_$LK_RELEASE
make push
```
Then, on the other build machines in turn:
```sh
cd $LK_ROOT/test/pkg
git fetch && git reset --hard $LK_REMOTE/rel_$LK_RELEASE
make push
```
Back on the `x86_64` machine:
```sh
cd $LK_ROOT
for img in $(cd test/pkg; make show-tag); do
./scripts/update-component-sha.sh --image $img
done
git commit -a -s -m "Update use of test packages to latest"
```
### Update packages
Next, we update the LinuxKit packages. This is really the core of the
release. The other steps above are just there to ensure consistency
across packages.
```sh
cd $LK_ROOT/pkg
../scripts/update-component-sha.sh --image linuxkit/alpine:$LK_ALPINE
git commit -a -s -m "pkgs: Update packages to latest alpine base"
git push $LK_REMOTE rel_$LK_RELEASE
```
Most of the packages are build from `linuxkit/alpine` and source code
in the `linuxkit` repository, but some packages wrap external
tools. The time of a release is a good opportunity to check if there
have been updates. Specifically:
- `pkg/cadvisor`: Check for [new releases](https://github.com/google/cadvisor/releases).
- `pkg/firmware` and `pkg/firmware-all`: Use latest commit from [here](https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git).
- `pkg/node_exporter`: Check for [new releases](https://github.com/prometheus/node_exporter/releases).
- `example/docker.yml`: Check [docker hub](https://hub.docker.com/r/library/docker/tags/) for the latest `dind` tags.
The build/push the packages:
```sh
cd $LK_ROOT/pkg
make OPTIONS="-release $LK_RELEASE" push
```
Note, the `OPTIONS` argument. This adds the release tag to the
packages.
Then, on the other build machines in turn:
```sh
cd $LK_ROOT/pkg
git fetch && git reset --hard $LK_REMOTE/rel_$LK_RELEASE
make OPTIONS="-release $LK_RELEASE" push
```
Update the package tags in the YAML files:
```sh
cd $LK_ROOT
for img in $(cd pkg; make show-tag | cut -d ':' -f1); do
./scripts/update-component-sha.sh --image $img:$LK_RELEASE
done
git commit -a -s -m "Update package tags to $LK_RELEASE"
```
### Final preparation steps
- Update the `VERSION` variable in the top-level `Makefile`
- Create an entry in `CHANGELOG.md`. Take a look at `git log v0.3..HEAD` and pick interesting updates (of course adjust `v0.3` to the previous version).
- Create a PR with your changes.
## Releasing
Once the PR is merged we can do the actual release.
- Update your local git clone to the lastest
- Identify the merge commit for your PR and tag it and push it to the main LinuxKit repository (remote `upstream` in my case):
```
git tag $LK_RELEASE master
git push upstream $LK_RELEASE
```
Then head over to GitHub and look at the `Releases` tab. You should see the new tag. Edit it:
- Add the changelog message
- Head over to the Circle CI page of the master build (try the Circle CI badge in the top level `README.md`)
- Download the artefacts and SHA256 sums file.
- Add the downloaded binaries to the release page (drag-and-drop below the editor window)
- Add the `sha256` sums to the release notes on the release page
Hit the `Publish release` button.
This completes the release, but you are not done, one more step is required.
## Post release
Create a PR which bumps the version number in the top-level `Makefile`
to `$LK_RELEASE+` to make sure that the version reported by `linuxkit
version` gets updated.

View File

@@ -12,7 +12,7 @@ To run the test suite:
```
cd test
rtf -x run
rtf -v run -x
```
This will run the tests and put the results in a the `_results` directory!
@@ -21,7 +21,7 @@ Run control is handled using labels and with pattern matching.
To run add a label you may use:
```
rtf -x -l slow run
rtf -v -l slow run -x
```
You can list the tests which will be run using:
@@ -35,7 +35,7 @@ Some tests may be marked as `SKIP` and `LABELS` column will typically provide an
To run tests that match the pattern `linuxkit.build` you would use the following command:
```
rtf -x run linuxkit.build
rtf -v run -x linuxkit.build
```
### Writing new tests

View File

@@ -28,7 +28,7 @@ docker run -it --rm \
-v $(pwd):/go/src/github.com/linuxkit/linuxkit \
-w /go/src/github.com/linuxkit/linuxkit/src/cmd/linuxkit \
--entrypoint /go/bin/vndr \
linuxkit/go-compile:8235f703735672509a16fb626d25c6ffb0d1c21d
linuxkit/go-compile:49a2e8f8672ca95ad0159eebcc631773503465c1
```
To update a single dependency:
@@ -38,7 +38,7 @@ docker run -it --rm \
-v $(pwd):/go/src/github.com/linuxkit/linuxkit \
-w /go/src/github.com/linuxkit/linuxkit/src/cmd/linuxkit \
--entrypoint /go/bin/vndr \
linuxkit/go-compile:8235f703735672509a16fb626d25c6ffb0d1c21d
linuxkit/go-compile:49a2e8f8672ca95ad0159eebcc631773503465c1
github.com/docker/docker
```

View File

@@ -1,28 +1,28 @@
kernel:
image: linuxkit/kernel:4.9.78
image: linuxkit/kernel:4.14.54
cmdline: "console=ttyS0"
init:
- linuxkit/init:v0.2
- linuxkit/runc:v0.2
- linuxkit/containerd:v0.2
- linuxkit/ca-certificates:v0.2
- linuxkit/init:v0.5
- linuxkit/runc:v0.5
- linuxkit/containerd:v0.5
- linuxkit/ca-certificates:v0.5
onboot:
- name: sysctl
image: linuxkit/sysctl:v0.2
image: linuxkit/sysctl:v0.5
- name: dhcpcd
image: linuxkit/dhcpcd:v0.2
image: linuxkit/dhcpcd:v0.5
command: ["/sbin/dhcpcd", "--nobackground", "-f", "/dhcpcd.conf", "-1"]
- name: metadata
image: linuxkit/metadata:v0.2
image: linuxkit/metadata:v0.5
services:
- name: rngd
image: linuxkit/rngd:v0.2
image: linuxkit/rngd:v0.5
- name: sshd
image: linuxkit/sshd:v0.2
image: linuxkit/sshd:v0.5
binds:
- /run/config/ssh/authorized_keys:/root/.ssh/authorized_keys
- name: nginx
image: nginx:alpine
image: nginx:1.13.8-alpine
capabilities:
- CAP_NET_BIND_SERVICE
- CAP_CHOWN

View File

@@ -1,21 +1,21 @@
kernel:
image: linuxkit/kernel:4.9.78
image: linuxkit/kernel:4.14.54
cmdline: "console=ttyS0"
init:
- linuxkit/init:v0.2
- linuxkit/runc:v0.2
- linuxkit/containerd:v0.2
- linuxkit/ca-certificates:v0.2
- linuxkit/init:v0.5
- linuxkit/runc:v0.5
- linuxkit/containerd:v0.5
- linuxkit/ca-certificates:v0.5
onboot:
- name: sysctl
image: linuxkit/sysctl:v0.2
image: linuxkit/sysctl:v0.5
services:
- name: rngd
image: linuxkit/rngd:v0.2
image: linuxkit/rngd:v0.5
- name: dhcpcd
image: linuxkit/dhcpcd:v0.2
image: linuxkit/dhcpcd:v0.5
- name: sshd
image: linuxkit/sshd:v0.2
image: linuxkit/sshd:v0.5
files:
- path: root/.ssh/authorized_keys
source: ~/.ssh/id_rsa.pub

View File

@@ -1,34 +1,34 @@
kernel:
image: linuxkit/kernel:4.9.78
cmdline: "console=tty0 console=ttyS0 console=ttyAMA0"
image: linuxkit/kernel:4.14.54
cmdline: "console=tty0 console=ttyS0 console=ttyAMA0 console=ttysclp0"
init:
- linuxkit/init:v0.2
- linuxkit/runc:v0.2
- linuxkit/containerd:v0.2
- linuxkit/ca-certificates:v0.2
- linuxkit/init:v0.5
- linuxkit/runc:v0.5
- linuxkit/containerd:v0.5
- linuxkit/ca-certificates:v0.5
onboot:
- name: sysctl
image: linuxkit/sysctl:v0.2
image: linuxkit/sysctl:v0.5
- name: dhcpcd
image: linuxkit/dhcpcd:v0.2
image: linuxkit/dhcpcd:v0.5
command: ["/sbin/dhcpcd", "--nobackground", "-f", "/dhcpcd.conf", "-1"]
- name: sysfs
image: linuxkit/sysfs:v0.2
image: linuxkit/sysfs:v0.5
- name: format
image: linuxkit/format:v0.2
image: linuxkit/format:v0.5
- name: mount
image: linuxkit/mount:v0.2
image: linuxkit/mount:v0.5
command: ["/usr/bin/mountie", "/var/lib/docker"]
services:
- name: getty
image: linuxkit/getty:v0.2
image: linuxkit/getty:v0.5
env:
- INSECURE=true
- name: rngd
image: linuxkit/rngd:v0.2
image: linuxkit/rngd:v0.5
- name: ntpd
image: linuxkit/openntpd:v0.2
image: linuxkit/openntpd:v0.5
- name: docker
image: docker:17.10.0-ce-dind
@@ -46,7 +46,7 @@ services:
- /etc/docker/daemon.json:/etc/docker/daemon.json
command: ["/usr/local/bin/docker-init", "/usr/local/bin/dockerd"]
- name: cadvisor
image: linuxkit/cadvisor:v0.2
image: linuxkit/cadvisor:v0.5
files:
- path: var/lib/docker
directory: true

View File

@@ -19,6 +19,21 @@ To run the VM with a 4G disk:
linuxkit run hyperkit -networking=vpnkit -vsock-ports=2376 -disk size=4096M -data-file ./metadata.json docker-for-mac
```
Where the file `./metadata.json` should contain the desired docker daemon
configuration, for example:
```
{
"docker": {
"entries": {
"daemon.json": {
"content": "{\n \"debug\" : true,\n \"experimental\" : true\n}\n"
}
}
}
}
```
In another terminal you should now be able to access docker via the
socket `guest.00000947` in the state directory
(`docker-for-mac-state/` by default):

View File

@@ -1,36 +1,36 @@
# 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.14.54
cmdline: "console=ttyS0 page_poison=1"
init:
- linuxkit/vpnkit-expose-port:v0.2 # install vpnkit-expose-port and vpnkit-iptables-wrapper on host
- linuxkit/init:v0.2
- linuxkit/runc:v0.2
- linuxkit/containerd:v0.2
- linuxkit/ca-certificates:v0.2
- linuxkit/vpnkit-expose-port:v0.5 # install vpnkit-expose-port and vpnkit-iptables-wrapper on host
- linuxkit/init:v0.5
- linuxkit/runc:v0.5
- linuxkit/containerd:v0.5
- linuxkit/ca-certificates:v0.5
onboot:
# support metadata for optional config in /run/config
- name: metadata
image: linuxkit/metadata:v0.2
image: linuxkit/metadata:v0.5
- name: sysctl
image: linuxkit/sysctl:v0.2
image: linuxkit/sysctl:v0.5
- name: sysfs
image: linuxkit/sysfs:v0.2
image: linuxkit/sysfs:v0.5
- name: binfmt
image: linuxkit/binfmt:v0.2
image: linuxkit/binfmt:v0.5
# Format and mount the disk image in /var/lib/docker
- name: format
image: linuxkit/format:v0.2
image: linuxkit/format:v0.5
- name: mount
image: linuxkit/mount:v0.2
image: linuxkit/mount:v0.5
command: ["/usr/bin/mountie", "/var/lib"]
# make a swap file on the mounted disk
- name: swap
image: linuxkit/swap:v0.2
image: linuxkit/swap:v0.5
command: ["/swap.sh", "--path", "/var/lib/swap", "--size", "1024M"]
# mount-vpnkit mounts the 9p share used by vpnkit to coordinate port forwarding
- name: mount-vpnkit
image: alpine:3.7
image: alpine:3.8
binds:
- /var/:/host_var:rbind,rshared
capabilities:
@@ -39,46 +39,46 @@ onboot:
command: ["sh", "-c", "mkdir -p /host_var/vpnkit/port && mount -v -t 9p -o trans=virtio,dfltuid=1001,dfltgid=50,version=9p2000 port /host_var/vpnkit"]
# move logs to the mounted disk (this is a temporary fix until we can limit the log sizes)
- name: move-logs
image: alpine:3.7
image: alpine:3.8
binds:
- /var:/host_var
command: ["sh", "-c", "mv -v /host_var/log /host_var/lib && ln -vs /var/lib/log /host_var/log"]
- name: dhcpcd
image: linuxkit/dhcpcd:v0.2
image: linuxkit/dhcpcd:v0.5
command: ["/sbin/dhcpcd", "--nobackground", "-f", "/dhcpcd.conf", "-1"]
services:
# Enable acpi to shutdown on power events
- name: acpid
image: linuxkit/acpid:v0.2
image: linuxkit/acpid:v0.5
# Enable getty for easier debugging
- name: getty
image: linuxkit/getty:v0.2
image: linuxkit/getty:v0.5
env:
- INSECURE=true
# Run ntpd to keep time synchronised in the VM
- name: ntpd
image: linuxkit/openntpd:v0.2
image: linuxkit/openntpd:v0.5
# VSOCK to unix domain socket forwarding. Forwards guest /var/run/docker.sock
# to a socket on the host.
- name: vsudd
image: linuxkit/vsudd:v0.2
image: linuxkit/vsudd:v0.5
binds:
- /var/run:/var/run
command: ["/vsudd", "-inport", "2376:unix:/var/run/docker.sock"]
# vpnkit-forwarder forwards network traffic to/from the host via VSOCK port 62373.
# It needs access to the vpnkit 9P coordination share
- name: vpnkit-forwarder
image: linuxkit/vpnkit-forwarder:v0.2
image: linuxkit/vpnkit-forwarder:v0.5
binds:
- /var/vpnkit:/port
net: host
command: ["/vpnkit-forwarder", "-vsockPort", "62373"]
# Monitor for image deletes and invoke a TRIM on the container filesystem
- name: trim-after-delete
image: linuxkit/trim-after-delete:v0.2
image: linuxkit/trim-after-delete:v0.5
# When the host resumes from sleep, force a clock resync
- name: host-timesync-daemon
image: linuxkit/host-timesync-daemon:v0.2
image: linuxkit/host-timesync-daemon:v0.5
# Run dockerd with the vpnkit userland proxy from the vpnkit-forwarder container.
# Bind mounts /var/run to allow vsudd to connect to docker.sock, /var/vpnkit
# for vpnkit coordination and /run/config/docker for the configuration file.

View File

@@ -1,34 +1,34 @@
kernel:
image: linuxkit/kernel:4.9.78
cmdline: "console=tty0 console=ttyS0 console=ttyAMA0"
image: linuxkit/kernel:4.14.54
cmdline: "console=tty0 console=ttyS0 console=ttyAMA0 console=ttysclp0"
init:
- linuxkit/init:v0.2
- linuxkit/runc:v0.2
- linuxkit/containerd:v0.2
- linuxkit/ca-certificates:v0.2
- linuxkit/init:v0.5
- linuxkit/runc:v0.5
- linuxkit/containerd:v0.5
- linuxkit/ca-certificates:v0.5
onboot:
- name: sysctl
image: linuxkit/sysctl:v0.2
image: linuxkit/sysctl:v0.5
- name: sysfs
image: linuxkit/sysfs:v0.2
image: linuxkit/sysfs:v0.5
- name: format
image: linuxkit/format:v0.2
image: linuxkit/format:v0.5
- name: mount
image: linuxkit/mount:v0.2
image: linuxkit/mount:v0.5
command: ["/usr/bin/mountie", "/var/lib/docker"]
services:
- name: getty
image: linuxkit/getty:v0.2
image: linuxkit/getty:v0.5
env:
- INSECURE=true
- name: rngd
image: linuxkit/rngd:v0.2
image: linuxkit/rngd:v0.5
- name: dhcpcd
image: linuxkit/dhcpcd:v0.2
image: linuxkit/dhcpcd:v0.5
- name: ntpd
image: linuxkit/openntpd:v0.2
image: linuxkit/openntpd:v0.5
- name: docker
image: docker:17.07.0-ce-dind
image: docker:18.05.0-ce-dind
capabilities:
- all
net: host

View File

@@ -1,32 +1,32 @@
kernel:
image: linuxkit/kernel:4.9.78
image: linuxkit/kernel:4.14.54
cmdline: "console=ttyS0"
init:
- linuxkit/init:v0.2
- linuxkit/runc:v0.2
- linuxkit/containerd:v0.2
- linuxkit/ca-certificates:v0.2
- linuxkit/init:v0.5
- linuxkit/runc:v0.5
- linuxkit/containerd:v0.5
- linuxkit/ca-certificates:v0.5
onboot:
- name: sysctl
image: linuxkit/sysctl:v0.2
image: linuxkit/sysctl:v0.5
- name: dhcpcd
image: linuxkit/dhcpcd:v0.2
image: linuxkit/dhcpcd:v0.5
command: ["/sbin/dhcpcd", "--nobackground", "-f", "/dhcpcd.conf", "-1"]
- name: metadata
image: linuxkit/metadata:v0.2
image: linuxkit/metadata:v0.5
services:
- name: getty
image: linuxkit/getty:v0.2
image: linuxkit/getty:v0.5
env:
- INSECURE=true
- name: rngd
image: linuxkit/rngd:v0.2
image: linuxkit/rngd:v0.5
- name: sshd
image: linuxkit/sshd:v0.2
image: linuxkit/sshd:v0.5
binds:
- /run/config/ssh/authorized_keys:/root/.ssh/authorized_keys
- name: nginx
image: nginx:alpine
image: nginx:1.13.8-alpine
capabilities:
- CAP_NET_BIND_SERVICE
- CAP_CHOWN

View File

@@ -1,25 +1,25 @@
kernel:
image: linuxkit/kernel:4.9.78
cmdline: "console=tty0 console=ttyS0 console=ttyAMA0"
image: linuxkit/kernel:4.14.54
cmdline: "console=tty0 console=ttyS0 console=ttyAMA0 console=ttysclp0"
init:
- linuxkit/init:v0.2
- linuxkit/runc:v0.2
- linuxkit/containerd:v0.2
- linuxkit/ca-certificates:v0.2
- linuxkit/init:v0.5
- linuxkit/runc:v0.5
- linuxkit/containerd:v0.5
- linuxkit/ca-certificates:v0.5
onboot:
- name: sysctl
image: linuxkit/sysctl:v0.2
image: linuxkit/sysctl:v0.5
- name: dhcpcd
image: linuxkit/dhcpcd:v0.2
image: linuxkit/dhcpcd:v0.5
command: ["/sbin/dhcpcd", "--nobackground", "-f", "/dhcpcd.conf", "-1"]
services:
- name: getty
image: linuxkit/getty:v0.2
image: linuxkit/getty:v0.5
# to make insecure with passwordless root login, uncomment following lines
#env:
# - INSECURE=true
- name: rngd
image: linuxkit/rngd:v0.2
image: linuxkit/rngd:v0.5
files:
- path: etc/getty.shadow
# sample sets password for root to "abcdefgh" (without quotes)

View File

@@ -1,16 +1,16 @@
kernel:
image: linuxkit/kernel:4.9.78
cmdline: "console=tty0 console=ttyS0 console=ttyAMA0"
image: linuxkit/kernel:4.14.54
cmdline: "console=tty0 console=ttyS0 console=ttyAMA0 console=ttysclp0"
init:
- linuxkit/init:v0.2
- linuxkit/runc:v0.2
- linuxkit/containerd:v0.2
- linuxkit/ca-certificates:v0.2
- linuxkit/init:v0.5
- linuxkit/runc:v0.5
- linuxkit/containerd:v0.5
- linuxkit/ca-certificates:v0.5
onboot:
- name: sysctl
image: linuxkit/sysctl:v0.2
image: linuxkit/sysctl:v0.5
- name: dhcpcd
image: linuxkit/dhcpcd:v0.2
image: linuxkit/dhcpcd:v0.5
command: ["/sbin/dhcpcd", "--nobackground", "-f", "/dhcpcd.conf", "-1"]
onshutdown:
- name: shutdown
@@ -18,7 +18,7 @@ onshutdown:
command: ["/bin/echo", "so long and thanks for all the fish"]
services:
- name: getty
image: linuxkit/getty:v0.2
image: linuxkit/getty:v0.5
env:
- INSECURE=true
runtime:
@@ -30,9 +30,9 @@ services:
destination: writeable-host-etc
options: ["rw", "lowerdir=/etc", "upperdir=/run/hostetc/upper", "workdir=/run/hostetc/work"]
- name: rngd
image: linuxkit/rngd:v0.2
image: linuxkit/rngd:v0.5
- name: nginx
image: nginx:alpine
image: nginx:1.13.8-alpine
capabilities:
- CAP_NET_BIND_SERVICE
- CAP_CHOWN

48
examples/influxdb-os.yml Normal file
View File

@@ -0,0 +1,48 @@
kernel:
image: linuxkit/kernel:4.14.54
cmdline: "console=tty0 console=ttyS0 console=ttyAMA0"
init:
- linuxkit/init:v0.5
- linuxkit/runc:v0.5
- linuxkit/containerd:v0.5
- linuxkit/ca-certificates:v0.5
onboot:
- name: dhcpcd
image: linuxkit/dhcpcd:v0.5
command: ["/sbin/dhcpcd", "--nobackground", "-f", "/dhcpcd.conf", "-1"]
services:
- name: getty
image: linuxkit/getty:v0.5
env:
- INSECURE=true
- name: influxdb
image: influxdb:1.4
net: host
capabilities:
- CAP_NET_BIND_SERVICE
- CAP_DAC_OVERRIDE
- name: kapacitor
image: kapacitor:1.4
net: host
capabilities:
- all
env:
- KAPACITOR_INFLUXDB_0_URLS_0=http://influxdb:8086
- name: telegraf
image: telegraf:1.4
net: host
capabilities:
- all
- name: chronograf
image: chronograf:1.4
net: host
capabilities:
- CAP_NET_BIND_SERVICE
- CAP_DAC_OVERRIDE
env:
- INFLUXDB_URL=http://localhost:8086
- KAPACITOR_URL=http://localhost:9092
trust:
org:
- linuxkit
- library

34
examples/logging.yml Normal file
View File

@@ -0,0 +1,34 @@
# Simple example of using an external logging service
kernel:
image: linuxkit/kernel:4.14.54
cmdline: "console=tty0 console=ttyS0 console=ttyAMA0"
init:
- linuxkit/init:v0.5
- linuxkit/runc:v0.5
- linuxkit/containerd:v0.5
- linuxkit/ca-certificates:v0.5
- linuxkit/memlogd:v0.5
onboot:
- name: sysctl
image: linuxkit/sysctl:v0.5
- name: dhcpcd
image: linuxkit/dhcpcd:v0.5
command: ["/sbin/dhcpcd", "--nobackground", "-f", "/dhcpcd.conf", "-1"]
services:
# Inside the getty type `/proc/1/root/usr/bin/logread -F` to follow the log
- name: getty
image: linuxkit/getty:v0.5
env:
- INSECURE=true
# A service which generates log messages for testing
- name: write-to-the-logs
image: alpine
command: ["/bin/sh", "-c", "while /bin/true; do echo hello $(date); sleep 1; done" ]
- name: write-and-rotate-logs
image: linuxkit/logwrite:v0.5
- name: kmsg
image: linuxkit/kmsg:v0.5
trust:
org:
- linuxkit
- library

View File

@@ -1,17 +1,17 @@
kernel:
image: linuxkit/kernel:4.9.78
image: linuxkit/kernel:4.14.54
cmdline: "console=tty0 console=ttyS0 console=ttyAMA0"
init:
- linuxkit/init:v0.2
- linuxkit/runc:v0.2
- linuxkit/containerd:v0.2
- linuxkit/init:v0.5
- linuxkit/runc:v0.5
- linuxkit/containerd:v0.5
onboot:
- name: dhcpcd
image: linuxkit/dhcpcd:v0.2
image: linuxkit/dhcpcd:v0.5
command: ["/sbin/dhcpcd", "--nobackground", "-f", "/dhcpcd.conf", "-1"]
services:
- name: getty
image: linuxkit/getty:v0.2
image: linuxkit/getty:v0.5
env:
- INSECURE=true
trust:

View File

@@ -1,21 +1,21 @@
kernel:
image: linuxkit/kernel:4.9.78
image: linuxkit/kernel:4.14.54
cmdline: "console=tty0 console=ttyS0"
init:
- linuxkit/init:v0.2
- linuxkit/runc:v0.2
- linuxkit/containerd:v0.2
- linuxkit/init:v0.5
- linuxkit/runc:v0.5
- linuxkit/containerd:v0.5
services:
- name: getty
image: linuxkit/getty:v0.2
image: linuxkit/getty:v0.5
env:
- INSECURE=true
- name: rngd
image: linuxkit/rngd:v0.2
image: linuxkit/rngd:v0.5
- name: dhcpcd
image: linuxkit/dhcpcd:v0.2
image: linuxkit/dhcpcd:v0.5
- name: node_exporter
image: linuxkit/node_exporter:v0.2
image: linuxkit/node_exporter:v0.5
trust:
org:
- linuxkit

View File

@@ -1,29 +1,29 @@
kernel:
image: linuxkit/kernel:4.9.78
image: linuxkit/kernel:4.14.54
cmdline: "console=ttyS0"
init:
- linuxkit/init:v0.2
- linuxkit/runc:v0.2
- linuxkit/containerd:v0.2
- linuxkit/ca-certificates:v0.2
- linuxkit/init:v0.5
- linuxkit/runc:v0.5
- linuxkit/containerd:v0.5
- linuxkit/ca-certificates:v0.5
onboot:
- name: sysctl
image: linuxkit/sysctl:v0.2
image: linuxkit/sysctl:v0.5
- name: dhcpcd
image: linuxkit/dhcpcd:v0.2
image: linuxkit/dhcpcd:v0.5
command: ["/sbin/dhcpcd", "--nobackground", "-f", "/dhcpcd.conf", "-1"]
- name: metadata
image: linuxkit/metadata:v0.2
image: linuxkit/metadata:v0.5
command: ["/usr/bin/metadata", "openstack"]
services:
- name: rngd
image: linuxkit/rngd:v0.2
image: linuxkit/rngd:v0.5
- name: sshd
image: linuxkit/sshd:v0.2
image: linuxkit/sshd:v0.5
binds:
- /run/config/ssh/authorized_keys:/root/.ssh/authorized_keys
- name: nginx
image: nginx:alpine
image: nginx:1.13.8-alpine
capabilities:
- CAP_NET_BIND_SERVICE
- CAP_CHOWN

View File

@@ -5,10 +5,10 @@
# 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.14.54
cmdline: "console=ttyAMA0"
ucode: ""
onboot:
- name: modprobe
image: linuxkit/modprobe:v0.2
image: linuxkit/modprobe:v0.5
command: ["modprobe", "nicvf"]

View File

@@ -1,34 +1,34 @@
kernel:
image: linuxkit/kernel:4.9.78
image: linuxkit/kernel:4.14.54
cmdline: console=ttyS1
ucode: intel-ucode.cpio
init:
- linuxkit/init:v0.2
- linuxkit/runc:v0.2
- linuxkit/containerd:v0.2
- linuxkit/ca-certificates:v0.2
- linuxkit/firmware:v0.2
- linuxkit/init:v0.5
- linuxkit/runc:v0.5
- linuxkit/containerd:v0.5
- linuxkit/ca-certificates:v0.5
- linuxkit/firmware:v0.5
onboot:
- name: rngd1
image: linuxkit/rngd:v0.2
image: linuxkit/rngd:v0.5
command: ["/sbin/rngd", "-1"]
- name: sysctl
image: linuxkit/sysctl:v0.2
image: linuxkit/sysctl:v0.5
- name: dhcpcd
image: linuxkit/dhcpcd:v0.2
image: linuxkit/dhcpcd:v0.5
command: ["/sbin/dhcpcd", "--nobackground", "-f", "/dhcpcd.conf", "-1"]
- name: metadata
image: linuxkit/metadata:v0.2
image: linuxkit/metadata:v0.5
command: ["/usr/bin/metadata", "packet"]
services:
- name: rngd
image: linuxkit/rngd:v0.2
image: linuxkit/rngd:v0.5
- name: getty
image: linuxkit/getty:v0.2
image: linuxkit/getty:v0.5
env:
- INSECURE=true
- name: sshd
image: linuxkit/sshd:v0.2
image: linuxkit/sshd:v0.5
files:
- path: root/.ssh/authorized_keys
source: ~/.ssh/id_rsa.pub

View File

@@ -1,19 +1,19 @@
# Minimal YAML to run a redis server (used at DockerCon'17)
# connect: nc localhost 6379
kernel:
image: linuxkit/kernel:4.9.78
cmdline: "console=tty0 console=ttyS0 console=ttyAMA0"
image: linuxkit/kernel:4.14.54
cmdline: "console=tty0 console=ttyS0 console=ttyAMA0 console=ttysclp0"
init:
- linuxkit/init:v0.2
- linuxkit/runc:v0.2
- linuxkit/containerd:v0.2
- linuxkit/init:v0.5
- linuxkit/runc:v0.5
- linuxkit/containerd:v0.5
onboot:
- name: dhcpcd
image: linuxkit/dhcpcd:v0.2
image: linuxkit/dhcpcd:v0.5
command: ["/sbin/dhcpcd", "--nobackground", "-f", "/dhcpcd.conf", "-1"]
services:
- name: getty
image: linuxkit/getty:v0.2
image: linuxkit/getty:v0.5
env:
- INSECURE=true
# Currently redis:4.0.6-alpine has trust issue with multi-arch

View File

@@ -0,0 +1,36 @@
kernel:
image: linuxkit/kernel:4.14.54-rt
cmdline: "console=tty0"
init:
- linuxkit/init:v0.5
- linuxkit/runc:v0.5
- linuxkit/containerd:v0.5
- linuxkit/ca-certificates:v0.5
onboot:
- name: sysctl
image: linuxkit/sysctl:v0.5
services:
- name: getty
image: linuxkit/getty:v0.5
env:
- INSECURE=true
- name: rngd
image: linuxkit/rngd:v0.5
- name: dhcpcd
image: linuxkit/dhcpcd:v0.5
- name: open-vm-tools
image: linuxkit/open-vm-tools:v0.5
- name: nginx
image: nginx:1.13.8-alpine
capabilities:
- CAP_NET_BIND_SERVICE
- CAP_CHOWN
- CAP_SETUID
- CAP_SETGID
- CAP_DAC_OVERRIDE
binds:
- /etc/resolv.conf:/etc/resolv.conf
trust:
org:
- linuxkit
- library

29
examples/scaleway.yml Normal file
View File

@@ -0,0 +1,29 @@
kernel:
image: linuxkit/kernel:4.14.54
cmdline: "console=tty0 console=ttyS0 console=ttyAMA0 console=ttysclp0 root=/dev/vda"
init:
- linuxkit/init:v0.5
- linuxkit/runc:v0.5
- linuxkit/containerd:v0.5
- linuxkit/ca-certificates:v0.5
onboot:
- name: sysctl
image: linuxkit/sysctl:v0.5
- name: rngd1
image: linuxkit/rngd:v0.5
command: ["/sbin/rngd", "-1"]
- name: dhcpcd
image: linuxkit/dhcpcd:v0.5
command: ["/sbin/dhcpcd", "--nobackground", "-f", "/dhcpcd.conf", "-1"]
- name: metadata
image: linuxkit/metadata:v0.5
services:
- name: getty
image: linuxkit/getty:v0.5
env:
- INSECURE=true
- name: rngd
image: linuxkit/rngd:v0.5
trust:
org:
- linuxkit

View File

@@ -1,28 +1,28 @@
kernel:
image: linuxkit/kernel:4.9.78
cmdline: "console=tty0 console=ttyS0 console=ttyAMA0"
image: linuxkit/kernel:4.14.54
cmdline: "console=tty0 console=ttyS0 console=ttyAMA0 console=ttysclp0"
init:
- linuxkit/init:v0.2
- linuxkit/runc:v0.2
- linuxkit/containerd:v0.2
- linuxkit/ca-certificates:v0.2
- linuxkit/init:v0.5
- linuxkit/runc:v0.5
- linuxkit/containerd:v0.5
- linuxkit/ca-certificates:v0.5
onboot:
- name: sysctl
image: linuxkit/sysctl:v0.2
image: linuxkit/sysctl:v0.5
- name: rngd1
image: linuxkit/rngd:v0.2
image: linuxkit/rngd:v0.5
command: ["/sbin/rngd", "-1"]
services:
- name: getty
image: linuxkit/getty:v0.2
image: linuxkit/getty:v0.5
env:
- INSECURE=true
- name: rngd
image: linuxkit/rngd:v0.2
image: linuxkit/rngd:v0.5
- name: dhcpcd
image: linuxkit/dhcpcd:v0.2
image: linuxkit/dhcpcd:v0.5
- name: sshd
image: linuxkit/sshd:v0.2
image: linuxkit/sshd:v0.5
files:
- path: root/.ssh/authorized_keys
source: ~/.ssh/id_rsa.pub

View File

@@ -1,34 +1,34 @@
kernel:
image: linuxkit/kernel:4.9.78
cmdline: "console=tty0 console=ttyS0 console=ttyAMA0"
image: linuxkit/kernel:4.14.54
cmdline: "console=tty0 console=ttyS0 console=ttyAMA0 console=ttysclp0"
init:
- linuxkit/init:v0.2
- linuxkit/runc:v0.2
- linuxkit/containerd:v0.2
- linuxkit/ca-certificates:v0.2
- linuxkit/init:v0.5
- linuxkit/runc:v0.5
- linuxkit/containerd:v0.5
- linuxkit/ca-certificates:v0.5
onboot:
- name: sysctl
image: linuxkit/sysctl:v0.2
image: linuxkit/sysctl:v0.5
- name: dhcpcd
image: linuxkit/dhcpcd:v0.2
image: linuxkit/dhcpcd:v0.5
command: ["/sbin/dhcpcd", "--nobackground", "-f", "/dhcpcd.conf", "-1"]
- name: format
image: linuxkit/format:v0.2
image: linuxkit/format:v0.5
- name: mount
image: linuxkit/mount:v0.2
image: linuxkit/mount:v0.5
command: ["/usr/bin/mountie", "/var/external"]
- name: swap
image: linuxkit/swap:v0.2
image: linuxkit/swap:v0.5
# to use unencrypted swap, use:
# command: ["/swap.sh", "--path", "/var/external/swap", "--size", "1G"]
command: ["/swap.sh", "--path", "/var/external/swap", "--size", "1G", "--encrypt"]
services:
- name: getty
image: linuxkit/getty:v0.2
image: linuxkit/getty:v0.5
env:
- INSECURE=true
- name: rngd
image: linuxkit/rngd:v0.2
image: linuxkit/rngd:v0.5
trust:
org:
- linuxkit

View File

@@ -2,25 +2,25 @@ kernel:
image: linuxkit/kernel:4.9.38
cmdline: "console=tty0 console=ttyS0"
init:
- linuxkit/init:v0.2
- linuxkit/runc:v0.2
- linuxkit/containerd:v0.2
- linuxkit/ca-certificates:v0.2
- linuxkit/init:v0.5
- linuxkit/runc:v0.5
- linuxkit/containerd:v0.5
- linuxkit/ca-certificates:v0.5
onboot:
- name: sysctl
image: linuxkit/sysctl:v0.2
image: linuxkit/sysctl:v0.5
- name: dhcpcd
image: linuxkit/dhcpcd:v0.2
image: linuxkit/dhcpcd:v0.5
command: ["/sbin/dhcpcd", "--nobackground", "-f", "/dhcpcd.conf", "-1"]
services:
- name: getty
image: linuxkit/getty:v0.2
image: linuxkit/getty:v0.5
env:
- INSECURE=true
- name: tss
image: linuxkit/tss:v0.2
image: linuxkit/tss:v0.5
- name: rngd
image: linuxkit/rngd:v0.2
image: linuxkit/rngd:v0.5
files:
- path: etc/getty.shadow
# sample sets password for root to "abcdefgh" (without quotes)

View File

@@ -1,25 +1,25 @@
kernel:
image: linuxkit/kernel:4.9.78
image: linuxkit/kernel:4.14.54
cmdline: "console=tty0"
init:
- linuxkit/init:v0.2
- linuxkit/runc:v0.2
- linuxkit/containerd:v0.2
- linuxkit/ca-certificates:v0.2
- linuxkit/init:v0.5
- linuxkit/runc:v0.5
- linuxkit/containerd:v0.5
- linuxkit/ca-certificates:v0.5
onboot:
- name: sysctl
image: linuxkit/sysctl:v0.2
image: linuxkit/sysctl:v0.5
services:
- name: getty
image: linuxkit/getty:v0.2
image: linuxkit/getty:v0.5
env:
- INSECURE=true
- name: rngd
image: linuxkit/rngd:v0.2
image: linuxkit/rngd:v0.5
- name: dhcpcd
image: linuxkit/dhcpcd:v0.2
image: linuxkit/dhcpcd:v0.5
- name: nginx
image: nginx:alpine
image: nginx:1.13.8-alpine
capabilities:
- CAP_NET_BIND_SERVICE
- CAP_CHOWN

View File

@@ -1,16 +1,16 @@
kernel:
image: linuxkit/kernel:4.9.78
image: linuxkit/kernel:4.14.54
cmdline: "console=ttyS0"
init:
- linuxkit/init:v0.2
- linuxkit/runc:v0.2
- linuxkit/containerd:v0.2
- linuxkit/init:v0.5
- linuxkit/runc:v0.5
- linuxkit/containerd:v0.5
onboot:
- name: dhcpcd
image: linuxkit/dhcpcd:v0.2
image: linuxkit/dhcpcd:v0.5
command: ["/sbin/dhcpcd", "--nobackground", "-f", "/dhcpcd.conf", "-1"]
- name: mount-vpnkit
image: alpine:3.7
image: alpine:3.8
binds:
- /var/:/host_var:rbind,rshared
capabilities:
@@ -19,9 +19,9 @@ onboot:
command: ["sh", "-c", "mkdir /host_var/vpnkit && mount -v -t 9p -o trans=virtio,dfltuid=1001,dfltgid=50,version=9p2000 port /host_var/vpnkit"]
services:
- name: sshd
image: linuxkit/sshd:v0.2
image: linuxkit/sshd:v0.5
- name: vpnkit-forwarder
image: linuxkit/vpnkit-forwarder:v0.2
image: linuxkit/vpnkit-forwarder:v0.5
binds:
- /var/vpnkit:/port
net: host

View File

@@ -1,17 +1,17 @@
kernel:
image: linuxkit/kernel:4.9.78
image: linuxkit/kernel:4.14.54
cmdline: "console=ttyS0"
init:
- linuxkit/init:v0.2
- linuxkit/runc:v0.2
- linuxkit/containerd:v0.2
- linuxkit/init:v0.5
- linuxkit/runc:v0.5
- linuxkit/containerd:v0.5
onboot:
- name: dhcpcd
image: linuxkit/dhcpcd:v0.2
image: linuxkit/dhcpcd:v0.5
command: ["/sbin/dhcpcd", "--nobackground", "-f", "/dhcpcd.conf", "-1"]
services:
- name: vsudd
image: linuxkit/vsudd:v0.2
image: linuxkit/vsudd:v0.5
binds:
- /run/containerd/containerd.sock:/run/containerd/containerd.sock
command: ["/vsudd",

View File

@@ -1,32 +1,32 @@
kernel:
image: linuxkit/kernel:4.9.78
image: linuxkit/kernel:4.14.54
cmdline: "console=ttyS0"
init:
- linuxkit/init:v0.2
- linuxkit/runc:v0.2
- linuxkit/containerd:v0.2
- linuxkit/ca-certificates:v0.2
- linuxkit/init:v0.5
- linuxkit/runc:v0.5
- linuxkit/containerd:v0.5
- linuxkit/ca-certificates:v0.5
onboot:
- name: sysctl
image: linuxkit/sysctl:v0.2
image: linuxkit/sysctl:v0.5
- name: dhcpcd
image: linuxkit/dhcpcd:v0.2
image: linuxkit/dhcpcd:v0.5
command: ["/sbin/dhcpcd", "--nobackground", "-f", "/dhcpcd.conf", "-1"]
- name: metadata
image: linuxkit/metadata:v0.2
image: linuxkit/metadata:v0.5
services:
- name: getty
image: linuxkit/getty:v0.2
image: linuxkit/getty:v0.5
env:
- INSECURE=true
- name: rngd
image: linuxkit/rngd:v0.2
image: linuxkit/rngd:v0.5
- name: sshd
image: linuxkit/sshd:v0.2
image: linuxkit/sshd:v0.5
binds:
- /run/config/ssh/authorized_keys:/root/.ssh/authorized_keys
- name: nginx
image: nginx:alpine
image: nginx:1.13.8-alpine
capabilities:
- CAP_NET_BIND_SERVICE
- CAP_CHOWN

View File

@@ -1,19 +1,19 @@
kernel:
image: linuxkit/kernel:4.9.78
image: linuxkit/kernel:4.14.54
cmdline: "console=tty0 console=ttyS0 console=ttyAMA0"
init:
- linuxkit/init:v0.2
- linuxkit/runc:v0.2
- linuxkit/containerd:v0.2
- linuxkit/ca-certificates:v0.2
- linuxkit/init:v0.5
- linuxkit/runc:v0.5
- linuxkit/containerd:v0.5
- linuxkit/ca-certificates:v0.5
onboot:
- name: sysctl
image: linuxkit/sysctl:v0.2
image: linuxkit/sysctl:v0.5
- name: dhcpcd
image: linuxkit/dhcpcd:v0.2
image: linuxkit/dhcpcd:v0.5
command: ["/sbin/dhcpcd", "--nobackground", "-f", "/dhcpcd.conf", "-1"]
- name: wg0
image: linuxkit/ip:v0.2
image: linuxkit/ip:v0.5
net: new
binds:
- /etc/wireguard:/etc/wireguard
@@ -26,7 +26,7 @@ onboot:
bindNS:
net: /run/netns/wg0
- name: wg1
image: linuxkit/ip:v0.2
image: linuxkit/ip:v0.5
net: new
binds:
- /etc/wireguard:/etc/wireguard
@@ -40,14 +40,14 @@ onboot:
net: /run/netns/wg1
services:
- name: getty
image: linuxkit/getty:v0.2
image: linuxkit/getty:v0.5
env:
- INSECURE=true
net: /run/netns/wg1
- name: rngd
image: linuxkit/rngd:v0.2
image: linuxkit/rngd:v0.5
- name: nginx
image: nginx:alpine
image: nginx:1.13.8-alpine
net: /run/netns/wg0
capabilities:
- CAP_NET_BIND_SERVICE

View File

@@ -1,4 +1,4 @@
FROM linuxkit/alpine:cba395fbc278daee841106801aba1e1bd7e0f2f7 AS kernel-build
FROM linuxkit/alpine:6264e5b39af8eb1da7ffa4c05a7ccc597da01197 AS kernel-build
RUN apk add \
argp-standalone \
automake \
@@ -16,11 +16,13 @@ RUN apk add \
installkernel \
kmod \
libelf-dev \
libressl \
libressl-dev \
linux-headers \
mpc1-dev \
mpfr-dev \
ncurses-dev \
patch \
sed \
squashfs-tools \
tar \
@@ -34,13 +36,14 @@ RUN [ $(uname -m) == x86_64 ] && apk add libunwind-dev || true
ARG KERNEL_VERSION
ARG KERNEL_SERIES
ARG EXTRA
ARG DEBUG
ENV KERNEL_SOURCE=https://www.kernel.org/pub/linux/kernel/v4.x/linux-${KERNEL_VERSION}.tar.xz
ENV KERNEL_SHA256_SUMS=https://www.kernel.org/pub/linux/kernel/v4.x/sha256sums.asc
ENV KERNEL_PGP2_SIGN=https://www.kernel.org/pub/linux/kernel/v4.x/linux-${KERNEL_VERSION}.tar.sign
ENV WIREGUARD_VERSION=0.0.20180118
ENV WIREGUARD_SHA256=463f3b402deb66b7ceac8df2d50944f32683933356455d6c1c7453926db3a8a3
ENV WIREGUARD_VERSION=0.0.20180708
ENV WIREGUARD_SHA256="5e38d554f7d1e3a64e3a5319ca1a3b790c84ed89c896586c490a93ac1f953a91"
ENV WIREGUARD_URL=https://git.zx2c4.com/WireGuard/snapshot/WireGuard-${WIREGUARD_VERSION}.tar.xz
# We copy the entire directory. This copies some unneeded files, but
@@ -61,16 +64,31 @@ RUN curl -fsSLO ${KERNEL_SHA256_SUMS} && \
gpg2 --verify linux-${KERNEL_VERSION}.tar.sign linux-${KERNEL_VERSION}.tar && \
cat linux-${KERNEL_VERSION}.tar | tar --absolute-names -x && mv /linux-${KERNEL_VERSION} /linux
# Apply local patches if present
WORKDIR /linux
# Apply local specific patches if present
RUN set -e && \
if [ -n "${EXTRA}" ] && [ -d /patches-${KERNEL_SERIES}${EXTRA} ]; then \
echo "Patching ${EXTRA} kernel"; \
for patch in /patches-${KERNEL_SERIES}${EXTRA}/*.patch; do \
echo "Applying $patch"; \
patch -t -F0 -N -u -p1 < "$patch"; \
done; \
fi
# Apply local common patches if present
RUN set -e && \
if [ -d /patches-${KERNEL_SERIES} ]; then \
for patch in /patches-${KERNEL_SERIES}/*.patch; do \
echo "Applying $patch"; \
patch -p1 < "$patch"; \
patch -t -F0 -N -u -p1 < "$patch"; \
done; \
fi
RUN mkdir -p /out/src
# Save kernel source
RUN tar cJf /out/src/linux.tar.xz /linux
# Kernel config
RUN case $(uname -m) in \
x86_64) \
@@ -79,20 +97,23 @@ RUN case $(uname -m) in \
aarch64) \
KERNEL_DEF_CONF=/linux/arch/arm64/configs/defconfig; \
;; \
s390x) \
KERNEL_DEF_CONF=/linux/arch/s390/defconfig; \
;; \
esac && \
cp /config-${KERNEL_SERIES}-$(uname -m) ${KERNEL_DEF_CONF}; \
if [ -n "${EXTRA}" ]; then \
sed -i "s/CONFIG_LOCALVERSION=\"-linuxkit\"/CONFIG_LOCALVERSION=\"-linuxkit${EXTRA}\"/" ${KERNEL_DEF_CONF}; \
if [ "${EXTRA}" = "-dbg" ]; then \
sed -i 's/CONFIG_PANIC_ON_OOPS=y/# CONFIG_PANIC_ON_OOPS is not set/' ${KERNEL_DEF_CONF}; \
fi && \
cat /config${EXTRA} >> ${KERNEL_DEF_CONF}; \
if [ -n "${EXTRA}" ] && [ -f "/config-${KERNEL_SERIES}-$(uname -m)${EXTRA}" ]; then \
cat /config-${KERNEL_SERIES}-$(uname -m)${EXTRA} >> ${KERNEL_DEF_CONF}; \
fi; \
sed -i "s/CONFIG_LOCALVERSION=\"-linuxkit\"/CONFIG_LOCALVERSION=\"-linuxkit${EXTRA}${DEBUG}\"/" ${KERNEL_DEF_CONF}; \
if [ -n "${DEBUG}" ]; then \
sed -i 's/CONFIG_PANIC_ON_OOPS=y/# CONFIG_PANIC_ON_OOPS is not set/' ${KERNEL_DEF_CONF}; \
cat /config${DEBUG} >> ${KERNEL_DEF_CONF}; \
fi && \
make defconfig && \
make oldconfig && \
if [ -z "${EXTRA}" ]; then diff .config ${KERNEL_DEF_CONF}; fi
if [ -z "${EXTRA}" ] && [ -z "${DEBUG}" ]; then diff .config ${KERNEL_DEF_CONF}; fi
RUN mkdir /out
# Kernel
RUN make -j "$(getconf _NPROCESSORS_ONLN)" KCFLAGS="-fno-pie" && \
@@ -103,13 +124,17 @@ RUN make -j "$(getconf _NPROCESSORS_ONLN)" KCFLAGS="-fno-pie" && \
aarch64) \
cp arch/arm64/boot/Image.gz /out/kernel; \
;; \
s390x) \
cp arch/s390/boot/bzImage /out/kernel; \
;; \
esac && \
cp System.map /out && \
([ "${EXTRA}" = "-dbg" ] && cp vmlinux /out || true)
([ -n "${DEBUG}" ] && cp vmlinux /out || true)
# WireGuard
RUN curl -sSL -o /wireguard.tar.xz "${WIREGUARD_URL}" && \
RUN curl -fsSL -o /wireguard.tar.xz "${WIREGUARD_URL}" && \
echo "${WIREGUARD_SHA256} /wireguard.tar.xz" | sha256sum -c - && \
cp /wireguard.tar.xz /out/src/ && \
tar -C / --one-top-level=wireguard --strip-components=2 -xJf /wireguard.tar.xz "WireGuard-${WIREGUARD_VERSION}/src" && \
make -j "$(getconf _NPROCESSORS_ONLN)" M="/wireguard" modules
@@ -149,8 +174,10 @@ RUN DVER=$(basename $(find /tmp/kernel-modules/lib/modules/ -mindepth 1 -maxdept
RUN printf "KERNEL_SOURCE=${KERNEL_SOURCE}\n" > /out/kernel-source-info
# perf (Don't compile for 4.4.x, it's broken and tedious to fix)
RUN if [ "${KERNEL_SERIES}" != "4.4.x" ]; then \
# perf
# Skip for 4.4.x (the compile is broken and tedious to fix) and 4.9.x (the
# compile broke with 4.9.93)
RUN if [ "${KERNEL_SERIES}" != "4.4.x" ] && [ "${KERNEL_SERIES}" != "4.9.x" ]; then \
mkdir -p /build/perf && \
make -C tools/perf LDFLAGS=-static O=/build/perf && \
strip /build/perf/perf && \
@@ -158,13 +185,14 @@ RUN if [ "${KERNEL_SERIES}" != "4.4.x" ]; then \
fi
# Download Intel ucode and create a CPIO archive for it
ENV UCODE_URL=https://downloadmirror.intel.com/27431/eng/microcode-20180108.tgz
ENV UCODE_URL=https://downloadmirror.intel.com/27776/eng/microcode-20180425.tgz
RUN set -e && \
if [ $(uname -m) == x86_64 ]; then \
cd /ucode && \
curl -sSL -o microcode.tar.gz ${UCODE_URL} && \
curl -fsSL -o microcode.tar.gz ${UCODE_URL} && \
md5sum -c intel-ucode-md5sums && \
tar xf microcode.tar.gz && \
rm -f intel-ucode/list && \
iucode_tool --normal-earlyfw --write-earlyfw=/out/intel-ucode.cpio ./intel-ucode && \
cp intel-ucode-license.txt /out; \
fi

View File

@@ -1,11 +1,14 @@
FROM linuxkit/alpine:d307c8a386fa3f32cddda9409b9687e191cdd6f1 AS kernel-build
FROM linuxkit/alpine:6264e5b39af8eb1da7ffa4c05a7ccc597da01197 AS kernel-build
RUN apk add \
argp-standalone \
bison \
build-base \
curl \
diffutils \
flex \
libarchive-tools \
ncurses-dev \
patch \
xz
ARG KERNEL_VERSIONS
@@ -27,14 +30,15 @@ RUN set -e && \
SERIES=${VERSION%.*}.x && \
echo "Patching $VERSION $SERIES" && \
cd /linux-${VERSION} && \
if [ -d /patches-${SERIES} ]; then \
for patch in /patches-${SERIES}/*.patch; do \
echo "Applying $patch" && \
patch -p1 < "$patch"; \
done; \
fi && \
mv /config-${SERIES}-x86_64 arch/x86/configs/x86_64_defconfig && \
mv /config-${SERIES}-aarch64 arch/arm64/configs/defconfig; \
if [ -d /patches-${SERIES} ]; then \
for patch in /patches-${SERIES}/*.patch; do \
echo "Applying $patch" && \
patch -t -F0 -N -u -p1 < "$patch"; \
done; \
fi && \
[ ! -f /config-${SERIES}-x86_64 ] || mv /config-${SERIES}-x86_64 arch/x86/configs/x86_64_defconfig && \
[ ! -f /config-${SERIES}-aarch64 ] || mv /config-${SERIES}-aarch64 arch/arm64/configs/defconfig ; \
[ ! -f /config-${SERIES}-s390x ] || mv /config-${SERIES}-s390x arch/s390/defconfig; \
done
ENTRYPOINT ["/bin/sh"]

View File

@@ -1,6 +1,6 @@
ARG IMAGE
FROM ${IMAGE} AS ksrc
FROM linuxkit/alpine:d307c8a386fa3f32cddda9409b9687e191cdd6f1 AS build
FROM linuxkit/alpine:6264e5b39af8eb1da7ffa4c05a7ccc597da01197 AS build
RUN apk add \
attr-dev \
autoconf \

View File

@@ -23,6 +23,11 @@ IMAGE_ZFS:=zfs-kmod
# - append $(EXTRA) to the CONFIG_LOCALVERSION of your kernel
EXTRA?=
# You can enable debug options for the Makefile. This will:
# - append a config-dbg to the kernel config for your kernel/arch
# - append -dbg to the CONFIG_LOCALVERSION of your kernel
DEBUG?=
ifeq ($(HASH),)
HASH_COMMIT?=HEAD # Setting this is only really useful with the show-tag target
HASH?=$(shell git ls-tree --full-tree $(HASH_COMMIT) -- $(CURDIR) | awk '{print $$3}')
@@ -36,12 +41,15 @@ endif
PUSH_MANIFEST:=$(shell git rev-parse --show-toplevel)/scripts/push-manifest.sh
ARCH := $(shell uname -m)
ifeq ($(ARCH), x86_64)
ifeq ($(ARCH),x86_64)
SUFFIX=-amd64
endif
ifeq ($(ARCH), aarch64)
ifeq ($(ARCH),aarch64)
SUFFIX=-arm64
endif
ifeq ($(ARCH),s390x)
SUFFIX=-s390x
endif
TAG=$(HASH)$(DIRTY)
@@ -63,7 +71,7 @@ endif
KERNEL_VERSIONS=
.PHONY: check build push
.PHONY: fetch build push
# Targets:
# fetch: Downloads the kernel sources into ./sources
# build: Builds all kernels
@@ -79,107 +87,112 @@ sources:
# Arguments:
# $1: Full kernel version, e.g., 4.9.22
# $2: Kernel "series", e.g., 4.9.x
# $3: Build a debug kernel (used as suffix for image)
# $3: Build a specific kernel like -rt: Preempt-RT (used as suffix for image)
# This defines targets like:
# build_4.9.x and push_4.9.x and adds them as dependencies
# to the global targets
# Set $3 to "-dbg", to build debug kernels. This defines targets like
# Set $3 to "-rt", to build Preempt-RT kernels. This defines targets like
# build_4.14.x-rt and adds "-rt" to the hub image name.
# Set $4 to "-dbg", to build debug kernels. This defines targets like
# build_4.9.x-dbg and adds "-dbg" to the hub image name.
# Set $3 to "-rt" and $4 to "-dbg" to build debug Preempt-RT kernel.
define kernel
ifeq ($(3),)
ifeq ($(4),)
sources/linux-$(1).tar.xz: Makefile | sources
curl -fsSLo sources/linux-$(1).tar.xz https://www.kernel.org/pub/linux/kernel/v4.x/linux-$(1).tar.xz
KERNEL_VERSIONS+=$(1)
endif
build_$(2)$(3): Dockerfile Makefile $(wildcard patches-$(2)/*) $(wildcard config-$(2)*) config-dbg | sources
docker pull $(ORG)/$(IMAGE):$(1)$(3)-$(TAG)$(SUFFIX) || \
build_$(2)$(3)$(4): Dockerfile Makefile $(wildcard patches-$(2)/*) $(wildcard config-$(2)*) config-dbg | sources
docker pull $(ORG)/$(IMAGE):$(1)$(3)$(4)-$(TAG)$(SUFFIX) || \
docker build \
--build-arg KERNEL_VERSION=$(1) \
--build-arg KERNEL_SERIES=$(2) \
--build-arg EXTRA=$(3) \
--build-arg DEBUG=$(4) \
$(LABELS) \
--no-cache -t $(ORG)/$(IMAGE):$(1)$(3)-$(TAG)$(SUFFIX) .
--no-cache -t $(ORG)/$(IMAGE):$(1)$(3)$(4)-$(TAG)$(SUFFIX) .
forcebuild_$(2)$(3): Dockerfile Makefile $(wildcard patches-$(2)/*) $(wildcard config-$(2)*) config-dbg | sources
forcebuild_$(2)$(3)$(4): Dockerfile Makefile $(wildcard patches-$(2)/*) $(wildcard config-$(2)*) config-dbg | sources
docker build \
--build-arg KERNEL_VERSION=$(1) \
--build-arg KERNEL_SERIES=$(2) \
--build-arg EXTRA=$(3) \
--build-arg DEBUG=$(4) \
$(LABELS) \
--no-cache -t $(ORG)/$(IMAGE):$(1)$(3)-$(TAG)$(SUFFIX) .
--no-cache -t $(ORG)/$(IMAGE):$(1)$(3)$(4)-$(TAG)$(SUFFIX) .
push_$(2)$(3): build_$(2)$(3)
push_$(2)$(3)$(4): build_$(2)$(3)$(4)
@if [ x"$(DIRTY)" != x ]; then echo "Your repository is not clean. Will not push image"; exit 1; fi
docker pull $(ORG)/$(IMAGE):$(1)$(3)-$(TAG)$(SUFFIX) || \
(docker push $(ORG)/$(IMAGE):$(1)$(3)-$(TAG)$(SUFFIX) && \
docker tag $(ORG)/$(IMAGE):$(1)$(3)-$(TAG)$(SUFFIX) $(ORG)/$(IMAGE):$(1)$(3)$(SUFFIX) && \
docker push $(ORG)/$(IMAGE):$(1)$(3)$(SUFFIX) && \
$(PUSH_MANIFEST) $(ORG)/$(IMAGE):$(1)$(3)-$(TAG) $(DOCKER_CONTENT_TRUST) && \
$(PUSH_MANIFEST) $(ORG)/$(IMAGE):$(1)$(3) $(DOCKER_CONTENT_TRUST))
docker pull $(ORG)/$(IMAGE):$(1)$(3)$(4)-$(TAG)$(SUFFIX) || \
(docker push $(ORG)/$(IMAGE):$(1)$(3)$(4)-$(TAG)$(SUFFIX) && \
docker tag $(ORG)/$(IMAGE):$(1)$(3)$(4)-$(TAG)$(SUFFIX) $(ORG)/$(IMAGE):$(1)$(3)$(4)$(SUFFIX) && \
docker push $(ORG)/$(IMAGE):$(1)$(3)$(4)$(SUFFIX) && \
$(PUSH_MANIFEST) $(ORG)/$(IMAGE):$(1)$(3)$(4)-$(TAG) $(DOCKER_CONTENT_TRUST) && \
$(PUSH_MANIFEST) $(ORG)/$(IMAGE):$(1)$(3)$(4) $(DOCKER_CONTENT_TRUST))
forcepush_$(2)$(3): forcebuild_$(2)$(3)
forcepush_$(2)$(3)$(4): forcebuild_$(2)$(3)$(4)
@if [ x"$(DIRTY)" != x ]; then echo "Your repository is not clean. Will not push image"; exit 1; fi
docker push $(ORG)/$(IMAGE):$(1)$(3)-$(TAG)$(SUFFIX) && \
docker tag $(ORG)/$(IMAGE):$(1)$(3)-$(TAG)$(SUFFIX) $(ORG)/$(IMAGE):$(1)$(3)$(SUFFIX) && \
docker push $(ORG)/$(IMAGE):$(1)$(3)$(SUFFIX) && \
$(PUSH_MANIFEST) $(ORG)/$(IMAGE):$(1)$(3)-$(TAG) $(DOCKER_CONTENT_TRUST) && \
$(PUSH_MANIFEST) $(ORG)/$(IMAGE):$(1)$(3) $(DOCKER_CONTENT_TRUST)
docker push $(ORG)/$(IMAGE):$(1)$(3)$(4)-$(TAG)$(SUFFIX) && \
docker tag $(ORG)/$(IMAGE):$(1)$(3)$(4)-$(TAG)$(SUFFIX) $(ORG)/$(IMAGE):$(1)$(3)$(4)$(SUFFIX) && \
docker push $(ORG)/$(IMAGE):$(1)$(3)$(4)$(SUFFIX) && \
$(PUSH_MANIFEST) $(ORG)/$(IMAGE):$(1)$(3)$(4)-$(TAG) $(DOCKER_CONTENT_TRUST) && \
$(PUSH_MANIFEST) $(ORG)/$(IMAGE):$(1)$(3)$(4) $(DOCKER_CONTENT_TRUST)
show-tag_$(2)$(3):
@echo $(ORG)/$(IMAGE):$(1)$(3)-$(TAG)
show-tag_$(2)$(3)$(4):
@echo $(ORG)/$(IMAGE):$(1)$(3)$(4)-$(TAG)
build: build_$(2)$(3)
forcebuild: forcebuild_$(2)$(3)
push: push_$(2)$(3)
forcepush: forcepush_$(2)$(3)
show-tags: show-tag_$(2)$(3)
build: build_$(2)$(3)$(4)
forcebuild: forcebuild_$(2)$(3)$(4)
push: push_$(2)$(3)$(4)
forcepush: forcepush_$(2)$(3)$(4)
show-tags: show-tag_$(2)$(3)$(4)
fetch: sources/linux-$(1).tar.xz
# 'docker build' with the FROM image supplied as --build-arg
# *and* with DOCKER_CONTENT_TRUST=1 currently does not work
# (https://github.com/moby/moby/issues/34199). So, we pull the image
# with DCT as part of the dependency on build_$(2)$(3) and then build
# with DCT as part of the dependency on build_$(2)$(3)$(4) and then build
# with DOCKER_CONTENT_TRUST explicitly set to 0
ifneq ($(2), 4.4.x)
# perf does not build out of the box for 4.4.x and 4.4.x is not that relevant anymore to work on a fix
build_perf_$(2)$(3): build_$(2)$(3)
docker pull $(ORG)/$(IMAGE_PERF):$(1)$(3)-$(TAG)$(SUFFIX) || \
ifneq ($(2), $(filter $(2),4.4.x 4.9.x))
# perf does not build out of the box for 4.4.x and 4.9.x
build_perf_$(2)$(3)$(4): build_$(2)$(3)$(4)
docker pull $(ORG)/$(IMAGE_PERF):$(1)$(3)$(4)-$(TAG)$(SUFFIX) || \
DOCKER_CONTENT_TRUST=0 docker build -f Dockerfile.perf \
--build-arg IMAGE=$(ORG)/$(IMAGE):$(1)$(3)-$(TAG)$(SUFFIX) \
--no-cache --network=none $(LABEL) -t $(ORG)/$(IMAGE_PERF):$(1)$(3)-$(TAG)$(SUFFIX) .
--build-arg IMAGE=$(ORG)/$(IMAGE):$(1)$(3)$(4)-$(TAG)$(SUFFIX) \
--no-cache --network=none $(LABEL) -t $(ORG)/$(IMAGE_PERF):$(1)$(3)$(4)-$(TAG)$(SUFFIX) .
forcebuild_perf_$(2)$(3): build_$(2)$(3)
forcebuild_perf_$(2)$(3)$(4): build_$(2)$(3)$(4)
DOCKER_CONTENT_TRUST=0 docker build -f Dockerfile.perf \
--build-arg IMAGE=$(ORG)/$(IMAGE):$(1)$(3)-$(TAG)$(SUFFIX) \
--no-cache --network=none $(LABEL) -t $(ORG)/$(IMAGE_PERF):$(1)$(3)-$(TAG)$(SUFFIX) .
--build-arg IMAGE=$(ORG)/$(IMAGE):$(1)$(3)$(4)-$(TAG)$(SUFFIX) \
--no-cache --network=none $(LABEL) -t $(ORG)/$(IMAGE_PERF):$(1)$(3)$(4)-$(TAG)$(SUFFIX) .
push_perf_$(2)$(3): build_perf_$(2)$(3)
push_perf_$(2)$(3)$(4): build_perf_$(2)$(3)$(4)
@if [ x"$(DIRTY)" != x ]; then echo "Your repository is not clean. Will not push image"; exit 1; fi
docker pull $(ORG)/$(IMAGE_PERF):$(1)$(3)-$(TAG)$(SUFFIX) || \
(docker push $(ORG)/$(IMAGE_PERF):$(1)$(3)-$(TAG)$(SUFFIX) && \
docker tag $(ORG)/$(IMAGE_PERF):$(1)$(3)-$(TAG)$(SUFFIX) $(ORG)/$(IMAGE_PERF):$(1)$(3)$(SUFFIX) && \
docker push $(ORG)/$(IMAGE_PERF):$(1)$(3)$(SUFFIX) && \
$(PUSH_MANIFEST) $(ORG)/$(IMAGE_PERF):$(1)$(3)-$(TAG) $(DOCKER_CONTENT_TRUST) && \
$(PUSH_MANIFEST) $(ORG)/$(IMAGE_PERF):$(1)$(3) $(DOCKER_CONTENT_TRUST))
docker pull $(ORG)/$(IMAGE_PERF):$(1)$(3)$(4)-$(TAG)$(SUFFIX) || \
(docker push $(ORG)/$(IMAGE_PERF):$(1)$(3)$(4)-$(TAG)$(SUFFIX) && \
docker tag $(ORG)/$(IMAGE_PERF):$(1)$(3)$(4)-$(TAG)$(SUFFIX) $(ORG)/$(IMAGE_PERF):$(1)$(3)$(4)$(SUFFIX) && \
docker push $(ORG)/$(IMAGE_PERF):$(1)$(3)$(4)$(SUFFIX) && \
$(PUSH_MANIFEST) $(ORG)/$(IMAGE_PERF):$(1)$(3)$(4)-$(TAG) $(DOCKER_CONTENT_TRUST) && \
$(PUSH_MANIFEST) $(ORG)/$(IMAGE_PERF):$(1)$(3)$(4) $(DOCKER_CONTENT_TRUST))
forcepush_perf_$(2)$(3): forcebuild_perf_$(2)$(3)
forcepush_perf_$(2)$(3)$(4): forcebuild_perf_$(2)$(3)$(4)
@if [ x"$(DIRTY)" != x ]; then echo "Your repository is not clean. Will not push image"; exit 1; fi
docker push $(ORG)/$(IMAGE_PERF):$(1)$(3)-$(TAG)$(SUFFIX) && \
docker tag $(ORG)/$(IMAGE_PERF):$(1)$(3)-$(TAG)$(SUFFIX) $(ORG)/$(IMAGE_PERF):$(1)$(3)$(SUFFIX) && \
docker push $(ORG)/$(IMAGE_PERF):$(1)$(3)$(SUFFIX) && \
$(PUSH_MANIFEST) $(ORG)/$(IMAGE_PERF):$(1)$(3)-$(TAG) $(DOCKER_CONTENT_TRUST) && \
$(PUSH_MANIFEST) $(ORG)/$(IMAGE_PERF):$(1)$(3) $(DOCKER_CONTENT_TRUST)
docker push $(ORG)/$(IMAGE_PERF):$(1)$(3)$(4)-$(TAG)$(SUFFIX) && \
docker tag $(ORG)/$(IMAGE_PERF):$(1)$(3)$(4)-$(TAG)$(SUFFIX) $(ORG)/$(IMAGE_PERF):$(1)$(3)$(4)$(SUFFIX) && \
docker push $(ORG)/$(IMAGE_PERF):$(1)$(3)$(4)$(SUFFIX) && \
$(PUSH_MANIFEST) $(ORG)/$(IMAGE_PERF):$(1)$(3)$(4)-$(TAG) $(DOCKER_CONTENT_TRUST) && \
$(PUSH_MANIFEST) $(ORG)/$(IMAGE_PERF):$(1)$(3)$(4) $(DOCKER_CONTENT_TRUST)
build: build_perf_$(2)$(3)
forcebuild: forcebuild_perf_$(2)$(3)
push: push_perf_$(2)$(3)
forcepush: forcepush_perf_$(2)$(3)
build: build_perf_$(2)$(3)$(4)
forcebuild: forcebuild_perf_$(2)$(3)$(4)
push: push_perf_$(2)$(3)$(4)
forcepush: forcepush_perf_$(2)$(3)$(4)
endif
ifneq ($(3), -dbg)
ifeq ($(4),)
# ZFS does not compile against -dbg kernels because CONFIG_DEBUG_LOCK_ALLOC
# is incompatible with CDDL, apparently (this is ./configure check)
build_zfs_$(2)$(3): build_$(2)$(3)
@@ -204,11 +217,23 @@ 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)))
ifeq ($(ARCH),x86_64)
$(eval $(call kernel,4.17.5,4.17.x,$(EXTRA),$(DEBUG)))
$(eval $(call kernel,4.14.54,4.14.x,$(EXTRA),$(DEBUG)))
$(eval $(call kernel,4.14.54,4.14.x,,-dbg))
$(eval $(call kernel,4.14.53,4.14.x,-rt,))
$(eval $(call kernel,4.9.111,4.9.x,$(EXTRA),$(DEBUG)))
$(eval $(call kernel,4.4.139,4.4.x,$(EXTRA),$(DEBUG)))
else ifeq ($(ARCH),aarch64)
$(eval $(call kernel,4.17.5,4.17.x,$(EXTRA),$(DEBUG)))
$(eval $(call kernel,4.14.54,4.14.x,$(EXTRA),$(DEBUG)))
$(eval $(call kernel,4.14.53,4.14.x,-rt,))
else ifeq ($(ARCH),s390x)
$(eval $(call kernel,4.17.5,4.17.x,$(EXTRA),$(DEBUG)))
$(eval $(call kernel,4.14.54,4.14.x,$(EXTRA),$(DEBUG)))
endif
# Target for kernel config
kconfig: | sources

View File

@@ -1,6 +1,6 @@
#
# Automatically generated file; DO NOT EDIT.
# Linux/arm64 4.14.15 Kernel Configuration
# Linux/arm64 4.14.54 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
@@ -487,6 +488,7 @@ CONFIG_ARM64_ERRATUM_819472=y
CONFIG_ARM64_ERRATUM_832075=y
CONFIG_ARM64_ERRATUM_834220=y
CONFIG_ARM64_ERRATUM_843419=y
CONFIG_ARM64_ERRATUM_1024718=y
CONFIG_CAVIUM_ERRATUM_22375=y
CONFIG_CAVIUM_ERRATUM_23154=y
CONFIG_CAVIUM_ERRATUM_27456=y
@@ -494,6 +496,7 @@ CONFIG_CAVIUM_ERRATUM_30115=y
CONFIG_QCOM_FALKOR_ERRATUM_1003=y
CONFIG_QCOM_FALKOR_ERRATUM_1009=y
CONFIG_QCOM_QDF2400_ERRATUM_0065=y
CONFIG_QCOM_FALKOR_ERRATUM_E1041=y
CONFIG_ARM64_4K_PAGES=y
# CONFIG_ARM64_16K_PAGES is not set
# CONFIG_ARM64_64K_PAGES is not set
@@ -569,6 +572,8 @@ CONFIG_PARAVIRT=y
CONFIG_XEN_DOM0=y
CONFIG_XEN=y
CONFIG_FORCE_MAX_ZONEORDER=11
CONFIG_UNMAP_KERNEL_AT_EL0=y
CONFIG_HARDEN_BRANCH_PREDICTOR=y
# CONFIG_ARM64_SW_TTBR0_PAN is not set
#
@@ -1055,6 +1060,9 @@ CONFIG_NF_CONNTRACK_IPV6=y
# CONFIG_NF_SOCKET_IPV6 is not set
CONFIG_NF_TABLES_IPV6=y
CONFIG_NFT_CHAIN_ROUTE_IPV6=y
CONFIG_NFT_CHAIN_NAT_IPV6=y
CONFIG_NFT_MASQ_IPV6=y
CONFIG_NFT_REDIR_IPV6=y
CONFIG_NFT_REJECT_IPV6=y
CONFIG_NFT_DUP_IPV6=y
# CONFIG_NFT_FIB_IPV6 is not set
@@ -1062,10 +1070,7 @@ CONFIG_NF_DUP_IPV6=y
CONFIG_NF_REJECT_IPV6=y
CONFIG_NF_LOG_IPV6=y
CONFIG_NF_NAT_IPV6=y
CONFIG_NFT_CHAIN_NAT_IPV6=y
CONFIG_NF_NAT_MASQUERADE_IPV6=y
CONFIG_NFT_MASQ_IPV6=y
CONFIG_NFT_REDIR_IPV6=y
CONFIG_IP6_NF_IPTABLES=y
CONFIG_IP6_NF_MATCH_AH=y
CONFIG_IP6_NF_MATCH_EUI64=y
@@ -1112,7 +1117,15 @@ CONFIG_BRIDGE_EBT_SNAT=y
CONFIG_BRIDGE_EBT_LOG=y
CONFIG_BRIDGE_EBT_NFLOG=y
# CONFIG_IP_DCCP is not set
# CONFIG_IP_SCTP is not set
CONFIG_IP_SCTP=m
# CONFIG_NET_SCTPPROBE is not set
# CONFIG_SCTP_DBG_OBJCNT is not set
CONFIG_SCTP_DEFAULT_COOKIE_HMAC_MD5=y
# CONFIG_SCTP_DEFAULT_COOKIE_HMAC_SHA1 is not set
# CONFIG_SCTP_DEFAULT_COOKIE_HMAC_NONE is not set
CONFIG_SCTP_COOKIE_HMAC_MD5=y
# CONFIG_SCTP_COOKIE_HMAC_SHA1 is not set
CONFIG_INET_SCTP_DIAG=m
# CONFIG_RDS is not set
# CONFIG_TIPC is not set
# CONFIG_ATM is not set
@@ -1228,7 +1241,8 @@ CONFIG_VIRTIO_VSOCKETS_COMMON=y
CONFIG_NETLINK_DIAG=y
CONFIG_MPLS=y
CONFIG_NET_MPLS_GSO=m
# CONFIG_MPLS_ROUTING is not set
CONFIG_MPLS_ROUTING=m
CONFIG_MPLS_IPTUNNEL=m
# CONFIG_NET_NSH is not set
# CONFIG_HSR is not set
CONFIG_NET_SWITCHDEV=y
@@ -1267,7 +1281,9 @@ CONFIG_NET_9P_VIRTIO=y
# CONFIG_NET_9P_XEN is not set
# CONFIG_NET_9P_DEBUG is not set
# CONFIG_CAIF is not set
# CONFIG_CEPH_LIB is not set
CONFIG_CEPH_LIB=m
# CONFIG_CEPH_LIB_PRETTYDEBUG is not set
# CONFIG_CEPH_LIB_USE_DNS_RESOLVER is not set
# CONFIG_NFC is not set
# CONFIG_PSAMPLE is not set
# CONFIG_NET_IFE is not set
@@ -1359,7 +1375,8 @@ CONFIG_BLK_DEV=y
CONFIG_BLK_DEV_LOOP=y
CONFIG_BLK_DEV_LOOP_MIN_COUNT=8
CONFIG_BLK_DEV_CRYPTOLOOP=y
# CONFIG_BLK_DEV_DRBD is not set
CONFIG_BLK_DEV_DRBD=m
# CONFIG_DRBD_FAULT_INJECTION is not set
CONFIG_BLK_DEV_NBD=y
# CONFIG_BLK_DEV_SKD is not set
# CONFIG_BLK_DEV_SX8 is not set
@@ -1371,7 +1388,7 @@ CONFIG_ATA_OVER_ETH=m
CONFIG_XEN_BLKDEV_FRONTEND=y
CONFIG_VIRTIO_BLK=y
# CONFIG_VIRTIO_BLK_SCSI is not set
# CONFIG_BLK_DEV_RBD is not set
CONFIG_BLK_DEV_RBD=m
# CONFIG_BLK_DEV_RSXX is not set
CONFIG_NVME_CORE=y
CONFIG_BLK_DEV_NVME=y
@@ -2126,7 +2143,8 @@ CONFIG_SERIAL_CORE_CONSOLE=y
# CONFIG_SERIAL_RP2 is not set
# CONFIG_SERIAL_FSL_LPUART is not set
# CONFIG_SERIAL_CONEXANT_DIGICOLOR is not set
# CONFIG_SERIAL_DEV_BUS is not set
CONFIG_SERIAL_DEV_BUS=y
# CONFIG_SERIAL_DEV_CTRL_TTYPORT is not set
# CONFIG_TTY_PRINTK is not set
CONFIG_HVC_DRIVER=y
CONFIG_HVC_IRQ=y
@@ -2160,7 +2178,7 @@ CONFIG_TCG_TIS_I2C_NUVOTON=m
CONFIG_TCG_ATMEL=m
CONFIG_TCG_INFINEON=m
CONFIG_TCG_XEN=m
CONFIG_TCG_CRB=m
CONFIG_TCG_CRB=y
CONFIG_TCG_VTPM_PROXY=m
CONFIG_TCG_TIS_ST33ZP24=m
CONFIG_TCG_TIS_ST33ZP24_I2C=m
@@ -2733,7 +2751,7 @@ CONFIG_FB_DEFERRED_IO=y
# CONFIG_FB_CYBER2000 is not set
# CONFIG_FB_ASILIANT is not set
# CONFIG_FB_IMSTT is not set
# CONFIG_FB_EFI is not set
CONFIG_FB_EFI=y
# CONFIG_FB_OPENCORES is not set
# CONFIG_FB_S1D13XXX is not set
# CONFIG_FB_NVIDIA is not set
@@ -2935,7 +2953,22 @@ CONFIG_USB_UHCI_HCD=m
#
# also be needed; see USB_STORAGE Help for more info
#
# CONFIG_USB_STORAGE is not set
CONFIG_USB_STORAGE=m
# CONFIG_USB_STORAGE_DEBUG is not set
# CONFIG_USB_STORAGE_REALTEK is not set
# CONFIG_USB_STORAGE_DATAFAB is not set
# CONFIG_USB_STORAGE_FREECOM is not set
# CONFIG_USB_STORAGE_ISD200 is not set
# CONFIG_USB_STORAGE_USBAT is not set
# CONFIG_USB_STORAGE_SDDR09 is not set
# CONFIG_USB_STORAGE_SDDR55 is not set
# CONFIG_USB_STORAGE_JUMPSHOT is not set
# CONFIG_USB_STORAGE_ALAUDA is not set
# CONFIG_USB_STORAGE_ONETOUCH is not set
# CONFIG_USB_STORAGE_KARMA is not set
# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set
# CONFIG_USB_STORAGE_ENE_UB6250 is not set
# CONFIG_USB_UAS is not set
#
# USB Imaging devices
@@ -3710,7 +3743,9 @@ CONFIG_SUNRPC_GSS=m
CONFIG_SUNRPC_BACKCHANNEL=y
CONFIG_RPCSEC_GSS_KRB5=m
# CONFIG_SUNRPC_DEBUG is not set
# CONFIG_CEPH_FS is not set
CONFIG_CEPH_FS=m
CONFIG_CEPH_FSCACHE=y
CONFIG_CEPH_FS_POSIX_ACL=y
CONFIG_CIFS=y
# CONFIG_CIFS_STATS is not set
# CONFIG_CIFS_WEAK_PW_HASH is not set
@@ -3953,7 +3988,6 @@ CONFIG_FTRACE_SYSCALLS=y
# CONFIG_TRACER_SNAPSHOT is not set
CONFIG_BRANCH_PROFILE_NONE=y
# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set
# CONFIG_PROFILE_ALL_BRANCHES is not set
CONFIG_STACK_TRACER=y
CONFIG_BLK_DEV_IO_TRACE=y
CONFIG_KPROBE_EVENTS=y
@@ -4029,7 +4063,7 @@ CONFIG_STRICT_DEVMEM=y
CONFIG_KEYS=y
CONFIG_PERSISTENT_KEYRINGS=y
CONFIG_BIG_KEYS=y
CONFIG_TRUSTED_KEYS=m
CONFIG_TRUSTED_KEYS=y
CONFIG_ENCRYPTED_KEYS=y
CONFIG_KEY_DH_OPERATIONS=y
CONFIG_SECURITY_DMESG_RESTRICT=y
@@ -4052,10 +4086,26 @@ CONFIG_STATIC_USERMODEHELPER_PATH="/sbin/usermode-helper"
# CONFIG_SECURITY_LOADPIN is not set
CONFIG_SECURITY_YAMA=y
CONFIG_INTEGRITY=y
# CONFIG_INTEGRITY_SIGNATURE is not set
CONFIG_INTEGRITY_SIGNATURE=y
CONFIG_INTEGRITY_ASYMMETRIC_KEYS=y
CONFIG_INTEGRITY_AUDIT=y
# CONFIG_IMA is not set
# CONFIG_EVM is not set
CONFIG_IMA=y
CONFIG_IMA_MEASURE_PCR_IDX=10
# CONFIG_IMA_TEMPLATE is not set
CONFIG_IMA_NG_TEMPLATE=y
# CONFIG_IMA_SIG_TEMPLATE is not set
CONFIG_IMA_DEFAULT_TEMPLATE="ima-ng"
# CONFIG_IMA_DEFAULT_HASH_SHA1 is not set
CONFIG_IMA_DEFAULT_HASH_SHA256=y
# CONFIG_IMA_DEFAULT_HASH_SHA512 is not set
# CONFIG_IMA_DEFAULT_HASH_WP512 is not set
CONFIG_IMA_DEFAULT_HASH="sha256"
# CONFIG_IMA_WRITE_POLICY is not set
CONFIG_IMA_READ_POLICY=y
CONFIG_IMA_APPRAISE=y
CONFIG_IMA_APPRAISE_BOOTPARAM=y
CONFIG_EVM=y
CONFIG_EVM_ATTR_FSUUID=y
CONFIG_DEFAULT_SECURITY_DAC=y
CONFIG_DEFAULT_SECURITY=""
CONFIG_XOR_BLOCKS=m
@@ -4307,11 +4357,13 @@ CONFIG_DQL=y
CONFIG_GLOB=y
# CONFIG_GLOB_SELFTEST is not set
CONFIG_NLATTR=y
CONFIG_LRU_CACHE=m
CONFIG_CLZ_TAB=y
# CONFIG_CORDIC is not set
# CONFIG_DDR is not set
# CONFIG_IRQ_POLL is not set
CONFIG_MPILIB=y
CONFIG_SIGNATURE=y
CONFIG_LIBFDT=y
CONFIG_OID_REGISTRY=y
CONFIG_UCS2_STRING=y

View File

@@ -0,0 +1,20 @@
CONFIG_SLUB_DEBUG=y
# CONFIG_SLUB_MEMCG_SYSFS_ON is not set
CONFIG_SLUB=y
# CONFIG_SLAB_FREELIST_HARDENED is not set
CONFIG_HAVE_ALIGNED_STRUCT_PAGE=y
CONFIG_PREEMPT=y
CONFIG_PREEMPT_RT_BASE=y
CONFIG_HAVE_PREEMPT_LAZY=y
CONFIG_PREEMPT_LAZY=y
# CONFIG_PREEMPT_VOLUNTARY is not set
# CONFIG_PREEMPT__LL is not set
# CONFIG_PREEMPT_RTB is not set
CONFIG_PREEMPT_RT_FULL=y
CONFIG_PREEMPT_COUNT=y
# CONFIG_SLUB_DEBUG_ON is not set
# CONFIG_SLUB_STATS is not set
CONFIG_DEBUG_PREEMPT=y
# CONFIG_PREEMPT_TRACER is not set
CONFIG_HZ_1000=y
CONFIG_HZ=1000

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,6 @@
#
# Automatically generated file; DO NOT EDIT.
# Linux/x86 4.14.15 Kernel Configuration
# Linux/x86 4.14.54 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
@@ -1218,6 +1219,9 @@ CONFIG_NF_CONNTRACK_IPV6=y
# CONFIG_NF_SOCKET_IPV6 is not set
CONFIG_NF_TABLES_IPV6=y
CONFIG_NFT_CHAIN_ROUTE_IPV6=y
CONFIG_NFT_CHAIN_NAT_IPV6=y
CONFIG_NFT_MASQ_IPV6=y
CONFIG_NFT_REDIR_IPV6=y
CONFIG_NFT_REJECT_IPV6=y
CONFIG_NFT_DUP_IPV6=y
# CONFIG_NFT_FIB_IPV6 is not set
@@ -1225,10 +1229,7 @@ CONFIG_NF_DUP_IPV6=y
CONFIG_NF_REJECT_IPV6=y
CONFIG_NF_LOG_IPV6=y
CONFIG_NF_NAT_IPV6=y
CONFIG_NFT_CHAIN_NAT_IPV6=y
CONFIG_NF_NAT_MASQUERADE_IPV6=y
CONFIG_NFT_MASQ_IPV6=y
CONFIG_NFT_REDIR_IPV6=y
CONFIG_IP6_NF_IPTABLES=y
CONFIG_IP6_NF_MATCH_AH=y
CONFIG_IP6_NF_MATCH_EUI64=y
@@ -1275,7 +1276,15 @@ CONFIG_BRIDGE_EBT_SNAT=y
CONFIG_BRIDGE_EBT_LOG=y
CONFIG_BRIDGE_EBT_NFLOG=y
# CONFIG_IP_DCCP is not set
# CONFIG_IP_SCTP is not set
CONFIG_IP_SCTP=m
# CONFIG_NET_SCTPPROBE is not set
# CONFIG_SCTP_DBG_OBJCNT is not set
CONFIG_SCTP_DEFAULT_COOKIE_HMAC_MD5=y
# CONFIG_SCTP_DEFAULT_COOKIE_HMAC_SHA1 is not set
# CONFIG_SCTP_DEFAULT_COOKIE_HMAC_NONE is not set
CONFIG_SCTP_COOKIE_HMAC_MD5=y
# CONFIG_SCTP_COOKIE_HMAC_SHA1 is not set
CONFIG_INET_SCTP_DIAG=m
# CONFIG_RDS is not set
# CONFIG_TIPC is not set
# CONFIG_ATM is not set
@@ -1392,7 +1401,8 @@ CONFIG_HYPERV_VSOCKETS=y
CONFIG_NETLINK_DIAG=y
CONFIG_MPLS=y
CONFIG_NET_MPLS_GSO=m
# CONFIG_MPLS_ROUTING is not set
CONFIG_MPLS_ROUTING=m
CONFIG_MPLS_IPTUNNEL=m
# CONFIG_NET_NSH is not set
# CONFIG_HSR is not set
CONFIG_NET_SWITCHDEV=y
@@ -1430,7 +1440,9 @@ CONFIG_NET_9P_VIRTIO=y
# CONFIG_NET_9P_XEN is not set
# CONFIG_NET_9P_DEBUG is not set
# CONFIG_CAIF is not set
# CONFIG_CEPH_LIB is not set
CONFIG_CEPH_LIB=m
# CONFIG_CEPH_LIB_PRETTYDEBUG is not set
# CONFIG_CEPH_LIB_USE_DNS_RESOLVER is not set
# CONFIG_NFC is not set
# CONFIG_PSAMPLE is not set
# CONFIG_NET_IFE is not set
@@ -1498,7 +1510,8 @@ CONFIG_BLK_DEV=y
CONFIG_BLK_DEV_LOOP=y
CONFIG_BLK_DEV_LOOP_MIN_COUNT=8
CONFIG_BLK_DEV_CRYPTOLOOP=y
# CONFIG_BLK_DEV_DRBD is not set
CONFIG_BLK_DEV_DRBD=m
# CONFIG_DRBD_FAULT_INJECTION is not set
CONFIG_BLK_DEV_NBD=y
# CONFIG_BLK_DEV_SKD is not set
# CONFIG_BLK_DEV_SX8 is not set
@@ -1511,7 +1524,7 @@ CONFIG_ATA_OVER_ETH=m
CONFIG_XEN_BLKDEV_FRONTEND=y
CONFIG_VIRTIO_BLK=y
# CONFIG_VIRTIO_BLK_SCSI is not set
# CONFIG_BLK_DEV_RBD is not set
CONFIG_BLK_DEV_RBD=m
# CONFIG_BLK_DEV_RSXX is not set
CONFIG_NVME_CORE=y
CONFIG_BLK_DEV_NVME=y
@@ -2218,9 +2231,9 @@ CONFIG_HPET=y
CONFIG_HPET_MMAP=y
CONFIG_HPET_MMAP_DEFAULT=y
CONFIG_HANGCHECK_TIMER=y
CONFIG_TCG_TPM=m
CONFIG_TCG_TIS_CORE=m
CONFIG_TCG_TIS=m
CONFIG_TCG_TPM=y
CONFIG_TCG_TIS_CORE=y
CONFIG_TCG_TIS=y
CONFIG_TCG_TIS_I2C_ATMEL=m
CONFIG_TCG_TIS_I2C_INFINEON=m
CONFIG_TCG_TIS_I2C_NUVOTON=m
@@ -2228,7 +2241,7 @@ CONFIG_TCG_NSC=m
CONFIG_TCG_ATMEL=m
CONFIG_TCG_INFINEON=m
CONFIG_TCG_XEN=m
CONFIG_TCG_CRB=m
CONFIG_TCG_CRB=y
CONFIG_TCG_VTPM_PROXY=m
CONFIG_TCG_TIS_ST33ZP24=m
CONFIG_TCG_TIS_ST33ZP24_I2C=m
@@ -2671,7 +2684,7 @@ CONFIG_FB_DEFERRED_IO=y
# CONFIG_FB_VGA16 is not set
# CONFIG_FB_UVESA is not set
CONFIG_FB_VESA=y
# CONFIG_FB_EFI is not set
CONFIG_FB_EFI=y
# CONFIG_FB_N411 is not set
# CONFIG_FB_HGA is not set
# CONFIG_FB_OPENCORES is not set
@@ -2880,7 +2893,22 @@ CONFIG_USB_UHCI_HCD=m
#
# also be needed; see USB_STORAGE Help for more info
#
# CONFIG_USB_STORAGE is not set
CONFIG_USB_STORAGE=m
# CONFIG_USB_STORAGE_DEBUG is not set
# CONFIG_USB_STORAGE_REALTEK is not set
# CONFIG_USB_STORAGE_DATAFAB is not set
# CONFIG_USB_STORAGE_FREECOM is not set
# CONFIG_USB_STORAGE_ISD200 is not set
# CONFIG_USB_STORAGE_USBAT is not set
# CONFIG_USB_STORAGE_SDDR09 is not set
# CONFIG_USB_STORAGE_SDDR55 is not set
# CONFIG_USB_STORAGE_JUMPSHOT is not set
# CONFIG_USB_STORAGE_ALAUDA is not set
# CONFIG_USB_STORAGE_ONETOUCH is not set
# CONFIG_USB_STORAGE_KARMA is not set
# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set
# CONFIG_USB_STORAGE_ENE_UB6250 is not set
# CONFIG_USB_UAS is not set
#
# USB Imaging devices
@@ -3510,7 +3538,9 @@ CONFIG_SUNRPC_GSS=m
CONFIG_SUNRPC_BACKCHANNEL=y
CONFIG_RPCSEC_GSS_KRB5=m
# CONFIG_SUNRPC_DEBUG is not set
# CONFIG_CEPH_FS is not set
CONFIG_CEPH_FS=m
CONFIG_CEPH_FSCACHE=y
CONFIG_CEPH_FS_POSIX_ACL=y
CONFIG_CIFS=y
# CONFIG_CIFS_STATS is not set
# CONFIG_CIFS_WEAK_PW_HASH is not set
@@ -3645,7 +3675,6 @@ CONFIG_DEBUG_MEMORY_INIT=y
# CONFIG_DEBUG_PER_CPU_MAPS is not set
CONFIG_HAVE_DEBUG_STACKOVERFLOW=y
# CONFIG_DEBUG_STACKOVERFLOW is not set
CONFIG_HAVE_ARCH_KMEMCHECK=y
CONFIG_HAVE_ARCH_KASAN=y
# CONFIG_KASAN is not set
CONFIG_ARCH_HAS_KCOV=y
@@ -3746,7 +3775,6 @@ CONFIG_FTRACE_SYSCALLS=y
# CONFIG_TRACER_SNAPSHOT is not set
CONFIG_BRANCH_PROFILE_NONE=y
# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set
# CONFIG_PROFILE_ALL_BRANCHES is not set
CONFIG_STACK_TRACER=y
CONFIG_BLK_DEV_IO_TRACE=y
CONFIG_KPROBE_EVENTS=y
@@ -3851,7 +3879,7 @@ CONFIG_KEYS=y
CONFIG_KEYS_COMPAT=y
CONFIG_PERSISTENT_KEYRINGS=y
CONFIG_BIG_KEYS=y
CONFIG_TRUSTED_KEYS=m
CONFIG_TRUSTED_KEYS=y
CONFIG_ENCRYPTED_KEYS=y
CONFIG_KEY_DH_OPERATIONS=y
CONFIG_SECURITY_DMESG_RESTRICT=y
@@ -3875,10 +3903,26 @@ CONFIG_STATIC_USERMODEHELPER_PATH="/sbin/usermode-helper"
# CONFIG_SECURITY_LOADPIN is not set
CONFIG_SECURITY_YAMA=y
CONFIG_INTEGRITY=y
# CONFIG_INTEGRITY_SIGNATURE is not set
CONFIG_INTEGRITY_SIGNATURE=y
CONFIG_INTEGRITY_ASYMMETRIC_KEYS=y
CONFIG_INTEGRITY_AUDIT=y
# CONFIG_IMA is not set
# CONFIG_EVM is not set
CONFIG_IMA=y
CONFIG_IMA_MEASURE_PCR_IDX=10
# CONFIG_IMA_TEMPLATE is not set
CONFIG_IMA_NG_TEMPLATE=y
# CONFIG_IMA_SIG_TEMPLATE is not set
CONFIG_IMA_DEFAULT_TEMPLATE="ima-ng"
# CONFIG_IMA_DEFAULT_HASH_SHA1 is not set
CONFIG_IMA_DEFAULT_HASH_SHA256=y
# CONFIG_IMA_DEFAULT_HASH_SHA512 is not set
# CONFIG_IMA_DEFAULT_HASH_WP512 is not set
CONFIG_IMA_DEFAULT_HASH="sha256"
# CONFIG_IMA_WRITE_POLICY is not set
CONFIG_IMA_READ_POLICY=y
CONFIG_IMA_APPRAISE=y
CONFIG_IMA_APPRAISE_BOOTPARAM=y
CONFIG_EVM=y
CONFIG_EVM_ATTR_FSUUID=y
CONFIG_DEFAULT_SECURITY_DAC=y
CONFIG_DEFAULT_SECURITY=""
CONFIG_XOR_BLOCKS=m
@@ -4172,11 +4216,13 @@ CONFIG_DQL=y
CONFIG_GLOB=y
# CONFIG_GLOB_SELFTEST is not set
CONFIG_NLATTR=y
CONFIG_LRU_CACHE=m
CONFIG_CLZ_TAB=y
# CONFIG_CORDIC is not set
# CONFIG_DDR is not set
# CONFIG_IRQ_POLL is not set
CONFIG_MPILIB=y
CONFIG_SIGNATURE=y
CONFIG_OID_REGISTRY=y
CONFIG_UCS2_STRING=y
CONFIG_FONT_SUPPORT=y

View File

@@ -0,0 +1,22 @@
CONFIG_RWSEM_GENERIC_SPINLOCK=y
# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set
CONFIG_PREEMPT_RCU=y
CONFIG_TASKS_RCU=y
CONFIG_SLUB_DEBUG=y
# CONFIG_SLUB_MEMCG_SYSFS_ON is not set
CONFIG_SLUB=y
# CONFIG_SLAB_FREELIST_HARDENED is not set
CONFIG_HAVE_ALIGNED_STRUCT_PAGE=y
CONFIG_PREEMPT=y
CONFIG_PREEMPT_RT_BASE=y
CONFIG_HAVE_PREEMPT_LAZY=y
CONFIG_PREEMPT_LAZY=y
# CONFIG_PREEMPT_VOLUNTARY is not set
# CONFIG_PREEMPT__LL is not set
# CONFIG_PREEMPT_RTB is not set
CONFIG_PREEMPT_RT_FULL=y
CONFIG_PREEMPT_COUNT=y
# CONFIG_SLUB_DEBUG_ON is not set
# CONFIG_SLUB_STATS is not set
CONFIG_DEBUG_PREEMPT=y
# CONFIG_PREEMPT_TRACER is not set

File diff suppressed because it is too large Load Diff

3359
kernel/config-4.17.x-s390x Normal file

File diff suppressed because it is too large Load Diff

4228
kernel/config-4.17.x-x86_64 Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,6 @@
#
# Automatically generated file; DO NOT EDIT.
# Linux/x86 4.4.113 Kernel Configuration
# Linux/x86 4.4.139 Kernel Configuration
#
CONFIG_64BIT=y
CONFIG_X86_64=y
@@ -36,7 +36,6 @@ CONFIG_AUDIT_ARCH=y
CONFIG_ARCH_SUPPORTS_OPTIMIZED_INLINING=y
CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y
CONFIG_X86_64_SMP=y
CONFIG_ARCH_HWEIGHT_CFLAGS="-fcall-saved-rdi -fcall-saved-rsi -fcall-saved-rdx -fcall-saved-rcx -fcall-saved-r8 -fcall-saved-r9 -fcall-saved-r10 -fcall-saved-r11"
CONFIG_ARCH_SUPPORTS_UPROBES=y
CONFIG_FIX_EARLYCON_MEM=y
CONFIG_PGTABLE_LEVELS=4
@@ -184,6 +183,7 @@ CONFIG_RD_GZIP=y
# CONFIG_RD_XZ is not set
# CONFIG_RD_LZO is not set
# CONFIG_RD_LZ4 is not set
# CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE is not set
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
CONFIG_SYSCTL=y
CONFIG_ANON_INODES=y
@@ -210,6 +210,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
@@ -1123,7 +1124,14 @@ CONFIG_BRIDGE_EBT_SNAT=y
CONFIG_BRIDGE_EBT_LOG=y
CONFIG_BRIDGE_EBT_NFLOG=y
# CONFIG_IP_DCCP is not set
# CONFIG_IP_SCTP is not set
CONFIG_IP_SCTP=m
# CONFIG_NET_SCTPPROBE is not set
# CONFIG_SCTP_DBG_OBJCNT is not set
CONFIG_SCTP_DEFAULT_COOKIE_HMAC_MD5=y
# CONFIG_SCTP_DEFAULT_COOKIE_HMAC_SHA1 is not set
# CONFIG_SCTP_DEFAULT_COOKIE_HMAC_NONE is not set
CONFIG_SCTP_COOKIE_HMAC_MD5=y
# CONFIG_SCTP_COOKIE_HMAC_SHA1 is not set
# CONFIG_RDS is not set
# CONFIG_TIPC is not set
# CONFIG_ATM is not set
@@ -1231,7 +1239,8 @@ CONFIG_VSOCKETS=y
CONFIG_NETLINK_DIAG=y
CONFIG_MPLS=y
CONFIG_NET_MPLS_GSO=m
# CONFIG_MPLS_ROUTING is not set
CONFIG_MPLS_ROUTING=m
CONFIG_MPLS_IPTUNNEL=m
# CONFIG_HSR is not set
CONFIG_NET_SWITCHDEV=y
CONFIG_NET_L3_MASTER_DEV=y
@@ -1264,10 +1273,14 @@ CONFIG_NET_9P=y
CONFIG_NET_9P_VIRTIO=y
# CONFIG_NET_9P_DEBUG is not set
# CONFIG_CAIF is not set
# CONFIG_CEPH_LIB is not set
CONFIG_CEPH_LIB=m
# CONFIG_CEPH_LIB_PRETTYDEBUG is not set
# CONFIG_CEPH_LIB_USE_DNS_RESOLVER is not set
# CONFIG_NFC is not set
CONFIG_LWTUNNEL=y
CONFIG_DST_CACHE=y
CONFIG_HAVE_BPF_JIT=y
CONFIG_HAVE_EBPF_JIT=y
#
# Device Drivers
@@ -1322,7 +1335,8 @@ CONFIG_BLK_DEV=y
CONFIG_BLK_DEV_LOOP=y
CONFIG_BLK_DEV_LOOP_MIN_COUNT=8
CONFIG_BLK_DEV_CRYPTOLOOP=y
# CONFIG_BLK_DEV_DRBD is not set
CONFIG_BLK_DEV_DRBD=m
# CONFIG_DRBD_FAULT_INJECTION is not set
CONFIG_BLK_DEV_NBD=y
# CONFIG_BLK_DEV_SKD is not set
# CONFIG_BLK_DEV_SX8 is not set
@@ -1332,7 +1346,7 @@ CONFIG_ATA_OVER_ETH=m
CONFIG_XEN_BLKDEV_FRONTEND=y
CONFIG_VIRTIO_BLK=y
# CONFIG_BLK_DEV_HD is not set
# CONFIG_BLK_DEV_RBD is not set
CONFIG_BLK_DEV_RBD=m
# CONFIG_BLK_DEV_RSXX is not set
CONFIG_BLK_DEV_NVME=y
@@ -2417,7 +2431,7 @@ CONFIG_FB_DEFERRED_IO=y
# CONFIG_FB_VGA16 is not set
# CONFIG_FB_UVESA is not set
CONFIG_FB_VESA=y
# CONFIG_FB_EFI is not set
CONFIG_FB_EFI=y
# CONFIG_FB_N411 is not set
# CONFIG_FB_HGA is not set
# CONFIG_FB_OPENCORES is not set
@@ -2613,7 +2627,22 @@ CONFIG_USB_UHCI_HCD=m
#
# also be needed; see USB_STORAGE Help for more info
#
# CONFIG_USB_STORAGE is not set
CONFIG_USB_STORAGE=y
# CONFIG_USB_STORAGE_DEBUG is not set
# CONFIG_USB_STORAGE_REALTEK is not set
# CONFIG_USB_STORAGE_DATAFAB is not set
# CONFIG_USB_STORAGE_FREECOM is not set
# CONFIG_USB_STORAGE_ISD200 is not set
# CONFIG_USB_STORAGE_USBAT is not set
# CONFIG_USB_STORAGE_SDDR09 is not set
# CONFIG_USB_STORAGE_SDDR55 is not set
# CONFIG_USB_STORAGE_JUMPSHOT is not set
# CONFIG_USB_STORAGE_ALAUDA is not set
# CONFIG_USB_STORAGE_ONETOUCH is not set
# CONFIG_USB_STORAGE_KARMA is not set
# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set
# CONFIG_USB_STORAGE_ENE_UB6250 is not set
# CONFIG_USB_UAS is not set
#
# USB Imaging devices
@@ -3130,7 +3159,9 @@ CONFIG_SUNRPC_GSS=m
CONFIG_SUNRPC_BACKCHANNEL=y
CONFIG_RPCSEC_GSS_KRB5=m
# CONFIG_SUNRPC_DEBUG is not set
# CONFIG_CEPH_FS is not set
CONFIG_CEPH_FS=m
CONFIG_CEPH_FSCACHE=y
CONFIG_CEPH_FS_POSIX_ACL=y
CONFIG_CIFS=y
# CONFIG_CIFS_STATS is not set
# CONFIG_CIFS_WEAK_PW_HASH is not set
@@ -3729,6 +3760,7 @@ CONFIG_GLOB=y
# CONFIG_GLOB_SELFTEST is not set
CONFIG_NLATTR=y
CONFIG_ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE=y
CONFIG_LRU_CACHE=m
CONFIG_CLZ_TAB=y
# CONFIG_CORDIC is not set
# CONFIG_DDR is not set

View File

@@ -1,6 +1,6 @@
#
# Automatically generated file; DO NOT EDIT.
# Linux/x86 4.9.78 Kernel Configuration
# Linux/x86 4.9.111 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
@@ -1188,7 +1189,15 @@ CONFIG_BRIDGE_EBT_SNAT=y
CONFIG_BRIDGE_EBT_LOG=y
CONFIG_BRIDGE_EBT_NFLOG=y
# CONFIG_IP_DCCP is not set
# CONFIG_IP_SCTP is not set
CONFIG_IP_SCTP=m
# CONFIG_NET_SCTPPROBE is not set
# CONFIG_SCTP_DBG_OBJCNT is not set
CONFIG_SCTP_DEFAULT_COOKIE_HMAC_MD5=y
# CONFIG_SCTP_DEFAULT_COOKIE_HMAC_SHA1 is not set
# CONFIG_SCTP_DEFAULT_COOKIE_HMAC_NONE is not set
CONFIG_SCTP_COOKIE_HMAC_MD5=y
# CONFIG_SCTP_COOKIE_HMAC_SHA1 is not set
CONFIG_INET_SCTP_DIAG=m
# CONFIG_RDS is not set
# CONFIG_TIPC is not set
# CONFIG_ATM is not set
@@ -1303,7 +1312,8 @@ CONFIG_HYPERV_SOCK=y
CONFIG_NETLINK_DIAG=y
CONFIG_MPLS=y
CONFIG_NET_MPLS_GSO=m
# CONFIG_MPLS_ROUTING is not set
CONFIG_MPLS_ROUTING=m
CONFIG_MPLS_IPTUNNEL=m
# CONFIG_HSR is not set
CONFIG_NET_SWITCHDEV=y
CONFIG_NET_L3_MASTER_DEV=y
@@ -1340,7 +1350,9 @@ CONFIG_NET_9P=y
CONFIG_NET_9P_VIRTIO=y
# CONFIG_NET_9P_DEBUG is not set
# CONFIG_CAIF is not set
# CONFIG_CEPH_LIB is not set
CONFIG_CEPH_LIB=m
# CONFIG_CEPH_LIB_PRETTYDEBUG is not set
# CONFIG_CEPH_LIB_USE_DNS_RESOLVER is not set
# CONFIG_NFC is not set
CONFIG_LWTUNNEL=y
CONFIG_DST_CACHE=y
@@ -1404,7 +1416,8 @@ CONFIG_BLK_DEV=y
CONFIG_BLK_DEV_LOOP=y
CONFIG_BLK_DEV_LOOP_MIN_COUNT=8
CONFIG_BLK_DEV_CRYPTOLOOP=y
# CONFIG_BLK_DEV_DRBD is not set
CONFIG_BLK_DEV_DRBD=m
# CONFIG_DRBD_FAULT_INJECTION is not set
CONFIG_BLK_DEV_NBD=y
# CONFIG_BLK_DEV_SKD is not set
# CONFIG_BLK_DEV_SX8 is not set
@@ -1414,7 +1427,7 @@ CONFIG_ATA_OVER_ETH=m
CONFIG_XEN_BLKDEV_FRONTEND=y
CONFIG_VIRTIO_BLK=y
# CONFIG_BLK_DEV_HD is not set
# CONFIG_BLK_DEV_RBD is not set
CONFIG_BLK_DEV_RBD=m
# CONFIG_BLK_DEV_RSXX is not set
CONFIG_NVME_CORE=y
CONFIG_BLK_DEV_NVME=y
@@ -2537,7 +2550,7 @@ CONFIG_FB_DEFERRED_IO=y
# CONFIG_FB_VGA16 is not set
# CONFIG_FB_UVESA is not set
CONFIG_FB_VESA=y
# CONFIG_FB_EFI is not set
CONFIG_FB_EFI=y
# CONFIG_FB_N411 is not set
# CONFIG_FB_HGA is not set
# CONFIG_FB_OPENCORES is not set
@@ -2739,7 +2752,22 @@ CONFIG_USB_UHCI_HCD=m
#
# also be needed; see USB_STORAGE Help for more info
#
# CONFIG_USB_STORAGE is not set
CONFIG_USB_STORAGE=m
# CONFIG_USB_STORAGE_DEBUG is not set
# CONFIG_USB_STORAGE_REALTEK is not set
# CONFIG_USB_STORAGE_DATAFAB is not set
# CONFIG_USB_STORAGE_FREECOM is not set
# CONFIG_USB_STORAGE_ISD200 is not set
# CONFIG_USB_STORAGE_USBAT is not set
# CONFIG_USB_STORAGE_SDDR09 is not set
# CONFIG_USB_STORAGE_SDDR55 is not set
# CONFIG_USB_STORAGE_JUMPSHOT is not set
# CONFIG_USB_STORAGE_ALAUDA is not set
# CONFIG_USB_STORAGE_ONETOUCH is not set
# CONFIG_USB_STORAGE_KARMA is not set
# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set
# CONFIG_USB_STORAGE_ENE_UB6250 is not set
# CONFIG_USB_UAS is not set
#
# USB Imaging devices
@@ -3304,7 +3332,9 @@ CONFIG_SUNRPC_GSS=m
CONFIG_SUNRPC_BACKCHANNEL=y
CONFIG_RPCSEC_GSS_KRB5=m
# CONFIG_SUNRPC_DEBUG is not set
# CONFIG_CEPH_FS is not set
CONFIG_CEPH_FS=m
CONFIG_CEPH_FSCACHE=y
CONFIG_CEPH_FS_POSIX_ACL=y
CONFIG_CIFS=y
# CONFIG_CIFS_STATS is not set
# CONFIG_CIFS_WEAK_PW_HASH is not set
@@ -3938,6 +3968,7 @@ CONFIG_DQL=y
CONFIG_GLOB=y
# CONFIG_GLOB_SELFTEST is not set
CONFIG_NLATTR=y
CONFIG_LRU_CACHE=m
CONFIG_CLZ_TAB=y
# CONFIG_CORDIC is not set
# CONFIG_DDR is not set

View File

@@ -0,0 +1,59 @@
From 1f9863a3348be088896f745bca5cf5a31d1d2c96 Mon Sep 17 00:00:00 2001
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Date: Wed, 11 Apr 2018 11:27:44 +0200
Subject: [PATCH 001/418] Revert mm/vmstat.c: fix vmstat_update() preemption
BUG
commit 97731753d44d5efcb95b994dc952c0e8195b3e96 upstream
This patch reverts commit c7f26ccfb2c3 ("mm/vmstat.c: fix
vmstat_update() preemption BUG").
Steven saw a "using smp_processor_id() in preemptible" message and
added a preempt_disable() section around it to keep it quiet. This is
not the right thing to do it does not fix the real problem.
vmstat_update() is invoked by a kworker on a specific CPU. This worker
it bound to this CPU. The name of the worker was "kworker/1:1" so it
should have been a worker which was bound to CPU1. A worker which can
run on any CPU would have a `u' before the first digit.
smp_processor_id() can be used in a preempt-enabled region as long as
the task is bound to a single CPU which is the case here. If it could
run on an arbitrary CPU then this is the problem we have an should seek
to resolve.
Not only this smp_processor_id() must not be migrated to another CPU but
also refresh_cpu_vm_stats() which might access wrong per-CPU variables.
Not to mention that other code relies on the fact that such a worker
runs on one specific CPU only.
Therefore I revert that commit and we should look instead what broke the
affinity mask of the kworker.
Cc: Steven J. Hill <steven.hill@cavium.com>
Cc: Tejun Heo <htejun@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
---
mm/vmstat.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/mm/vmstat.c b/mm/vmstat.c
index e085b13c572e..4bb13e72ac97 100644
--- a/mm/vmstat.c
+++ b/mm/vmstat.c
@@ -1770,11 +1770,9 @@ static void vmstat_update(struct work_struct *w)
* to occur in the future. Keep on running the
* update worker thread.
*/
- preempt_disable();
queue_delayed_work_on(smp_processor_id(), mm_percpu_wq,
this_cpu_ptr(&vmstat_work),
round_jiffies_relative(sysctl_stat_interval));
- preempt_enable();
}
}
--
2.17.1

View File

@@ -0,0 +1,127 @@
From 0ff9e891f4b361a8909d6f062f5137f041d6adaa Mon Sep 17 00:00:00 2001
From: Boqun Feng <boqun.feng@gmail.com>
Date: Fri, 9 Mar 2018 14:56:28 +0800
Subject: [PATCH 002/418] rtmutex: Make rt_mutex_futex_unlock() safe for
irq-off callsites
Upstream commit 6b0ef92fee2a3189eba6d6b827b247cb4f6da7e9
When running rcutorture with TREE03 config, CONFIG_PROVE_LOCKING=y, and
kernel cmdline argument "rcutorture.gp_exp=1", lockdep reports a
HARDIRQ-safe->HARDIRQ-unsafe deadlock:
================================
WARNING: inconsistent lock state
4.16.0-rc4+ #1 Not tainted
--------------------------------
inconsistent {IN-HARDIRQ-W} -> {HARDIRQ-ON-W} usage.
takes:
__schedule+0xbe/0xaf0
{IN-HARDIRQ-W} state was registered at:
_raw_spin_lock+0x2a/0x40
scheduler_tick+0x47/0xf0
...
other info that might help us debug this:
Possible unsafe locking scenario:
CPU0
----
lock(&rq->lock);
<Interrupt>
lock(&rq->lock);
*** DEADLOCK ***
1 lock held by rcu_torture_rea/724:
rcu_torture_read_lock+0x0/0x70
stack backtrace:
CPU: 2 PID: 724 Comm: rcu_torture_rea Not tainted 4.16.0-rc4+ #1
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.11.0-20171110_100015-anatol 04/01/2014
Call Trace:
lock_acquire+0x90/0x200
? __schedule+0xbe/0xaf0
_raw_spin_lock+0x2a/0x40
? __schedule+0xbe/0xaf0
__schedule+0xbe/0xaf0
preempt_schedule_irq+0x2f/0x60
retint_kernel+0x1b/0x2d
RIP: 0010:rcu_read_unlock_special+0x0/0x680
? rcu_torture_read_unlock+0x60/0x60
__rcu_read_unlock+0x64/0x70
rcu_torture_read_unlock+0x17/0x60
rcu_torture_reader+0x275/0x450
? rcutorture_booster_init+0x110/0x110
? rcu_torture_stall+0x230/0x230
? kthread+0x10e/0x130
kthread+0x10e/0x130
? kthread_create_worker_on_cpu+0x70/0x70
? call_usermodehelper_exec_async+0x11a/0x150
ret_from_fork+0x3a/0x50
This happens with the following even sequence:
preempt_schedule_irq();
local_irq_enable();
__schedule():
local_irq_disable(); // irq off
...
rcu_note_context_switch():
rcu_note_preempt_context_switch():
rcu_read_unlock_special():
local_irq_save(flags);
...
raw_spin_unlock_irqrestore(...,flags); // irq remains off
rt_mutex_futex_unlock():
raw_spin_lock_irq();
...
raw_spin_unlock_irq(); // accidentally set irq on
<return to __schedule()>
rq_lock():
raw_spin_lock(); // acquiring rq->lock with irq on
which means rq->lock becomes a HARDIRQ-unsafe lock, which can cause
deadlocks in scheduler code.
This problem was introduced by commit 02a7c234e540 ("rcu: Suppress
lockdep false-positive ->boost_mtx complaints"). That brought the user
of rt_mutex_futex_unlock() with irq off.
To fix this, replace the *lock_irq() in rt_mutex_futex_unlock() with
*lock_irq{save,restore}() to make it safe to call rt_mutex_futex_unlock()
with irq off.
Fixes: 02a7c234e540 ("rcu: Suppress lockdep false-positive ->boost_mtx complaints")
Signed-off-by: Boqun Feng <boqun.feng@gmail.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Lai Jiangshan <jiangshanlai@gmail.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Josh Triplett <josh@joshtriplett.org>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: "Paul E . McKenney" <paulmck@linux.vnet.ibm.com>
Link: https://lkml.kernel.org/r/20180309065630.8283-1-boqun.feng@gmail.com
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
kernel/locking/rtmutex.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/kernel/locking/rtmutex.c b/kernel/locking/rtmutex.c
index 65cc0cb984e6..940633c63254 100644
--- a/kernel/locking/rtmutex.c
+++ b/kernel/locking/rtmutex.c
@@ -1616,11 +1616,12 @@ bool __sched __rt_mutex_futex_unlock(struct rt_mutex *lock,
void __sched rt_mutex_futex_unlock(struct rt_mutex *lock)
{
DEFINE_WAKE_Q(wake_q);
+ unsigned long flags;
bool postunlock;
- raw_spin_lock_irq(&lock->wait_lock);
+ raw_spin_lock_irqsave(&lock->wait_lock, flags);
postunlock = __rt_mutex_futex_unlock(lock, &wake_q);
- raw_spin_unlock_irq(&lock->wait_lock);
+ raw_spin_unlock_irqrestore(&lock->wait_lock, flags);
if (postunlock)
rt_mutex_postunlock(&wake_q);
--
2.17.1

View File

@@ -0,0 +1,56 @@
From 7b28fe258efc9f3d9dbac60f39826d57845ff991 Mon Sep 17 00:00:00 2001
From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Date: Tue, 19 Sep 2017 15:36:42 -0700
Subject: [PATCH 003/418] rcu: Suppress lockdep false-positive ->boost_mtx
complaints
Upstream commit bcda31a2659497df39d6bedfbdf17498b4f4ac89
RCU priority boosting uses rt_mutex_init_proxy_locked() to initialize an
rt_mutex structure in locked state held by some other task. When that
other task releases it, lockdep complains (quite accurately, but a bit
uselessly) that the other task never acquired it. This complaint can
suppress other, more helpful, lockdep complaints, and in any case it is
a false positive.
This commit therefore switches from rt_mutex_unlock() to
rt_mutex_futex_unlock(), thereby avoiding the lockdep annotations.
Of course, if lockdep ever learns about rt_mutex_init_proxy_locked(),
addtional adjustments will be required.
Suggested-by: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
kernel/rcu/tree_plugin.h | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/kernel/rcu/tree_plugin.h b/kernel/rcu/tree_plugin.h
index 8b3102d22823..181e2487c8b8 100644
--- a/kernel/rcu/tree_plugin.h
+++ b/kernel/rcu/tree_plugin.h
@@ -31,11 +31,10 @@
#include <linux/smpboot.h>
#include <uapi/linux/sched/types.h>
#include "../time/tick-internal.h"
+#include "../locking/rtmutex_common.h"
#ifdef CONFIG_RCU_BOOST
-#include "../locking/rtmutex_common.h"
-
/*
* Control variables for per-CPU and per-rcu_node kthreads. These
* handle all flavors of RCU.
@@ -530,7 +529,7 @@ void rcu_read_unlock_special(struct task_struct *t)
/* Unboost if we were boosted. */
if (IS_ENABLED(CONFIG_RCU_BOOST) && drop_boost_mutex)
- rt_mutex_unlock(&rnp->boost_mtx);
+ rt_mutex_futex_unlock(&rnp->boost_mtx);
/*
* If this was the last task on the expedited lists,
--
2.17.1

View File

@@ -0,0 +1,32 @@
From e90c5da25d3a76acf44c248eb76fe0b6794174dd Mon Sep 17 00:00:00 2001
From: Mikulas Patocka <mpatocka@redhat.com>
Date: Fri, 10 Nov 2017 12:29:34 -0500
Subject: [PATCH 004/418] brd: remove unused brd_mutex
Upstream commit 15f7b41f70ddcca3b555bd0fdc7c8da7466b517e
Remove unused mutex brd_mutex. It is unused since the commit ff26956875c2
("brd: remove support for BLKFLSBUF").
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
drivers/block/brd.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/block/brd.c b/drivers/block/brd.c
index 2d7178f7754e..c1cf87718c2e 100644
--- a/drivers/block/brd.c
+++ b/drivers/block/brd.c
@@ -60,7 +60,6 @@ struct brd_device {
/*
* Look up and return a brd's page for a given sector.
*/
-static DEFINE_MUTEX(brd_mutex);
static struct page *brd_lookup_page(struct brd_device *brd, sector_t sector)
{
pgoff_t idx;
--
2.17.1

View File

@@ -0,0 +1,44 @@
From 36d6a35ae79ce5699704c987d3b4d3eb2de6e7db Mon Sep 17 00:00:00 2001
From: Christoffer Dall <christoffer.dall@linaro.org>
Date: Fri, 8 Sep 2017 07:07:13 -0700
Subject: [PATCH 005/418] KVM: arm/arm64: Remove redundant preemptible checks
Upstream commit 5a24575032971c5a9a4580417a791c427ebdb8e5
The __this_cpu_read() and __this_cpu_write() functions already implement
checks for the required preemption levels when using
CONFIG_DEBUG_PREEMPT which gives you nice error messages and such.
Therefore there is no need to explicitly check this using a BUG_ON() in
the code (which we don't do for other uses of per cpu variables either).
Acked-by: Marc Zyngier <marc.zyngier@arm.com>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
virt/kvm/arm/arm.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/virt/kvm/arm/arm.c b/virt/kvm/arm/arm.c
index 9bee849db682..0c5d846ba809 100644
--- a/virt/kvm/arm/arm.c
+++ b/virt/kvm/arm/arm.c
@@ -69,7 +69,6 @@ static DEFINE_PER_CPU(unsigned char, kvm_arm_hardware_enabled);
static void kvm_arm_set_running_vcpu(struct kvm_vcpu *vcpu)
{
- BUG_ON(preemptible());
__this_cpu_write(kvm_arm_running_vcpu, vcpu);
}
@@ -79,7 +78,6 @@ static void kvm_arm_set_running_vcpu(struct kvm_vcpu *vcpu)
*/
struct kvm_vcpu *kvm_arm_get_running_vcpu(void)
{
- BUG_ON(preemptible());
return __this_cpu_read(kvm_arm_running_vcpu);
}
--
2.17.1

View File

@@ -0,0 +1,68 @@
From c9e312daee80f74ba3e2b50da2ea33336f6846e8 Mon Sep 17 00:00:00 2001
From: Tejun Heo <tj@kernel.org>
Date: Tue, 9 Jan 2018 07:21:15 -0800
Subject: [PATCH 006/418] string: drop __must_check from strscpy() and restore
strscpy() usages in cgroup
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Upstream commit 08a77676f9c5fc69a681ccd2cd8140e65dcb26c7
e7fd37ba1217 ("cgroup: avoid copying strings longer than the buffers")
converted possibly unsafe strncpy() usages in cgroup to strscpy().
However, although the callsites are completely fine with truncated
copied, because strscpy() is marked __must_check, it led to the
following warnings.
kernel/cgroup/cgroup.c: In function cgroup_file_name:
kernel/cgroup/cgroup.c:1400:10: warning: ignoring return value of strscpy, declared with attribute warn_unused_result [-Wunused-result]
strscpy(buf, cft->name, CGROUP_FILE_NAME_MAX);
^
To avoid the warnings, 50034ed49645 ("cgroup: use strlcpy() instead of
strscpy() to avoid spurious warning") switched them to strlcpy().
strlcpy() is worse than strlcpy() because it unconditionally runs
strlen() on the source string, and the only reason we switched to
strlcpy() here was because it was lacking __must_check, which doesn't
reflect any material differences between the two function. It's just
that someone added __must_check to strscpy() and not to strlcpy().
These basic string copy operations are used in variety of ways, and
one of not-so-uncommon use cases is safely handling truncated copies,
where the caller naturally doesn't care about the return value. The
__must_check doesn't match the actual use cases and forces users to
opt for inferior variants which lack __must_check by happenstance or
spread ugly (void) casts.
Remove __must_check from strscpy() and restore strscpy() usages in
cgroup.
Signed-off-by: Tejun Heo <tj@kernel.org>
Suggested-by: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Ma Shimiao <mashimiao.fnst@cn.fujitsu.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Chris Metcalf <cmetcalf@ezchip.com>
[bigeasy: drop the cgroup.c hunk]
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
include/linux/string.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/string.h b/include/linux/string.h
index cfd83eb2f926..96115bf561b4 100644
--- a/include/linux/string.h
+++ b/include/linux/string.h
@@ -28,7 +28,7 @@ extern char * strncpy(char *,const char *, __kernel_size_t);
size_t strlcpy(char *, const char *, size_t);
#endif
#ifndef __HAVE_ARCH_STRSCPY
-ssize_t __must_check strscpy(char *, const char *, size_t);
+ssize_t strscpy(char *, const char *, size_t);
#endif
#ifndef __HAVE_ARCH_STRCAT
extern char * strcat(char *, const char *);
--
2.17.1

View File

@@ -0,0 +1,180 @@
From 5217a4b31298b5ff1082bd88e6ac8054780b6aaf Mon Sep 17 00:00:00 2001
From: Scott Wood <swood@redhat.com>
Date: Sun, 21 Jan 2018 03:28:54 -0600
Subject: [PATCH 007/418] iommu/amd: Use raw locks on atomic context paths
Upstream commit 27790398c2aed917828dc3c6f81240d57f1584c9
Several functions in this driver are called from atomic context,
and thus raw locks must be used in order to be safe on PREEMPT_RT.
This includes paths that must wait for command completion, which is
a potential PREEMPT_RT latency concern but not easily avoidable.
Signed-off-by: Scott Wood <swood@redhat.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
---
drivers/iommu/amd_iommu.c | 30 +++++++++++++++---------------
drivers/iommu/amd_iommu_init.c | 2 +-
drivers/iommu/amd_iommu_types.h | 4 ++--
3 files changed, 18 insertions(+), 18 deletions(-)
diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c
index 10190e361a13..ff50337fe3ba 100644
--- a/drivers/iommu/amd_iommu.c
+++ b/drivers/iommu/amd_iommu.c
@@ -1056,9 +1056,9 @@ static int iommu_queue_command_sync(struct amd_iommu *iommu,
unsigned long flags;
int ret;
- spin_lock_irqsave(&iommu->lock, flags);
+ raw_spin_lock_irqsave(&iommu->lock, flags);
ret = __iommu_queue_command_sync(iommu, cmd, sync);
- spin_unlock_irqrestore(&iommu->lock, flags);
+ raw_spin_unlock_irqrestore(&iommu->lock, flags);
return ret;
}
@@ -1084,7 +1084,7 @@ static int iommu_completion_wait(struct amd_iommu *iommu)
build_completion_wait(&cmd, (u64)&iommu->cmd_sem);
- spin_lock_irqsave(&iommu->lock, flags);
+ raw_spin_lock_irqsave(&iommu->lock, flags);
iommu->cmd_sem = 0;
@@ -1095,7 +1095,7 @@ static int iommu_completion_wait(struct amd_iommu *iommu)
ret = wait_on_sem(&iommu->cmd_sem);
out_unlock:
- spin_unlock_irqrestore(&iommu->lock, flags);
+ raw_spin_unlock_irqrestore(&iommu->lock, flags);
return ret;
}
@@ -3620,7 +3620,7 @@ static struct irq_remap_table *get_irq_table(u16 devid, bool ioapic)
goto out_unlock;
/* Initialize table spin-lock */
- spin_lock_init(&table->lock);
+ raw_spin_lock_init(&table->lock);
if (ioapic)
/* Keep the first 32 indexes free for IOAPIC interrupts */
@@ -3679,7 +3679,7 @@ static int alloc_irq_index(u16 devid, int count)
if (!table)
return -ENODEV;
- spin_lock_irqsave(&table->lock, flags);
+ raw_spin_lock_irqsave(&table->lock, flags);
/* Scan table for free entries */
for (c = 0, index = table->min_index;
@@ -3702,7 +3702,7 @@ static int alloc_irq_index(u16 devid, int count)
index = -ENOSPC;
out:
- spin_unlock_irqrestore(&table->lock, flags);
+ raw_spin_unlock_irqrestore(&table->lock, flags);
return index;
}
@@ -3723,7 +3723,7 @@ static int modify_irte_ga(u16 devid, int index, struct irte_ga *irte,
if (!table)
return -ENOMEM;
- spin_lock_irqsave(&table->lock, flags);
+ raw_spin_lock_irqsave(&table->lock, flags);
entry = (struct irte_ga *)table->table;
entry = &entry[index];
@@ -3734,7 +3734,7 @@ static int modify_irte_ga(u16 devid, int index, struct irte_ga *irte,
if (data)
data->ref = entry;
- spin_unlock_irqrestore(&table->lock, flags);
+ raw_spin_unlock_irqrestore(&table->lock, flags);
iommu_flush_irt(iommu, devid);
iommu_completion_wait(iommu);
@@ -3756,9 +3756,9 @@ static int modify_irte(u16 devid, int index, union irte *irte)
if (!table)
return -ENOMEM;
- spin_lock_irqsave(&table->lock, flags);
+ raw_spin_lock_irqsave(&table->lock, flags);
table->table[index] = irte->val;
- spin_unlock_irqrestore(&table->lock, flags);
+ raw_spin_unlock_irqrestore(&table->lock, flags);
iommu_flush_irt(iommu, devid);
iommu_completion_wait(iommu);
@@ -3780,9 +3780,9 @@ static void free_irte(u16 devid, int index)
if (!table)
return;
- spin_lock_irqsave(&table->lock, flags);
+ raw_spin_lock_irqsave(&table->lock, flags);
iommu->irte_ops->clear_allocated(table, index);
- spin_unlock_irqrestore(&table->lock, flags);
+ raw_spin_unlock_irqrestore(&table->lock, flags);
iommu_flush_irt(iommu, devid);
iommu_completion_wait(iommu);
@@ -4361,7 +4361,7 @@ int amd_iommu_update_ga(int cpu, bool is_run, void *data)
if (!irt)
return -ENODEV;
- spin_lock_irqsave(&irt->lock, flags);
+ raw_spin_lock_irqsave(&irt->lock, flags);
if (ref->lo.fields_vapic.guest_mode) {
if (cpu >= 0)
@@ -4370,7 +4370,7 @@ int amd_iommu_update_ga(int cpu, bool is_run, void *data)
barrier();
}
- spin_unlock_irqrestore(&irt->lock, flags);
+ raw_spin_unlock_irqrestore(&irt->lock, flags);
iommu_flush_irt(iommu, devid);
iommu_completion_wait(iommu);
diff --git a/drivers/iommu/amd_iommu_init.c b/drivers/iommu/amd_iommu_init.c
index 6fe2d0346073..e3cd81b32a33 100644
--- a/drivers/iommu/amd_iommu_init.c
+++ b/drivers/iommu/amd_iommu_init.c
@@ -1474,7 +1474,7 @@ static int __init init_iommu_one(struct amd_iommu *iommu, struct ivhd_header *h)
{
int ret;
- spin_lock_init(&iommu->lock);
+ raw_spin_lock_init(&iommu->lock);
/* Add IOMMU to internal data structures */
list_add_tail(&iommu->list, &amd_iommu_list);
diff --git a/drivers/iommu/amd_iommu_types.h b/drivers/iommu/amd_iommu_types.h
index f6b24c7d8b70..7521745dc2a5 100644
--- a/drivers/iommu/amd_iommu_types.h
+++ b/drivers/iommu/amd_iommu_types.h
@@ -406,7 +406,7 @@ extern bool amd_iommu_iotlb_sup;
#define IRQ_TABLE_ALIGNMENT 128
struct irq_remap_table {
- spinlock_t lock;
+ raw_spinlock_t lock;
unsigned min_index;
u32 *table;
};
@@ -488,7 +488,7 @@ struct amd_iommu {
int index;
/* locks the accesses to the hardware */
- spinlock_t lock;
+ raw_spinlock_t lock;
/* Pointer to PCI device of this IOMMU */
struct pci_dev *dev;
--
2.17.1

View File

@@ -0,0 +1,38 @@
From f139b736cc22cafcb207795386fe46e0a8fea151 Mon Sep 17 00:00:00 2001
From: Scott Wood <swood@redhat.com>
Date: Sun, 28 Jan 2018 14:22:19 -0600
Subject: [PATCH 008/418] iommu/amd: Don't use dev_data in
irte_ga_set_affinity()
Upstream commit 01ee04badefd296eb7a4430497373be9b7b16783
search_dev_data() acquires a non-raw lock, which can't be done
from atomic context on PREEMPT_RT. There is no need to look at
dev_data because guest_mode should never be set if use_vapic is
not set.
Signed-off-by: Scott Wood <swood@redhat.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
---
drivers/iommu/amd_iommu.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c
index ff50337fe3ba..388ec5e98ef5 100644
--- a/drivers/iommu/amd_iommu.c
+++ b/drivers/iommu/amd_iommu.c
@@ -3863,10 +3863,8 @@ static void irte_ga_set_affinity(void *entry, u16 devid, u16 index,
u8 vector, u32 dest_apicid)
{
struct irte_ga *irte = (struct irte_ga *) entry;
- struct iommu_dev_data *dev_data = search_dev_data(devid);
- if (!dev_data || !dev_data->use_vapic ||
- !irte->lo.fields_remap.guest_mode) {
+ if (!irte->lo.fields_remap.guest_mode) {
irte->hi.fields.vector = vector;
irte->lo.fields_remap.destination = dest_apicid;
modify_irte_ga(devid, index, irte, NULL);
--
2.17.1

View File

@@ -0,0 +1,122 @@
From eec0129e06a60a46f1f09a329f850a248af0e4ea Mon Sep 17 00:00:00 2001
From: Scott Wood <swood@redhat.com>
Date: Wed, 14 Feb 2018 17:36:28 -0600
Subject: [PATCH 009/418] iommu/amd: Avoid locking get_irq_table() from atomic
context
Upstream commit df42a04b15f19a842393dc98a84cbc52b1f8ed49
get_irq_table() previously acquired amd_iommu_devtable_lock which is not
a raw lock, and thus cannot be acquired from atomic context on
PREEMPT_RT. Many calls to modify_irte*() come from atomic context due to
the IRQ desc->lock, as does amd_iommu_update_ga() due to the preemption
disabling in vcpu_load/put().
The only difference between calling get_irq_table() and reading from
irq_lookup_table[] directly, other than the lock acquisition and
amd_iommu_rlookup_table[] check, is if the table entry is unpopulated,
which should never happen when looking up a devid that came from an
irq_2_irte struct, as get_irq_table() would have already been called on
that devid during irq_remapping_alloc().
The lock acquisition is not needed in these cases because entries in
irq_lookup_table[] never change once non-NULL -- nor would the
amd_iommu_devtable_lock usage in get_irq_table() provide meaningful
protection if they did, since it's released before using the looked up
table in the get_irq_table() caller.
Rename the old get_irq_table() to alloc_irq_table(), and create a new
lockless get_irq_table() to be used in non-allocating contexts that WARNs
if it doesn't find what it's looking for.
Signed-off-by: Scott Wood <swood@redhat.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
---
drivers/iommu/amd_iommu.c | 29 ++++++++++++++++++++++-------
1 file changed, 22 insertions(+), 7 deletions(-)
diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c
index 388ec5e98ef5..e42992fcebca 100644
--- a/drivers/iommu/amd_iommu.c
+++ b/drivers/iommu/amd_iommu.c
@@ -3588,7 +3588,22 @@ static void set_dte_irq_entry(u16 devid, struct irq_remap_table *table)
amd_iommu_dev_table[devid].data[2] = dte;
}
-static struct irq_remap_table *get_irq_table(u16 devid, bool ioapic)
+static struct irq_remap_table *get_irq_table(u16 devid)
+{
+ struct irq_remap_table *table;
+
+ if (WARN_ONCE(!amd_iommu_rlookup_table[devid],
+ "%s: no iommu for devid %x\n", __func__, devid))
+ return NULL;
+
+ table = irq_lookup_table[devid];
+ if (WARN_ONCE(!table, "%s: no table for devid %x\n", __func__, devid))
+ return NULL;
+
+ return table;
+}
+
+static struct irq_remap_table *alloc_irq_table(u16 devid, bool ioapic)
{
struct irq_remap_table *table = NULL;
struct amd_iommu *iommu;
@@ -3675,7 +3690,7 @@ static int alloc_irq_index(u16 devid, int count)
if (!iommu)
return -ENODEV;
- table = get_irq_table(devid, false);
+ table = alloc_irq_table(devid, false);
if (!table)
return -ENODEV;
@@ -3719,7 +3734,7 @@ static int modify_irte_ga(u16 devid, int index, struct irte_ga *irte,
if (iommu == NULL)
return -EINVAL;
- table = get_irq_table(devid, false);
+ table = get_irq_table(devid);
if (!table)
return -ENOMEM;
@@ -3752,7 +3767,7 @@ static int modify_irte(u16 devid, int index, union irte *irte)
if (iommu == NULL)
return -EINVAL;
- table = get_irq_table(devid, false);
+ table = get_irq_table(devid);
if (!table)
return -ENOMEM;
@@ -3776,7 +3791,7 @@ static void free_irte(u16 devid, int index)
if (iommu == NULL)
return;
- table = get_irq_table(devid, false);
+ table = get_irq_table(devid);
if (!table)
return;
@@ -4094,7 +4109,7 @@ static int irq_remapping_alloc(struct irq_domain *domain, unsigned int virq,
return ret;
if (info->type == X86_IRQ_ALLOC_TYPE_IOAPIC) {
- if (get_irq_table(devid, true))
+ if (alloc_irq_table(devid, true))
index = info->ioapic_pin;
else
ret = -ENOMEM;
@@ -4355,7 +4370,7 @@ int amd_iommu_update_ga(int cpu, bool is_run, void *data)
if (!iommu)
return -ENODEV;
- irt = get_irq_table(devid, false);
+ irt = get_irq_table(devid);
if (!irt)
return -ENODEV;
--
2.17.1

View File

@@ -0,0 +1,105 @@
From 53ff4b0f4c2a4ae8eea46b71b11b9fc5a7d79a11 Mon Sep 17 00:00:00 2001
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Date: Thu, 22 Mar 2018 16:22:34 +0100
Subject: [PATCH 010/418] iommu/amd: Turn dev_data_list into a lock less list
Upstream commit 779da73273fc4c4c6f41579a95e4fb7880a1720e
alloc_dev_data() adds new items to dev_data_list and search_dev_data()
is searching for items in this list. Both protect the access to the list
with a spinlock.
There is no need to navigate forth and back within the list and there is
also no deleting of a specific item. This qualifies the list to become a
lock less list and as part of this, the spinlock can be removed.
With this change the ordering of those items within the list is changed:
before the change new items were added to the end of the list, now they
are added to the front. I don't think it matters but wanted to mention
it.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
---
drivers/iommu/amd_iommu.c | 28 ++++++++++------------------
drivers/iommu/amd_iommu_types.h | 2 +-
2 files changed, 11 insertions(+), 19 deletions(-)
diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c
index e42992fcebca..1babecd37819 100644
--- a/drivers/iommu/amd_iommu.c
+++ b/drivers/iommu/amd_iommu.c
@@ -84,8 +84,7 @@
static DEFINE_RWLOCK(amd_iommu_devtable_lock);
/* List of all available dev_data structures */
-static LIST_HEAD(dev_data_list);
-static DEFINE_SPINLOCK(dev_data_list_lock);
+static LLIST_HEAD(dev_data_list);
LIST_HEAD(ioapic_map);
LIST_HEAD(hpet_map);
@@ -204,40 +203,33 @@ static struct dma_ops_domain* to_dma_ops_domain(struct protection_domain *domain
static struct iommu_dev_data *alloc_dev_data(u16 devid)
{
struct iommu_dev_data *dev_data;
- unsigned long flags;
dev_data = kzalloc(sizeof(*dev_data), GFP_KERNEL);
if (!dev_data)
return NULL;
dev_data->devid = devid;
-
- spin_lock_irqsave(&dev_data_list_lock, flags);
- list_add_tail(&dev_data->dev_data_list, &dev_data_list);
- spin_unlock_irqrestore(&dev_data_list_lock, flags);
-
ratelimit_default_init(&dev_data->rs);
+ llist_add(&dev_data->dev_data_list, &dev_data_list);
return dev_data;
}
static struct iommu_dev_data *search_dev_data(u16 devid)
{
struct iommu_dev_data *dev_data;
- unsigned long flags;
+ struct llist_node *node;
+
+ if (llist_empty(&dev_data_list))
+ return NULL;
- spin_lock_irqsave(&dev_data_list_lock, flags);
- list_for_each_entry(dev_data, &dev_data_list, dev_data_list) {
+ node = dev_data_list.first;
+ llist_for_each_entry(dev_data, node, dev_data_list) {
if (dev_data->devid == devid)
- goto out_unlock;
+ return dev_data;
}
- dev_data = NULL;
-
-out_unlock:
- spin_unlock_irqrestore(&dev_data_list_lock, flags);
-
- return dev_data;
+ return NULL;
}
static int __last_alias(struct pci_dev *pdev, u16 alias, void *data)
diff --git a/drivers/iommu/amd_iommu_types.h b/drivers/iommu/amd_iommu_types.h
index 7521745dc2a5..16b1404da58c 100644
--- a/drivers/iommu/amd_iommu_types.h
+++ b/drivers/iommu/amd_iommu_types.h
@@ -625,7 +625,7 @@ struct devid_map {
*/
struct iommu_dev_data {
struct list_head list; /* For domain->dev_list */
- struct list_head dev_data_list; /* For global dev_data_list */
+ struct llist_node dev_data_list; /* For global dev_data_list */
struct protection_domain *domain; /* Domain the device is bound to */
u16 devid; /* PCI Device ID */
u16 alias; /* Alias Device ID */
--
2.17.1

View File

@@ -0,0 +1,68 @@
From 1645ac08eb6be3c6b2900de419f578ed5f91ecf4 Mon Sep 17 00:00:00 2001
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Date: Thu, 22 Mar 2018 16:22:35 +0100
Subject: [PATCH 011/418] iommu/amd: Split domain id out of
amd_iommu_devtable_lock
Upstream commit 2bc00180890427dcc092b2f2b0d03c904bcade29
domain_id_alloc() and domain_id_free() is used for id management. Those
two function share a bitmap (amd_iommu_pd_alloc_bitmap) and set/clear
bits based on id allocation. There is no need to share this with
amd_iommu_devtable_lock, it can use its own lock for this operation.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
---
drivers/iommu/amd_iommu.c | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c
index 1babecd37819..250b6354fae5 100644
--- a/drivers/iommu/amd_iommu.c
+++ b/drivers/iommu/amd_iommu.c
@@ -82,6 +82,7 @@
#define AMD_IOMMU_PGSIZES ((~0xFFFUL) & ~(2ULL << 38))
static DEFINE_RWLOCK(amd_iommu_devtable_lock);
+static DEFINE_SPINLOCK(pd_bitmap_lock);
/* List of all available dev_data structures */
static LLIST_HEAD(dev_data_list);
@@ -1596,29 +1597,26 @@ static void del_domain_from_list(struct protection_domain *domain)
static u16 domain_id_alloc(void)
{
- unsigned long flags;
int id;
- write_lock_irqsave(&amd_iommu_devtable_lock, flags);
+ spin_lock(&pd_bitmap_lock);
id = find_first_zero_bit(amd_iommu_pd_alloc_bitmap, MAX_DOMAIN_ID);
BUG_ON(id == 0);
if (id > 0 && id < MAX_DOMAIN_ID)
__set_bit(id, amd_iommu_pd_alloc_bitmap);
else
id = 0;
- write_unlock_irqrestore(&amd_iommu_devtable_lock, flags);
+ spin_unlock(&pd_bitmap_lock);
return id;
}
static void domain_id_free(int id)
{
- unsigned long flags;
-
- write_lock_irqsave(&amd_iommu_devtable_lock, flags);
+ spin_lock(&pd_bitmap_lock);
if (id > 0 && id < MAX_DOMAIN_ID)
__clear_bit(id, amd_iommu_pd_alloc_bitmap);
- write_unlock_irqrestore(&amd_iommu_devtable_lock, flags);
+ spin_unlock(&pd_bitmap_lock);
}
#define DEFINE_FREE_PT_FN(LVL, FN) \
--
2.17.1

View File

@@ -0,0 +1,56 @@
From 37ded533c97f8424a00e051c4351ab2515717457 Mon Sep 17 00:00:00 2001
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Date: Thu, 22 Mar 2018 16:22:36 +0100
Subject: [PATCH 012/418] iommu/amd: Split irq_lookup_table out of the
amd_iommu_devtable_lock
Upstream commit ea6166f4b83e9cfba1c18f46a764d50045682fe5
The function get_irq_table() reads/writes irq_lookup_table while holding
the amd_iommu_devtable_lock. It also modifies
amd_iommu_dev_table[].data[2].
set_dte_entry() is using amd_iommu_dev_table[].data[0|1] (under the
domain->lock) so it should be okay. The access to the iommu is
serialized with its own (iommu's) lock.
So split out get_irq_table() out of amd_iommu_devtable_lock's lock.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
---
drivers/iommu/amd_iommu.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c
index 250b6354fae5..2cedb0caec73 100644
--- a/drivers/iommu/amd_iommu.c
+++ b/drivers/iommu/amd_iommu.c
@@ -83,6 +83,7 @@
static DEFINE_RWLOCK(amd_iommu_devtable_lock);
static DEFINE_SPINLOCK(pd_bitmap_lock);
+static DEFINE_SPINLOCK(iommu_table_lock);
/* List of all available dev_data structures */
static LLIST_HEAD(dev_data_list);
@@ -3600,7 +3601,7 @@ static struct irq_remap_table *alloc_irq_table(u16 devid, bool ioapic)
unsigned long flags;
u16 alias;
- write_lock_irqsave(&amd_iommu_devtable_lock, flags);
+ spin_lock_irqsave(&iommu_table_lock, flags);
iommu = amd_iommu_rlookup_table[devid];
if (!iommu)
@@ -3665,7 +3666,7 @@ static struct irq_remap_table *alloc_irq_table(u16 devid, bool ioapic)
iommu_completion_wait(iommu);
out_unlock:
- write_unlock_irqrestore(&amd_iommu_devtable_lock, flags);
+ spin_unlock_irqrestore(&iommu_table_lock, flags);
return table;
}
--
2.17.1

View File

@@ -0,0 +1,100 @@
From 7faa3de9da88db7a577fbc9d11c095425c7de802 Mon Sep 17 00:00:00 2001
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Date: Thu, 22 Mar 2018 16:22:37 +0100
Subject: [PATCH 013/418] iommu/amd: Remove the special case from
alloc_irq_table()
Upstream commit fde65dd3d3096e8f6ecc7bbe544eb91f4220772c
alloc_irq_table() has a special ioapic argument. If set then it will
pre-allocate / reserve the first 32 indexes. The argument is only once
true and it would make alloc_irq_table() a little simpler if we would
extract the special bits to the caller.
The caller of irq_remapping_alloc() is holding irq_domain_mutex so the
initialization of iommu->irte_ops->set_allocated() should not race
against other user.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
---
drivers/iommu/amd_iommu.c | 34 ++++++++++++++++++++--------------
1 file changed, 20 insertions(+), 14 deletions(-)
diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c
index 2cedb0caec73..fc23b89d2372 100644
--- a/drivers/iommu/amd_iommu.c
+++ b/drivers/iommu/amd_iommu.c
@@ -3594,7 +3594,7 @@ static struct irq_remap_table *get_irq_table(u16 devid)
return table;
}
-static struct irq_remap_table *alloc_irq_table(u16 devid, bool ioapic)
+static struct irq_remap_table *alloc_irq_table(u16 devid)
{
struct irq_remap_table *table = NULL;
struct amd_iommu *iommu;
@@ -3628,10 +3628,6 @@ static struct irq_remap_table *alloc_irq_table(u16 devid, bool ioapic)
/* Initialize table spin-lock */
raw_spin_lock_init(&table->lock);
- if (ioapic)
- /* Keep the first 32 indexes free for IOAPIC interrupts */
- table->min_index = 32;
-
table->table = kmem_cache_alloc(amd_iommu_irq_cache, GFP_ATOMIC);
if (!table->table) {
kfree(table);
@@ -3646,12 +3642,6 @@ static struct irq_remap_table *alloc_irq_table(u16 devid, bool ioapic)
memset(table->table, 0,
(MAX_IRQS_PER_TABLE * (sizeof(u64) * 2)));
- if (ioapic) {
- int i;
-
- for (i = 0; i < 32; ++i)
- iommu->irte_ops->set_allocated(table, i);
- }
irq_lookup_table[devid] = table;
set_dte_irq_entry(devid, table);
@@ -3681,7 +3671,7 @@ static int alloc_irq_index(u16 devid, int count)
if (!iommu)
return -ENODEV;
- table = alloc_irq_table(devid, false);
+ table = alloc_irq_table(devid);
if (!table)
return -ENODEV;
@@ -4100,10 +4090,26 @@ static int irq_remapping_alloc(struct irq_domain *domain, unsigned int virq,
return ret;
if (info->type == X86_IRQ_ALLOC_TYPE_IOAPIC) {
- if (alloc_irq_table(devid, true))
+ struct irq_remap_table *table;
+ struct amd_iommu *iommu;
+
+ table = alloc_irq_table(devid);
+ if (table) {
+ if (!table->min_index) {
+ /*
+ * Keep the first 32 indexes free for IOAPIC
+ * interrupts.
+ */
+ table->min_index = 32;
+ iommu = amd_iommu_rlookup_table[devid];
+ for (i = 0; i < 32; ++i)
+ iommu->irte_ops->set_allocated(table, i);
+ }
+ WARN_ON(table->min_index != 32);
index = info->ioapic_pin;
- else
+ } else {
ret = -ENOMEM;
+ }
} else {
index = alloc_irq_index(devid, nr_irqs);
}
--
2.17.1

View File

@@ -0,0 +1,58 @@
From c148dfef5e405f1d7f74ac4e667b19007bc31fd1 Mon Sep 17 00:00:00 2001
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Date: Thu, 22 Mar 2018 16:22:38 +0100
Subject: [PATCH 014/418] iommu/amd: Use `table' instead `irt' as variable name
in amd_iommu_update_ga()
Upstream commit 4fde541c9dc114c5b448ad34b0286fe8b7c550f1
The variable of type struct irq_remap_table is always named `table'
except in amd_iommu_update_ga() where it is called `irt'. Make it
consistent and name it also `table'.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
---
drivers/iommu/amd_iommu.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c
index fc23b89d2372..bfda5f26ea50 100644
--- a/drivers/iommu/amd_iommu.c
+++ b/drivers/iommu/amd_iommu.c
@@ -4353,7 +4353,7 @@ int amd_iommu_update_ga(int cpu, bool is_run, void *data)
{
unsigned long flags;
struct amd_iommu *iommu;
- struct irq_remap_table *irt;
+ struct irq_remap_table *table;
struct amd_ir_data *ir_data = (struct amd_ir_data *)data;
int devid = ir_data->irq_2_irte.devid;
struct irte_ga *entry = (struct irte_ga *) ir_data->entry;
@@ -4367,11 +4367,11 @@ int amd_iommu_update_ga(int cpu, bool is_run, void *data)
if (!iommu)
return -ENODEV;
- irt = get_irq_table(devid);
- if (!irt)
+ table = get_irq_table(devid);
+ if (!table)
return -ENODEV;
- raw_spin_lock_irqsave(&irt->lock, flags);
+ raw_spin_lock_irqsave(&table->lock, flags);
if (ref->lo.fields_vapic.guest_mode) {
if (cpu >= 0)
@@ -4380,7 +4380,7 @@ int amd_iommu_update_ga(int cpu, bool is_run, void *data)
barrier();
}
- raw_spin_unlock_irqrestore(&irt->lock, flags);
+ raw_spin_unlock_irqrestore(&table->lock, flags);
iommu_flush_irt(iommu, devid);
iommu_completion_wait(iommu);
--
2.17.1

View File

@@ -0,0 +1,72 @@
From ef80165d12b76356146a32c6b43e45e98f052ae9 Mon Sep 17 00:00:00 2001
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Date: Thu, 22 Mar 2018 16:22:39 +0100
Subject: [PATCH 015/418] iommu/amd: Factor out setting the remap table for a
devid
Upstream commit 2fcc1e8ac4a8514c64f946178fc36c2e30e56a41
Setting the IRQ remap table for a specific devid (or its alias devid)
includes three steps. Those three steps are always repeated each time
this is done.
Introduce a new helper function, move those steps there and use that
function instead. The compiler can still decide if it is worth to
inline.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
---
drivers/iommu/amd_iommu.c | 23 ++++++++++++-----------
1 file changed, 12 insertions(+), 11 deletions(-)
diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c
index bfda5f26ea50..d4eeb91afa36 100644
--- a/drivers/iommu/amd_iommu.c
+++ b/drivers/iommu/amd_iommu.c
@@ -3594,6 +3594,14 @@ static struct irq_remap_table *get_irq_table(u16 devid)
return table;
}
+static void set_remap_table_entry(struct amd_iommu *iommu, u16 devid,
+ struct irq_remap_table *table)
+{
+ irq_lookup_table[devid] = table;
+ set_dte_irq_entry(devid, table);
+ iommu_flush_dte(iommu, devid);
+}
+
static struct irq_remap_table *alloc_irq_table(u16 devid)
{
struct irq_remap_table *table = NULL;
@@ -3614,9 +3622,7 @@ static struct irq_remap_table *alloc_irq_table(u16 devid)
alias = amd_iommu_alias_table[devid];
table = irq_lookup_table[alias];
if (table) {
- irq_lookup_table[devid] = table;
- set_dte_irq_entry(devid, table);
- iommu_flush_dte(iommu, devid);
+ set_remap_table_entry(iommu, devid, table);
goto out;
}
@@ -3643,14 +3649,9 @@ static struct irq_remap_table *alloc_irq_table(u16 devid)
(MAX_IRQS_PER_TABLE * (sizeof(u64) * 2)));
- irq_lookup_table[devid] = table;
- set_dte_irq_entry(devid, table);
- iommu_flush_dte(iommu, devid);
- if (devid != alias) {
- irq_lookup_table[alias] = table;
- set_dte_irq_entry(alias, table);
- iommu_flush_dte(iommu, alias);
- }
+ set_remap_table_entry(iommu, devid, table);
+ if (devid != alias)
+ set_remap_table_entry(iommu, alias, table);
out:
iommu_completion_wait(iommu);
--
2.17.1

View File

@@ -0,0 +1,137 @@
From 6224ad75694b7e9aa332a504f1da722c416a4cf3 Mon Sep 17 00:00:00 2001
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Date: Thu, 22 Mar 2018 16:22:40 +0100
Subject: [PATCH 016/418] iommu/amd: Drop the lock while allocating new irq
remap table
Upstream commit 993ca6e063a69a0c65ca42ed449b6bc1b3844151
The irq_remap_table is allocated while the iommu_table_lock is held with
interrupts disabled.
>From looking at the call sites, all callers are in the early device
initialisation (apic_bsp_setup(), pci_enable_device(),
pci_enable_msi()) so make sense to drop the lock which also enables
interrupts and try to allocate that memory with GFP_KERNEL instead
GFP_ATOMIC.
Since during the allocation the iommu_table_lock is dropped, we need to
recheck if table exists after the lock has been reacquired. I *think*
that it is impossible that the "devid" entry appears in irq_lookup_table
while the lock is dropped since the same device can only be probed once.
However I check for both cases, just to be sure.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
---
drivers/iommu/amd_iommu.c | 63 ++++++++++++++++++++++++++++-----------
1 file changed, 45 insertions(+), 18 deletions(-)
diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c
index d4eeb91afa36..8b6e515b395e 100644
--- a/drivers/iommu/amd_iommu.c
+++ b/drivers/iommu/amd_iommu.c
@@ -3594,6 +3594,30 @@ static struct irq_remap_table *get_irq_table(u16 devid)
return table;
}
+static struct irq_remap_table *__alloc_irq_table(void)
+{
+ struct irq_remap_table *table;
+
+ table = kzalloc(sizeof(*table), GFP_KERNEL);
+ if (!table)
+ return NULL;
+
+ table->table = kmem_cache_alloc(amd_iommu_irq_cache, GFP_KERNEL);
+ if (!table->table) {
+ kfree(table);
+ return NULL;
+ }
+ raw_spin_lock_init(&table->lock);
+
+ if (!AMD_IOMMU_GUEST_IR_GA(amd_iommu_guest_ir))
+ memset(table->table, 0,
+ MAX_IRQS_PER_TABLE * sizeof(u32));
+ else
+ memset(table->table, 0,
+ (MAX_IRQS_PER_TABLE * (sizeof(u64) * 2)));
+ return table;
+}
+
static void set_remap_table_entry(struct amd_iommu *iommu, u16 devid,
struct irq_remap_table *table)
{
@@ -3605,6 +3629,7 @@ static void set_remap_table_entry(struct amd_iommu *iommu, u16 devid,
static struct irq_remap_table *alloc_irq_table(u16 devid)
{
struct irq_remap_table *table = NULL;
+ struct irq_remap_table *new_table = NULL;
struct amd_iommu *iommu;
unsigned long flags;
u16 alias;
@@ -3623,42 +3648,44 @@ static struct irq_remap_table *alloc_irq_table(u16 devid)
table = irq_lookup_table[alias];
if (table) {
set_remap_table_entry(iommu, devid, table);
- goto out;
+ goto out_wait;
}
+ spin_unlock_irqrestore(&iommu_table_lock, flags);
/* Nothing there yet, allocate new irq remapping table */
- table = kzalloc(sizeof(*table), GFP_ATOMIC);
- if (!table)
- goto out_unlock;
+ new_table = __alloc_irq_table();
+ if (!new_table)
+ return NULL;
- /* Initialize table spin-lock */
- raw_spin_lock_init(&table->lock);
+ spin_lock_irqsave(&iommu_table_lock, flags);
- table->table = kmem_cache_alloc(amd_iommu_irq_cache, GFP_ATOMIC);
- if (!table->table) {
- kfree(table);
- table = NULL;
+ table = irq_lookup_table[devid];
+ if (table)
goto out_unlock;
- }
- if (!AMD_IOMMU_GUEST_IR_GA(amd_iommu_guest_ir))
- memset(table->table, 0,
- MAX_IRQS_PER_TABLE * sizeof(u32));
- else
- memset(table->table, 0,
- (MAX_IRQS_PER_TABLE * (sizeof(u64) * 2)));
+ table = irq_lookup_table[alias];
+ if (table) {
+ set_remap_table_entry(iommu, devid, table);
+ goto out_wait;
+ }
+ table = new_table;
+ new_table = NULL;
set_remap_table_entry(iommu, devid, table);
if (devid != alias)
set_remap_table_entry(iommu, alias, table);
-out:
+out_wait:
iommu_completion_wait(iommu);
out_unlock:
spin_unlock_irqrestore(&iommu_table_lock, flags);
+ if (new_table) {
+ kmem_cache_free(amd_iommu_irq_cache, new_table->table);
+ kfree(new_table);
+ }
return table;
}
--
2.17.1

View File

@@ -0,0 +1,79 @@
From 9d350d7dff14fe5881062bb1dd588fe1bf19719d Mon Sep 17 00:00:00 2001
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Date: Thu, 22 Mar 2018 16:22:41 +0100
Subject: [PATCH 017/418] iommu/amd: Make amd_iommu_devtable_lock a spin_lock
Upstream commit 2cd1083d79a0a8c223af430ca97884c28a1e2fc0
Before commit 0bb6e243d7fb ("iommu/amd: Support IOMMU_DOMAIN_DMA type
allocation") amd_iommu_devtable_lock had a read_lock() user but now
there are none. In fact, after the mentioned commit we had only
write_lock() user of the lock. Since there is no reason to keep it as
writer lock, change its type to a spin_lock.
I *think* that we might even be able to remove the lock because all its
current user seem to have their own protection.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
---
drivers/iommu/amd_iommu.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c
index 8b6e515b395e..f685026e6d9e 100644
--- a/drivers/iommu/amd_iommu.c
+++ b/drivers/iommu/amd_iommu.c
@@ -81,7 +81,7 @@
*/
#define AMD_IOMMU_PGSIZES ((~0xFFFUL) & ~(2ULL << 38))
-static DEFINE_RWLOCK(amd_iommu_devtable_lock);
+static DEFINE_SPINLOCK(amd_iommu_devtable_lock);
static DEFINE_SPINLOCK(pd_bitmap_lock);
static DEFINE_SPINLOCK(iommu_table_lock);
@@ -2086,9 +2086,9 @@ static int attach_device(struct device *dev,
}
skip_ats_check:
- write_lock_irqsave(&amd_iommu_devtable_lock, flags);
+ spin_lock_irqsave(&amd_iommu_devtable_lock, flags);
ret = __attach_device(dev_data, domain);
- write_unlock_irqrestore(&amd_iommu_devtable_lock, flags);
+ spin_unlock_irqrestore(&amd_iommu_devtable_lock, flags);
/*
* We might boot into a crash-kernel here. The crashed kernel
@@ -2138,9 +2138,9 @@ static void detach_device(struct device *dev)
domain = dev_data->domain;
/* lock device table */
- write_lock_irqsave(&amd_iommu_devtable_lock, flags);
+ spin_lock_irqsave(&amd_iommu_devtable_lock, flags);
__detach_device(dev_data);
- write_unlock_irqrestore(&amd_iommu_devtable_lock, flags);
+ spin_unlock_irqrestore(&amd_iommu_devtable_lock, flags);
if (!dev_is_pci(dev))
return;
@@ -2804,7 +2804,7 @@ static void cleanup_domain(struct protection_domain *domain)
struct iommu_dev_data *entry;
unsigned long flags;
- write_lock_irqsave(&amd_iommu_devtable_lock, flags);
+ spin_lock_irqsave(&amd_iommu_devtable_lock, flags);
while (!list_empty(&domain->dev_list)) {
entry = list_first_entry(&domain->dev_list,
@@ -2812,7 +2812,7 @@ static void cleanup_domain(struct protection_domain *domain)
__detach_device(entry);
}
- write_unlock_irqrestore(&amd_iommu_devtable_lock, flags);
+ spin_unlock_irqrestore(&amd_iommu_devtable_lock, flags);
}
static void protection_domain_free(struct protection_domain *domain)
--
2.17.1

View File

@@ -0,0 +1,46 @@
From cf3885d685d1115031da5d5963a9152b11cf9f36 Mon Sep 17 00:00:00 2001
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Date: Thu, 22 Mar 2018 16:22:42 +0100
Subject: [PATCH 018/418] iommu/amd: Return proper error code in
irq_remapping_alloc()
Upstream commit 29d049be9438278c47253a74cf8d0ddf36bd5d68
In the unlikely case when alloc_irq_table() is not able to return a
remap table then "ret" will be assigned with an error code. Later, the
code checks `index' and if it is negative (which it is because it is
initialized with `-1') and then then function properly aborts but
returns `-1' instead `-ENOMEM' what was intended.
In order to correct this, I assign -ENOMEM to index.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
---
drivers/iommu/amd_iommu.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c
index f685026e6d9e..f61c2dab5490 100644
--- a/drivers/iommu/amd_iommu.c
+++ b/drivers/iommu/amd_iommu.c
@@ -4094,7 +4094,7 @@ static int irq_remapping_alloc(struct irq_domain *domain, unsigned int virq,
struct amd_ir_data *data = NULL;
struct irq_cfg *cfg;
int i, ret, devid;
- int index = -1;
+ int index;
if (!info)
return -EINVAL;
@@ -4136,7 +4136,7 @@ static int irq_remapping_alloc(struct irq_domain *domain, unsigned int virq,
WARN_ON(table->min_index != 32);
index = info->ioapic_pin;
} else {
- ret = -ENOMEM;
+ index = -ENOMEM;
}
} else {
index = alloc_irq_index(devid, nr_irqs);
--
2.17.1

View File

@@ -0,0 +1,287 @@
From d2540f23d6110bdea14e3b9b8af69ee71909096f Mon Sep 17 00:00:00 2001
From: Thomas Gleixner <tglx@linutronix.de>
Date: Wed, 20 Dec 2017 17:12:50 +0100
Subject: [PATCH 019/418] timers: Use static keys for
migrate_enable/nohz_active
The members migrate_enable and nohz_active in the timer/hrtimer per CPU
bases have been introduced to avoid accessing global variables for these
decisions.
Still that results in a (cache hot) load and conditional branch, which can
be avoided by using static keys.
Implement it with static keys and optimize for the most critical case of
high performance networking which tends to disable the timer migration
functionality.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Anna-Maria Gleixner <anna-maria@linutronix.de>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
include/linux/hrtimer.h | 4 --
kernel/time/hrtimer.c | 17 +++-----
kernel/time/tick-internal.h | 19 +++++----
kernel/time/tick-sched.c | 2 +-
kernel/time/timer.c | 83 +++++++++++++++++++------------------
5 files changed, 61 insertions(+), 64 deletions(-)
diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h
index 012c37fdb688..79b2a8d29d8c 100644
--- a/include/linux/hrtimer.h
+++ b/include/linux/hrtimer.h
@@ -153,8 +153,6 @@ enum hrtimer_base_type {
* @cpu: cpu number
* @active_bases: Bitfield to mark bases with active timers
* @clock_was_set_seq: Sequence counter of clock was set events
- * @migration_enabled: The migration of hrtimers to other cpus is enabled
- * @nohz_active: The nohz functionality is enabled
* @expires_next: absolute time of the next event which was scheduled
* via clock_set_next_event()
* @next_timer: Pointer to the first expiring timer
@@ -178,8 +176,6 @@ struct hrtimer_cpu_base {
unsigned int cpu;
unsigned int active_bases;
unsigned int clock_was_set_seq;
- bool migration_enabled;
- bool nohz_active;
#ifdef CONFIG_HIGH_RES_TIMERS
unsigned int in_hrtirq : 1,
hres_active : 1,
diff --git a/kernel/time/hrtimer.c b/kernel/time/hrtimer.c
index d00e85ac10d6..883fef2926e9 100644
--- a/kernel/time/hrtimer.c
+++ b/kernel/time/hrtimer.c
@@ -178,23 +178,16 @@ hrtimer_check_target(struct hrtimer *timer, struct hrtimer_clock_base *new_base)
#endif
}
-#ifdef CONFIG_NO_HZ_COMMON
-static inline
-struct hrtimer_cpu_base *get_target_base(struct hrtimer_cpu_base *base,
- int pinned)
-{
- if (pinned || !base->migration_enabled)
- return base;
- return &per_cpu(hrtimer_bases, get_nohz_timer_target());
-}
-#else
static inline
struct hrtimer_cpu_base *get_target_base(struct hrtimer_cpu_base *base,
int pinned)
{
+#if defined(CONFIG_SMP) && defined(CONFIG_NO_HZ_COMMON)
+ if (static_branch_unlikely(&timers_migration_enabled) && !pinned)
+ return &per_cpu(hrtimer_bases, get_nohz_timer_target());
+#endif
return base;
}
-#endif
/*
* We switch the timer base to a power-optimized selected CPU target,
@@ -973,7 +966,7 @@ void hrtimer_start_range_ns(struct hrtimer *timer, ktime_t tim,
* Kick to reschedule the next tick to handle the new timer
* on dynticks target.
*/
- if (new_base->cpu_base->nohz_active)
+ if (is_timers_nohz_active())
wake_up_nohz_cpu(new_base->cpu_base->cpu);
} else {
hrtimer_reprogram(timer, new_base);
diff --git a/kernel/time/tick-internal.h b/kernel/time/tick-internal.h
index f8e1845aa464..4ac74dff59f0 100644
--- a/kernel/time/tick-internal.h
+++ b/kernel/time/tick-internal.h
@@ -150,14 +150,19 @@ static inline void tick_nohz_init(void) { }
#ifdef CONFIG_NO_HZ_COMMON
extern unsigned long tick_nohz_active;
-#else
+extern void timers_update_nohz(void);
+extern struct static_key_false timers_nohz_active;
+static inline bool is_timers_nohz_active(void)
+{
+ return static_branch_unlikely(&timers_nohz_active);
+}
+# ifdef CONFIG_SMP
+extern struct static_key_false timers_migration_enabled;
+# endif
+#else /* CONFIG_NO_HZ_COMMON */
+static inline void timers_update_nohz(void) { }
#define tick_nohz_active (0)
-#endif
-
-#if defined(CONFIG_SMP) && defined(CONFIG_NO_HZ_COMMON)
-extern void timers_update_migration(bool update_nohz);
-#else
-static inline void timers_update_migration(bool update_nohz) { }
+static inline bool is_timers_nohz_active(void) { return false; }
#endif
DECLARE_PER_CPU(struct hrtimer_cpu_base, hrtimer_bases);
diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c
index bb2af74e6b62..9a372e16791c 100644
--- a/kernel/time/tick-sched.c
+++ b/kernel/time/tick-sched.c
@@ -1132,7 +1132,7 @@ static inline void tick_nohz_activate(struct tick_sched *ts, int mode)
ts->nohz_mode = mode;
/* One update is enough */
if (!test_and_set_bit(0, &tick_nohz_active))
- timers_update_migration(true);
+ timers_update_nohz();
}
/**
diff --git a/kernel/time/timer.c b/kernel/time/timer.c
index 9fe525f410bf..b24232985960 100644
--- a/kernel/time/timer.c
+++ b/kernel/time/timer.c
@@ -200,8 +200,6 @@ struct timer_base {
unsigned long clk;
unsigned long next_expiry;
unsigned int cpu;
- bool migration_enabled;
- bool nohz_active;
bool is_idle;
bool must_forward_clk;
DECLARE_BITMAP(pending_map, WHEEL_SIZE);
@@ -210,45 +208,59 @@ struct timer_base {
static DEFINE_PER_CPU(struct timer_base, timer_bases[NR_BASES]);
-#if defined(CONFIG_SMP) && defined(CONFIG_NO_HZ_COMMON)
+#ifdef CONFIG_NO_HZ_COMMON
+
+DEFINE_STATIC_KEY_FALSE(timers_nohz_active);
+static DEFINE_MUTEX(timer_keys_mutex);
+
+static void timer_update_keys(struct work_struct *work);
+static DECLARE_WORK(timer_update_work, timer_update_keys);
+
+#ifdef CONFIG_SMP
unsigned int sysctl_timer_migration = 1;
-void timers_update_migration(bool update_nohz)
+DEFINE_STATIC_KEY_FALSE(timers_migration_enabled);
+
+static void timers_update_migration(void)
{
bool on = sysctl_timer_migration && tick_nohz_active;
- unsigned int cpu;
- /* Avoid the loop, if nothing to update */
- if (this_cpu_read(timer_bases[BASE_STD].migration_enabled) == on)
- return;
+ if (on)
+ static_branch_enable(&timers_migration_enabled);
+ else
+ static_branch_disable(&timers_migration_enabled);
+}
+#else
+static inline void timers_update_migration(void) { }
+#endif /* !CONFIG_SMP */
- for_each_possible_cpu(cpu) {
- per_cpu(timer_bases[BASE_STD].migration_enabled, cpu) = on;
- per_cpu(timer_bases[BASE_DEF].migration_enabled, cpu) = on;
- per_cpu(hrtimer_bases.migration_enabled, cpu) = on;
- if (!update_nohz)
- continue;
- per_cpu(timer_bases[BASE_STD].nohz_active, cpu) = true;
- per_cpu(timer_bases[BASE_DEF].nohz_active, cpu) = true;
- per_cpu(hrtimer_bases.nohz_active, cpu) = true;
- }
+static void timer_update_keys(struct work_struct *work)
+{
+ mutex_lock(&timer_keys_mutex);
+ timers_update_migration();
+ static_branch_enable(&timers_nohz_active);
+ mutex_unlock(&timer_keys_mutex);
+}
+
+void timers_update_nohz(void)
+{
+ schedule_work(&timer_update_work);
}
int timer_migration_handler(struct ctl_table *table, int write,
void __user *buffer, size_t *lenp,
loff_t *ppos)
{
- static DEFINE_MUTEX(mutex);
int ret;
- mutex_lock(&mutex);
+ mutex_lock(&timer_keys_mutex);
ret = proc_dointvec_minmax(table, write, buffer, lenp, ppos);
if (!ret && write)
- timers_update_migration(false);
- mutex_unlock(&mutex);
+ timers_update_migration();
+ mutex_unlock(&timer_keys_mutex);
return ret;
}
-#endif
+#endif /* NO_HZ_COMMON */
static unsigned long round_jiffies_common(unsigned long j, int cpu,
bool force_up)
@@ -534,7 +546,7 @@ __internal_add_timer(struct timer_base *base, struct timer_list *timer)
static void
trigger_dyntick_cpu(struct timer_base *base, struct timer_list *timer)
{
- if (!IS_ENABLED(CONFIG_NO_HZ_COMMON) || !base->nohz_active)
+ if (!is_timers_nohz_active())
return;
/*
@@ -840,21 +852,20 @@ static inline struct timer_base *get_timer_base(u32 tflags)
return get_timer_cpu_base(tflags, tflags & TIMER_CPUMASK);
}
-#ifdef CONFIG_NO_HZ_COMMON
static inline struct timer_base *
get_target_base(struct timer_base *base, unsigned tflags)
{
-#ifdef CONFIG_SMP
- if ((tflags & TIMER_PINNED) || !base->migration_enabled)
- return get_timer_this_cpu_base(tflags);
- return get_timer_cpu_base(tflags, get_nohz_timer_target());
-#else
- return get_timer_this_cpu_base(tflags);
+#if defined(CONFIG_SMP) && defined(CONFIG_NO_HZ_COMMON)
+ if (static_branch_unlikely(&timers_migration_enabled) &&
+ !(tflags & TIMER_PINNED))
+ return get_timer_cpu_base(tflags, get_nohz_timer_target());
#endif
+ return get_timer_this_cpu_base(tflags);
}
static inline void forward_timer_base(struct timer_base *base)
{
+#ifdef CONFIG_NO_HZ_COMMON
unsigned long jnow;
/*
@@ -878,16 +889,8 @@ static inline void forward_timer_base(struct timer_base *base)
base->clk = jnow;
else
base->clk = base->next_expiry;
-}
-#else
-static inline struct timer_base *
-get_target_base(struct timer_base *base, unsigned tflags)
-{
- return get_timer_this_cpu_base(tflags);
-}
-
-static inline void forward_timer_base(struct timer_base *base) { }
#endif
+}
/*
--
2.17.1

View File

@@ -0,0 +1,42 @@
From 437a57e7664994a510190bfaff01026cd7e75422 Mon Sep 17 00:00:00 2001
From: Thomas Gleixner <tglx@linutronix.de>
Date: Wed, 20 Dec 2017 17:12:51 +0100
Subject: [PATCH 020/418] hrtimer: Correct blantanly wrong comment
The protection of a hrtimer which runs its callback against migration to a
different CPU has nothing to do with hard interrupt context.
The protection against migration of a hrtimer running the expiry callback
is the pointer in the cpu_base which holds a pointer to the currently
running timer. This pointer is evaluated in the code which potentially
switches the timer base and makes sure it's kept on the CPU on which the
callback is running.
Reported-by: Anna-Maria Gleixner <anna-maria@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Anna-Maria Gleixner <anna-maria@linutronix.de>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
kernel/time/hrtimer.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/kernel/time/hrtimer.c b/kernel/time/hrtimer.c
index 883fef2926e9..65543d31af32 100644
--- a/kernel/time/hrtimer.c
+++ b/kernel/time/hrtimer.c
@@ -1204,9 +1204,9 @@ static void __run_hrtimer(struct hrtimer_cpu_base *cpu_base,
timer->is_rel = false;
/*
- * Because we run timers from hardirq context, there is no chance
- * they get migrated to another cpu, therefore its safe to unlock
- * the timer base.
+ * The timer is marked as running in the cpu base, so it is
+ * protected against migration to a different CPU even if the lock
+ * is dropped.
*/
raw_spin_unlock(&cpu_base->lock);
trace_hrtimer_expire_entry(timer, now);
--
2.17.1

View File

@@ -0,0 +1,48 @@
From b9a845a61b4f2fd293791e8a6f3b3031ba03308d Mon Sep 17 00:00:00 2001
From: Anna-Maria Gleixner <anna-maria@linutronix.de>
Date: Wed, 20 Dec 2017 17:12:52 +0100
Subject: [PATCH 021/418] hrtimer: Fix kerneldoc for struct hrtimer_cpu_base
The sequence '/**' marks the start of a struct description. Add the
missing second asterisk. While at it adapt the ordering of the struct
members to the struct definition and document the purpose of
expires_next more precisely.
Signed-off-by: Anna-Maria Gleixner <anna-maria@linutronix.de>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
include/linux/hrtimer.h | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h
index 79b2a8d29d8c..b3a382be8db0 100644
--- a/include/linux/hrtimer.h
+++ b/include/linux/hrtimer.h
@@ -144,7 +144,7 @@ enum hrtimer_base_type {
HRTIMER_MAX_CLOCK_BASES,
};
-/*
+/**
* struct hrtimer_cpu_base - the per cpu clock bases
* @lock: lock protecting the base and associated clock bases
* and timers
@@ -153,12 +153,12 @@ enum hrtimer_base_type {
* @cpu: cpu number
* @active_bases: Bitfield to mark bases with active timers
* @clock_was_set_seq: Sequence counter of clock was set events
- * @expires_next: absolute time of the next event which was scheduled
- * via clock_set_next_event()
- * @next_timer: Pointer to the first expiring timer
* @in_hrtirq: hrtimer_interrupt() is currently executing
* @hres_active: State of high resolution mode
* @hang_detected: The last hrtimer interrupt detected a hang
+ * @expires_next: absolute time of the next event, is required for remote
+ * hrtimer enqueue
+ * @next_timer: Pointer to the first expiring timer
* @nr_events: Total number of hrtimer interrupt events
* @nr_retries: Total number of hrtimer interrupt retries
* @nr_hangs: Total number of hrtimer interrupt hangs
--
2.17.1

View File

@@ -0,0 +1,88 @@
From 3f2ef191049442d38c95443f4a85062a403cb21a Mon Sep 17 00:00:00 2001
From: Anna-Maria Gleixner <anna-maria@linutronix.de>
Date: Wed, 20 Dec 2017 17:12:53 +0100
Subject: [PATCH 022/418] hrtimer: Cleanup clock argument in
schedule_hrtimeout_range_clock()
schedule_hrtimeout_range_clock() uses an integer for the clock id
instead of the predefined type "clockid_t". The ID of the clock is
indicated in hrtimer code as clock_id. Therefore change the name of
the variable as well to make it consistent.
While at it, clean up the description for the function parameters clock_id
and mode. The clock modes and the clock ids are not restricted as the
comment suggests. Fix the mode description as well for the callers of
schedule_hrtimeout_range_clock().
No functional change.
Signed-off-by: Anna-Maria Gleixner <anna-maria@linutronix.de>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
include/linux/hrtimer.h | 2 +-
kernel/time/hrtimer.c | 12 ++++++------
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h
index b3a382be8db0..931ce9c89c93 100644
--- a/include/linux/hrtimer.h
+++ b/include/linux/hrtimer.h
@@ -462,7 +462,7 @@ extern int schedule_hrtimeout_range(ktime_t *expires, u64 delta,
extern int schedule_hrtimeout_range_clock(ktime_t *expires,
u64 delta,
const enum hrtimer_mode mode,
- int clock);
+ clockid_t clock_id);
extern int schedule_hrtimeout(ktime_t *expires, const enum hrtimer_mode mode);
/* Soft interrupt function to run the hrtimer queues: */
diff --git a/kernel/time/hrtimer.c b/kernel/time/hrtimer.c
index 65543d31af32..790841b59433 100644
--- a/kernel/time/hrtimer.c
+++ b/kernel/time/hrtimer.c
@@ -1672,12 +1672,12 @@ void __init hrtimers_init(void)
* schedule_hrtimeout_range_clock - sleep until timeout
* @expires: timeout value (ktime_t)
* @delta: slack in expires timeout (ktime_t)
- * @mode: timer mode, HRTIMER_MODE_ABS or HRTIMER_MODE_REL
- * @clock: timer clock, CLOCK_MONOTONIC or CLOCK_REALTIME
+ * @mode: timer mode
+ * @clock_id: timer clock to be used
*/
int __sched
schedule_hrtimeout_range_clock(ktime_t *expires, u64 delta,
- const enum hrtimer_mode mode, int clock)
+ const enum hrtimer_mode mode, clockid_t clock_id)
{
struct hrtimer_sleeper t;
@@ -1698,7 +1698,7 @@ schedule_hrtimeout_range_clock(ktime_t *expires, u64 delta,
return -EINTR;
}
- hrtimer_init_on_stack(&t.timer, clock, mode);
+ hrtimer_init_on_stack(&t.timer, clock_id, mode);
hrtimer_set_expires_range_ns(&t.timer, *expires, delta);
hrtimer_init_sleeper(&t, current);
@@ -1720,7 +1720,7 @@ schedule_hrtimeout_range_clock(ktime_t *expires, u64 delta,
* schedule_hrtimeout_range - sleep until timeout
* @expires: timeout value (ktime_t)
* @delta: slack in expires timeout (ktime_t)
- * @mode: timer mode, HRTIMER_MODE_ABS or HRTIMER_MODE_REL
+ * @mode: timer mode
*
* Make the current task sleep until the given expiry time has
* elapsed. The routine will return immediately unless
@@ -1759,7 +1759,7 @@ EXPORT_SYMBOL_GPL(schedule_hrtimeout_range);
/**
* schedule_hrtimeout - sleep until timeout
* @expires: timeout value (ktime_t)
- * @mode: timer mode, HRTIMER_MODE_ABS or HRTIMER_MODE_REL
+ * @mode: timer mode
*
* Make the current task sleep until the given expiry time has
* elapsed. The routine will return immediately unless
--
2.17.1

View File

@@ -0,0 +1,68 @@
From 7bceac6c2181a2ce1ba209d1fc6afb626dbab4c7 Mon Sep 17 00:00:00 2001
From: Anna-Maria Gleixner <anna-maria@linutronix.de>
Date: Wed, 20 Dec 2017 17:12:54 +0100
Subject: [PATCH 023/418] hrtimer: Fix hrtimer function description
The hrtimer_start[_range_ns]() starts a timer reliable on this CPU only
when HRTIMER_MODE_PINNED is set. Furthermore the HRTIMER_MODE_PINNED mode
is not considered, when a hrtimer is initialized.
Signed-off-by: Anna-Maria Gleixner <anna-maria@linutronix.de>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
include/linux/hrtimer.h | 6 +++---
kernel/time/hrtimer.c | 9 +++++----
2 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h
index 931ce9c89c93..4e6a8841dcbe 100644
--- a/include/linux/hrtimer.h
+++ b/include/linux/hrtimer.h
@@ -361,11 +361,11 @@ extern void hrtimer_start_range_ns(struct hrtimer *timer, ktime_t tim,
u64 range_ns, const enum hrtimer_mode mode);
/**
- * hrtimer_start - (re)start an hrtimer on the current CPU
+ * hrtimer_start - (re)start an hrtimer
* @timer: the timer to be added
* @tim: expiry time
- * @mode: expiry mode: absolute (HRTIMER_MODE_ABS) or
- * relative (HRTIMER_MODE_REL)
+ * @mode: timer mode: absolute (HRTIMER_MODE_ABS) or
+ * relative (HRTIMER_MODE_REL), and pinned (HRTIMER_MODE_PINNED)
*/
static inline void hrtimer_start(struct hrtimer *timer, ktime_t tim,
const enum hrtimer_mode mode)
diff --git a/kernel/time/hrtimer.c b/kernel/time/hrtimer.c
index 790841b59433..6460aa2d9b25 100644
--- a/kernel/time/hrtimer.c
+++ b/kernel/time/hrtimer.c
@@ -928,12 +928,12 @@ static inline ktime_t hrtimer_update_lowres(struct hrtimer *timer, ktime_t tim,
}
/**
- * hrtimer_start_range_ns - (re)start an hrtimer on the current CPU
+ * hrtimer_start_range_ns - (re)start an hrtimer
* @timer: the timer to be added
* @tim: expiry time
* @delta_ns: "slack" range for the timer
- * @mode: expiry mode: absolute (HRTIMER_MODE_ABS) or
- * relative (HRTIMER_MODE_REL)
+ * @mode: timer mode: absolute (HRTIMER_MODE_ABS) or
+ * relative (HRTIMER_MODE_REL), and pinned (HRTIMER_MODE_PINNED)
*/
void hrtimer_start_range_ns(struct hrtimer *timer, ktime_t tim,
u64 delta_ns, const enum hrtimer_mode mode)
@@ -1116,7 +1116,8 @@ static void __hrtimer_init(struct hrtimer *timer, clockid_t clock_id,
* hrtimer_init - initialize a timer to the given clock
* @timer: the timer to be initialized
* @clock_id: the clock to be used
- * @mode: timer mode abs/rel
+ * @mode: timer mode: absolute (HRTIMER_MODE_ABS) or
+ * relative (HRTIMER_MODE_REL); pinned is not considered here!
*/
void hrtimer_init(struct hrtimer *timer, clockid_t clock_id,
enum hrtimer_mode mode)
--
2.17.1

View File

@@ -0,0 +1,51 @@
From 79c700b613fe56d7318ab41bc9184cd8572006ec Mon Sep 17 00:00:00 2001
From: Anna-Maria Gleixner <anna-maria@linutronix.de>
Date: Wed, 20 Dec 2017 17:12:56 +0100
Subject: [PATCH 024/418] hrtimer: Cleanup hrtimer_mode enum
It's not obvious that the HRTIMER_MODE variants are bit combinations
because all modes are hard coded constants.
Change it so the bit meanings are clear and use the symbols for creating
modes which combine bits.
While at it get rid of the ugly tail comments.
Signed-off-by: Anna-Maria Gleixner <anna-maria@linutronix.de>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
include/linux/hrtimer.h | 16 +++++++++++-----
1 file changed, 11 insertions(+), 5 deletions(-)
diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h
index 4e6a8841dcbe..28f267cf2851 100644
--- a/include/linux/hrtimer.h
+++ b/include/linux/hrtimer.h
@@ -28,13 +28,19 @@ struct hrtimer_cpu_base;
/*
* Mode arguments of xxx_hrtimer functions:
+ *
+ * HRTIMER_MODE_ABS - Time value is absolute
+ * HRTIMER_MODE_REL - Time value is relative to now
+ * HRTIMER_MODE_PINNED - Timer is bound to CPU (is only considered
+ * when starting the timer)
*/
enum hrtimer_mode {
- HRTIMER_MODE_ABS = 0x0, /* Time value is absolute */
- HRTIMER_MODE_REL = 0x1, /* Time value is relative to now */
- HRTIMER_MODE_PINNED = 0x02, /* Timer is bound to CPU */
- HRTIMER_MODE_ABS_PINNED = 0x02,
- HRTIMER_MODE_REL_PINNED = 0x03,
+ HRTIMER_MODE_ABS = 0x00,
+ HRTIMER_MODE_REL = 0x01,
+ HRTIMER_MODE_PINNED = 0x02,
+
+ HRTIMER_MODE_ABS_PINNED = HRTIMER_MODE_ABS | HRTIMER_MODE_PINNED,
+ HRTIMER_MODE_REL_PINNED = HRTIMER_MODE_REL | HRTIMER_MODE_PINNED,
};
/*
--
2.17.1

View File

@@ -0,0 +1,121 @@
From 734fc4622933368429263530e951f67c458070eb Mon Sep 17 00:00:00 2001
From: Anna-Maria Gleixner <anna-maria@linutronix.de>
Date: Wed, 20 Dec 2017 17:12:58 +0100
Subject: [PATCH 025/418] tracing/hrtimer: Print hrtimer mode in hrtimer_start
tracepoint
The hrtimer_start tracepoint lacks the mode information. The mode is
important because consecutive starts can switch from ABS to REL or from
PINNED to non PINNED.
Add the mode information.
Signed-off-by: Anna-Maria Gleixner <anna-maria@linutronix.de>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
include/trace/events/timer.h | 13 ++++++++-----
kernel/time/hrtimer.c | 16 +++++++++-------
2 files changed, 17 insertions(+), 12 deletions(-)
diff --git a/include/trace/events/timer.h b/include/trace/events/timer.h
index c6f728037c53..744b4310b24b 100644
--- a/include/trace/events/timer.h
+++ b/include/trace/events/timer.h
@@ -186,15 +186,16 @@ TRACE_EVENT(hrtimer_init,
*/
TRACE_EVENT(hrtimer_start,
- TP_PROTO(struct hrtimer *hrtimer),
+ TP_PROTO(struct hrtimer *hrtimer, enum hrtimer_mode mode),
- TP_ARGS(hrtimer),
+ TP_ARGS(hrtimer, mode),
TP_STRUCT__entry(
__field( void *, hrtimer )
__field( void *, function )
__field( s64, expires )
__field( s64, softexpires )
+ __field( enum hrtimer_mode, mode )
),
TP_fast_assign(
@@ -202,12 +203,14 @@ TRACE_EVENT(hrtimer_start,
__entry->function = hrtimer->function;
__entry->expires = hrtimer_get_expires(hrtimer);
__entry->softexpires = hrtimer_get_softexpires(hrtimer);
+ __entry->mode = mode;
),
- TP_printk("hrtimer=%p function=%pf expires=%llu softexpires=%llu",
- __entry->hrtimer, __entry->function,
+ TP_printk("hrtimer=%p function=%pf expires=%llu softexpires=%llu "
+ "mode=%s", __entry->hrtimer, __entry->function,
(unsigned long long) __entry->expires,
- (unsigned long long) __entry->softexpires)
+ (unsigned long long) __entry->softexpires,
+ decode_hrtimer_mode(__entry->mode))
);
/**
diff --git a/kernel/time/hrtimer.c b/kernel/time/hrtimer.c
index 6460aa2d9b25..476fe683e8ed 100644
--- a/kernel/time/hrtimer.c
+++ b/kernel/time/hrtimer.c
@@ -435,10 +435,11 @@ debug_init(struct hrtimer *timer, clockid_t clockid,
trace_hrtimer_init(timer, clockid, mode);
}
-static inline void debug_activate(struct hrtimer *timer)
+static inline void debug_activate(struct hrtimer *timer,
+ enum hrtimer_mode mode)
{
debug_hrtimer_activate(timer);
- trace_hrtimer_start(timer);
+ trace_hrtimer_start(timer, mode);
}
static inline void debug_deactivate(struct hrtimer *timer)
@@ -832,9 +833,10 @@ EXPORT_SYMBOL_GPL(hrtimer_forward);
* Returns 1 when the new timer is the leftmost timer in the tree.
*/
static int enqueue_hrtimer(struct hrtimer *timer,
- struct hrtimer_clock_base *base)
+ struct hrtimer_clock_base *base,
+ enum hrtimer_mode mode)
{
- debug_activate(timer);
+ debug_activate(timer, mode);
base->cpu_base->active_bases |= 1 << base->index;
@@ -957,7 +959,7 @@ void hrtimer_start_range_ns(struct hrtimer *timer, ktime_t tim,
/* Switch the timer base, if necessary: */
new_base = switch_hrtimer_base(timer, base, mode & HRTIMER_MODE_PINNED);
- leftmost = enqueue_hrtimer(timer, new_base);
+ leftmost = enqueue_hrtimer(timer, new_base, mode);
if (!leftmost)
goto unlock;
@@ -1226,7 +1228,7 @@ static void __run_hrtimer(struct hrtimer_cpu_base *cpu_base,
*/
if (restart != HRTIMER_NORESTART &&
!(timer->state & HRTIMER_STATE_ENQUEUED))
- enqueue_hrtimer(timer, base);
+ enqueue_hrtimer(timer, base, HRTIMER_MODE_ABS);
/*
* Separate the ->running assignment from the ->state assignment.
@@ -1626,7 +1628,7 @@ static void migrate_hrtimer_list(struct hrtimer_clock_base *old_base,
* sort out already expired timers and reprogram the
* event device.
*/
- enqueue_hrtimer(timer, new_base);
+ enqueue_hrtimer(timer, new_base, HRTIMER_MODE_ABS);
}
}
--
2.17.1

View File

@@ -0,0 +1,90 @@
From 551c25858df0438915d8addafa70afbb12779d35 Mon Sep 17 00:00:00 2001
From: Anna-Maria Gleixner <anna-maria@linutronix.de>
Date: Wed, 20 Dec 2017 17:12:59 +0100
Subject: [PATCH 026/418] hrtimer: Switch for loop to _ffs() evaluation
Looping over all clock bases to find active bits is suboptimal if not all
bases are active.
Avoid this by converting it to a __ffs() evaluation. The functionallity is
outsourced into an own function and is called via a macro as suggested by
Peter Zijlstra.
Suggested-by: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Anna-Maria Gleixner <anna-maria@linutronix.de>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
kernel/time/hrtimer.c | 31 +++++++++++++++++++++----------
1 file changed, 21 insertions(+), 10 deletions(-)
diff --git a/kernel/time/hrtimer.c b/kernel/time/hrtimer.c
index 476fe683e8ed..85f9335d0d60 100644
--- a/kernel/time/hrtimer.c
+++ b/kernel/time/hrtimer.c
@@ -448,6 +448,23 @@ static inline void debug_deactivate(struct hrtimer *timer)
trace_hrtimer_cancel(timer);
}
+static struct hrtimer_clock_base *
+__next_base(struct hrtimer_cpu_base *cpu_base, unsigned int *active)
+{
+ unsigned int idx;
+
+ if (!*active)
+ return NULL;
+
+ idx = __ffs(*active);
+ *active &= ~(1U << idx);
+
+ return &cpu_base->clock_base[idx];
+}
+
+#define for_each_active_base(base, cpu_base, active) \
+ while ((base = __next_base((cpu_base), &(active))))
+
#if defined(CONFIG_NO_HZ_COMMON) || defined(CONFIG_HIGH_RES_TIMERS)
static inline void hrtimer_update_next_timer(struct hrtimer_cpu_base *cpu_base,
struct hrtimer *timer)
@@ -459,18 +476,15 @@ static inline void hrtimer_update_next_timer(struct hrtimer_cpu_base *cpu_base,
static ktime_t __hrtimer_get_next_event(struct hrtimer_cpu_base *cpu_base)
{
- struct hrtimer_clock_base *base = cpu_base->clock_base;
+ struct hrtimer_clock_base *base;
unsigned int active = cpu_base->active_bases;
ktime_t expires, expires_next = KTIME_MAX;
hrtimer_update_next_timer(cpu_base, NULL);
- for (; active; base++, active >>= 1) {
+ for_each_active_base(base, cpu_base, active) {
struct timerqueue_node *next;
struct hrtimer *timer;
- if (!(active & 0x01))
- continue;
-
next = timerqueue_getnext(&base->active);
timer = container_of(next, struct hrtimer, node);
expires = ktime_sub(hrtimer_get_expires(timer), base->offset);
@@ -1245,16 +1259,13 @@ static void __run_hrtimer(struct hrtimer_cpu_base *cpu_base,
static void __hrtimer_run_queues(struct hrtimer_cpu_base *cpu_base, ktime_t now)
{
- struct hrtimer_clock_base *base = cpu_base->clock_base;
+ struct hrtimer_clock_base *base;
unsigned int active = cpu_base->active_bases;
- for (; active; base++, active >>= 1) {
+ for_each_active_base(base, cpu_base, active) {
struct timerqueue_node *node;
ktime_t basenow;
- if (!(active & 0x01))
- continue;
-
basenow = ktime_add(now, base->offset);
while ((node = timerqueue_getnext(&base->active))) {
--
2.17.1

View File

@@ -0,0 +1,199 @@
From 1ca83795806184362986a22e2a4dd0d5ac30eddd Mon Sep 17 00:00:00 2001
From: Anna-Maria Gleixner <anna-maria@linutronix.de>
Date: Wed, 20 Dec 2017 17:13:00 +0100
Subject: [PATCH 027/418] hrtimer: Store running timer in hrtimer_clock_base
The pointer to the currently running timer is stored in hrtimer_cpu_base
before the base lock is dropped and the callback is invoked.
This results in two levels of indirections and the upcoming support for
softirq based hrtimer requires splitting the "running" storage into soft
and hard irq context expiry.
Storing both in the cpu base would require conditionals in all code paths
accessing that information.
It's possible to have a per clock base sequence count and running pointer
without changing the semantics of the related mechanisms because the timer
base pointer cannot be changed while a timer is running the callback.
Unfortunately this makes cpu_clock base larger than 32 bytes on 32bit
kernels. Instead of having huge gaps due to alignment, remove the alignment
and let the compiler pack cpu base for 32bit. The resulting cache access
patterns are fortunately not really different from the current
behaviour. On 64bit kernels the 64byte alignment stays and the behaviour is
unchanged. This was determined by analyzing the resulting layout and
looking at the number of cache lines involved for the frequently used
clocks.
Signed-off-by: Anna-Maria Gleixner <anna-maria@linutronix.de>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
include/linux/hrtimer.h | 20 +++++++++-----------
kernel/time/hrtimer.c | 28 +++++++++++++---------------
2 files changed, 22 insertions(+), 26 deletions(-)
diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h
index 28f267cf2851..1bae7b9f071d 100644
--- a/include/linux/hrtimer.h
+++ b/include/linux/hrtimer.h
@@ -118,9 +118,9 @@ struct hrtimer_sleeper {
};
#ifdef CONFIG_64BIT
-# define HRTIMER_CLOCK_BASE_ALIGN 64
+# define __hrtimer_clock_base_align ____cacheline_aligned
#else
-# define HRTIMER_CLOCK_BASE_ALIGN 32
+# define __hrtimer_clock_base_align
#endif
/**
@@ -129,18 +129,22 @@ struct hrtimer_sleeper {
* @index: clock type index for per_cpu support when moving a
* timer to a base on another cpu.
* @clockid: clock id for per_cpu support
+ * @seq: seqcount around __run_hrtimer
+ * @running: pointer to the currently running hrtimer
* @active: red black tree root node for the active timers
* @get_time: function to retrieve the current time of the clock
* @offset: offset of this clock to the monotonic base
*/
struct hrtimer_clock_base {
struct hrtimer_cpu_base *cpu_base;
- int index;
+ unsigned int index;
clockid_t clockid;
+ seqcount_t seq;
+ struct hrtimer *running;
struct timerqueue_head active;
ktime_t (*get_time)(void);
ktime_t offset;
-} __attribute__((__aligned__(HRTIMER_CLOCK_BASE_ALIGN)));
+} __hrtimer_clock_base_align;
enum hrtimer_base_type {
HRTIMER_BASE_MONOTONIC,
@@ -154,8 +158,6 @@ enum hrtimer_base_type {
* struct hrtimer_cpu_base - the per cpu clock bases
* @lock: lock protecting the base and associated clock bases
* and timers
- * @seq: seqcount around __run_hrtimer
- * @running: pointer to the currently running hrtimer
* @cpu: cpu number
* @active_bases: Bitfield to mark bases with active timers
* @clock_was_set_seq: Sequence counter of clock was set events
@@ -177,8 +179,6 @@ enum hrtimer_base_type {
*/
struct hrtimer_cpu_base {
raw_spinlock_t lock;
- seqcount_t seq;
- struct hrtimer *running;
unsigned int cpu;
unsigned int active_bases;
unsigned int clock_was_set_seq;
@@ -198,8 +198,6 @@ struct hrtimer_cpu_base {
static inline void hrtimer_set_expires(struct hrtimer *timer, ktime_t time)
{
- BUILD_BUG_ON(sizeof(struct hrtimer_clock_base) > HRTIMER_CLOCK_BASE_ALIGN);
-
timer->node.expires = time;
timer->_softexpires = time;
}
@@ -424,7 +422,7 @@ static inline int hrtimer_is_queued(struct hrtimer *timer)
*/
static inline int hrtimer_callback_running(struct hrtimer *timer)
{
- return timer->base->cpu_base->running == timer;
+ return timer->base->running == timer;
}
/* Forward a hrtimer so it expires after now: */
diff --git a/kernel/time/hrtimer.c b/kernel/time/hrtimer.c
index 85f9335d0d60..bedfc2865901 100644
--- a/kernel/time/hrtimer.c
+++ b/kernel/time/hrtimer.c
@@ -70,7 +70,6 @@
DEFINE_PER_CPU(struct hrtimer_cpu_base, hrtimer_bases) =
{
.lock = __RAW_SPIN_LOCK_UNLOCKED(hrtimer_bases.lock),
- .seq = SEQCNT_ZERO(hrtimer_bases.seq),
.clock_base =
{
{
@@ -118,7 +117,6 @@ static const int hrtimer_clock_to_base_table[MAX_CLOCKS] = {
* timer->base->cpu_base
*/
static struct hrtimer_cpu_base migration_cpu_base = {
- .seq = SEQCNT_ZERO(migration_cpu_base),
.clock_base = { { .cpu_base = &migration_cpu_base, }, },
};
@@ -1152,19 +1150,19 @@ EXPORT_SYMBOL_GPL(hrtimer_init);
*/
bool hrtimer_active(const struct hrtimer *timer)
{
- struct hrtimer_cpu_base *cpu_base;
+ struct hrtimer_clock_base *base;
unsigned int seq;
do {
- cpu_base = READ_ONCE(timer->base->cpu_base);
- seq = raw_read_seqcount_begin(&cpu_base->seq);
+ base = READ_ONCE(timer->base);
+ seq = raw_read_seqcount_begin(&base->seq);
if (timer->state != HRTIMER_STATE_INACTIVE ||
- cpu_base->running == timer)
+ base->running == timer)
return true;
- } while (read_seqcount_retry(&cpu_base->seq, seq) ||
- cpu_base != READ_ONCE(timer->base->cpu_base));
+ } while (read_seqcount_retry(&base->seq, seq) ||
+ base != READ_ONCE(timer->base));
return false;
}
@@ -1198,16 +1196,16 @@ static void __run_hrtimer(struct hrtimer_cpu_base *cpu_base,
lockdep_assert_held(&cpu_base->lock);
debug_deactivate(timer);
- cpu_base->running = timer;
+ base->running = timer;
/*
* Separate the ->running assignment from the ->state assignment.
*
* As with a regular write barrier, this ensures the read side in
- * hrtimer_active() cannot observe cpu_base->running == NULL &&
+ * hrtimer_active() cannot observe base->running == NULL &&
* timer->state == INACTIVE.
*/
- raw_write_seqcount_barrier(&cpu_base->seq);
+ raw_write_seqcount_barrier(&base->seq);
__remove_hrtimer(timer, base, HRTIMER_STATE_INACTIVE, 0);
fn = timer->function;
@@ -1248,13 +1246,13 @@ static void __run_hrtimer(struct hrtimer_cpu_base *cpu_base,
* Separate the ->running assignment from the ->state assignment.
*
* As with a regular write barrier, this ensures the read side in
- * hrtimer_active() cannot observe cpu_base->running == NULL &&
+ * hrtimer_active() cannot observe base->running.timer == NULL &&
* timer->state == INACTIVE.
*/
- raw_write_seqcount_barrier(&cpu_base->seq);
+ raw_write_seqcount_barrier(&base->seq);
- WARN_ON_ONCE(cpu_base->running != timer);
- cpu_base->running = NULL;
+ WARN_ON_ONCE(base->running != timer);
+ base->running = NULL;
}
static void __hrtimer_run_queues(struct hrtimer_cpu_base *cpu_base, ktime_t now)
--
2.17.1

View File

@@ -0,0 +1,39 @@
From bbc2c2e88a6682df03351e2a3c19593de4c08d3e Mon Sep 17 00:00:00 2001
From: Anna-Maria Gleixner <anna-maria@linutronix.de>
Date: Wed, 20 Dec 2017 17:13:01 +0100
Subject: [PATCH 028/418] hrtimer: Make room in struct hrtimer_cpu_base
The upcoming softirq based hrtimers support requires an additional field in
the hrtimer_cpu_base struct, which would grow the struct size beyond a
cache line.
The struct members nr_retries and nr_hangs of hrtimer_cpu_base are solely
used for diagnostic output and have no requirement to be unsigned int.
Make them unsigned short to create room for the new struct member. No
functional change.
Signed-off-by: Anna-Maria Gleixner <anna-maria@linutronix.de>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
include/linux/hrtimer.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h
index 1bae7b9f071d..56e56bcb6f0f 100644
--- a/include/linux/hrtimer.h
+++ b/include/linux/hrtimer.h
@@ -189,8 +189,8 @@ struct hrtimer_cpu_base {
ktime_t expires_next;
struct hrtimer *next_timer;
unsigned int nr_events;
- unsigned int nr_retries;
- unsigned int nr_hangs;
+ unsigned short nr_retries;
+ unsigned short nr_hangs;
unsigned int max_hang_time;
#endif
struct hrtimer_clock_base clock_base[HRTIMER_MAX_CLOCK_BASES];
--
2.17.1

View File

@@ -0,0 +1,157 @@
From 036160e2bf23c43f7a7eb4482cd372c2c5983389 Mon Sep 17 00:00:00 2001
From: Anna-Maria Gleixner <anna-maria@linutronix.de>
Date: Wed, 20 Dec 2017 17:13:02 +0100
Subject: [PATCH 029/418] hrtimer: Reduce conditional code (hres_active)
The hrtimer_cpu_base struct has the CONFIG_HIGH_RES_TIMERS conditional
struct member hres_active. All related functions to this member are
conditional as well.
There is no functional change, when the hres_active member is
unconditional with all related functions and is set to zero during
initialization.
The conditional code sections can be avoided by adding IS_ENABLED(HIGHRES)
conditionals into common functions, which ensures dead code elimination.
Suggested-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Anna-Maria Gleixner <anna-maria@linutronix.de>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
include/linux/hrtimer.h | 20 ++++++++------------
kernel/time/hrtimer.c | 31 +++++++++++++++----------------
2 files changed, 23 insertions(+), 28 deletions(-)
diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h
index 56e56bcb6f0f..22627b3a33fe 100644
--- a/include/linux/hrtimer.h
+++ b/include/linux/hrtimer.h
@@ -161,8 +161,8 @@ enum hrtimer_base_type {
* @cpu: cpu number
* @active_bases: Bitfield to mark bases with active timers
* @clock_was_set_seq: Sequence counter of clock was set events
- * @in_hrtirq: hrtimer_interrupt() is currently executing
* @hres_active: State of high resolution mode
+ * @in_hrtirq: hrtimer_interrupt() is currently executing
* @hang_detected: The last hrtimer interrupt detected a hang
* @expires_next: absolute time of the next event, is required for remote
* hrtimer enqueue
@@ -182,9 +182,9 @@ struct hrtimer_cpu_base {
unsigned int cpu;
unsigned int active_bases;
unsigned int clock_was_set_seq;
+ unsigned int hres_active : 1;
#ifdef CONFIG_HIGH_RES_TIMERS
unsigned int in_hrtirq : 1,
- hres_active : 1,
hang_detected : 1;
ktime_t expires_next;
struct hrtimer *next_timer;
@@ -266,16 +266,17 @@ static inline ktime_t hrtimer_cb_get_time(struct hrtimer *timer)
return timer->base->get_time();
}
+static inline int hrtimer_is_hres_active(struct hrtimer *timer)
+{
+ return IS_ENABLED(CONFIG_HIGH_RES_TIMERS) ?
+ timer->base->cpu_base->hres_active : 0;
+}
+
#ifdef CONFIG_HIGH_RES_TIMERS
struct clock_event_device;
extern void hrtimer_interrupt(struct clock_event_device *dev);
-static inline int hrtimer_is_hres_active(struct hrtimer *timer)
-{
- return timer->base->cpu_base->hres_active;
-}
-
/*
* The resolution of the clocks. The resolution value is returned in
* the clock_getres() system call to give application programmers an
@@ -298,11 +299,6 @@ extern unsigned int hrtimer_resolution;
#define hrtimer_resolution (unsigned int)LOW_RES_NSEC
-static inline int hrtimer_is_hres_active(struct hrtimer *timer)
-{
- return 0;
-}
-
static inline void clock_was_set_delayed(void) { }
#endif
diff --git a/kernel/time/hrtimer.c b/kernel/time/hrtimer.c
index bedfc2865901..7e0490143275 100644
--- a/kernel/time/hrtimer.c
+++ b/kernel/time/hrtimer.c
@@ -512,6 +512,20 @@ static inline ktime_t hrtimer_update_base(struct hrtimer_cpu_base *base)
offs_real, offs_boot, offs_tai);
}
+/*
+ * Is the high resolution mode active ?
+ */
+static inline int __hrtimer_hres_active(struct hrtimer_cpu_base *cpu_base)
+{
+ return IS_ENABLED(CONFIG_HIGH_RES_TIMERS) ?
+ cpu_base->hres_active : 0;
+}
+
+static inline int hrtimer_hres_active(void)
+{
+ return __hrtimer_hres_active(this_cpu_ptr(&hrtimer_bases));
+}
+
/* High resolution timer related functions */
#ifdef CONFIG_HIGH_RES_TIMERS
@@ -540,19 +554,6 @@ static inline int hrtimer_is_hres_enabled(void)
return hrtimer_hres_enabled;
}
-/*
- * Is the high resolution mode active ?
- */
-static inline int __hrtimer_hres_active(struct hrtimer_cpu_base *cpu_base)
-{
- return cpu_base->hres_active;
-}
-
-static inline int hrtimer_hres_active(void)
-{
- return __hrtimer_hres_active(this_cpu_ptr(&hrtimer_bases));
-}
-
/*
* Reprogram the event source with checking both queues for the
* next event
@@ -662,7 +663,6 @@ static inline void hrtimer_init_hres(struct hrtimer_cpu_base *base)
{
base->expires_next = KTIME_MAX;
base->hang_detected = 0;
- base->hres_active = 0;
base->next_timer = NULL;
}
@@ -722,8 +722,6 @@ void clock_was_set_delayed(void)
#else
-static inline int __hrtimer_hres_active(struct hrtimer_cpu_base *b) { return 0; }
-static inline int hrtimer_hres_active(void) { return 0; }
static inline int hrtimer_is_hres_enabled(void) { return 0; }
static inline void hrtimer_switch_to_hres(void) { }
static inline void
@@ -1605,6 +1603,7 @@ int hrtimers_prepare_cpu(unsigned int cpu)
cpu_base->active_bases = 0;
cpu_base->cpu = cpu;
+ cpu_base->hres_active = 0;
hrtimer_init_hres(cpu_base);
return 0;
}
--
2.17.1

View File

@@ -0,0 +1,42 @@
From 5f845b534ffc9f5a653f45bddf0dc4e99dd6a510 Mon Sep 17 00:00:00 2001
From: Anna-Maria Gleixner <anna-maria@linutronix.de>
Date: Wed, 20 Dec 2017 17:13:03 +0100
Subject: [PATCH 030/418] hrtimer: Use accesor functions instead of direct
access
__hrtimer_hres_active() is now available unconditionally. Replace the
direct access to hrtimer_cpu_base.hres_active.
No functional change.
Signed-off-by: Anna-Maria Gleixner <anna-maria@linutronix.de>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
kernel/time/hrtimer.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/time/hrtimer.c b/kernel/time/hrtimer.c
index 7e0490143275..85882d5da523 100644
--- a/kernel/time/hrtimer.c
+++ b/kernel/time/hrtimer.c
@@ -564,7 +564,7 @@ hrtimer_force_reprogram(struct hrtimer_cpu_base *cpu_base, int skip_equal)
{
ktime_t expires_next;
- if (!cpu_base->hres_active)
+ if (!__hrtimer_hres_active(cpu_base))
return;
expires_next = __hrtimer_get_next_event(cpu_base);
@@ -675,7 +675,7 @@ static void retrigger_next_event(void *arg)
{
struct hrtimer_cpu_base *base = this_cpu_ptr(&hrtimer_bases);
- if (!base->hres_active)
+ if (!__hrtimer_hres_active(base))
return;
raw_spin_lock(&base->lock);
--
2.17.1

View File

@@ -0,0 +1,144 @@
From 454c4ff0fb355b4dafad0f616d12cbdf1a6521db Mon Sep 17 00:00:00 2001
From: Anna-Maria Gleixner <anna-maria@linutronix.de>
Date: Wed, 20 Dec 2017 17:13:04 +0100
Subject: [PATCH 031/418] hrtimer: Make the remote enqueue check unconditional
hrtimer_cpu_base.expires_next is used to cache the next event armed in the
timer hardware. The value is used to check whether an hrtimer can be
enqueued remotely. If the new hrtimer is expiring before expires_next, then
remote enqueue is not possible as the remote hrtimer hardware cannot be
accessed for reprogramming to an earlier expiry time.
The remote enqueue check is currently conditional on
CONFIG_HIGH_RES_TIMERS=y and hrtimer_cpu_base.hres_active. There is no
compelling reason to make this conditional.
Move hrtimer_cpu_base.expires_next out of the CONFIG_HIGH_RES_TIMERS=y
guarded area and remove the conditionals in hrtimer_check_target().
The check is currently a NOOP for the CONFIG_HIGH_RES_TIMERS=n and the
!hrtimer_cpu_base.hres_active case because in these cases nothing updates
hrtimer_cpu_base.expires_next yet. This will be changed with later patches
which further reduce the #ifdef zoo in this code.
Signed-off-by: Anna-Maria Gleixner <anna-maria@linutronix.de>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
include/linux/hrtimer.h | 6 +++---
kernel/time/hrtimer.c | 32 +++++++++-----------------------
2 files changed, 12 insertions(+), 26 deletions(-)
diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h
index 22627b3a33fe..bb7270e8bc37 100644
--- a/include/linux/hrtimer.h
+++ b/include/linux/hrtimer.h
@@ -164,13 +164,13 @@ enum hrtimer_base_type {
* @hres_active: State of high resolution mode
* @in_hrtirq: hrtimer_interrupt() is currently executing
* @hang_detected: The last hrtimer interrupt detected a hang
- * @expires_next: absolute time of the next event, is required for remote
- * hrtimer enqueue
* @next_timer: Pointer to the first expiring timer
* @nr_events: Total number of hrtimer interrupt events
* @nr_retries: Total number of hrtimer interrupt retries
* @nr_hangs: Total number of hrtimer interrupt hangs
* @max_hang_time: Maximum time spent in hrtimer_interrupt
+ * @expires_next: absolute time of the next event, is required for remote
+ * hrtimer enqueue
* @clock_base: array of clock bases for this cpu
*
* Note: next_timer is just an optimization for __remove_hrtimer().
@@ -186,13 +186,13 @@ struct hrtimer_cpu_base {
#ifdef CONFIG_HIGH_RES_TIMERS
unsigned int in_hrtirq : 1,
hang_detected : 1;
- ktime_t expires_next;
struct hrtimer *next_timer;
unsigned int nr_events;
unsigned short nr_retries;
unsigned short nr_hangs;
unsigned int max_hang_time;
#endif
+ ktime_t expires_next;
struct hrtimer_clock_base clock_base[HRTIMER_MAX_CLOCK_BASES];
} ____cacheline_aligned;
diff --git a/kernel/time/hrtimer.c b/kernel/time/hrtimer.c
index 85882d5da523..b1016aabc73a 100644
--- a/kernel/time/hrtimer.c
+++ b/kernel/time/hrtimer.c
@@ -154,26 +154,21 @@ struct hrtimer_clock_base *lock_hrtimer_base(const struct hrtimer *timer,
}
/*
- * With HIGHRES=y we do not migrate the timer when it is expiring
- * before the next event on the target cpu because we cannot reprogram
- * the target cpu hardware and we would cause it to fire late.
+ * We do not migrate the timer when it is expiring before the next
+ * event on the target cpu. When high resolution is enabled, we cannot
+ * reprogram the target cpu hardware and we would cause it to fire
+ * late. To keep it simple, we handle the high resolution enabled and
+ * disabled case similar.
*
* Called with cpu_base->lock of target cpu held.
*/
static int
hrtimer_check_target(struct hrtimer *timer, struct hrtimer_clock_base *new_base)
{
-#ifdef CONFIG_HIGH_RES_TIMERS
ktime_t expires;
- if (!new_base->cpu_base->hres_active)
- return 0;
-
expires = ktime_sub(hrtimer_get_expires(timer), new_base->offset);
return expires <= new_base->cpu_base->expires_next;
-#else
- return 0;
-#endif
}
static inline
@@ -656,16 +651,6 @@ static void hrtimer_reprogram(struct hrtimer *timer,
tick_program_event(expires, 1);
}
-/*
- * Initialize the high resolution related parts of cpu_base
- */
-static inline void hrtimer_init_hres(struct hrtimer_cpu_base *base)
-{
- base->expires_next = KTIME_MAX;
- base->hang_detected = 0;
- base->next_timer = NULL;
-}
-
/*
* Retrigger next event is called after clock was set
*
@@ -731,7 +716,6 @@ static inline int hrtimer_reprogram(struct hrtimer *timer,
{
return 0;
}
-static inline void hrtimer_init_hres(struct hrtimer_cpu_base *base) { }
static inline void retrigger_next_event(void *arg) { }
#endif /* CONFIG_HIGH_RES_TIMERS */
@@ -1601,10 +1585,12 @@ int hrtimers_prepare_cpu(unsigned int cpu)
timerqueue_init_head(&cpu_base->clock_base[i].active);
}
- cpu_base->active_bases = 0;
cpu_base->cpu = cpu;
+ cpu_base->active_bases = 0;
cpu_base->hres_active = 0;
- hrtimer_init_hres(cpu_base);
+ cpu_base->hang_detected = 0;
+ cpu_base->next_timer = NULL;
+ cpu_base->expires_next = KTIME_MAX;
return 0;
}
--
2.17.1

View File

@@ -0,0 +1,105 @@
From 0f5e672a02807d10c8772c839d358cb498ec6d9f Mon Sep 17 00:00:00 2001
From: Anna-Maria Gleixner <anna-maria@linutronix.de>
Date: Wed, 20 Dec 2017 17:13:05 +0100
Subject: [PATCH 032/418] hrtimer: Make hrtimer_cpu_base.next_timer handling
unconditional
hrtimer_cpu_base.next_timer stores the pointer to the next expiring timer
in a cpu base.
This pointer cannot be dereferenced and is solely used to check whether a
hrtimer which is removed is the hrtimer which is the first to expire in the
CPU base. If this is the case, then the timer hardware needs to be
reprogrammed to avoid an extra interrupt for nothing.
Again, this is conditional functionality, but there is no compelling reason
to make this conditional. As a preparation, hrtimer_cpu_base.next_timer
needs to be available unconditonal. Aside of that the upcoming support for
softirq based hrtimers requires access to this pointer unconditionally.
Make the update of hrtimer_cpu_base.next_timer unconditional and remove the
ifdef cruft. The impact on CONFIG_HIGH_RES_TIMERS=n && CONFIG_NOHZ=n is
marginal as it's just a store on an already dirtied cacheline.
No functional change.
Signed-off-by: Anna-Maria Gleixner <anna-maria@linutronix.de>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
include/linux/hrtimer.h | 4 ++--
kernel/time/hrtimer.c | 12 ++----------
2 files changed, 4 insertions(+), 12 deletions(-)
diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h
index bb7270e8bc37..2d3e1d678a4d 100644
--- a/include/linux/hrtimer.h
+++ b/include/linux/hrtimer.h
@@ -164,13 +164,13 @@ enum hrtimer_base_type {
* @hres_active: State of high resolution mode
* @in_hrtirq: hrtimer_interrupt() is currently executing
* @hang_detected: The last hrtimer interrupt detected a hang
- * @next_timer: Pointer to the first expiring timer
* @nr_events: Total number of hrtimer interrupt events
* @nr_retries: Total number of hrtimer interrupt retries
* @nr_hangs: Total number of hrtimer interrupt hangs
* @max_hang_time: Maximum time spent in hrtimer_interrupt
* @expires_next: absolute time of the next event, is required for remote
* hrtimer enqueue
+ * @next_timer: Pointer to the first expiring timer
* @clock_base: array of clock bases for this cpu
*
* Note: next_timer is just an optimization for __remove_hrtimer().
@@ -186,13 +186,13 @@ struct hrtimer_cpu_base {
#ifdef CONFIG_HIGH_RES_TIMERS
unsigned int in_hrtirq : 1,
hang_detected : 1;
- struct hrtimer *next_timer;
unsigned int nr_events;
unsigned short nr_retries;
unsigned short nr_hangs;
unsigned int max_hang_time;
#endif
ktime_t expires_next;
+ struct hrtimer *next_timer;
struct hrtimer_clock_base clock_base[HRTIMER_MAX_CLOCK_BASES];
} ____cacheline_aligned;
diff --git a/kernel/time/hrtimer.c b/kernel/time/hrtimer.c
index b1016aabc73a..e01c2e78c032 100644
--- a/kernel/time/hrtimer.c
+++ b/kernel/time/hrtimer.c
@@ -459,21 +459,13 @@ __next_base(struct hrtimer_cpu_base *cpu_base, unsigned int *active)
while ((base = __next_base((cpu_base), &(active))))
#if defined(CONFIG_NO_HZ_COMMON) || defined(CONFIG_HIGH_RES_TIMERS)
-static inline void hrtimer_update_next_timer(struct hrtimer_cpu_base *cpu_base,
- struct hrtimer *timer)
-{
-#ifdef CONFIG_HIGH_RES_TIMERS
- cpu_base->next_timer = timer;
-#endif
-}
-
static ktime_t __hrtimer_get_next_event(struct hrtimer_cpu_base *cpu_base)
{
struct hrtimer_clock_base *base;
unsigned int active = cpu_base->active_bases;
ktime_t expires, expires_next = KTIME_MAX;
- hrtimer_update_next_timer(cpu_base, NULL);
+ cpu_base->next_timer = NULL;
for_each_active_base(base, cpu_base, active) {
struct timerqueue_node *next;
struct hrtimer *timer;
@@ -483,7 +475,7 @@ static ktime_t __hrtimer_get_next_event(struct hrtimer_cpu_base *cpu_base)
expires = ktime_sub(hrtimer_get_expires(timer), base->offset);
if (expires < expires_next) {
expires_next = expires;
- hrtimer_update_next_timer(cpu_base, timer);
+ cpu_base->next_timer = timer;
}
}
/*
--
2.17.1

View File

@@ -0,0 +1,193 @@
From 528276dfeb134c7e8f46afdced23ebb1c7da0c8b Mon Sep 17 00:00:00 2001
From: Anna-Maria Gleixner <anna-maria@linutronix.de>
Date: Wed, 20 Dec 2017 17:13:06 +0100
Subject: [PATCH 033/418] hrtimer: Make hrtimer_reprogramm() unconditional
hrtimer_reprogram() needs to be available unconditionally for softirq based
hrtimers. Move the function and all required struct members out of the
CONFIG_HIGH_RES_TIMERS #ifdef.
There is no functional change because hrtimer_reprogram() is only invoked
when hrtimer_cpu_base.hres_active is true. Making it unconditional
increases the text size for the CONFIG_HIGH_RES_TIMERS=n case, but avoids
replication of that code for the upcoming softirq based hrtimers support.
Signed-off-by: Anna-Maria Gleixner <anna-maria@linutronix.de>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
include/linux/hrtimer.h | 6 +-
kernel/time/hrtimer.c | 129 +++++++++++++++++++---------------------
2 files changed, 65 insertions(+), 70 deletions(-)
diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h
index 2d3e1d678a4d..98ed35767ac5 100644
--- a/include/linux/hrtimer.h
+++ b/include/linux/hrtimer.h
@@ -182,10 +182,10 @@ struct hrtimer_cpu_base {
unsigned int cpu;
unsigned int active_bases;
unsigned int clock_was_set_seq;
- unsigned int hres_active : 1;
-#ifdef CONFIG_HIGH_RES_TIMERS
- unsigned int in_hrtirq : 1,
+ unsigned int hres_active : 1,
+ in_hrtirq : 1,
hang_detected : 1;
+#ifdef CONFIG_HIGH_RES_TIMERS
unsigned int nr_events;
unsigned short nr_retries;
unsigned short nr_hangs;
diff --git a/kernel/time/hrtimer.c b/kernel/time/hrtimer.c
index e01c2e78c032..37085a13f19a 100644
--- a/kernel/time/hrtimer.c
+++ b/kernel/time/hrtimer.c
@@ -581,68 +581,6 @@ hrtimer_force_reprogram(struct hrtimer_cpu_base *cpu_base, int skip_equal)
tick_program_event(cpu_base->expires_next, 1);
}
-/*
- * When a timer is enqueued and expires earlier than the already enqueued
- * timers, we have to check, whether it expires earlier than the timer for
- * which the clock event device was armed.
- *
- * Called with interrupts disabled and base->cpu_base.lock held
- */
-static void hrtimer_reprogram(struct hrtimer *timer,
- struct hrtimer_clock_base *base)
-{
- struct hrtimer_cpu_base *cpu_base = this_cpu_ptr(&hrtimer_bases);
- ktime_t expires = ktime_sub(hrtimer_get_expires(timer), base->offset);
-
- WARN_ON_ONCE(hrtimer_get_expires_tv64(timer) < 0);
-
- /*
- * If the timer is not on the current cpu, we cannot reprogram
- * the other cpus clock event device.
- */
- if (base->cpu_base != cpu_base)
- return;
-
- /*
- * If the hrtimer interrupt is running, then it will
- * reevaluate the clock bases and reprogram the clock event
- * device. The callbacks are always executed in hard interrupt
- * context so we don't need an extra check for a running
- * callback.
- */
- if (cpu_base->in_hrtirq)
- return;
-
- /*
- * CLOCK_REALTIME timer might be requested with an absolute
- * expiry time which is less than base->offset. Set it to 0.
- */
- if (expires < 0)
- expires = 0;
-
- if (expires >= cpu_base->expires_next)
- return;
-
- /* Update the pointer to the next expiring timer */
- cpu_base->next_timer = timer;
-
- /*
- * If a hang was detected in the last timer interrupt then we
- * do not schedule a timer which is earlier than the expiry
- * which we enforced in the hang detection. We want the system
- * to make progress.
- */
- if (cpu_base->hang_detected)
- return;
-
- /*
- * Program the timer hardware. We enforce the expiry for
- * events which are already in the past.
- */
- cpu_base->expires_next = expires;
- tick_program_event(expires, 1);
-}
-
/*
* Retrigger next event is called after clock was set
*
@@ -703,15 +641,72 @@ static inline int hrtimer_is_hres_enabled(void) { return 0; }
static inline void hrtimer_switch_to_hres(void) { }
static inline void
hrtimer_force_reprogram(struct hrtimer_cpu_base *base, int skip_equal) { }
-static inline int hrtimer_reprogram(struct hrtimer *timer,
- struct hrtimer_clock_base *base)
-{
- return 0;
-}
static inline void retrigger_next_event(void *arg) { }
#endif /* CONFIG_HIGH_RES_TIMERS */
+/*
+ * When a timer is enqueued and expires earlier than the already enqueued
+ * timers, we have to check, whether it expires earlier than the timer for
+ * which the clock event device was armed.
+ *
+ * Called with interrupts disabled and base->cpu_base.lock held
+ */
+static void hrtimer_reprogram(struct hrtimer *timer,
+ struct hrtimer_clock_base *base)
+{
+ struct hrtimer_cpu_base *cpu_base = this_cpu_ptr(&hrtimer_bases);
+ ktime_t expires = ktime_sub(hrtimer_get_expires(timer), base->offset);
+
+ WARN_ON_ONCE(hrtimer_get_expires_tv64(timer) < 0);
+
+ /*
+ * If the timer is not on the current cpu, we cannot reprogram
+ * the other cpus clock event device.
+ */
+ if (base->cpu_base != cpu_base)
+ return;
+
+ /*
+ * If the hrtimer interrupt is running, then it will
+ * reevaluate the clock bases and reprogram the clock event
+ * device. The callbacks are always executed in hard interrupt
+ * context so we don't need an extra check for a running
+ * callback.
+ */
+ if (cpu_base->in_hrtirq)
+ return;
+
+ /*
+ * CLOCK_REALTIME timer might be requested with an absolute
+ * expiry time which is less than base->offset. Set it to 0.
+ */
+ if (expires < 0)
+ expires = 0;
+
+ if (expires >= cpu_base->expires_next)
+ return;
+
+ /* Update the pointer to the next expiring timer */
+ cpu_base->next_timer = timer;
+
+ /*
+ * If a hang was detected in the last timer interrupt then we
+ * do not schedule a timer which is earlier than the expiry
+ * which we enforced in the hang detection. We want the system
+ * to make progress.
+ */
+ if (cpu_base->hang_detected)
+ return;
+
+ /*
+ * Program the timer hardware. We enforce the expiry for
+ * events which are already in the past.
+ */
+ cpu_base->expires_next = expires;
+ tick_program_event(expires, 1);
+}
+
/*
* Clock realtime was set
*
--
2.17.1

View File

@@ -0,0 +1,111 @@
From 679e677ed43106bfa23fcd7fa318acf826e27113 Mon Sep 17 00:00:00 2001
From: Anna-Maria Gleixner <anna-maria@linutronix.de>
Date: Wed, 20 Dec 2017 17:13:07 +0100
Subject: [PATCH 034/418] hrtimer: Make hrtimer_force_reprogramm()
unconditionally available
hrtimer_force_reprogram() needs to be available unconditionally for softirq
based hrtimers. Move the function and all required struct members out of
the CONFIG_HIGH_RES_TIMERS #ifdef.
There is no functional change because hrtimer_force_reprogram() is only
invoked when hrtimer_cpu_base.hres_active is true and
CONFIG_HIGH_RES_TIMERS=y.
Making it unconditional increases the text size for the
CONFIG_HIGH_RES_TIMERS=n case slightly, but avoids replication of that code
for the upcoming softirq based hrtimers support. Most of the code gets
eliminated in the CONFIG_HIGH_RES_TIMERS=n case by the compiler.
Signed-off-by: Anna-Maria Gleixner <anna-maria@linutronix.de>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
kernel/time/hrtimer.c | 58 +++++++++++++++++++++----------------------
1 file changed, 28 insertions(+), 30 deletions(-)
diff --git a/kernel/time/hrtimer.c b/kernel/time/hrtimer.c
index 37085a13f19a..5fd669dd46be 100644
--- a/kernel/time/hrtimer.c
+++ b/kernel/time/hrtimer.c
@@ -513,34 +513,6 @@ static inline int hrtimer_hres_active(void)
return __hrtimer_hres_active(this_cpu_ptr(&hrtimer_bases));
}
-/* High resolution timer related functions */
-#ifdef CONFIG_HIGH_RES_TIMERS
-
-/*
- * High resolution timer enabled ?
- */
-static bool hrtimer_hres_enabled __read_mostly = true;
-unsigned int hrtimer_resolution __read_mostly = LOW_RES_NSEC;
-EXPORT_SYMBOL_GPL(hrtimer_resolution);
-
-/*
- * Enable / Disable high resolution mode
- */
-static int __init setup_hrtimer_hres(char *str)
-{
- return (kstrtobool(str, &hrtimer_hres_enabled) == 0);
-}
-
-__setup("highres=", setup_hrtimer_hres);
-
-/*
- * hrtimer_high_res_enabled - query, if the highres mode is enabled
- */
-static inline int hrtimer_is_hres_enabled(void)
-{
- return hrtimer_hres_enabled;
-}
-
/*
* Reprogram the event source with checking both queues for the
* next event
@@ -581,6 +553,34 @@ hrtimer_force_reprogram(struct hrtimer_cpu_base *cpu_base, int skip_equal)
tick_program_event(cpu_base->expires_next, 1);
}
+/* High resolution timer related functions */
+#ifdef CONFIG_HIGH_RES_TIMERS
+
+/*
+ * High resolution timer enabled ?
+ */
+static bool hrtimer_hres_enabled __read_mostly = true;
+unsigned int hrtimer_resolution __read_mostly = LOW_RES_NSEC;
+EXPORT_SYMBOL_GPL(hrtimer_resolution);
+
+/*
+ * Enable / Disable high resolution mode
+ */
+static int __init setup_hrtimer_hres(char *str)
+{
+ return (kstrtobool(str, &hrtimer_hres_enabled) == 0);
+}
+
+__setup("highres=", setup_hrtimer_hres);
+
+/*
+ * hrtimer_high_res_enabled - query, if the highres mode is enabled
+ */
+static inline int hrtimer_is_hres_enabled(void)
+{
+ return hrtimer_hres_enabled;
+}
+
/*
* Retrigger next event is called after clock was set
*
@@ -639,8 +639,6 @@ void clock_was_set_delayed(void)
static inline int hrtimer_is_hres_enabled(void) { return 0; }
static inline void hrtimer_switch_to_hres(void) { }
-static inline void
-hrtimer_force_reprogram(struct hrtimer_cpu_base *base, int skip_equal) { }
static inline void retrigger_next_event(void *arg) { }
#endif /* CONFIG_HIGH_RES_TIMERS */
--
2.17.1

View File

@@ -0,0 +1,94 @@
From 748812cb4f5a3b85cb2ba72c6edb68e390137b84 Mon Sep 17 00:00:00 2001
From: Anna-Maria Gleixner <anna-maria@linutronix.de>
Date: Wed, 20 Dec 2017 17:13:08 +0100
Subject: [PATCH 035/418] hrtimer: Unify handling of hrtimer remove
When the first hrtimer on the current CPU is removed,
hrtimer_force_reprogram() is invoked but only when
CONFIG_HIGH_RES_TIMERS=y and hrtimer_cpu_base.hres_active is set.
hrtimer_force_reprogram() updates hrtimer_cpu_base.expires_next and
reprograms the clock event device. When CONFIG_HIGH_RES_TIMERS=y and
hrtimer_cpu_base.hres_active is set, a pointless hrtimer interrupt can be
prevented.
hrtimer_check_target() makes the 'can remote enqueue' decision. As soon as
hrtimer_check_target() is unconditionally available and
hrtimer_cpu_base.expires_next is updated by hrtimer_reprogram(),
hrtimer_force_reprogram() needs to be available unconditionally as well to
prevent the following scenario with CONFIG_HIGH_RES_TIMERS=n:
- the first hrtimer on this CPU is removed and hrtimer_force_reprogram() is
not executed
- CPU goes idle (next timer is calculated and hrtimers are taken into
account)
- a hrtimer is enqueued remote on the idle CPU: hrtimer_check_target()
compares expiry value and hrtimer_cpu_base.expires_next. The expiry value
is after expires_next, so the hrtimer is enqueued. This timer will fire
late, if it expires before the effective first hrtimer on this CPU and
the comparison was with an outdated expires_next value.
To prevent this scenario, make hrtimer_force_reprogram() unconditional
except the effective reprogramming part, which gets eliminated by the
compiler in the CONFIG_HIGH_RES_TIMERS=n case.
Signed-off-by: Anna-Maria Gleixner <anna-maria@linutronix.de>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
kernel/time/hrtimer.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/kernel/time/hrtimer.c b/kernel/time/hrtimer.c
index 5fd669dd46be..ce9a3ef7a796 100644
--- a/kernel/time/hrtimer.c
+++ b/kernel/time/hrtimer.c
@@ -523,9 +523,6 @@ hrtimer_force_reprogram(struct hrtimer_cpu_base *cpu_base, int skip_equal)
{
ktime_t expires_next;
- if (!__hrtimer_hres_active(cpu_base))
- return;
-
expires_next = __hrtimer_get_next_event(cpu_base);
if (skip_equal && expires_next == cpu_base->expires_next)
@@ -534,6 +531,9 @@ hrtimer_force_reprogram(struct hrtimer_cpu_base *cpu_base, int skip_equal)
cpu_base->expires_next = expires_next;
/*
+ * If hres is not active, hardware does not have to be
+ * reprogrammed yet.
+ *
* If a hang was detected in the last timer interrupt then we
* leave the hang delay active in the hardware. We want the
* system to make progress. That also prevents the following
@@ -547,7 +547,7 @@ hrtimer_force_reprogram(struct hrtimer_cpu_base *cpu_base, int skip_equal)
* set. So we'd effectivly block all timers until the T2 event
* fires.
*/
- if (cpu_base->hang_detected)
+ if (!__hrtimer_hres_active(cpu_base) || cpu_base->hang_detected)
return;
tick_program_event(cpu_base->expires_next, 1);
@@ -848,7 +848,6 @@ static void __remove_hrtimer(struct hrtimer *timer,
if (!timerqueue_del(&base->active, &timer->node))
cpu_base->active_bases &= ~(1 << base->index);
-#ifdef CONFIG_HIGH_RES_TIMERS
/*
* Note: If reprogram is false we do not update
* cpu_base->next_timer. This happens when we remove the first
@@ -859,7 +858,6 @@ static void __remove_hrtimer(struct hrtimer *timer,
*/
if (reprogram && timer == cpu_base->next_timer)
hrtimer_force_reprogram(cpu_base, 1);
-#endif
}
/*
--
2.17.1

View File

@@ -0,0 +1,158 @@
From bf1446f64f73dad06295e748afb019d24f7cb3ef Mon Sep 17 00:00:00 2001
From: Anna-Maria Gleixner <anna-maria@linutronix.de>
Date: Wed, 20 Dec 2017 17:13:09 +0100
Subject: [PATCH 036/418] hrtimer: Unify handling of remote enqueue
hrtimer_reprogram() is conditionally invoked from hrtimer_start_range_ns()
when hrtimer_cpu_base.hres_active is true.
In the !hres_active case there is a special condition for the nohz_active
case:
If the newly enqueued timer expires before the first expiring timer on a
remote CPU then the remote CPU needs to be notified and woken up from a
NOHZ idle sleep to take the new first expiring timer into account.
Previous changes have already established the prerequisites to make the
remote enqueue behaviour the same whether high resolution mode is active or
not:
If the to be enqueued timer expires before the first expiring timer on a
remote CPU, then it cannot be enqueued there.
This was done for the high resolution mode because there is no way to
access the remote CPU timer hardware. The same is true for NOHZ, but was
handled differently by unconditionally enqueuing the timer and waking up
the remote CPU so it can reprogram its timer. Again there is no compelling
reason for this difference.
hrtimer_check_target(), which makes the 'can remote enqueue' decision is
already unconditional, but not yet functional because nothing updates
hrtimer_cpu_base.expires_next in the !hres_active case.
To unify this the following changes are required:
1) Make the store of the new first expiry time unconditonal in
hrtimer_reprogram() and check __hrtimer_hres_active() before proceeding
to the actual hardware access. This check also lets the compiler
eliminate the rest of the function in case of CONFIG_HIGH_RES_TIMERS=n.
2) Invoke hrtimer_reprogram() unconditionally from
hrtimer_start_range_ns()
3) Remove the remote wakeup special case for the !high_res && nohz_active
case.
Confine the timers_nohz_active static key to timer.c which is the only user
now.
Signed-off-by: Anna-Maria Gleixner <anna-maria@linutronix.de>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
kernel/time/hrtimer.c | 18 ++++++------------
kernel/time/tick-internal.h | 6 ------
kernel/time/timer.c | 9 ++++++++-
3 files changed, 14 insertions(+), 19 deletions(-)
diff --git a/kernel/time/hrtimer.c b/kernel/time/hrtimer.c
index ce9a3ef7a796..35d7d0c8c3d6 100644
--- a/kernel/time/hrtimer.c
+++ b/kernel/time/hrtimer.c
@@ -687,21 +687,24 @@ static void hrtimer_reprogram(struct hrtimer *timer,
/* Update the pointer to the next expiring timer */
cpu_base->next_timer = timer;
+ cpu_base->expires_next = expires;
/*
+ * If hres is not active, hardware does not have to be
+ * programmed yet.
+ *
* If a hang was detected in the last timer interrupt then we
* do not schedule a timer which is earlier than the expiry
* which we enforced in the hang detection. We want the system
* to make progress.
*/
- if (cpu_base->hang_detected)
+ if (!__hrtimer_hres_active(cpu_base) || cpu_base->hang_detected)
return;
/*
* Program the timer hardware. We enforce the expiry for
* events which are already in the past.
*/
- cpu_base->expires_next = expires;
tick_program_event(expires, 1);
}
@@ -940,16 +943,7 @@ void hrtimer_start_range_ns(struct hrtimer *timer, ktime_t tim,
if (!leftmost)
goto unlock;
- if (!hrtimer_is_hres_active(timer)) {
- /*
- * Kick to reschedule the next tick to handle the new timer
- * on dynticks target.
- */
- if (is_timers_nohz_active())
- wake_up_nohz_cpu(new_base->cpu_base->cpu);
- } else {
- hrtimer_reprogram(timer, new_base);
- }
+ hrtimer_reprogram(timer, new_base);
unlock:
unlock_hrtimer_base(timer, &flags);
}
diff --git a/kernel/time/tick-internal.h b/kernel/time/tick-internal.h
index 4ac74dff59f0..e277284c2831 100644
--- a/kernel/time/tick-internal.h
+++ b/kernel/time/tick-internal.h
@@ -151,18 +151,12 @@ static inline void tick_nohz_init(void) { }
#ifdef CONFIG_NO_HZ_COMMON
extern unsigned long tick_nohz_active;
extern void timers_update_nohz(void);
-extern struct static_key_false timers_nohz_active;
-static inline bool is_timers_nohz_active(void)
-{
- return static_branch_unlikely(&timers_nohz_active);
-}
# ifdef CONFIG_SMP
extern struct static_key_false timers_migration_enabled;
# endif
#else /* CONFIG_NO_HZ_COMMON */
static inline void timers_update_nohz(void) { }
#define tick_nohz_active (0)
-static inline bool is_timers_nohz_active(void) { return false; }
#endif
DECLARE_PER_CPU(struct hrtimer_cpu_base, hrtimer_bases);
diff --git a/kernel/time/timer.c b/kernel/time/timer.c
index b24232985960..34415f2b3f04 100644
--- a/kernel/time/timer.c
+++ b/kernel/time/timer.c
@@ -210,7 +210,7 @@ static DEFINE_PER_CPU(struct timer_base, timer_bases[NR_BASES]);
#ifdef CONFIG_NO_HZ_COMMON
-DEFINE_STATIC_KEY_FALSE(timers_nohz_active);
+static DEFINE_STATIC_KEY_FALSE(timers_nohz_active);
static DEFINE_MUTEX(timer_keys_mutex);
static void timer_update_keys(struct work_struct *work);
@@ -260,6 +260,13 @@ int timer_migration_handler(struct ctl_table *table, int write,
mutex_unlock(&timer_keys_mutex);
return ret;
}
+
+static inline bool is_timers_nohz_active(void)
+{
+ return static_branch_unlikely(&timers_nohz_active);
+}
+#else
+static inline bool is_timers_nohz_active(void) { return false; }
#endif /* NO_HZ_COMMON */
static unsigned long round_jiffies_common(unsigned long j, int cpu,
--
2.17.1

Some files were not shown because too many files have changed in this diff Show More