Skip to content

Custom Kernel

The Syn_OS kernel is built from upstream Linux 6.19 with the CONFIG_RUST=y toolchain enabled, hardened with KSPP defaults, and extended with 17 custom syscalls, 17 loadable Rust kernel modules, an in-kernel safe-bytecode VM, an LSM attestation hook, and 5 eBPF monitors. It is the prokaryotic-cell layer of the biological model — primitive, fast, always-on; the mitochondria for the whole organism.

SettingValue
Upstream versionLinux 6.19
Build target6.19-synos-ai
ToolchainLLVM/Clang + Rust (no GCC)
CONFIG_RUSTy
CONFIG_MODVERSIONSn (disabled — Rust modules don’t use it)
HardeningKSPP defaults + Sanctum overlays
Custom config knobs12 — all under CONFIG_SYNOS_*
Module signingcosign-attested keys (v41 Wave 9), validator escalates with sudo when key is root-readable (v43.2 fix)

Consciousness fusion (469–479) — v41 Wave 8

Section titled “Consciousness fusion (469–479) — v41 Wave 8”
#NamePurpose
469GET_CONSCIOUSNESS_STATECoherence, activity, mode, decision latency snapshot
470PROCESS_AI_STIMULUSSubmit a stimulus event for fusion processing
471MAKE_AI_DECISIONTrigger a fused decision over a posed problem
472UPDATE_AI_MEMORYWrite to hippocampus storage
473GET_AI_METRICSDecision counters, latency histogram
474OPTIMIZE_MEMORY_LAYOUTFragment-aware allocator hints from synos-memory
475GET_QUANTUM_STATEFragment Field IDS signature
476CREATE_MEM_ENTANGLEEstablish correlated memory regions for energy-topology IDS
477GET_MEM_RECOMMENDAllocator hints based on observed entanglement
478ENABLE_EBPF_MONITORToggle one of the 5 eBPF monitor programs
479GET_EBPF_STATSRead eBPF monitor stats from the kernel-side ring buffer

Glasswalker observability (480–485) — v45

Section titled “Glasswalker observability (480–485) — v45”
#NamePurpose
480OBS_REGISTER_COUNTERRegister a kernel-observability counter
481OBS_INCREMENT_COUNTERAtomic counter increment from userspace context
482OBS_READ_COUNTERRead counter value
483OBS_PERF_RING_OPENOpen a perf ring buffer for high-throughput event streaming
484OBS_PERF_RING_SUBMITSubmit an event to the ring
485OBS_PERF_RING_DRAINUserspace drain of accumulated events
#include <syn_os/syscalls.h>
struct consciousness_state state;
syscall(SYS_GET_CONSCIOUSNESS_STATE, &state);
if (state.coherence > 0.85 && state.mode == ALFRED_MODE_ADVISORY) {
/* AI is alert and read-only — safe to ask for a decision */
syscall(SYS_MAKE_AI_DECISION, &request, &response);
}

The 50-syscall ceiling discussed in early FEV documents was an aspirational maximum. The practical scope landed at 17 covering all kernel-side observability + AI-cortex needs.

Eleven canonical loadable .ko modules live in fruit/core/src/linux-kernel/rust-modules/:

ModuleRole
synos_consciousnessHosts the consciousness-fusion kernel interface
synos_hardeningRuntime hardening hooks (LSM glue)
synos_interruptsIRQ-affinity tuning, RPS/XPS adjustments
synos_memoryFragment-aware allocator hints
synos_modloaderSigned-module load gate
synos_networkeBPF network monitor controller
synos_powerIntel RAPL telemetry, CPU governor guard (v43.1 fix)
synos_procfs/proc/synos/* exposure
synos_schedulerPredictive scheduler hints from cerebellum
synos_securityCapability-gating LSM hook
synos_syscallHolds fragment_field.rs + 469–485 dispatch

Plus six new crates introduced through Operation Warp Speed:

  • synos-attest (v46 Threadwalker) — LSM attestation module + HMAC-SHA256 chained synos-attest-ledger + PromptGuard receipts
  • synos-observability-module (v45 Glasswalker) — kernel observability counters + perf ring buffers
  • kernel/snapshot (v51 Storm Glass) — kernel snapshot crate, digital-twin substrate
  • kernel/observability (v45) — eBPF-friendly counters, perf ring-buffer hooks
  • kernel/attest (v46) — LSM attestation kernel-side crate
  • kernel/riftrunner (v52) — in-kernel safe-bytecode VM (22-instruction eBPF subset, in-kernel verifier + interpreter)

The remaining nine subdirectories under rust-modules/ are support infrastructure (shared crates, test harnesses, build tooling, future module placeholders).

Five eBPF programs are always-loaded under the kernel’s BPF infrastructure:

MonitorWatches
memoryAllocator hot-paths, page faults, OOM events
networkConnection-tracking, anomalous flows, DNS exfil patterns
processexec/clone/exit, command-line capture
securityPrivilege transitions, capability use, namespace ops
perfSoft-IRQ counts, scheduler latency, cache miss patterns

Each monitor exposes its stats through syscalls 478 / 479 and contributes events to the Fragment Field IDS pipeline.

Syn_OS ships its own Linux Security Module hook that consults Curtain v3 capability tokens before allowing privileged operations. The integration lives in:

  • synos-security kernel module — the LSM hook itself
  • synos-curtain-tokens user-space crate — token issuance, ed25519 signature
  • synos-attest (v46) — LSM attestation receipt chained into synos-attest-ledger

Operations gated by Curtain tokens include: AI dispatch syscalls (470–474), Fragment Field IDS access (475–477), perf ring open (483), and any tier-jump request from a userspace process.

In-kernel safe-bytecode VM (Riftrunner, v52)

Section titled “In-kernel safe-bytecode VM (Riftrunner, v52)”

fruit/core/kernel/riftrunner/ ships an in-kernel 22-instruction eBPF subset with an in-kernel verifier and interpreter. Use cases:

  • ALFRED-driven detection rules that can be hot-loaded without a kernel rebuild
  • Lightweight policy bytecode for tenant isolation (synos-tenant)
  • Late-binding telemetry pipelines

The verifier rejects programs that attempt unbounded loops, unaligned memory access, or syscall invocation. Forward horizon: more opcodes are queued in FEV.md v61+.

fruit/core/kernel/snapshot/ exposes a snapshot interface that powers the Twin Bevy plugin and the digital-twin substrate. The kernel emits snapshots of selected memory regions and observable state into the substrate, where ALFRED’s MPS cortex can play with them without affecting the live system.

Terminal window
/proc/synos/consciousness # current ConsciousnessState
/proc/synos/fragment-field # Fragment Field IDS energy state
/proc/synos/observability/* # registered counters
/proc/synos/attest/ledger # HMAC-SHA256 chained attestation log
dmesg | grep -i synos
synos-doctor --kernel