A new patch series enables Rust support on IBM’s s390 mainframe architecture, but requires a nightly Rust compiler. The change paves the way for memory‑safe kernel code on mainframes, though production use will be limited until the toolchain stabilises.
Rust Stalks IBM Mainframes, but Only in Nightly Form

Regulatory action → What it requires → Compliance timeline
Patch series submitted – Engineer Jan Polensky has opened a patch set titled "s390: enable Rust support and add required arch glue" for the Linux kernel. If the series lands, the kernel will be able to compile Rust modules for IBM’s s390 (a.k.a. mainframe) architecture.
What the patch does
- Declares s390 as a Rust‑capable 64‑bit architecture.
- Introduces the small set of assembly interfaces Rust needs for WARN/BUG reporting and static branch handling.
- Adjusts bindgen parameters to avoid layout conflicts caused by packed and aligned s390 structures.
- Sets the minimum tool‑chain version to a nightly
rustcbecause the architecture relies on the-Zpacked-stackfeature, which is not yet available in stable releases.
Why it matters
- Rust’s memory‑safety guarantees can now be applied to kernel code running on IBM mainframes, a platform traditionally dominated by C.
- The change follows the kernel’s 2022 decision to accept Rust as a first‑class language for new drivers and subsystems.
- Mainframe customers will need to adopt a nightly Rust toolchain, which may conflict with the conservative upgrade policies common in enterprise environments.
Compliance timeline for mainframe operators
| Milestone | Date (estimated) | Action required |
|---|---|---|
| Patch acceptance into Linux mainline | Q3 2026 (kernel 7.1‑rc3) | Review the patch series and test on staging systems. |
Availability of nightly Rust with -Zpacked-stack for s390 |
Immediate with current nightly releases | Update CI pipelines to pull the latest nightly rustc. |
| Stable Rust support for s390 (if pursued) | Likely 2027‑2028, contingent on upstream Rust development | Plan migration to stable toolchain once the feature graduates. |
| Production deployment on IBM Z systems | After internal validation, typically 6‑12 months post‑acceptance | Conduct security and performance testing; document any compiler‑specific flags. |
Practical steps for compliance officers
- Inventory your toolchain – Verify that your build environment can fetch the required nightly Rust version (e.g., via
rustup toolchain install nightly). - Update build scripts – Add the
-Zpacked-stackflag to the Rust compilation flags for kernel modules targeting s390. - Validate architecture glue – Run the kernel’s
make ARCH=s390 CROSS_COMPILE=riscv64-linux-gnu- rustdefconfig(or equivalent) to ensure the new assembly interfaces are linked correctly. - Perform regression testing – Use existing mainframe test suites to confirm that WARN/BUG reporting behaves as expected with Rust code paths.
- Document the change – Record the compiler version, patch identifiers, and any deviations from the standard kernel build process in your configuration management database (CMDB).
Broader context
When Rust entered the kernel in 2022, the primary concern was the LLVM‑based rustc versus the kernel’s traditional GCC toolchain. Linux has supported LLVM as a backend since kernel 6.9, and the current development cycle (kernel 7.1‑rc3) continues to expand LLVM usage. The s390 patch does not introduce a new LLVM backend; it simply adapts the existing Rust infrastructure to the mainframe’s unique calling conventions and data layouts.
The mainframe market is known for its cautious adoption of new software stacks. Requiring a nightly compiler means early adopters must accept the risk of occasional breakages or ABI changes. However, the patch demonstrates that the kernel community is willing to invest the engineering effort needed to bring memory‑safe languages to even the most legacy‑heavy platforms.
What to watch next
- Kernel 7.2 (expected mid‑2026) may include further refinements to Rust support, possibly reducing the reliance on nightly features.
- IBM’s own Linux on Z roadmap could incorporate the patch into its distribution, offering a pre‑tested Rust‑enabled kernel for customers.
- Upstream Rust may eventually stabilize
-Zpacked-stackor provide an alternative, allowing a shift to the stable toolchain and easing compliance concerns.
For organizations that manage sensitive workloads on IBM Z, the introduction of Rust represents a potential reduction in memory‑corruption vulnerabilities. Until the nightly requirement is resolved, the prudent approach is to pilot the feature in isolated environments, document all deviations, and maintain a clear rollback path to the proven GCC‑based kernel.

Comments
Please log in or register to join the discussion