5847 Commits

Author SHA1 Message Date
Kir Kolyshkin a916309fff VERSION: release 1.1.2
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
v1.1.2
2022-05-05 12:49:49 -07:00
Kir Kolyshkin 364ec0f1b4 runc: do not set inheritable capabilities
Do not set inheritable capabilities in runc spec, runc exec --cap,
and in libcontainer integration tests.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2022-05-05 12:20:40 -07:00
Aleksa Sarai 58546650ce merge branch 'pr-3439' into release-1.1
Kir Kolyshkin (3):
  VERSION: back to development
  VERSION: release 1.1.1
  CHANGELOG.md: add 1.1.1 release notes

LGTMs: mrunalp AkihiroSuda cyphar
Closes #3439
2022-03-29 13:58:36 +11:00
Kir Kolyshkin 8959e37254 VERSION: back to development
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2022-03-28 12:02:47 -07:00
Kir Kolyshkin 52de29d7e0 VERSION: release 1.1.1
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
v1.1.1
2022-03-28 12:02:47 -07:00
Kir Kolyshkin 2636e1cb36 CHANGELOG.md: add 1.1.1 release notes
This also includes the backport of commit e4d23d50fa,
fixing a minor formatting issue.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2022-03-28 12:02:47 -07:00
Kir Kolyshkin ae28db1424 Merge pull request #3436 from kolyshkin/1.1-add-centos-stream-9
[1.1] add centos-stream-9
2022-03-28 12:02:23 -07:00
Kir Kolyshkin 036cc34899 CI/cirrus: add centos-stream-9
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit a9cc993a2b6f8405edcc2a07e52a2c48e664b323)
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2022-03-28 11:46:11 -07:00
Mrunal Patel c65363285b Merge pull request #3438 from kolyshkin/1.1-fix-badges
[1.1] Fix badges
2022-03-28 11:21:45 -07:00
Kir Kolyshkin db953158e1 README.md: add cirrus-ci badge
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit 3618079cab)
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2022-03-28 09:53:34 -07:00
Kir Kolyshkin ea19181ebd README,libct/README: fix pkg.go.dev badges
What used to be godoc.org is now pkg.go.dev, and while the old URLs
still work, they might be broken in the future.

Updated badges are generated via https://pkg.go.dev/badge/

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit f309a69a48)
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2022-03-28 09:53:34 -07:00
Mrunal Patel 6bf0a56814 Merge pull request #3435 from mrunalp/dont_panic_1.1
[release-1.1] libct/cg: IsCgroup2HybridMode: don't panic
2022-03-28 09:43:01 -07:00
Kir Kolyshkin 8290c4cf58 libct/cg: IsCgroup2HybridMode: don't panic
In case statfs("/sys/fs/cgroup/unified") fails with any error other
than ENOENT, current code panics. As IsCgroup2HybridMode is called from
libcontainer/cgroups/fs's init function, this means that any user of
libcontainer may panic during initialization, which is ugly.

Avoid panicking; instead, do not enable hybrid hierarchy support and
report the error (under debug level, not to confuse anyone).

Basically, replace the panic with "turn off hybrid mode support"
(which makes total sense since we were unable to statfs its root).

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2022-03-28 09:13:57 -07:00
Kir Kolyshkin 6f48ab3eaf Merge pull request #3406 from marquiz/backports/rdt
[1.1] configs/validate: looser validation for RDT
2022-03-14 14:11:24 -07:00
Markus Lehtonen ee7ba6cb1e configs/validate: looser validation for RDT
Don't require CAT or MBA because we don't detect those correctly (we
don't support L2 or L3DATA/L3CODE for example, and in the future
possibly even more). With plain "ClosId mode" we don't really care: we
assign the container to a pre-configured CLOS without trying to do
anything smarter.

Moreover, this was a duplicate/redundant check anyway, as for CAT and
MBA there is another specific sanity check that is done if L3 or MB
is specified in the config.

Signed-off-by: Markus Lehtonen <markus.lehtonen@intel.com>
(cherry picked from commit 1d5c331042)
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2022-03-14 09:35:43 -07:00
Sebastiaan van Stijn a3765fb46d Merge pull request #3404 from kolyshkin/1.1-delegate-enoent
[1.1] libct/cg/sd/v2: fix ENOENT on cgroup delegation
2022-03-10 20:37:34 +01:00
Kir Kolyshkin 96193422ea libct/cg/sd/v2: fix ENOENT on cgroup delegation
Apparently, not all files listed in /sys/kernel/cgroup/delegate must
exist in every cgroup, so we should ignore ENOENT.

Dot not ignore ENOENT on the directory itself though.

Change cgroupFilesToChown to not return ".", and refactor it to not do
any dynamic slice appending in case we're using the default built-in
list of files.

