Mask /sys/firmware using read-only tmpfs#26689
Conversation
Since 693b4ac which prohibits /sys/firmware from being accessed, `find /` has been failing due to EPERM. Signed-off-by: Akihiro Suda <[email protected]>
|
This PR depends on opencontainers/runc#1054 |
|
I fear this approach would need many So maybe there is a chance to accept |
|
The test should be using |
|
@justincormack OK, opened #26720 |
|
There is still an issue that if users do not have apparmor these paths are not being blocked, and this is one solution, but it would need to be applied more completely. There may be other solutions though, looking at the options. |
|
@justincormack Some questions:
|
|
@justincormack |
- What I did
TestBuildApiDockerFileRemotehas been consistently failing (EPERM) on the host with #26618, which prohibits /sys/firmware from being accessed using apparmor.https://github.com/docker/docker/blob/8a46c18dd4e4f8091b9e02ef5b476e8b8aa77c47/integration-cli/docker_api_build_test.go#L19
This PR masks
/sys/firmwareusing a read-only tmpfs so thatTestBuildApiDockerFileRemotepasses without a change.- How I did it
Masked
/sys/firmwareusing a read-only tmpfs.- How to verify it
Make sure the latest apparmor profile is installed to the host:
Then execute tests
Or just make sure that
docker run -it --rm busybox sh -c 'find / > /dev/null'passes without any error.- Description for the changelog
Mask /sys/firmware using read-only tmpfs
- A picture of a cute animal (not mandatory but encouraged)
Signed-off-by: Akihiro Suda [email protected]