feat: implement kernel capability model

This commit is contained in:
2026-08-29 16:53:04 +02:00
parent 9051b8a16e
commit e7646bbbdb
47 changed files with 1507 additions and 264 deletions
+8 -6
View File
@@ -250,10 +250,12 @@ void perform_graceful_shutdown(LoginState* ls, int action) {
// ==== Stage 4: dispatch the ACPI power-off / reset ====
show_stage(ls, heading, rebooting ? "Restarting now..." : "Powering off...");
if (rebooting) {
montauk::reset();
} else {
montauk::shutdown();
}
__builtin_unreachable();
int rc = rebooting ? montauk::reset() : montauk::shutdown();
// A successful power-control syscall never returns. If it does return,
// keep the trusted supervisor alive and make the authorization failure
// visible instead of falling through an unreachable-code assumption.
show_stage(ls, heading, rc == montauk::abi::SYS_ERR_PERMISSION
? "Power control permission denied."
: "Power control failed.");
for (;;) montauk::sleep_ms(1000);
}