Fixes: 35d20c4e0
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit 8c04b98100)
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2022-03-08 12:03:50 -08:00
Akihiro Suda 51feb4289d Merge pull request #3403 from kolyshkin/1.1-exec-subcgroup
[1.1] runc exec --cgroup: ensure the path is a sub-cgroup path
2022-03-09 00:12:19 +09:00
lifubang 35784a3e6a ensure the path is a sub-cgroup path
Signed-off-by: lifubang <lifubang@acmcoder.com>
(cherry picked from commit 01f00e1fd5)
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2022-03-07 18:25:59 -08:00
Mrunal Patel b9460f26b4 Merge pull request #3355 from kolyshkin/1.1-rodev
[1.1] Fix working with read-only /dev
2022-01-28 15:56:26 -08:00
Kir Kolyshkin 986e7c535f libct: fixStdioPermissions: ignore EROFS
In case of a read-only /dev, it's better to move on and let whatever is
run in a container to handle any possible errors.

This solves runc exec for a user with read-only /dev.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit 146c8c0c62)
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2022-01-27 13:36:33 -08:00
Kir Kolyshkin 5053a06511 libct: fixStdioPermissions: skip chown if not needed
Since we already called fstat, we know the current file uid. In case it
is the same as the one we want it to be, there's no point in trying
chown.

Remove the specific /dev/null check, as the above also covers it
(comparing /dev/null uid with itself is true).

This also fixes runc exec with read-only /dev for root user.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit 18c4760aed)
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2022-01-27 13:36:33 -08:00
Kir Kolyshkin d2939b6b93 libct: fixStdioPermissions: minor refactoring
Use os/file Chown method instead of bare unix.Fchown as it already have
access to underlying fd, and produces nice-looking errors. This allows
us to remove our error wrapping and some linter annotations.

We still use unix.Fstat since os.Stat access to os-specific fields
like uid/gid is not very straightforward. The only change here is to use
file name (rather than fd) in the error text.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit b7fdb68848)
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2022-01-27 13:36:33 -08:00
Aleksa Sarai d7f7b22a85 VERSION: back to development
Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
2022-01-17 19:16:33 +11:00
Aleksa Sarai 067aaf8548 VERSION: release runc v1.1.0
Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
v1.1.0
2022-01-17 19:16:31 +11:00
Akihiro Suda c83abc503d Merge pull request #3331 from kolyshkin/nsenter-unsup
Refuse to build runc without nsenter
2022-01-05 14:18:02 +09:00
Kir Kolyshkin c0e300f109 Refuse to build runc without nsenter
Commit 4d1d6185ab added this
nsenter_unsupported.go file in order for nsenter to be a valid (but
empty, non-functional) Go package on unsupported platforms.

As a result, runc can be build successfully without CGO, which results
in a non-working and hard-to-debug binary (see issue 3330).

As the functionality of being able to compile a package which is
definitely not working is questionable, and I can't think of any use
cases, let's remove the file.

