Repository navigation
Commit 004d770
guest: delete the process modules and cgroups
The old layered init, the managed agent's sandbox mode and the one-shot
container helpers are gone, and with them the last users of the guest
process modules: guest::exec ran a layered root's executions, which
guest::spawn started, guest::entry entered into their namespaces, view
and identity, guest::cgroup placed and guest::process collected, and
guest::root's bootstrap moved the init's processes into the cgroups
that held them. nvx-init runs its workloads as plain processes through
sys::spawn, without per-execution containment.
Delete guest::{exec, spawn, process, cgroup, entry}, with their
submodules and tests, and guest::root::{bootstrap, Bootstrap,
BootstrapStep, Resources}, with root::Error::Bootstrap. Delete the OS
support that only they used:
- sys::entry's per-execution entry: EntryChild, its clone3 start in new
mount, PID and UTS namespaces, its view of /proc, /sys and /dev, with
the procfs entries that it masked or made read-only, its move into
the root, its umask, its working directory's resolution beneath the
root, and the CloneArgs and OpenHow structures. sys::entry keeps a
layered root's runtime file systems and the workload identity, which
nvx-init and Root use.
- The spawn child's per-execution stages, with their ChildSpec setters:
the root, the working directory's credentials check, inherited
descriptors, the cgroup placement, the session, the barrier and the
entry. The child keeps the path of nvx-init's workloads. LaunchStage,
whose numbers the child's launch report carries and which
guest::spawn held, moves into sys::spawn as a crate-private enum of
the stages that the child still takes, each with its number.
- The waits and signals that only guest::exec used: process_group_of,
WaitTarget and wait_named, and the sys re-exports of
signal_process_group and signal_through_pidfd, which sys::process
keeps for kill_process_group and kill_through_pidfd.
- The cgroup writes: root::kernel's Kernel::write, which only the
bootstrap called.
- fd's shut_down_sending, take_pipe_end, open_at and
create_socket_pair, which only guest::exec's pipes and sockets used.
fd's per-execution memfd and seals already left with #1310.
Root::switch keeps its move of the root and its change of root, and
the rooted open keeps its EAGAIN retry. What the warning-denied builds
then find unused goes too: root::bind_runtime_file, whose retained
variant bind_runtime_file_retained takes its rustdoc, and
guest::mappings' bind_with re-export. guest::account's items, which
only guest::entry re-exported, become crate-private.
Tests:
- The deleted modules' 125 tests retire: 44 of guest::exec, among them
a_stalled_sink_stalls_only_its_own_execution_and_loses_nothing, 22
of guest::entry, 22 of guest::spawn, 17 of guest::cgroup, 9 of
guest::process and 2 of guest::root::bootstrap; guest::root's 6
bootstrap tests; and sys::spawn's
a_child_enters_its_root_or_reports_why_not,
the_check_s_credentials_keep_the_parent_s_supplementary_groups and
an_entry_leads_a_session_and_keeps_its_barrier_from_the_program,
whose stages go. So do the deleted modules' 8 doc tests, and the
test hooks of their code and of the deleted child stages.
- sys::spawn's invalid_specs_are_refused_before_forking,
stream_sources_below_the_standard_streams_are_raised_and_kept_from_the_program
and the_launch_descriptors_are_close_on_exec lose their cases of the
credentials check, inherited descriptors and cgroup placement.
- sys::entry's the_kernel_structures_have_their_uapi_sizes loses
CloneArgs and OpenHow, and its Simulation helper goes.
- Tests that used a deleted helper use the kept one:
a_thread_that_may_hold_the_permission_spawns_no_command spawns
through sys::spawn;
a_write_takes_back_its_own_sigpipe_beside_one_pending_for_the_process
and
a_stolen_or_auto_reaped_status_is_reported_once_and_never_reclassified_by_an_ending
wait with sys::wait;
privileged_capture_sweep_kills_setsid_escapees_and_spares_both_helpers
reads process groups with getpgid; and the managed agent's runtime
tests signal through sys::tests' signal_through_pidfd.
a_real_time_signal_goes_through_a_pidfd_and_to_a_process_group drops
its check of process_group_of.
- The helpers that only deleted tests used go: root::kernel's fake
writes and process moves, root's bootstrap fixtures,
sys::process's untraced and traced children, sys::fd's
set_descriptor_limit and sys::spawn's CAP_SYS_CHROOT.
Docs: the rustdoc of guest, guest::root, sys and the kept OS modules,
the crate's guest summary, the nvx README, whose module table and
sections drop the five modules, and the guest-agent guidelines no
longer describe the deleted modules or the root's bootstrap. The case
matrix retires the deleted doc tests and names the kept ones by the
lines to which they move. The test-layout allowlist and the Linux
public API snapshot drop the deleted modules.
Part of #1123 (SL6.11b).
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 321bd2b commit 004d770
42 files changed
Lines changed: 285 additions & 11059 deletions
File tree
- doc
- nvx-rs
- public-api
- src
- guest
- cgroup
- entry
- exec
- init/tests
- managed_agent/dispatch/tests
- process
- root
- bootstrap
- kernel
- spawn
- sys
- entry
- fd
- port
- process
- signal
- spawn
- time
- scripts
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
| 37 | + | |
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| |||
480 | 480 | | |
481 | 481 | | |
482 | 482 | | |
483 | | - | |
484 | | - | |
485 | | - | |
486 | | - | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
487 | 487 | | |
488 | 488 | | |
489 | 489 | | |
490 | | - | |
| 490 | + | |
491 | 491 | | |
492 | | - | |
493 | | - | |
| 492 | + | |
| 493 | + | |
494 | 494 | | |
495 | | - | |
| 495 | + | |
496 | 496 | | |
497 | | - | |
498 | | - | |
| 497 | + | |
| 498 | + | |
499 | 499 | | |
500 | 500 | | |
501 | 501 | | |
| |||
505 | 505 | | |
506 | 506 | | |
507 | 507 | | |
508 | | - | |
| 508 | + | |
509 | 509 | | |
510 | 510 | | |
511 | 511 | | |
512 | | - | |
| 512 | + | |
513 | 513 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
| 56 | + | |
| 57 | + | |
63 | 58 | | |
64 | 59 | | |
65 | 60 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
62 | 60 | | |
63 | 61 | | |
64 | 62 | | |
| |||
130 | 128 | | |
131 | 129 | | |
132 | 130 | | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | 131 | | |
139 | 132 | | |
140 | 133 | | |
141 | 134 | | |
142 | | - | |
| 135 | + | |
143 | 136 | | |
144 | 137 | | |
145 | 138 | | |
| |||
1199 | 1192 | | |
1200 | 1193 | | |
1201 | 1194 | | |
1202 | | - | |
1203 | | - | |
1204 | | - | |
1205 | | - | |
1206 | | - | |
1207 | | - | |
1208 | | - | |
1209 | | - | |
1210 | | - | |
1211 | | - | |
1212 | | - | |
1213 | | - | |
1214 | | - | |
1215 | | - | |
1216 | | - | |
1217 | | - | |
1218 | | - | |
1219 | | - | |
1220 | | - | |
1221 | | - | |
1222 | | - | |
1223 | | - | |
1224 | | - | |
1225 | | - | |
1226 | | - | |
1227 | | - | |
1228 | | - | |
1229 | | - | |
1230 | | - | |
1231 | | - | |
1232 | | - | |
1233 | | - | |
1234 | | - | |
1235 | | - | |
1236 | | - | |
1237 | | - | |
1238 | | - | |
1239 | | - | |
1240 | | - | |
1241 | | - | |
1242 | | - | |
1243 | | - | |
1244 | | - | |
1245 | | - | |
1246 | | - | |
1247 | | - | |
1248 | | - | |
1249 | | - | |
1250 | | - | |
1251 | | - | |
1252 | | - | |
1253 | | - | |
1254 | | - | |
1255 | | - | |
1256 | | - | |
1257 | | - | |
1258 | | - | |
1259 | | - | |
1260 | | - | |
1261 | | - | |
1262 | | - | |
1263 | | - | |
1264 | | - | |
1265 | | - | |
1266 | | - | |
1267 | | - | |
1268 | | - | |
1269 | | - | |
1270 | | - | |
1271 | | - | |
1272 | | - | |
1273 | | - | |
1274 | | - | |
1275 | | - | |
1276 | | - | |
1277 | | - | |
1278 | | - | |
1279 | | - | |
1280 | | - | |
1281 | | - | |
1282 | | - | |
1283 | | - | |
1284 | | - | |
1285 | | - | |
1286 | | - | |
1287 | | - | |
1288 | | - | |
1289 | | - | |
1290 | | - | |
1291 | | - | |
1292 | | - | |
1293 | | - | |
1294 | | - | |
1295 | | - | |
1296 | | - | |
1297 | 1195 | | |
1298 | 1196 | | |
1299 | 1197 | | |
| |||
1316 | 1214 | | |
1317 | 1215 | | |
1318 | 1216 | | |
1319 | | - | |
| 1217 | + | |
1320 | 1218 | | |
1321 | 1219 | | |
1322 | 1220 | | |
| |||
1478 | 1376 | | |
1479 | 1377 | | |
1480 | 1378 | | |
1481 | | - | |
1482 | | - | |
1483 | | - | |
1484 | | - | |
1485 | | - | |
1486 | 1379 | | |
1487 | 1380 | | |
1488 | 1381 | | |
| |||
2679 | 2572 | | |
2680 | 2573 | | |
2681 | 2574 | | |
2682 | | - | |
2683 | | - | |
2684 | | - | |
2685 | | - | |
2686 | | - | |
| 2575 | + | |
2687 | 2576 | | |
2688 | 2577 | | |
2689 | 2578 | | |
2690 | | - | |
2691 | | - | |
2692 | | - | |
| 2579 | + | |
| 2580 | + | |
2693 | 2581 | | |
2694 | 2582 | | |
2695 | 2583 | | |
| |||
0 commit comments