ADR-041: User FP/SIMD Register State - Soft-Float Kernels and a Per-Task Area Saved at the Task Switch
- Status: Accepted
- Date: 2026-11-28
- Depends on: ADR-001
(per-CPU schedulers, the two switch paths and the
ContextSwitchHint), ADR-034 (the global task-slot namespace,claim_task_slot/release_task_slot, slot generations), ADR-040 (x86_64 § 6: CR0.EM and CR4.OSXSAVE hold ring 3 off the FP units until this ADR’s x86_64 stage lands) - Related: ADR-013
(riscv64 runs with
sstatus.FS= Off), ADR-008 (the sizing model task slots do not yet follow), ADR-019 (a reaped task’s slot), threat-model.md T-9 - Supersedes: N/A
Scope Boundary (read this first)
This ADR decides who may hold FP/SIMD (floating-point and single-instruction-multiple-data) register state, where a program’s state lives while it is not running, and when it moves between the registers and that place.
| Concern | Owner |
|---|---|
| Whether kernel code may use FP/SIMD registers, on every architecture | This ADR § 1 |
| Where a task’s FP/SIMD state lives off-CPU, its initial value, its lifetime | This ADR § 2 |
| When state is saved and restored, and by which code | This ADR § 3 |
| What each architecture does today and what is deferred | This ADR § 4 |
| What a program may assume across a syscall | This ADR § 5 |
| Which CPU control bits let ring 3 / EL0 / U-mode execute FP instructions | ADR-040
§ 6 (x86_64), enable_fpsimd (aarch64), ADR-013
(riscv64), unchanged here except as § 4 names |
The general-purpose register frame (SavedContext) and the trap entry that builds it | ADR-040 , unchanged |
| Task slots, their claim and release | ADR-034 , unchanged; § 2 adds one call at claim |
Context
Every aarch64 Rust program for CambiOS reaches the vector unit whether or not it computes with floats: memset and memcpy in compiler_builtins use NEON there (the dup v0.4h that reaped the policy service on an AP with FPEN = 0, 2026-11-04), LLVM’s inlined copies of small memcpy use the Q registers too, and key-store-service’s blake3 keeps its hash state in them. Any byte that process copies through those routines, key material included, passes through the same registers; the hash state is the case measured so far, and step 3’s evidence should include a disassembly of key-store-service’s copy paths to settle the stronger claim. Until this ADR the aarch64 exception frame saved x0-x30, ELR, SPSR and SP_EL0 only; no architecture saved FP/SIMD state across a task switch (STATUS.md Known issues, 2026-11-04). The aarch64 kernel was itself built with NEON: 688 instructions in 38 functions touched vector registers in the release kernel, among them handle_write, handle_recv_msg, memset, every core::fmt path, the in-kernel AES, ed25519 verification and blake3.
The sandbox review of 2026-11-26 (stage J, notes/stage-j-fp-simd-state.md) measured the three architectures:
| Architecture | Kernel uses FP/SIMD | Programs use it | Saved across a switch | Programs may execute it | State |
|---|---|---|---|---|---|
| aarch64 | yes, 38 functions | yes, every program | no | yes (CPACR_EL1.FPEN = 0b11 on every CPU) | live: corruption across a syscall or a preemption, and the next task reads the previous task’s registers |
| x86_64 | no (soft-float) | no (0 instructions in 64 binaries) | no | no: CR0.EM = 1 since ADR-040
step 5 | closed (an FP instruction reaps the program) |
| riscv64 | no | no | no | no: sstatus.FS = Off in S- and U-mode | closed (illegal instruction, reaped) |
The aarch64 syscall half was closed first, in user space (libsys declares clobber_abi("C") on every svc, 2026-11-28): the compiler no longer keeps a vector value live across a syscall. Preemption and the cross-task leak remained.
Problem
- A task’s FP/SIMD state was not part of its context. A task interrupted between a vector load and its store resumed with whatever the kernel or the next task on that CPU had left in those registers.
- The next task read the previous task’s registers. key-store-service’s hash state passed through them; nothing cleared them between tasks.
- The kernel itself wrote vector registers on any trap that ran through one of those 38 functions, so the state of the interrupted program was gone before any save could run, and any save would have had to happen on every entry, on every path, including the EL1-taken interrupt. The same writes ran the other way: a kernel
memcpyof another process’s IPC payload left that payload’s bytes in the registers, and the return to EL0 handed them to the program. - No static setting could tell the two apart. Kernel and user FP use look identical to the hardware;
CPACR_EL1.FPENcan trap both exception levels or EL0 alone, never EL1 alone. Catching kernel use at runtime means togglingFPENon every entry and exit (Alternatives Considered), and even then only on the paths a run exercises.
Decision
1. The kernel holds no FP/SIMD state
Kernel code on every architecture executes no FP/SIMD instruction, except the two routines of § 3 that move a task’s state between the registers and its area. The compiler is told so by the target: the x86_64 kernel target is soft-float already; the aarch64 kernel moves from aarch64-unknown-none to aarch64-unknown-none-softfloat (Tier 2, prebuilt core and compiler_builtins without NEON); riscv64 builds with the F and D extensions available to the compiler but sstatus.FS = Off, and the same scan applies to it when its FP state is enabled (§ 4). User crates stay on the hard-float targets: a program is free to use the vector unit.
On aarch64 the rule is enforced by the build, because the hardware cannot do it alone. make check-aarch64-fpsimd (inside check-aarch64, so make check-all and CI) disassembles the aarch64 kernel and fails on any instruction that names a V, Q, D, S, H or B register, a Z or P register or ZA, or reads or writes FPCR / FPSR, outside an allow-list that is exactly the two § 3 routines. It fails closed: a word in an executable section the disassembler cannot decode (.inst, <unknown>) fails the build too, so the scan’s known weakness, an encoding its patterns do not name, cannot pass silently. A target flag is a default a dependency’s inline assembly, a prebuilt runtime routine or a toolchain change can override without a build error; the scan is what makes “the kernel never touches FP state” an invariant that is checked rather than assumed. On riscv64 the hardware does enforce it today: sstatus.FS = Off traps an FP instruction in S-mode as well as U-mode, which ends when U-mode gets FS (§ 4); the scan arrives with that change. On x86_64 the soft-float target has held since the kernel’s first build and CR0.EM = 1 traps ring 0 too; the scan arrives with step 4.
Consequences accepted: kernel memset / memcpy, core::fmt, the in-kernel AES and blake3, and ed25519 verification run scalar on aarch64, as they already do on x86_64. Measured at boot (two boots each, the real aarch64 image, 2026-11-28): every service’s “ready after N ticks” line is identical between the two kernels within the hard-float kernel’s own run-to-run jitter; signature verification and the storage mount are in that wave. That shows no user-visible boot regression at 10 ms resolution, not that the scalar paths cost nothing. In-kernel work that a measurement later shows GPR-bound moves to user space first (the “cycles outside the ring” rule); the Linux-shaped kernel_neon_begin / end bracket, which would save the current task’s state before the kernel used the registers, is the last resort (Open Problems).
2. One area per task, outside SavedContext, eagerly maintained
Each task has one FP/SIMD save area, sized for the architecture’s full user-visible register file, that lives outside SavedContext. Because kernel code holds no FP state (§ 1), a task’s registers are untouched from the moment it leaves the CPU until the kernel switches to another task, so the state needs saving at a task switch only, never on a trap that returns to the same task. Trap frames stay general-purpose-register-only on every architecture; a timer tick that does not reschedule and a syscall that does not block pay nothing.
The area is indexed by global task slot. USER_FP_STATE: [FpSlot; MAX_TASKS], a static in the kernel image, one entry per slot of the task-slot namespace ADR-034
§ 4 defines, the same shape as TASK_CPU_MAP and TASK_GENERATION. Slot 0, every CPU’s idle task, has no user state and is never saved or restored. The entry for slot s is written only by the CPU that switches task s out and read only by the CPU that switches task s in. What orders the two is the scheduler lock, and the save has to happen while it is held: the three scheduler entry points (on_timer_isr, on_resched_ipi, on_voluntary_yield) hold this CPU’s scheduler lock while they mark the outgoing task Ready, Blocked or Terminated and pick the next one, and drop it when they return the hint; the architecture applies the hint after that. A save that ran at hint application would run after the lock was dropped, and another CPU could by then have taken both locks, migrated the outgoing task (it is Ready) and restored from an area not yet written: a stale restore racing a write. So the save of the outgoing task runs inside the scheduler’s critical section, before the lock is dropped (§ 3), and from then on the task’s area is complete before any other CPU can observe the task as not Running. The restore of the incoming task may run after the drop: the scheduler marked it Running under the lock, no other CPU migrates a Running task, and its slot is not released while it is Running. The general-purpose frame never had this problem because it is complete before the scheduler is called; the FP save is not, which is why it moves inside. The entry needs no lock of its own (an “additional lock domain” with no lock: single-writer by construction, ordered by the scheduler lock). When task slots move under ADR-008
sizing, this table moves with them.
A new task starts from the architecture’s reset image. claim_task_slot writes the slot’s area with the state the architecture defines for a fresh FP unit, before the slot is live anywhere, and the task’s first dispatch restores from it: aarch64, all zeros (v0-v31 = 0, FPCR = 0, FPSR = 0: round-to-nearest, no exception flags; the architecture leaves the V registers UNKNOWN at reset, so zero is this ADR’s choice); x86_64, FCW = 0x037F and MXCSR = 0x1F80 (every exception masked, round-to-nearest, as FINIT and reset leave them) and everything else zero, since an all-zero FXSAVE image unmasks every exception and the first inexact SSE operation would fault; riscv64, f0-f31 = 0 and fcsr = 0. release_task_slot zeroes the whole area (zero, not the reset image: nothing restores from it again), so a dead task’s registers do not sit in kernel memory until the slot is reused. Release happens on the CPU the task died on, after its terminal switch (ADR-034
: the reclaim item is drained by that CPU’s death path or idle loop), so the last save into the area precedes the zero in that CPU’s program order, and the owner field on that CPU no longer names the slot (§ 3 updates it in the same critical section as the save). No task ever sees the previous occupant’s registers; no task’s area is read after its slot is released.
Eager, not lazy. The state is saved on every switch-out of a non-idle task and restored on every switch-in of one, including a switch to or from the idle task: a task switched out to idle and picked up on another CPU must find its state in its area, not in the first CPU’s registers. Lazy schemes (restore on first use after a trap: x86_64 CR0.TS, aarch64 FPEN = 0b01) leave the previous task’s values in the registers until the new task touches them and are the LazyFP class of leak (CVE-2018-3665); they are rejected.
3. Save and restore happen at the task switch, in two routines
Each architecture keeps, per CPU, the slot whose state is live in that CPU’s registers (PerCpu.fp_owner_slot; 0 = none). The switch is two halves on either side of the scheduler’s lock drop:
- Switch-out, under the scheduler lock. When a scheduler entry point has decided to resume a different task and before it returns the hint, it calls
arch::fp_switch_out(next_slot): if the owner is not 0, save the registers into the owner’s area; owner =next_slot. One call site, in the portable scheduler at the point the three entry points share (the hint builder), with the lock held and interrupts masked. The owner is updated here, not at the restore, so that from the moment the lock drops no CPU’s owner field names a slot whose task is not Running on that CPU. - Switch-in, at hint application. The portable
ContextSwitchHintcarriestask_slot. Where the architecture applies a hint,arch::fp_switch_in(task_slot)runs with interrupts masked, before the new task’s general-purpose registers are restored: iftask_slotis not 0, restore the registers from its area. Slot 0 (idle) restores nothing, and the registers hold the saved task’s stale values only until the next restore; no EL0 code runs on the idle task.
Every switch-away goes through one of two paths. On aarch64 the paths that resume a different task are the timer interrupt (timer_isr_inner) and the voluntary yield (yield_inner, reached from yield_save_and_switch); kick_cpu is a no-op there, so there is no reschedule-interrupt path. Process exit, every blocking syscall, and the fault reap (reap_faulting_current then the yield_save_and_switch loop in the EL0 fault handler) all leave the CPU through yield_save_and_switch; there is no third way off the CPU. x86_64 adds resched_isr_inner (step 4). A path that returns to the same task applies no hint and runs none of this.
The invariant that catches a missed path: at every return to EL0, fp_owner_slot equals the current task’s slot. The check is always on, not a debug assertion: one load and one compare in the EL0 exit path, where the trap frame’s return mode is already known, and a mismatch halts with a typed report in the ADR-040
§ 4 shape (a kernel invariant broken is a decision, not a continue). It runs in release builds because the regression kernels are release builds; a debug-only check would never run where the evidence is gathered. The Verification Target states it in these terms, since it is what “no switch-away was missed” means for FP state.
The save and restore routines are hand-written assembly (fpsimd_save, fpsimd_restore: on aarch64 sixteen stp / ldp of Q-register pairs and mrs / msr of FPCR and FPSR), the only FP/SIMD instructions the kernel binary may contain (§ 1). Their safety contract: the area pointer is 16-byte aligned and sized for the whole register file; the caller runs with interrupts masked and is the CPU that owns the slot’s access at that moment (§ 2).
4. Per architecture
| Architecture | Area | Today | Deferred |
|---|---|---|---|
| aarch64 | 528 bytes: v0-v31 (32 × 16), FPCR, FPSR (HARDWARE: Armv8-A FP/SIMD register file) | steps 1-3 of § Sequencing; enable_fpsimd writes CPACR_EL1 on every CPU with FPEN = 0b11 and ZEN = SMEN = 0 explicitly (today it ORs FPEN in and leaves the other fields as the bootloader handed them), so EL0 may use the FP/SIMD unit and an SVE or SME instruction traps and reaps the program; the 528-byte area is a complete record of what EL0 can hold only because of that write | SVE / SME: a size change to the area (Z, P, FFR; ZA), decided when a CPU with the extension is a target |
| x86_64 | 512 bytes, FXSAVE / FXRSTOR, 16-byte aligned (HARDWARE); XSAVE with a boot-time size from CPUID leaf 0xD when AVX is enabled | kernel soft-float; CR0.EM = 1 and CR4.OSXSAVE = 0 keep ring 3 off the x87, SSE and AVX units (ADR-040
§ 6, both rows) | the area, CR0.EM → 0 with CR4.OSXSAVE staying 0 (FXSAVE; XSAVE and OSXSAVE = 1 when AVX is enabled), resched_isr_inner included, the probe’s trap-x87 stage becomes a survives-a-switch stage: step 4 of § Sequencing, before ADR-040’s user address floor and ceiling (ADR-040
§ 8) (Jason, 2026-11-28) |
| riscv64 | 264 bytes: f0-f31 (D extension, 32 × 8), fcsr (HARDWARE); the V extension would add a boot-time size from vlenb | sstatus.FS = Off and sstatus.VS = Off. No kernel code enables either and every frame the kernel synthesizes carries sstatus = 0x20 (both fields 0), but the boot value was inherited from firmware: SBI HSM’s hart start leaves sstatus undefined except SIE, the same assumption this ADR removes from enable_fpsimd. Step 2 adds one csrc sstatus, FS | VS per hart at boot (BSP and AP init), as Linux’s entry does, and step 3 a probe stage that executes one FP instruction and expects the reap. The exclusion bites hardest here: the target is riscv64gc (hard-float ABI), so the first f64 a program computes is an illegal-instruction reap | the area and FS = Initial for U-mode: when a riscv64 program needs floating point (Open Problems) |
5. What a program may assume
Across a syscall, the kernel promises no vector register: all of v0-v31 may change, including the low halves of v8-v15 that AAPCS64 preserves across a call. The control and status registers are promised: FPCR and FPSR come back as the program left them across every trap, since the kernel never writes them and a future bracket (Open Problems) would save and restore them. This is an ABI decision, not a description of the kernel: after steps 1-3 the kernel never writes the vector registers either, so a value would in fact survive, but the ABI keeps the clobber so that a later kernel is free to use the unit inside a syscall path without an ABI change. libsys’s aarch64 svc blocks declare clobber_abi("C") (2026-11-28); on aarch64 Rust’s clobber_abi("C") marks every one of v0-v31 clobbered (checked by codegen the same day), which is this promise’s set, not AAPCS64’s. That line is the ABI, and it is not retired when the save lands. Across a preemption, a yield, a blocking syscall and a migration, every FP/SIMD register and the control registers come back as the program left them (§ 2, § 3). A new program starts with the reset state (§ 2).
Architecture
| Piece | Lives in |
|---|---|
UserFpState; USER_FP_STATE as [FpSlot; MAX_TASKS] where FpSlot wraps an UnsafeCell (unsafe impl Sync, reached through a raw pointer only: not a static mut, which the static_mut_refs backlog is retiring); fp_state_reset, fp_switch_out, fp_switch_in, fpsimd_save / fpsimd_restore (aarch64) | src/arch/aarch64/fpsimd.rs |
PerCpu.fp_owner_slot | src/arch/aarch64/percpu.rs |
the two hint-applying sites (fp_switch_in) and the EL0-exit owner check | timer_isr_inner, yield_inner, the EL0 restore path in src/arch/aarch64/mod.rs |
ContextSwitchHint.task_slot; one hint builder for every entry point, which calls arch::fp_switch_out under the lock | src/scheduler/mod.rs |
enable_fpsimd writing FPEN = 0b11, ZEN = SMEN = 0, then isb (the isb is already there) | src/arch/aarch64/mod.rs |
riscv64: csrc sstatus, FS | VS per hart | percpu::init_bsp / init_ap in src/arch/riscv64/percpu.rs |
| zero at claim and at release | claim_task_slot and release_task_slot in src/lib.rs, through arch::fp_state_reset (a no-op on x86_64 and riscv64 until their § 4 areas land) |
| the build gate | tools/check-aarch64-fpsimd.py, make check-aarch64-fpsimd, run by check-aarch64 so make check-all (the mandatory tri-arch gate) and CI’s aarch64 job both carry it |
| the kernel triple | .cargo/config.toml, rust-toolchain.toml, the Makefile’s kernel-triple variables (user crates keep their own), .github/workflows/ci.yml |
| regression stages | user/regression-probe (aarch64: fp-switch, fp-fresh; riscv64: trap-fp-off), user/regress-victim modes fp-fill, fp-fresh (aarch64 build), fp-off (riscv64 build) |
Threat Model Impact
threat-model.md
gains T-9, the FP/SIMD register file as a cross-task channel: before this ADR a task’s vector values were readable by the next task on that CPU (High: leaks another process’s data; the hash state of key-store-service passed through) and corruptible by the kernel or another task (integrity of every program’s computation). T-9 lands with this ADR’s commit as Open on aarch64 (design: this ADR) and becomes Mitigated in the commit that lands the last of steps 1-3: § 1 removes the kernel as a writer and a discloser, § 2 and § 3 isolate tasks from each other, and the gate and the probe stages are the evidence. Its Gap names what the gate is (a disassembly pattern match whose decode coverage is asserted by its own tests, not proven) and what has no proof (the single-owner rule, restore-before-resume). T-4 (unsafe in the switch paths) gains the two routines of § 3 to its surface, and names them.
Verification Target
- The kernel is FP-free. The disassembled kernel contains no FP/SIMD instruction outside
fpsimd_saveandfpsimd_restore. A build-time check today; a statement a verifier can take as an axiom about kernel code (general-purpose registers only). - Single-owner access to
USER_FP_STATE[s], ordered by the scheduler lock. For every slots: the write (save) happens inside a critical section of the scheduler lock of the CPU on whichswas Running, in the same critical section that changess’s state away from Running; the read (restore) happens on a CPU after a critical section of its own scheduler lock that madesRunning there; a migration ofstakes both locks. So every save ofshappens-before every later restore ofs, and no two accesses toUSER_FP_STATE[s]are concurrent. The invariant it rests on is “a task’s state changes only under its CPU’s scheduler lock” (ADR-001 ), not “Running on at most one CPU” alone. - The owner names the current task at every return to EL0. On every CPU, when the exit path returns to EL0,
fp_owner_slotequals the slot of the task being resumed. This is the statement that no switch-away path was missed (exit, fault reap, blocking syscall, preemption alike); an always-on check halts on every EL0 return that violates it, andfp_switch_inbefore the general-purpose restore is how each path satisfies it. The migration and release orderings of the single-owner target above are not reachable by this check or by the probe stages; they rest on the lock argument and review. - Reset image before first use, zero after last.
fp_state_reset(s)happens-before the firstfp_switch_in(s)for every claim ofs(the claim precedes the per-CPU insert, ADR-034 § 4), and the zero at release happens-after the lastfp_switch_outthat saveds(same CPU, after the terminal switch) and at a time no CPU’s owner field namess. - EL0 cannot hold state the area does not cover. On every CPU
CPACR_EL1.ZEN=SMEN= 0 fromenable_fpsimdon; an aarch64 kernel that enables either changes the area’s size in the same commit. - Area layout.
size_of::<UserFpState>()and the field offsets the assembly uses are compile-time assertions.
Alternatives Considered
Keep the NEON kernel and save v0-v31 on every exception entry
No toolchain change; the state travels in the trap frame, so a switch is still a frame swap. Rejected: every syscall, interrupt and tick on every CPU pays 32 Q-register moves and the frame grows from 272 to 800 bytes (nested frames double it); the save must also cover the EL1-taken interrupt and context_switch’s callee-saved d8-d15; nothing mechanical checks that no path was missed, since the compiler may emit vector code anywhere; a missed restore leaks kernel-staged data (IPC payloads, keys in flight) to EL0, whereas under § 1 a missed path can expose at most another task’s own registers; with SVE the per-entry save becomes the full Z/P/FFR state. It also diverges from x86_64 and riscv64, whose kernels already hold no FP state.
-C target-feature=-neon,-fp-armv8 on aarch64-unknown-none
Rejected: rustc warns both features are ABI-required on that target and that the flag will become a hard error (rust-lang/rust#116344), and the prebuilt core / compiler_builtins keep their NEON regardless. The soft-float target is the supported form of the same intent.
Catch kernel FP use at runtime by toggling FPEN on every entry and exit
CPACR_EL1.FPEN cannot trap EL1 alone, but it can trap both levels: set it to 0b00 on every kernel entry and back to 0b11 on every return to EL0, and any kernel FP instruction faults. Rejected as the enforcement: a system-register write and isb on every entry and every exit of every trap on every CPU, and it catches only the paths a run happens to exercise, where the § 1 scan covers every instruction in the binary before it boots. It would be a runtime backstop behind the scan, not a replacement; it is not taken because the scan’s failure mode (a decode the pattern misses) is better closed by extending the scan’s tests than by paying on every trap.
Lazy save (trap on first use)
Rejected in § 2: the LazyFP leak class.
FP state inside SavedContext
Rejected: it makes every trap frame carry the area and every trap pay the save, which § 1 makes unnecessary; it also couples the frame layout, which ADR-040 holds fixed by assertion, to a size that changes with SVE / AVX.
A boot-time-sized area table (ADR-008 )
Not yet: task slots themselves are a compile-time MAX_TASKS namespace with its own SCAFFOLDING row, and TASK_CPU_MAP / TASK_GENERATION are statics of the same shape. The area table follows the slot namespace; when the slots move under ADR-008 sizing, it moves with them (Open Problems).
Open Problems (deferred)
Deferred decision. The x86_64 area (§ 4 row). Why: the design is this ADR’s; the stage is sequenced, not yet built. Revisit when: a program needs floating point or vector instructions on x86_64, or steps 1-3 have landed, whichever is first; the x86_64 stage is step 4 (§ Sequencing).
Deferred decision. The riscv64 area and
sstatus.FS. Why: no riscv64 binary contains an FP instruction andFS= Off reaps one that tries. Revisit when: a riscv64 program needs floating point.
Deferred decision. Trapped FP exceptions from EL0 (
FPCRtrap-enable bits, EC 0x2C). EL0 may set them; on a core that implements trapped exceptions the result is a synchronous EL0 exception, which the fault handler’s default arm (FaultKind::ArchSpecific) reaps today; QEMU does not implement them. Why: a reap is the safe outcome, and no program wants the trap. Revisit when: a program asks for IEEE trap delivery, or the first hardware target implements the trap-enable bits; the stage that checks the reap is then added.
Deferred decision. SVE / SME state on aarch64 and
XSAVEon x86_64. Why: no target CPU exposes them to programs today (ZEN/SMEN= 0,OSXSAVE= 0). Revisit when: a program or a target machine needs the extension; the area becomes boot-time-sized from the CPU’s reported size, likeXSAVE’s CPUID leaf 0xD.
Deferred decision. A
kernel_fpsimd_begin/endbracket (save the current task’s state, use the unit in the kernel, restore). Why: no kernel path has been measured GPR-bound; moving the work to user space is the first answer. Revisit when: a measurement shows a kernel path whose scalar cost is user-visible and that cannot leave the kernel.
Deferred decision. The area table under ADR-008 sizing. Why: task slots are not under it yet. Revisit when:
MAX_TASKSbecomes a boot-time value; the table changes in the same commit.
Sequencing
Each step is its own commit; the probe stages of step 3 fail on the commit before step 2 and pass after it:
- The aarch64 kernel on
aarch64-unknown-none-softfloat, the kernel-triple split in the Makefile, the toolchain and CI target, the documents that name the triple;check-aarch64-fpsimdwith an empty allow-list (the kernel has no FP code yet to allow), run bycheck-aarch64somake check-allcarries it. fpsimd.rs,PerCpu.fp_owner_slot,ContextSwitchHint.task_slot,fp_switch_outin the scheduler’s hint builder under the lock,fp_switch_inat both aarch64 hint sites, the EL0-exit owner assertion,fp_state_resetat claim (reset image) and at release (zero),enable_fpsimdwritingZEN=SMEN= 0 explicitly; the allow-list becomes the two routines; SCHEDULER.md, ASSUMPTIONS rows. A second, riscv64 commit in this step:csrc sstatus, FS | VSper hart at boot.- Probe stages. aarch64:
fp-switch(a pattern in v0-v31 andFPCRsurvives yields and preemption across at least 30 ticks; it also crosses syscalls issued in raw assembly, since through libsys the compiler keeps nothing live, and that part is labelled a kernel-property check for § 1, not an ABI test: § 5 promises no vector register across a syscall, so the stage is rewritten the day a bracket lands) andfp-fresh(after programs have filled the registers, a new program’s entry reads zeroes); regress-victim builds for aarch64. riscv64:trap-fp-off, one FP instruction, expects the reap (the counterpart of x86_64’strap-x87). With the evidence in hand, threat-model T-9 flips to Mitigated, T-4 gains the two routines, and the STATUS Known issue is replaced by its pointer. - The x86_64 area (§ 4), before ADR-040’s user address floor and ceiling (ADR-040 § 8).
Divergence
The body above reflects the design as approved on 2026-11-28 (design (a) of notes/stage-j-fp-simd-state.md § 4, chosen 2026-11-28; the four implementation choices of notes/stage-j-plan.md, approved the same day). Changes that intersect this ADR are recorded here with their date and commit.