aboutsummaryrefslogtreecommitdiffhomepage
path: root/container
AgeCommit message (Collapse)Author
2025-08-21container/init: op interface valid methodOphestra
Check ops early and eliminate duplicate checks. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-20container/inittmpfs: check path equivalence by valueOphestra
Fixes regression introduced while integrating Absolute. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-20container/initsymlink: check path equivalence by valueOphestra
Fixes regression introduced while integrating Absolute. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-20container/initremount: check path equivalence by valueOphestra
Fixes regression introduced while integrating Absolute. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-20container/initproc: check path equivalence by valueOphestra
Fixes regression introduced while integrating Absolute. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-20container/initplace: check path equivalence by valueOphestra
Fixes regression introduced while integrating Absolute. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-20container/initoverlay: check path equivalence by valueOphestra
Fixes regression introduced while integrating Absolute. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-20container/init: use absolute compare methodOphestra
More checks are also added. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-20absolute: efficient equivalence check methodOphestra
This is more efficient and makes the call site cleaner. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-20container/initdev: check path equivalence by valueOphestra
Fixes regression introduced while integrating Absolute. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-20container/capability: check CAP_TO_INDEX and CAP_TO_MASKOphestra
Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-20container/autoetc: do not bypass absolute checkOphestra
This can now be done cleanly via path function wrappers. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-20container/initmkdir: check path equivalence by valueOphestra
Fixes regression introduced while integrating Absolute. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-20container/initbind: check path equivalence by valueOphestra
Same problem as autoroot, never updated the checks after integrating Absolute. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-20container/autoroot: check host path equivalence by valueOphestra
This will never return true otherwise unless the equivalent paths happen to be interned by the caller. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-20container/init: split setup ops into individual filesOphestra
This significantly increases readability. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-20container/ops: move Op type to init fileOphestra
This helps with the eventual separation of all setup ops into individual files. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-20container/autoroot: filter dentry with empty nameOphestra
This is unreachable, but nice to have just in case. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-20container: ptrace protection via Yama LSMOphestra
This is only a nice to have feature as the init process has no additional privileges and the monitor process was never reachable anyway. Closes #4. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-18container/params: check setup/receive behaviourOphestra
Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-18container/path: check create and mountinfo helpersOphestra
These can quite easily be checked within the framework. The scanner fault injection might require updating at some point if the implementation changes. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-18container: optionally isolate host abstract UNIX domain sockets via landlockClayton Gilmer
2025-08-18container: move PR_SET_NO_NEW_PRIVS to parentOphestra
This allows some LSM setup in the parent. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-17container: start from locked threadOphestra
This allows setup that relies on per-thread state like securebits and landlock, from the parent side. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-17container: check output helper functionsOphestra
The container test suite has always been somewhat inadequate due to the inability of coverage tooling to reach into containers. This has become an excuse for not testing non-container code as well, which lead to the general lack of confidence when working with container code. This change aims to be one of many to address that to some extent. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-17container: enforce nonrepeatable autoetc and autorootOphestra
These keep track of some internal state, and they don't make sense to have multiple instances of anyway, so instead of dealing with that, just make them nonrepetable. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-17container: allow additional state between opsOphestra
This is useful for ops that need to be aware of previous instances of themselves. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-14container: export overlay escapeOphestra
Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-14container/path: remove unused pathOphestra
Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-11container: use absolute for pathnameOphestra
This is simultaneously more efficient and less error-prone. This change caused minor API changes in multiple other packages. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-10container/absolute: wrap safe stdlib functionsOphestra
These functions do not change the absoluteness of a pathname. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-09container: remove PATH lookup behaviourOphestra
This is way higher level than the container package and does not even work unless every path is mounted in the exact same location. This behaviour causes nothing but confusion and problems, Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-09container/absolute: early absolute pathname checkOphestra
This is less error-prone, and allows pathname to be checked once. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-09container/params: remove confusingly named errorOphestra
Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-08container: document ambient capabilitiesOphestra
Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-08container/ops: implement overlay opOphestra
There are significant limitations to using the overlay mount, and the implementation in the kernel is quite quirky. For now the Op is quite robust, however a higher level interface for it has not been decided yet. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-08container/path: fix typo "paths"Ophestra
Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-08container: test case runtime initialisationOphestra
This allows for more sophisticated test setup. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-08container: test bypass output buffer on verboseOphestra
This restores verbose behaviour. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-08container: raise CAP_DAC_OVERRIDEOphestra
This is required for upperdir and workdir checks in overlayfs. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-07container: buffer test outputOphestra
This further reduces noise on test failure by only passing through output of the failed test. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-07container: test respect verbose flagOphestra
This reduces noise on test failure. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-04container/init: use mount string constantsOphestra
These literals were missed when the constants were first defined. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-03container/path: fhs path constantsOphestra
This increases readability since this can help disambiguate absolute paths from similarly named path segments. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-03container/ops: mount dev readonlyOphestra
There is usually no good reason to write to /dev. This however doesn't work in internal/app because FilesystemConfig supplied by ContainerConfig might add entries to /dev, so internal/app follows DevWritable with Remount instead. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-03container/ops: merge mqueue and dev OpsOphestra
There is no reason to mount mqueue anywhere else, and these Ops usually follow each other. This change merges them. This helps decrease IPC overhead and also enables mounting dev readonly. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-03container/mount: move tmpfs sysroot prefixing to callerOphestra
The mountTmpfs helper is a relatively low level function that is not exposed as part of the API. Prefixing sysroot here not only introduces overhead but is also quite error-prone. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-03container/op: unexport bind resolved source fieldOphestra
This is used for symlink resolution and is only used internally. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-03container/mount: mount data escape helper functionOphestra
For formatting user-supplied path strings into overlayfs mount data. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-02container: improve clone flags readabilityOphestra
Signed-off-by: Ophestra <cat@gensokyo.uk>