How hichat-fog/interclus works
Interclus is embedded firmware that runs eBPF policies inside RISC-V PMP compartments. The principal workflow is: the machine-mode supervisor validates and loads a policy, prepares packet and swarm inputs, schedules the monitor, and records verdicts; compartment faults are captured and the faulty lifetime is evicted. Separate capabilities include native attacker and measurement modules, UART program transport, the PMP probe, and a QEMU reproduction path. Edges are limited to relationships visible in the supplied excerpts or README; several implementation details are unsampled.
Main entry points: supervisor.c Supervisor · monitor.c Policy monitor · compartment.c PMP compartments · main_qemu.c QEMU runtime
Components 22
Supervisor and Isolation
- Supervisor
modules/supervisor.c - PMP compartments
core/compartment.c - Module contract
core/contract.h - Platform map
core/platform.h - Fault capture
core/trap.S
Policy Execution
- Policy monitor
modules/monitor.c - eBPF interpreter
core/ebpf.c - Map helpers
core/helpers.c - MAVLink policy
modules/policies/mavlink.h - Grid screening
modules/policies/screening.h
Loading and Inputs
- Program gate
core/loader.c - Compartment specs
descriptions/demo.h - UART transport
core/uart.c
Experiments and Evidence
- Attack probe
modules/attacker.c - Measurement module
modules/measure.c - PMP probe
modules/pmp_probe.c - QEMU runtime
qemu/main_qemu.c - Capacity fixtures
qemu/fixture.h - QEMU evidence report
qemu/report.c
Other components
- Firmware operator
- CH32V307 board
- WCH-LinkE
Connections 24
- Firmware operator → Supervisor: boots firmware
README.md - Supervisor → Program gate: gates programs
README.md - Supervisor → Compartment specs: uses specs
modules/supervisor.c - Supervisor → PMP compartments: schedules compartments
modules/supervisor.c - Supervisor → Policy monitor: schedules filtering
README.md - Supervisor → UART transport: receives frames
README.md - Policy monitor → eBPF interpreter: runs programs
modules/monitor.c - Policy monitor → Map helpers: uses helpers
modules/monitor.c - Policy monitor → MAVLink policy: selects policy
modules/monitor.c - Policy monitor → Grid screening: selects policy
modules/monitor.c - PMP compartments → Module contract: implements interface
- Supervisor → Module contract: checks contract
modules/supervisor.c - Supervisor → Platform map: uses address map
modules/supervisor.c - PMP compartments → Platform map: maps PMP regions
core/compartment.c - PMP compartments → Fault capture: captures faults
README.md - Supervisor → Attack probe: schedules attacks
modules/supervisor.c - Supervisor → Measurement module: runs measurements
- Firmware operator → WCH-LinkE: loads swarm
README.md - WCH-LinkE → Supervisor: writes mailbox
README.md - Firmware operator → CH32V307 board: flashes firmware
README.md - Firmware operator → QEMU runtime: runs experiment
README.md - QEMU runtime → Capacity fixtures: loads fixtures
qemu/main_qemu.c - QEMU runtime → QEMU evidence report: reports results
- Firmware operator → PMP probe: runs probe firmware
README.md