aboutsummaryrefslogtreecommitdiffhomepage
AgeCommit message (Collapse)Author
2025-08-26release: 0.2.0v0.2.0Ophestra
Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-26hst: use hsu userid for share path suffixOphestra
The privileged user is identifier to hakurei through its hsu userid. Using the kernel uid here makes little sense and is a leftover design choice from before hsu was implemented. Closes #7. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-26hst/config: remove data field, rename dir to homeOphestra
There is no reason to give the home directory special treatment, as this behaviour can be quite confusing. The home directory also does not necessarily require its own mount point, it could be provided by a parent or simply be ephemeral. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-26hst/fsbind: optional ensure sourceOphestra
This exposes the BindEnsure flag of BindMountOp. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-26container/initbind: optional ensure host directoryOphestra
This is used for ensuring persistent data directories specific to the container. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-25hst/fslink: improve string representationOphestra
This shortens the representation of most common use cases and generally improves readability. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-25hst/config: remove symlink fieldOphestra
Closes #6. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-25hst/fs: implement link fstypeOphestra
Symlinks do not require special treatment, and doing this allows placing links in order. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-25hst/fs: update doc commentsOphestra
The Type method no longer exists on the interface. Update doc comments to reflect that. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-25hst/config: remove container etc fieldOphestra
This no longer needs special treatment since it can be specified as a generic filesystem entry. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-25hst/fsbind: optional autoetc behaviourOphestra
This generalises the special field allowing any special behaviour to be matched from target. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-25hst/config: handle filesystem entry targeting rootOphestra
This allows any fstype supported by hst to be directly mounted on sysroot. A special case in internal/app applies the matching entry early and excludes it from path hiding. Closes #5. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-25hst/fsbind: optional autoroot behaviourOphestra
This allows autoroot to be configured via Filesystem. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-25container/dispatcher: remove exit stub test logOphestra
Turns out testing.T does not like being called in defer. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-25container/autoroot: remove prefix fieldOphestra
This field has been a noop for a long time. Remove it to prevent further confusion. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-25container/initoverlay: internal bypass sysroot prefixOphestra
This is for supporting overlay mounts for autoroot. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-24container/init: measure init behaviourOphestra
This used to be entirely done via integration tests, with almost no hope of error injection and coverage profile. These tests significantly increase confidence of future work in this area. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-23container/dispatcher: start goroutine in dispatcherOphestra
This allows instrumentation of calls from goroutine without relying on finalizers. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-23container/init: avoid multiple lastcap callsOphestra
This reduces the size of []kexpect in the test suite. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-23container/dispatcher: instrument each goroutine individuallyOphestra
Scheduler nondeterminism cannot be accounted for, so do this instead. There should not be any performance penalty as these calls are optimised out for direct. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-23container/params: pass fd instead of fileOphestra
The file is very difficult to stub. Pass fd instead as it is the value that is actually useful. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-22container/init: call lockOSThread through dispatcherOphestra
This degrades test performance if not stubbed out. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-22container: move integration test helpersOphestra
With the new instrumentation it is now possible to run init code outside integration tests. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-22container/path: use syscall dispatcherOphestra
This allows path and mount functions to be instrumented. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-22container/init: wrap syscall helper functionsOphestra
This allows tests to stub all kernel behaviour, enabling measurement of all function call arguments and error injection. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-21system/dbus: share host net ns for abstractOphestra
Host abstract unix sockets are only accessible when also in the init net ns. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-21container/syscall: doc comments from manpagesOphestra
These are pulled straight from the manpages. Signed-off-by: Ophestra <cat@gensokyo.uk>
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-19system/dbus/proc: host abstract only when not bindingOphestra
The test failure seems to be caused by an unrelated bug in xdg-dbus-proxy. 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-18cmd/hpkg: add deprecation noticeOphestra
Signed-off-by: Ophestra <cat@gensokyo.uk>