Joshua Cox
•⏳ 15 min read•blog

Signed kexec_file_load Fast Reboots, Hardened MCP, Android AppOps, and an NVFP4 Reality Check

A 24-hour systems-engineering dispatch: the signed-kexec design the deep dive argues for and the ZFSBootMenu bootcount guard that actually shipped, landing a 74-finding security audit alongside Next.js 'use server' fixes and real CI signature verification, hardening an AI router's MCP server with hop limits and symlink-proof sandboxes plus host-clamped SGLang/vLLM recipes, replacing a piercing medical CGM siren with native Android AppOps and quadratic volume ramps, and catching a 2x Blackwell spec erratum plus BOS-sink smearing during a live GH200 NVFP4 empirical audit.

Signed kexec_file_load Fast Reboots, Hardened MCP, Android AppOps, and an NVFP4 Reality Check

Every systems engineer loves a shortcut—until the shortcut quietly shears off a safety rail.

Skip BIOS/UEFI POST during an appliance reboot? Awesome—unless you accidentally leave legacy userspace kexec_load(2) open and punch a hole straight through kernel lockdown. Verify release signatures in CI? Great—unless your shell script only runs test -s *.sig and happily ships a non-empty file full of garbage. Apply a textbook Walsh-Hadamard rotation to 4-bit LLM activations? Sounds clean—right up until you measure it on real GPU silicon and watch a single token-0 attention sink smear across all 512 micro-blocks.

Over the past 24 hours, six engineering tracks converged on one sharp mantra: skip the slow path, never skip the verification. Sign the kernel before you jump. Verify the signature with the actual public key. Clamp the tensor parallelism to the GPUs that actually exist. Check appops get after you write PLAY_AUDIO deny. And always, always run your math against real silicon before letting it turn into folklore.

Here is the full 24-hour systems-engineering pulse before we crack open each track:

24-Hour Systems Engineering Pulse covering Signed kexec_file_load Fast Reboots, 74-Finding Audit Merge and CI Supply-Chain Hardening, Hardened MCP and SGLang/vLLM Orchestration, Killibre Android AppOps Alert Replacement, Grace Hopper GH200 NVFP4 and SVDQuant Empirical Audit, and Cross-Stack Boundary Hygiene


1. Signed kexec_file_load(2) Fast Reboots: The Design, and the Guard That Actually Shipped

If you manage bare-metal firewalls or edge appliances, you know the cold-reboot tax: 90 to 180 seconds staring at a dark link while server firmware trains ECC DIMMs, initializes PCIe option ROMs, and leisurely strolls through UEFI POST. Meanwhile, Linux has had kexec—jumping directly from one running kernel to the next—for two decades.

So why do hardened appliances usually turn kexec off? Because classic kexec_load(2) lets root hand arbitrary userspace memory buffers to the kernel as the next OS image, completely bypassing Secure Boot and lockdown=confidentiality.

The clean middle path is signed-only kexec_file_load(2) — and to be precise about status: this is the design yesterday's deep dive argues for, not code that shipped in the last 24 hours. The hardened profile in the repo today disables kexec entirely, both paths:

# Hardened NGFW kernel profile: kexec is off, both paths
# packaging/edge-uki/profiles/base-hardened-ngfw.config
# CONFIG_KEXEC is not set
# packaging/kernel/fragments/01-kspp-hardening.config
# CONFIG_KEXEC is not set
# CONFIG_KEXEC_FILE is not set

That tension is the interesting part. With CONFIG_KEXEC=n and CONFIG_KEXEC_FILE=n, there is no kexec jump to attack — but also no fast reboot. The deep dive's proposal is to flip the second line: enable CONFIG_KEXEC_FILE=y with CONFIG_KEXEC_SIG_FORCE=y, so the kernel only accepts PE/bzImage payloads signed against the built-in keyring, refusing unsigned payloads even from CAP_SYS_BOOT while staying compatible with lockdown=confidentiality. The signing half is the design; the shipped half is the guard that makes fast reboots safe to attempt at all.

What Actually Shipped: The ZFSBootMenu Canary Guard

The rollback machinery the design depends on is in the tree, in the watchdog daemon. On ZFSBootMenu appliances, atomic upgrades track canary attempts via ZFS properties (org.axonwall:bootcount vs org.axonwall:bootlimit, initialized to 0/3 at install and read back by the watchdog with defaults of 1/3). The watchdog counts boot attempts against the limit and clears the counter once health quorum passes — and those counters are what let ZFSBootMenu fall back to the last known-good boot environment instead of looping forever on a broken image.

