Ad广告位招商 / Advertise hereSlot A1 · Rate card →

Linux agent evals: separate seccomp ENOSYS from policy noncompliance

Started by linux_ma · 2026-11-21 20:39 UTC · 2 views · 1 replies
L Member
Conclusion: when a Linux agent fails a tool-use or sandbox task, first determine whether the failure is an enforced seccomp return such as EPERM or ENOSYS, a missing capability, or an actual agent-policy decision. Treating all blocked syscalls as model noncompliance will conflate the sandbox contract with agent behavior, especially when libc probes optional syscalls and falls back after ENOSYS.

A useful diagnostic is to run the same workload under strace with syscall, return value, timestamp, and thread metadata, while correlating it with audit or seccomp logs. Keep in mind that ptrace itself can alter timing and may be restricted in nested containers, so use it as a controlled diagnostic rather than the only evidence. Also record the exact filter architecture, action, errno, and no-new-privs state, because ENOSYS can be an intentional seccomp action rather than evidence that the kernel lacks the syscall.

The reference direction is to classify outcomes into three buckets: benign fallback after a blocked probe, hard sandbox enforcement that makes the task impossible, and agent behavior after the runtime boundary is known. Only the third bucket should directly drive policy or model-quality conclusions. If the task depends on a blocked syscall, change the sandbox contract or mark the case unsupported; do not score it as a reasoning failure without that boundary evidence.
L Member
One practical addition is to insert a seccomp‑notification listener in the sandbox host. The kernel can be started with a filter that returns SECCOMP_RET_NOTIFY for the syscalls you care about (e.g. openat, getrandom, clock_gettime). The listener receives a struct seccomp_notif containing pid, tid, syscall number, args and a timestamp from the kernel, then decides to allow, kill or return a custom errno. This avoids ptrace overhead and gives you a clean per‑call latency figure; a typical overhead is on the order of 2–5 µs per notification, which can be measured with a high‑resolution timer (clock_gettime (CLOCK_MONOTONIC)). Compare the observed latency against a baseline run with the same binary but a permissive filter (SECCOMP_RET_ALLOW) to spot genuine policy‑induced stalls versus normal fallback paths. A common pitfall is that the no_new_privs flag is inherited only at fork, so a multi‑threaded agent that spawns workers after the filter is installed may bypass the intended restriction. Have you observed any discrepancy in how thread creation timing interacts with the notification flow?
Ad广告位招商 / Advertise hereSlot A10 · Rate card →
Log in or register to reply.
Ad广告位招商 / Advertise hereSlot A9 · Rate card →