-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix updating /sys/fs/cgroup mount to 'rw' #1085
Conversation
There were two bugs: Mount was matched by Type which is actually `cgroup`, not `sysfs`. And the second problem was that copy of the value was modified, not value in the slice. Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
This should be for both sysfs and cgroup. There are actaally functions already |
Or actually, there is |
Also, add checks for these in the existing security tests in |
@tonistiigi I'm not really an expert in all of these low-level mounts, but looks like |
As it seems it's not 100% the same what can be done with |
Please sign your commits following these rules: $ git clone -b "sysfs-cgroup-rw-fix" git@github.com:smira/buildkit.git somewhere
$ cd somewhere
$ git rebase -i HEAD~842361581128
editor opens
change each 'pick' to 'edit'
save the file and quit
$ git commit --amend -s --no-edit
$ git rebase --continue # and repeat the amend for each commit
$ git push -f Amending updates the existing PR. You DO NOT need to open a new one. |
Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
f2410c6
to
5dbb31a
Compare
Updated with helpers, but only for |
Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
1f4db0e
to
fc9781a
Compare
client/client_test.go
Outdated
AllowedEntitlements: allowedEntitlements, | ||
}, nil) | ||
|
||
if secMode == securitySandbox || sb.Rootless() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: maybe just skip the test in rootless as this isn't expected behavior but current limitations
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks, updated
Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
This relies on two PRs to the buildkit, which aren't merged yet, so I had to do some overrides to apply them: * moby/buildkit#1081 * moby/buildkit#1085 Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
This relies on two PRs to the buildkit, which aren't merged yet, so I had to do some overrides to apply them: * moby/buildkit#1081 * moby/buildkit#1085 Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
I tried to get the test to fail without the fix, but did not succeed. |
@tiborvass fails for me:
|
Yes, user error, my bad. |
This relies on two PRs to the buildkit: * moby/buildkit#1081 * moby/buildkit#1085 Sysfs fix was merged to upstream, so updated tag, while using `Dockerfile` slug I can switch to dockerfile2llb with support for `--security=insecure`. Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
This relies on two PRs to the buildkit: * moby/buildkit#1081 * moby/buildkit#1085 Sysfs fix was merged to upstream, so updated tag, while using `Dockerfile` slug I can switch to dockerfile2llb with support for `--security=insecure`. Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
There were two bugs: Mount was matched by Type which is actually
cgroup
, notsysfs
. And the second problem was that copy of the valuewas modified, not value in the slice.
Signed-off-by: Andrey Smirnov smirnov.andrey@gmail.com