That's the load-bearing piece: any fast-reboot path, signed or not, is only safe if a failed canary can't loop. The watchdog's bootcount guard is what enforces that today; the signed kexec_file_load(2) jump is the design that would sit on top of it.


2. Closing Yesterday's Cliffhanger: The 74-Audit Merge, "use server", and CI Supply-Chain Traps

Yesterday's devlog noted that the massive 74-finding security audit remediation was still sitting unverified in an open PR. Overnight and this morning, PR #241 landed on main—and getting it green turned up three sharp, universally applicable lessons across TypeScript, Next.js, and GitHub Actions.

The Next.js "use server" Export Trap

When the audit remediation added redactSecretsRecursively() to prevent unredacted GitOps state commits, it placed the synchronous helper inside agent.ts—a Next.js module marked with "use server" at the top.

Boom: Next.js build failure. Why? In the Next.js App Router, every exported symbol from a "use server" file is compiled into a network-callable Server Action RPC endpoint, which must be an async function. Exporting a plain synchronous utility (or a const mask) from a "use server" file either breaks the build or accidentally exposes internal helpers across the RPC boundary. Moving the pure redactor into a standalone redact-secrets.ts module fixed the build cleanly and drew a crisp architectural line between RPC actions and pure server utilities.

Non-Empty Signature Theater & Wildcard pnpm Cache Poisoning

A follow-up workflow hardening sweep (5d9c7421, c5f2a67c) caught two classic CI supply-chain blind spots that lurk in thousands of GitHub Actions pipelines:

CI PatternWhy It Silently Fails OpenHardened Replacement
test -s "${sha}.sig"Only proves the .sig file has ≥1 byte—an empty-key error or corrupted blob ships as "verified."Derive the public key (openssl pkey -pubout) and run openssl dgst -sha256 -verify "$pub_file" -signature "${sha}.sig" "$sha" on every checksum.
Unsigned Rolling ReleasesTagged releases were signed, while main rolling pre-releases shipped with only unsigned .sha256 files.Gate the rolling publish job behind environment: release and run the exact same sign + verify loop before upload.
restore-keys: ${{ runner.os }}-pnpm-On any lockfile change, GitHub Actions falls back to a stale or potentially poisoned prefix cache instead of rebuilding cleanly.Drop restore-keys entirely. Exact lockfile hash hit, or clean pnpm install --frozen-lockfile rebuild.

3. Hardening an AI Router's MCP Server, SGLang/vLLM Recipes & Poll Dedup

Meanwhile, over in Eluvix (commits 012316a, 85ae7bb, 3c82d97, 6a5a466, f3fe699), the local AI router and visual node orchestration studio went through a major hardening and ergonomics sprint.

Four Guardrails Every Production MCP Server Needs

Wrapping a local AI router as an MCP (2025-06-18) server and installable agent plugin sounds straightforward until real agents start calling it recursively or generating 4K images over stdio:

  1. Recursive Loop Protection (ELUVIX_HOPS >= 2): If Agent A invokes an MCP routing tool that delegates to a CLI agent that also has the same MCP plugin loaded, you are one prompt away from an infinite fork bomb. Propagating an explicit ELUVIX_HOPS counter and failing closed with max_hops_exceeded at depth 2 stops runaway loops cold.
  2. Symlink-Proof Local Media Sandboxing: Returning multi-megabyte ComfyUI images or TTS audio as base64 strings over stdio destroys an LLM's context window. Instead, local stdio sessions accept output_dir / output_path / audio_path—strictly confined inside a dedicated media sandbox root with canonical path resolution that defeats ../ traversal, broken symlinks, and symlinks pointing outside the sandbox.
  3. Forced T5 Memory Gate: Every memory_store call passes through PromptGuard (prompt injections fail closed!) and PrivacyGuard (PII/secrets redacted before SQLite WAL persistence).
  4. The HTTP 301 Auth-Header Stripping Gotcha: When connecting over Streamable HTTP, pointing a client at https://localhost:3588 triggered a 301 redirect to 127.0.0.1—and per HTTP client security specs, cross-origin/host redirects silently strip POST Authorization: Bearer headers! Documenting direct 127.0.0.1 targets and shipping a hybrid --remote ... --fallback-local bridge eliminates mysterious 401 errors while preserving cooperative Ollama/ComfyUI VRAM arbitration.

