Browse code

Enable seccomp on ppc64le

In order to do this, allow the socketcall syscall in the default
seccomp profile. This is a multiplexing syscall for the socket
operations, which is becoming obsolete gradually, but it is used
in some architectures. libseccomp has special handling for it for
x86 where it is common, so we did not need it in the profile,
but does not have any handling for ppc64le. It turns out that the
Debian images we use for tests do use the socketcall, while the
newer images such as Ubuntu 16.04 do not. Enabling this does no
harm as we allow all the socket operations anyway, and we allow
the similar ipc call for similar reasons already.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
(cherry picked from commit a83cedddc6d3e0fe1df352ec54245090df641ab8)

Justin Cormack authored on 2016/05/24 07:19:19
Showing 3 changed files
... ...
@@ -153,7 +153,7 @@ RUN useradd --create-home --gid docker unprivilegeduser
153 153
 
154 154
 VOLUME /var/lib/docker
155 155
 WORKDIR /go/src/github.com/docker/docker
156
-ENV DOCKER_BUILDTAGS apparmor pkcs11 selinux
156
+ENV DOCKER_BUILDTAGS apparmor pkcs11 seccomp selinux
157 157
 
158 158
 # Let us use a .bashrc file
159 159
 RUN ln -sfv $PWD/.bashrc ~/.bashrc
... ...
@@ -1380,6 +1380,11 @@
1380 1380
 			"args": []
1381 1381
 		},
1382 1382
 		{
1383
+			"name": "socketcall",
1384
+			"action": "SCMP_ACT_ALLOW",
1385
+			"args": []
1386
+		},
1387
+		{
1383 1388
 			"name": "socketpair",
1384 1389
 			"action": "SCMP_ACT_ALLOW",
1385 1390
 			"args": []
... ...
@@ -1409,6 +1409,11 @@ var DefaultProfile = &types.Seccomp{
1409 1409
 			Args:   []*types.Arg{},
1410 1410
 		},
1411 1411
 		{
1412
+			Name:   "socketcall",
1413
+			Action: types.ActAllow,
1414
+			Args:   []*types.Arg{},
1415
+		},
1416
+		{
1412 1417
 			Name:   "socketpair",
1413 1418
 			Action: types.ActAllow,
1414 1419
 			Args:   []*types.Arg{},