With this, runc can no longer be build without CGO:

	[kir@kir-rhat runc]$ CGO_ENABLED=0 make runc
	go build -trimpath "-buildmode=pie"  -tags "seccomp" -ldflags "-X main.gitCommit=v1.0.0-452-g00f56786-dirty -X main.version=1.1.0-rc.1+dev " -o runc .
	go build github.com/opencontainers/runc/libcontainer/nsenter: build constraints exclude all Go files in /home/kir/go/src/github.com/opencontainers/runc/libcontainer/nsenter

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2022-01-04 15:49:41 -08:00
Akihiro Suda 00f56786bb Merge pull request #3328 from opencontainers/dependabot/go_modules/github.com/checkpoint-restore/go-criu/v5-5.3.0
build(deps): bump github.com/checkpoint-restore/go-criu/v5 from 5.2.0 to 5.3.0
2021-12-23 11:00:22 +09:00
dependabot[bot] e155b3322c build(deps): bump github.com/checkpoint-restore/go-criu/v5
Bumps [github.com/checkpoint-restore/go-criu/v5](https://github.com/checkpoint-restore/go-criu) from 5.2.0 to 5.3.0.
- [Release notes](https://github.com/checkpoint-restore/go-criu/releases)
- [Commits](https://github.com/checkpoint-restore/go-criu/compare/v5.2.0...v5.3.0)

---
updated-dependencies:
- dependency-name: github.com/checkpoint-restore/go-criu/v5
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-12-22 04:18:26 +00:00
Akihiro Suda 81044ad7c9 Merge pull request #3325 from kolyshkin/rm-go115
libct/cg: rm go 1.15 compatibility
2021-12-15 11:39:50 +09:00
Kir Kolyshkin 5c7e898186 libct/cg: rm go 1.15 compatibility
Since commit 12e99a0f8d we do require Go >= 1.16, so this file
is no longer needed.

Also, this actually ensures that go >= 1.16 is used (otherwise
libcontainer/cgroups/getallpids.go won't compile).

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2021-12-14 13:08:47 -08:00
Aleksa Sarai 7113a40898 merge branch 'pr-3323'
Aleksa Sarai (2):
  VERSION: back to development
  VERSION: release v1.1.0-rc.1

LGTMs: AkihiroSuda kolyshkin
Closes #3323
2021-12-14 15:27:16 +11:00
Aleksa Sarai 4773769ce1 VERSION: back to development
Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
2021-12-14 14:23:02 +11:00
Aleksa Sarai 55df1fc4c8 VERSION: release v1.1.0-rc.1
Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
v1.1.0-rc.1
2021-12-14 14:23:00 +11:00
Kir Kolyshkin 6c1e2ecc20 Merge pull request #3320 from cyphar/changelog
CHANGELOG: add an in-repo changelog file
2021-12-13 12:51:14 -08:00
Aleksa Sarai a8f9d5defc CHANGELOG: add an in-repo changelog file
This will make releases much simpler. I've back-filled the changelog
with everything since runc 1.0.0 (there's not much point going further
back than that).

Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
2021-12-13 13:22:11 +11:00
Aleksa Sarai 7e792c9236 merge branch 'pr-3301'
Kir Kolyshkin (1):
  libct/utils: ResolveRootfs: remove

LGTMs: AkihiroSuda cyphar
Closes #3301
2021-12-09 23:11:12 +11:00
Akihiro Suda 4e56a2b35e Merge pull request #3313 from kolyshkin/int-nits
libct/int: minor improvements
2021-12-09 19:20:59 +09:00
Aleksa Sarai e7dfcc93af Merge pull request #3314 from kolyshkin/seccomp-2.5.3
release: update libseccomp to 2.5.3, minor script fixes
2021-12-09 20:36:54 +11:00
Kir Kolyshkin 6d2067a4bf script/seccomp.sh: fix argc check
This check was always broken, and it slipped through the cracks because
we never run it without additional architectures now.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2021-12-09 00:59:47 -08:00
Kir Kolyshkin 457ca62f1f script/release_*.sh: fix usage
- release_build: fix -H <hash_cmd> option (was -h)
- release_sign: add -H and -S options

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2021-12-09 00:59:43 -08:00
Kir Kolyshkin c729594cdd deps: update libseccomp to 2.5.3
It was released about a month ago. I don't see anything major
in the changelog but it makes sense to keep tracking upstream deps.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2021-12-09 00:38:25 -08:00
Aleksa Sarai 1b747a43f0 merge branch 'pr-3309'
Aleksa Sarai (1):
  release: correctly handle binary signing for "make releaseall"

LGTMs: AkihiroSuda kolyshkin
Closes #3309
2021-12-09 16:47:31 +11:00
Kir Kolyshkin 5d77962099 tests/int: use update_config in hooks test
Using "$@" instead of $1 in update_config() allows us to use it from
hooks.bats, where jq is used with more options than usual.

We need to disable SC2016 as otherwise shellcheck sees $something inside
single quotes and think we are losing the shell expansion (we are not).

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2021-12-08 21:36:27 -08:00
Kir Kolyshkin 9e798e26cb tests/int: ability to specify binary
This can be used to specify a different runc binary, for example:

	sudo -E RUNC=$PWD/runc.mine tests/integration/cwd.bats

A different (but compatible enough) runtime also works:

	sudo -E RUNC=/usr/local/bin/crun tests/integration/cwd.bats

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2021-12-08 21:25:05 -08:00
Kir Kolyshkin 13b0806f12 Merge pull request #3272 from AkihiroSuda/mount-rro
Support recursive mount attrs ("rro", "rnosuid", "rnodev", ...)
2021-12-08 11:02:26 -08:00
Aleksa Sarai 4b22d8e446 Merge branch 'pr-3310'
Akihiro Suda (2):
  types/features: clarify MountOptions
  Mark `runc features` experimental

LGTMs: cyphar mrunalp
Closes #3310
2021-12-08 17:07:21 +11:00
Mrunal Patel cd07af28ce Merge pull request #3304 from kolyshkin/lint-extra
ci: enable extra linters for new code
2021-12-07 15:58:10 -08:00
Akihiro Suda 97688ddff3 types/features: clarify MountOptions
`MountOptions` does not contain `const void *data` options.

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2021-12-07 18:36:04 +09:00
Akihiro Suda deb0a5f2ef Mark runc features experimental
Follow-up to PR 3296

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2021-12-07 17:51:39 +09:00