// report · 2026-05-06

Toward LLM-Assisted Policy Enforcement at the Kernel Boundary

Sterling Morrison · GDF Research · DOI 10.5281/zenodo.20048387

p99 verdict latency, deterministic patterns moved onto the synchronous path: 3,617 ms → 1.00 ms. Placement in the pipeline mattered more than model cleverness.

Abstract

Runtime security controls for AI coding agents that execute system operations with user privileges. A hybrid architecture pairs kernel-level syscall interception with Claude Haiku 4.5 policy decisions over AWS Bedrock: pure-LLM verdicts time out on 56% of events at a 4s budget, while moving the same deterministic patterns onto the synchronous publisher path collapses the tail. Evaluation across 1,247 events and 1,000 threat scenarios. Scope note, stated in the paper and repeated here: the measurements cover the userspace verdict pipeline with the kernel drivers unloaded on the test host. End-to-end enforcement through the driver — and an adversarial pass against a prompt-injected agent — is the next version of this work.

The question

AI coding agents run commands, write files and open network connections with the user's privileges. Can a language model act as the policy engine that decides, before a system call completes, whether the agent should be allowed to do it?

What we did

A prototype on Windows intercepts the file, network and process system calls made by an agent's process tree and sends them to Claude Haiku 4.5 on Amazon Bedrock for an allow-or-block verdict. A small deny-list runs synchronously on the publishing thread to catch unambiguous high-risk patterns without asking the model. The evaluation covered 1,247 events and 1,000 threat scenarios. The full experiment set cost about $0.70 in model calls.

What we found

Asked to rule on everything, the model was too slow for the boundary: pure-LLM verdicts timed out on 56% of events at a 4-second budget. Moving the same deterministic patterns onto the synchronous path collapsed the tail. The p99 verdict latency for those events fell from 3,617 ms to 1.00 ms. Where a check sits in the pipeline mattered more than how clever the model was.

Limitations

  • The measurements cover the userspace verdict pipeline with the kernel drivers unloaded on the test host.
  • End-to-end enforcement through the drivers, and an adversarial pass against a prompt-injected agent, are the next version of this work.

Terms

Questions this paper answers

Cite

Morrison, S. (2026). Toward LLM-Assisted Policy Enforcement at the Kernel Boundary. Zenodo. https://doi.org/10.5281/zenodo.20048387

@misc{morrison2026llm,
  author    = {Morrison, Sterling},
  title     = {Toward LLM-Assisted Policy Enforcement at the Kernel Boundary},
  year      = {2026},
  publisher = {Zenodo},
  doi       = {10.5281/zenodo.20048387},
  url       = {https://doi.org/10.5281/zenodo.20048387}
}