code wiki / (root) / nx_lysis.nx

nx_lysis.nx

buildroot/runtime/nx_lysis.nx

12890 B295 linesdepth 3pulls 5 transitivereach 5 importersview sourcekind library
docsdependenciesstructsconstsfunctions

about

nx_lysis.nx -- selective foreign-entity neutralization. Per [[feedback-unified-immune-architecture-three-tier]] item 3: the user's specific question: "take how would you combat and deactivate nano bots as if they were viruses or stuff like that, would a giant magnet work or what is the equivalent that would purge but not hurt the host think of the mechanisms of anti parasites on things like ivermectin or whatever." THE UNIVERSAL PRINCIPLE: selective targeting via host-threat biochemical/physical/electromagnetic/structural differences. Ivermectin works because parasite ion channels differ from mammalian; magnetic-particle hyperthermia works because ferromagnetic threats heat in alternating fields while diamagnetic tissue does not; chelation works because EDTA binds heavy metals preferentially. SOFTWARE SUBSTRATE EQUIVALENT: neutralize the foreign entity by exploiting a difference between FOREIGN and HOST that the host can tolerate. We have several such differences available -- foreign processes lack the substrate's capability tokens, foreign memory pages lack the chromatin chain, foreign egress targets aren't on the substrate's allowlist. Each difference = an attack vector against the foreign entity that costs the host nothing. Mechanism catalog shipped V1 (each = one host-tolerant difference the substrate can exploit): CAPABILITY_REVOKE -- drop the brane capability tokens; foreign loses access without affecting self MEMORY_ZERO -- overwrite foreign memory region with zeros (caller has already isolated the region) NETWORK_BLACKHOLE -- route foreign egress to /dev/null; host egress on other interfaces unaffected PROCESS_PAUSE -- SIGSTOP foreign process (reversible; gathers evidence while frozen) PROCESS_TERMINATE -- SIGKILL foreign process (irreversible) QUARANTINE -- isolate-but-preserve (no kill, no read, operator review gates next step) CRYPTO_REKEY -- rotate the substrate's master keys; any foreign cached credentials become useless

dependencies 5 imports · 4 importers

nx_syscalls.nx nx_tier.nx nx_budget.nx nx_attention_class.nx nx_evict_journal.nx nx_lysis.nx nx_immune.nx nx_lysis_test.nx nx_tier1_immune_compose_test.nx nx_tier2_immune_compose_test.nx

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

imported by: nx_immune.nxnx_lysis_test.nxnx_tier1_immune_compose_test.nxnx_tier2_immune_compose_test.nx

structs

138struct NxLysisAction

consts

103const NX_LYSIS_NONE: nx_int = 0
104const NX_LYSIS_CAPABILITY_REVOKE: nx_int = 1
105const NX_LYSIS_MEMORY_ZERO: nx_int = 2
106const NX_LYSIS_NETWORK_BLACKHOLE: nx_int = 3
107const NX_LYSIS_PROCESS_PAUSE: nx_int = 4
108const NX_LYSIS_PROCESS_TERMINATE: nx_int = 5
109const NX_LYSIS_QUARANTINE: nx_int = 6
110const NX_LYSIS_CRYPTO_REKEY: nx_int = 7
111const NX_LYSIS_PEER_MESH_EVICT: nx_int = 8
112const NX_LYSIS_DECOY_PROMOTE: nx_int = 9
113const NX_LYSIS_N_MECHANISMS: nx_int = 10
119const NX_LYSIS_SEV_LOW: nx_int = 0 // suspect; quarantine + observe
120const NX_LYSIS_SEV_MED: nx_int = 1 // confirmed probing; revoke caps
121const NX_LYSIS_SEV_HIGH: nx_int = 2 // active compromise; pause/kill
122const NX_LYSIS_N_SEVS: nx_int = 3
126const NX_LYSIS_OK: nx_int = 0
127const NX_LYSIS_ERR_BAD_MECHANISM: nx_int = 1
128const NX_LYSIS_ERR_BAD_SEVERITY: nx_int = 2
129const NX_LYSIS_ERR_HOST_INTOLERANT: nx_int = 3 // mechanism would harm host
130const NX_LYSIS_ERR_OPERATOR_GATED: nx_int = 4 // requires twin-key

functions

149func nx_lysis_mechanism_is_valid(m: nx_int) -> nx_int
called by 2: nx_lysis_emitmain
155func nx_lysis_severity_is_valid(s: nx_int) -> nx_int
167func nx_lysis_is_reversible(m: nx_int) -> nx_int
called by 2: nx_lysis_emitmain
183func nx_lysis_is_host_tolerant(m: nx_int) -> nx_int
called by 2: nx_lysis_emitmain
203func nx_lysis_requires_operator(m: nx_int) -> nx_int
called by 2: nx_lysis_emitmain
225func nx_lysis_select(severity: nx_int,
260func nx_lysis_emit(target_id: nx_int,
285func nx_lysis_log(action: *NxLysisAction,
called by 2: mainmain calls 1: nx_evict_log