runtime-spec: update pids.limit handling to match new guidance

The main update is actually in github.com/opencontainers/cgroups, but we
need to also update runtime-spec to a newer pre-release version to get
the updates from there as well.

In short, the behaviour change is now that "0" is treated as a valid
value to set in "pids.max", "-1" means "max" and unset/nil means "do
nothing". As described in the opencontainers/cgroups PR, this change is
actually backwards compatible because our internal state.json stores
PidsLimit, and that entry is marked as "omitempty". So, an old runc
would omit PidsLimit=0 in state.json, and this will be parsed by a new
runc as being "nil" -- and both would treat this case as "do not set
anything".

Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
This commit is contained in:
Aleksa Sarai
2025-10-22 23:57:21 +11:00
parent eec1f7e34b
commit 3b75374cc7
18 changed files with 247 additions and 52 deletions
+2 -1
View File
@@ -85,7 +85,8 @@ stdin. If this option is used, all other options are ignored.
(i.e. use unlimited swap).
**--pids-limit** _num_
: Set the maximum number of processes allowed in the container.
: Set the maximum number of processes allowed in the container. Use **-1** to
unset the limit.
**--l3-cache-schema** _value_
: Set the value for Intel RDT/CAT L3 cache schema.