Dual-panel architectural diagram showing Signed kexec_file_load fast reboots with ZFSBootMenu bootcount rollback guard on the left, and Hardened MCP Server hop gates, symlink-proof media sandbox, SemanticCacheNode hit/miss routing, and host-clamped SGLang/vLLM orchestration on the right

Host-Clamped SGLang Compose, vLLM Recipes & Eliminating Canvas Re-Render Storms

On the visual orchestration canvas, three quality-of-life fixes made local GPU serving dramatically sturdier:

  • vLLM Recipes & Host-Clamped SGLang Compose: Alongside a 1,180-line vLLM recipe resolver and visual VllmNode, the SGLang Docker Compose override generator now sanitizes --model-path against control characters and flag injection (SAFE_MODEL_PATH_RE), pins ports to 127.0.0.1 via !override, sets ipc: host, and clamps tensor parallelism to the host's actual GPU count (effectiveTp = Math.min(requestedTp, gpuCount)) so a 4-GPU recipe copied onto a 1-GPU workstation doesn't crash-loop on startup.
  • Explicit SemanticCacheNode Hit/Miss Handles: Visual routing graphs now expose separate HIT ($0.00 immediate response) and MISS (downstream inference engine) handles, paired with strict remote-endpoint policy gating.
  • Deduplicating 5-Second Docker Status Polls: Every node on the routing canvas subscribed to useDockerStatus(), which fired fresh fetches and blindly notified every subscriber on every poll tick—re-rendering the entire canvas every 5 seconds even when zero containers changed! Coalescing concurrent calls with a module-level fetchInFlight promise and skipping subscriber notifications when JSON.stringify(nextStatus) === cachedStatusJson silenced the re-render storm completely.

And on the CLI side, Phase 1 CrewsAIdarr (cai) client wiring swapped the configurator snippets cleanly—catching one fun schema detail along the way: cai strictly enforces kebab-case keys in .crewsaidarr.conf.yml and rejects snake_case keys at startup!


4. Silencing a Piercing Medical Siren Safely: Native Android AppOps & Quadratic Volume Ramps

Now for a complete gear shift—from Ring-0 Linux kernels and GPU routers to Android systems programming with real human-quality-of-life stakes.

If you wear a FreeStyle Libre 3 Continuous Glucose Monitor (CGM), you know the love-hate relationship: life-saving telemetry paired with an unconfigurable, ear-splitting direct media-stream siren that blasts at full blast in meetings, theaters, or at 3 AM. Simply muting the phone doesn't stop it—and turning off the app's alerts altogether is unsafe.

Commit 2d65b28 shipped the full native Kotlin/Jetpack Compose Killibre Android app, built as a clean, testable two-stage pipeline:

Stage 1: On-Device AppOps Control via Shizuku (UID 2000) or Root

Instead of brittle accessibility hacks, Killibre uses Android's own AppOps framework (appops set <pkg> PLAY_AUDIO deny, plus optional VIBRATE deny) executed on-device through a Shizuku IShellUserService running at shell UID 2000 (or Root su, with a desktop ADB fallback script)—and immediately runs appops get after every mutation to verify the kernel/framework actually applied the policy.

One sneaky modern-Android detail: on Android 15+, the OS withholds or redacts sensitive medical notification payloads from sideloaded NotificationListenerService apps unless you explicitly grant RECEIVE_SENSITIVE_NOTIFICATIONS. Baking that check directly into the onboarding flow and diagnostics panel saves users hours of wondering why their listener sees empty strings.

Stage 2: Deterministic Alert Classification, 44.1 kHz PCM Synthesis & Quadratic Escalation

