Skip to content

vms-a17e: vms.ko constructs SYSTEM's identity at module init; PID 1 reads SYSUAF zero times - #288

Merged
baron-3dl merged 4 commits into
mainfrom
vms-a17e-system-identity
Aug 10, 2026
Merged

baron-3dl merged 4 commits into
mainfrom
vms-a17e-system-identity

Conversation

@baron-3dl

Copy link
Copy Markdown
Contributor

Boot-faithfulness (parent vms-46c): vms.ko now constructs SYSTEM's identity (UIC [1,4] + priv mask) at module init following the OPA0: precedent in src/kernel/vms_devtab.c; PROVISION.EXE is a pure reader via vms_kif_getjpi_self() — PID 1 reads SYSUAF zero times. New QEMU gate + negctl assert executive-constructed identity + zero SYSUAF reads; architecture.md boot diagram updated. Opened by the conductor after the implementer stalled before gh pr create; CI boot gates (persistent-boot, norecord halt, SYSTEM-identity gate) are the authoritative proof.

🤖 Generated with Claude Code

alice and others added 4 commits August 10, 2026 19:16
…ON.EXE reads SYSUAF zero times for it

EXEC_INIT constructs the system process's identity on OpenVMS; LOGINOUT is
SYSUAF's FIRST reader. OVMX inverted that: PROVISION.EXE read SYSUAF's
SYSTEM record and handed the values to VMS_IOCTL_SETIDENT, the ioctl
reserved for LOGINOUT authenticating an arbitrary user.

Follows the OPA0: precedent in vms_devtab.c (the executive creates the
fact itself, from constants it owns, before any process asks):

- VMS_SYSTEM_UIC ([1,4]) and VMS_PRV_M_SYSTEM_ALL (ALL) are new executive
  constants in vms_internal.h, oracle-pinned to docs/oracle/vax73-authorize-
  privilege.md's "owner UIC [1,4]" and OVMX's own default SYSUAF SYSTEM
  record (PRIVILEGES=ALL).
- New ioctl VMS_IOCTL_ESTABLISH_SYSTEM / vms_ioctl_establish_system()
  (vms_proctab.c) stamps that constant identity onto the caller. Unlike
  VMS_IOCTL_SETIDENT, its args struct carries no username/uic/privs field
  -- there is nothing for a caller to supply. Gated on capable(CAP_SYS_ADMIN),
  the same real kernel credential vms_proc_register() already uses.
- vms_kif_establish_system() is the new libvmssys wrapper; added to all 7
  SYS_VEC/harness copies (mk_vmssys_shr.sh + the 6 src/imgact/test/run_*
  native-link harnesses).
- vms_init() announces the constant at module load, mirroring
  vms_devtab_init()'s console announcement.

PROVISION.EXE (src/ovmx_provision/ovmx_provision.c) drops its
sysuaf_lookup("SYSTEM", ...) + vms_kif_setident() call in favor of
vms_kif_establish_system(); its vms_kif_getjpi_self() readback is
unchanged. The "no SYSTEM record" boot halt (#278) survives by riding
provision_home_directories()'s existing SYSUAF walk (already required for
home-directory provisioning) instead of a second, now-deleted read --
moved earlier in main() so it still fires before any identity is printed.

Tests:
- tests/integration/test_system_identity_no_sysuaf.sh (+_negctl.sh, 9/9
  mutations caught): static gate proving the identity path is rewired,
  not just relocated.
- tests/qemu/test_release_e2e.sh: new "poisoned_uic" case writes SYSTEM's
  SYSUAF row with UIC [50,50]/PRIVILEGES=NONE and asserts the boot still
  reports "SYSTEM [1,4] established by the executive" -- the ground-source
  proof that SYSUAF content no longer feeds identity. norecord case's halt
  message updated (no SYSTEM account / no session could authenticate) to
  match the new source of the check, same functional guarantee.

Verified: vms.ko builds clean via src/kernel/Dockerfile; full CMake dev
build (BUILD_TOOLS=ON) succeeds containerized.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…tive-constructed SYSTEM identity

The diagram still showed PROVISION.EXE reading SYSUAF's SYSTEM record and
calling vms_kif_setident() on itself. Updated to vms_kif_establish_system()
and the new source of the "no SYSTEM record" continuity check.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
test_system_identity_no_sysuaf.sh and its negctl pair follow the
terminal_identity_gate / env_identity_census pattern already in this
CMakeLists. Verified via a containerized Debug+BUILD_TESTS build:
`ctest -R system_identity_no_sysuaf` -- 2/2 passed.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…oisoned row

CI caught this (PR #288): run_case()'s "the edited SYSTEM row is readable
in-session" check hardcoded "SYSTEM|$HASH|1|4|", which every case except
poisoned_uic legitimately writes. poisoned_uic deliberately writes
"50|50" -- that's the whole point of the case -- so the hardcoded check
failed even though the poison landed exactly as intended. Mechanical bug
in the shared helper, not a defect in vms-a17e's design.

Parameterized run_case() with a 5th "uic" arg (default "1|4", unchanged
for every existing caller) used ONLY by that landed-in-file sanity check.
poisoned_uic passes "50|50".

Added the design clarification the fix surfaces: there are two identities
in this boot, and vms-a17e touches only one. The STARTUP process
(PROVISION.EXE) gets vms_kif_establish_system()'s executive CONSTANT,
independent of SYSUAF by design. A real interactive SYSTEM/MANAGER login
against the same poisoned row genuinely authenticates as UIC [50,50]
through tools/vms_login.c (LOGINOUT), because LOGINOUT reading SYSUAF is
correct, unmodified VMS behavior and exactly what this item's own goal
statement asks for -- "LOGINOUT is SYSUAF's FIRST reader". So the fixed
sanity check correctly expects [50,50] in the file; the SEPARATE "SYSTEM
[1,4] established by the executive" assertion (proving the STARTUP
process's identity is unaffected) is untouched and already passed on the
first CI run.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@baron-3dl
baron-3dl merged commit c8da227 into main Aug 10, 2026
53 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant