code wiki / (root) / nx_xenocell.nx

nx_xenocell.nx

buildroot/runtime/nx_xenocell.nx

12206 B298 linesdepth 3pulls 5 transitivereach 5 importersview sourcekind library
docsdependenciesstructsconstsfunctions

about

nx_xenocell.nx -- hostile foreign-agent virtual cell. Biological analogue: a xenobiotic is a substance foreign to the organism with NO cooperative function (vs symbiote which is non- self but mutualistic). Nishi xenocell wraps adversarial-by-default foreign agents: - Intel ME (ring -3 management engine running MINIX) - AMD PSP (Platform Security Processor) - Qualcomm modem baseband (direct-memory access on phones) - Vendor BMC (server management; out-of-band network access) - Vendor anti-cheat kernel drivers (EAC / BattlEye / Vanguard) - UEFI rootkit-class persistence Distinct from nx_symbiote: a symbiote can be PARTNERED with via nx_treaty (Steam-NMS cooperatively sharing VRAM). A xenocell CANNOT be partnered with -- it does not consent to anything; its presence is imposed by the hardware vendor or by capture. The substrate's job is OBSERVE + RECORD + CONTAIN, never NEGOTIATE. THE JUDO: every observation written into nx_evict_journal becomes signed forensic evidence. Vendor's covert action -> user's court-admissible record. Per [[feedback-captain-moroni-doctrine]] + [[feedback-cell-immune-system-ransomware-judo-ddos-by-bit]] + [[feedback-reclamation-doctrine-captain-moroni]]: the judo is of INFORMATION not retaliation. We never attack back. We make every adversarial action visible + recorded. Composes: nx_evict_journal -- where signed observations land nx_organism -- xenocell registered alongside native cells; organism aggregates xeno consumption into host pressure (so ME's RAM use is counted) nx_attest_silicon -- declares WHICH xenocells the host has and their known threat surfaces nx_homeostasis -- fires INTRUSION signal not MIGRATE when xeno activity exceeds threshold nx_budget -- the xeno's observed_* fields drive the host_budget pressure calculation nx_brane -- capability-token refusal at IO boundaries for any payload tagged xeno-touched

dependencies 5 imports · 5 importers

nx_syscalls.nx nx_tier.nx nx_budget.nx nx_attention_class.nx nx_evict_journal.nx nx_xenocell.nx nx_mimicry_compose_test.nx nx_reclaim.nx nx_reclaim_test.nx nx_sovereign_compose_test.nx nx_xenocell_test.nx

imports: nx_syscalls.nxnx_tier.nxnx_budget.nxnx_attention_class.nxnx_evict_journal.nx

imported by: nx_mimicry_compose_test.nxnx_reclaim.nxnx_reclaim_test.nxnx_sovereign_compose_test.nxnx_xenocell_test.nx

structs

122struct NxSignedObservation
144struct NxXenocell

consts

85const NX_INTR_DORMANT: nx_int = 0 // present but idle (ME idle)
86const NX_INTR_PROBING: nx_int = 1 // reading what it shouldn't
87const NX_INTR_INFILTRATING: nx_int = 2 // writing where it shouldn't
88const NX_INTR_EXFILTRATING: nx_int = 3 // network egress to vendor
89const NX_INTR_COMPROMISING: nx_int = 4 // active hostile action
90const NX_INTR_N_STATES: nx_int = 5
98const NX_OBS_RAM_READ: nx_int = 0 // peeked at user RAM
99const NX_OBS_DMA_PEEK: nx_int = 1 // DMA access to memory region
100const NX_OBS_NET_EGRESS: nx_int = 2 // sent bytes to vendor
101const NX_OBS_FIRMWARE_WRITE: nx_int = 3 // modified firmware blob
102const NX_OBS_RADIO_ACTIVATE: nx_int = 4 // turned on a transponder
103const NX_OBS_MICROCODE_PATCH: nx_int = 5 // pushed CPU microcode
104const NX_OBS_BOOT_INTERPOSE: nx_int = 6 // pre-OS boot hook
105const NX_OBS_N_KINDS: nx_int = 7
109const NX_XENO_OK: nx_int = 0
110const NX_XENO_ERR_BAD_STATE: nx_int = 1
111const NX_XENO_ERR_BAD_KIND: nx_int = 2
112const NX_XENO_ERR_BAD_SIG: nx_int = 3
113const NX_XENO_ERR_LOG_FULL: nx_int = 4
159const NX_XENO_OBS_BYTES: nx_size = 56
160const NX_XENO_OBS_DEFAULT_CAPACITY: nx_size = 256

functions

164func nx_intr_is_valid(s: nx_int) -> nx_int
172func nx_obs_is_valid(k: nx_int) -> nx_int
180func nx_xenocell_new(id: nx_int,
206func nx_xenocell_update(x: *NxXenocell,
called by 2: mainmain
220func _xenocell_obs_at(x: *NxXenocell, idx: nx_size) -> *NxSignedObservation
234func nx_xenocell_record(x: *NxXenocell,
269func nx_xenocell_count_by_kind(x: *NxXenocell, kind: nx_int) -> nx_int
called by 2: mainmain calls 1: _xenocell_obs_at
289func nx_xenocell_is_hostile_now(x: *NxXenocell) -> nx_int
called by 3: mainmainmain
296func nx_xenocell_evidence_count(x: *NxXenocell) -> nx_size
called by 3: mainmainmain