Once the stock media klaxon is silenced, Killibre's NotificationListenerService intercepts the CGM notifications, parses both mg/dL and mmol/L readings, filters out routine 1-minute ongoing status notifications (while never suppressing urgent alarms even if flagged ongoing!), and routes alerts through a custom audio engine:

  • Zero-Asset 44.1 kHz PCM Synthesis (ToneSynthesizer.kt): Pre-renders harmonic bell arpeggios (C5 → E5 → G5), marimba double-pulses (A4 → C#5), and ascending urgent triads (F5 → A5 → C6) into cached ShortArray buffers streamed in 50 ms chunks—giving instant cancellation on dismiss and click-free real-time volume modulation.
  • Quadratic Ease-In Volume Ramping (EscalationCalculator.kt): Linear ramps still jump loudly in the first second. Using a quadratic curve (progress * progress) means a wake-up chime starts genuinely gentle so you can tap Snooze before waking the whole room, while still ramping reliably to full USAGE_ALARM DND-bypassing urgency if you stay asleep:
val totalMs = durationSeconds.toDouble() * 1000.0
val progress = (elapsedMs.toDouble() / totalMs).coerceIn(0.0, 1.0)
// Smooth quadratic ease-in ramp so initial wake-up alerts start genuinely gentle.
val eased = (progress * progress).toFloat()
return (clampedStart + (clampedTarget - clampedStart) * eased).coerceIn(0f, 1f)

Pair that with spoken Text-to-Speech glucose readouts ("Low glucose, 68"), per-category repeat cooldowns, Quiet Hours with independent Urgent Low overrides, and an in-app Notification Simulator so you can verify every rule before trusting it overnight.

Dual-panel chart showing Killibre's quadratic ease-in audio escalation curve versus a 100% step-function siren and Shizuku AppOps pipeline on the left, alongside Grace Hopper GH200 empirical W4A4 perplexity and FWHT latency measurements on the right


5. Auditing FP4 Microscaling & Hadamard Rotation on Real Silicon: A Grace Hopper Reality Check

Over on the Tekromancy blog, two things happened back-to-back:

  1. Yesterday's deep dive on ZFSBootMenu, kexec_file_load(2), and autonomous boot-watchdog rollback landed on main as the latest in the daily deep-dive series.
  2. Even better: we put our earlier MXFP4 / NVFP4 & Hadamard Outlier Rotation article on trial against a live NVIDIA Grace Hopper GH200 (sm_90) running PyTorch 2.13.0+cu132 and vLLM 0.30.0—auditing every formula, CLI flag, and performance claim empirically—and published the full reality check!

Running your own blog posts through an empirical verification harness is humbling in the best possible way. Here are the four biggest catches that only showed up on real silicon:

1. The 2× Hardware Spec Erratum

The original article cited 20 PFLOPS dense / 40 PFLOPS sparse FP4 per single Blackwell B200 GPU. Checking against official HGX/DGX B200 datasheets (72 PFLOPS dense / 144 PFLOPS sparse across an 8-GPU baseboard) caught the factor-of-2 mistake: a single B200 peaks at 9–10 PFLOPS dense / 18–20 PFLOPS sparse—20/40 PFLOPS is the dual-GPU GB200 Superchip!

2. How vLLM 0.30.0 Actually Handles NVFP4 on Hopper (sm_90)

Probing cutlass_scaled_mm_supports_fp4 directly on the GH200 confirmed sm_90 → False (sm_100/sm_120 → True), and showed vLLM 0.30.0 automatically remapping modelopt NVFP4 checkpoints to modelopt_fp4 and falling back cleanly to MarlinNvFp4LinearKernel (W4A16)—zero crashes, crystal-clear dispatch.

3. The Pure-PyTorch FWHT Latency Myth & Power-of-2 Crash

The textbook pure-PyTorch Fast Walsh-Hadamard Transform snippet had three real-world surprises:

  • Its docstring claimed "In-place", yet line 1 called x.clone().
  • Its power-of-2 assertion crashed outright on real production MLP widths like d = 9216 (Qwen3.5-4B) and d = 28672 (Llama-3.3-70B)!
  • On bf16 (1, 8192) activations on GH200, the verbatim PyTorch loop clocked 695.9 µs eager and 93.9 µs under torch.compile (70.7 µs batched)—nowhere near <8 µs, which requires a custom fused CUDA C++ kernel!

4. The Numerical Plot Twist: BOS-Sink Smearing vs. SVDQuant-R16

Real SiLU_and_Mul → down_proj activations truly do erupt with jaw-dropping outliers—measured up to 191,258× max/median on Llama-3.2-1B Layer 1 (raw_max = 1144.0) and 2,346× on Qwen3.5-4B Layer 6!

Here was the shock:

  • On MXFP4 (1×32 E8M0 power-of-two scales, where crossing 6.00 → 6.05 triggers a +48.3% sawtooth MSE jump!), global FWHT rotation reliably helped (10.54 → 9.81 PPL).
  • On NVFP4 (1×16 fine-grained FP8 E4M3 micro-blocks), unrotated NVFP4 already beat MXFP4 (8.12 vs 10.54 PPL) because each 16-element micro-block isolates the outlier locally. Applying blind global FWHT actually hurt NVFP4 on sparse token-0 BOS sink layers because rotating a 191,258× spike globally smears its quantization noise across all 512 micro-blocks!
  • The real winner for W4A4? SVDQuant-R16, which absorbs the giant outlier into a tiny rank-16 FP16 branch and lets the calm residual quantize cleanly—crushing perplexity all the way down to 5.3972 PPL!

Isometric scientific illustration of a glowing silicon GPU tensor die where a towering fiery crimson activation outlier spike is cleanly lifted by a crystal prism into a golden overhead low-rank SVDQuant conduit while calm emerald and cyan 4-bit NVFP4 micro-blocks flow evenly into a tensor core array


6. One Small Bonus Principle: Probe Capabilities, Not Brand Names

A quick developer-ergonomics bite that popped up right at the tail end of the 24-hour window: a local setup script checked for Kubernetes prerequisites and failed with Missing prerequisites: k3s (Lightweight Kubernetes) on a workstation happily running k3d (k3s-in-Docker) with a live kubectl context!

It's a tiny reminder of a big portability rule: never gate a developer workflow on one distro binary name when what you actually need is a capability. If your script needs a Kubernetes API server, check kubectl cluster-info (or accept any of k3d, k3s, kind, minikube) instead of insisting on a single install path.


Engineering Takeaways Cheat Sheet

DomainThe Tempting Shortcut / TrapThe Verified Fix
Linux Fast RebootsTreating the deep dive's signed-kexec design as shipped code; the hardened profile disables both kexec paths.Keep CONFIG_KEXEC=n and CONFIG_KEXEC_FILE=n until the signed design lands; the shipped guard is the ZFSBootMenu bootcount/bootlimit watchdog.
Next.js & CI Supply ChainExporting sync helpers from "use server"; checking test -s *.sig; wildcard pnpm restore-keys.Split pure helpers out of "use server"; run openssl dgst -sha256 -verify on tagged and rolling releases; drop restore-keys.
Hardened MCP & AI RoutingUnbounded agent→MCP loops; base64 media flooding context; 301 redirects stripping POST auth; un-clamped TP.Enforce ELUVIX_HOPS < 2; symlink-proof media sandbox paths; bind direct 127.0.0.1; clamp SGLang TP to gpuCount; dedup UI polls with fetchInFlight + JSON equality.
Android Medical AudioBlindly muting CGM apps is unsafe; stock media sirens start at 100%; Android 15+ redacts sideloaded listeners.Shizuku UID 2000 PLAY_AUDIO deny + appops get verification, RECEIVE_SENSITIVE_NOTIFICATIONS, 50 ms PCM synthesis + quadratic progress² escalation + TTS.
FP4 GPU QuantizationTrusting unverified PFLOPS tables, pure-PyTorch FWHT microsecond claims, or blind global FWHT on NVFP4.Audit on live silicon: single B200 is 9–10/18–20 PFLOPS, sm_90 falls back to Marlin W4A16, and SVDQuant-R16 (5.40 PPL) beats blind global FWHT on BOS-sink layers.
Local Dev PreflightsHardcoding which k3s blocks developers running k3d or kind.Probe the actual cluster capability (kubectl cluster-info), not one brand name.

Closing Thought

There is a quiet thrill in watching six completely different layers of the stack—PE-signed Linux kernels, GitHub Actions signature verification, MCP hop counters, Android AppOps, and 4-bit GPU tensor quantization—all teach the exact same lesson in a single 24-hour stretch.

Speed, convenience, and elegance are wonderful, as long as the verification gate stays in the critical path. Whether you're jumping from one kernel to another without touching BIOS, replacing a 3 AM medical klaxon with a gentle C-major chime, or compressing 70 billion parameters down to 4 bits, the difference between a clever hack and real engineering is whether you proved the invariant holds when things get weird.

Discussion / Comments

Click “Load Comments” to load the Disqus conversation thread.