Skip to content

vms-934: build VMS modules IN-TREE under drivers/ovmx/ (clears TAINT_OUT_OF_TREE) - #533

Merged
baron-3dl merged 1 commit into
mainfrom
work/vms-934
Aug 14, 2026
Merged

baron-3dl merged 1 commit into
mainfrom
work/vms-934

Conversation

@baron-3dl

Copy link
Copy Markdown
Contributor

vms-934 — in-tree home for the VMS modules (owns-kernel, parent vms-19e)

Unblocked by vms-448 (from-source pinned kernel). Restarts the owns-kernel pole.

Before: vms.ko/vmsfs.ko were built OUT-OF-TREE (standalone src/kernel/ Makefiles) and loaded with TAINT_OUT_OF_TREE (bit 12, 0x1000) set — the boot logged loading out-of-tree module taints kernel.

After: they build IN-TREE under drivers/ovmx/ of our from-source kernel, so modpost stamps modinfo intree=Y and loading them does not set the out-of-tree taint bit. "In-tree" = OUR tree; no mainline/Linus acceptance implied. The canonical source stays in src/kernel/ + src/kernel-core/ and still drives the standalone out-of-tree build for the QEMU test harness — this is a build-time overlay, not a fork.

drivers/ovmx/ layout (overlaid into the kernel tree at build time)

drivers/ovmx/
├── Kconfig            menuconfig OVMX  →  tristate CONFIG_OVMX_VMS / CONFIG_OVMX_VMSFS
├── Makefile           obj-$(CONFIG_OVMX_VMS) += vms/ ; obj-$(CONFIG_OVMX_VMSFS) += vmsfs/
├── vms/               vms.ko : src/kernel/*.{c,h} (Linux glue) + src/kernel-core/*.{c,h} (exec core), flattened
│   └── Kbuild
└── vmsfs/             vmsfs.ko : src/kernel/vmsfs/*.{c,h} + src/kernel-core/vmsfs/*.{c,h}, flattened
    └── Kbuild

The overlay wires source "drivers/ovmx/Kconfig" into the kernel's drivers/Kconfig and obj-$(CONFIG_OVMX) += ovmx/ into drivers/Makefile. Core .c are flattened into each module dir (all local #include are basename-only, so a flat dir + -I$(src) resolves every header). Object sets mirror the standalone Makefiles' vms-y/vmsfs-y.

intree / no-taint proof

  • Build-time, fail-closed: the kernel-build stage builds the modules via make modules and asserts modinfo -F intree == Y; the builder stage re-asserts intree=Y + vermagic on the exact .ko the initramfs carries.
  • tests/qemu/test_intree_modules.sh (new CI step in the Persistent Boot Smoke job):

Files

  • distro/kernel/drivers-ovmx/{Kconfig,Makefile,vms/Kbuild,vmsfs/Kbuild} (new)
  • distro/kernel/overlay-ovmx-drivers.sh (new, idempotent)
  • distro/kernel/ovmx-x86_64.configCONFIG_OVMX=y, CONFIG_OVMX_VMS=m, CONFIG_OVMX_VMSFS=m
  • distro/Dockerfile.bootable — overlay + config gate + in-tree build/harvest; builder consumes in-tree .ko; runner gains kmod
  • tests/qemu/test_intree_modules.sh (new) + .github/workflows/ci.yml (step + path filter)

Boot-image change → exercises Build & Test + Persistent Boot Smoke + the executive gates. Conductor reaps.

🤖 Generated with Claude Code

…AINT_OUT_OF_TREE

Parent vms-19e ("owns-kernel"), unblocked by vms-448 (from-source pinned
kernel). vms.ko/vmsfs.ko were built OUT-OF-TREE (standalone src/kernel
Makefiles) and loaded with TAINT_OUT_OF_TREE set. Now they build IN-TREE
under drivers/ovmx/ of our from-source kernel, so modpost stamps modinfo
intree=Y and loading them does NOT set the out-of-tree taint bit.

"In-tree" = OUR tree; no mainline/Linus acceptance implied. The canonical
module source stays in src/kernel/ + src/kernel-core/ and still drives the
standalone (out-of-tree) build used by the QEMU test harness — this is a
build-time overlay, not a fork.

What lands:
- distro/kernel/drivers-ovmx/: in-tree Kconfig (menuconfig OVMX + tristate
  CONFIG_OVMX_VMS / CONFIG_OVMX_VMSFS), Makefile, and per-module Kbuild.
- distro/kernel/overlay-ovmx-drivers.sh: copies src/kernel + src/kernel-core
  into drivers/ovmx/{vms,vmsfs}/ (core flattened in; all includes are
  basename-only) and wires drivers/ovmx into the kernel's drivers/Kconfig +
  drivers/Makefile. Idempotent.
- distro/kernel/ovmx-x86_64.config: CONFIG_OVMX=y, CONFIG_OVMX_VMS=m,
  CONFIG_OVMX_VMSFS=m.
- Dockerfile.bootable: kernel-build stage overlays the modules before
  defconfig, gates the =m config, builds them with `make modules`, and
  harvests them asserting intree=Y (fail-closed). Builder stage consumes the
  in-tree .ko (replacing the out-of-tree `make -C src/kernel`) and re-asserts
  vermagic + intree=Y on the exact artifacts the initramfs carries. runner
  gains kmod for modinfo (test tooling).
- tests/qemu/test_intree_modules.sh + CI wiring: STATIC proof (modinfo
  intree=Y on the shipped vms.ko/vmsfs.ko extracted from the boot initramfs)
  plus a raised-loglevel boot proving the modules load with no "out-of-tree
  module taints kernel" line.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@baron-3dl
baron-3dl merged commit e702905 into main Aug 14, 2026
81 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