<feed xmlns='http://www.w3.org/2005/Atom'>
<title>procd/jail/seccomp-inject.c, branch master</title>
<subtitle>OpenWrt service / process manager</subtitle>
<id>https://git.openwrt.org/project/procd/atom?h=master</id>
<link rel='self' href='https://git.openwrt.org/project/procd/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/procd/'/>
<updated>2026-09-19T08:30:42Z</updated>
<entry>
<title>jail: skip Thumb injection on cores without Thumb state</title>
<updated>2026-09-19T08:30:42Z</updated>
<author>
<name>Daniel Golle</name>
</author>
<published>2026-09-19T08:30:42Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/procd/commit/?id=c230ad87d6b72964583a7395871e4827baf9250d'/>
<id>urn:sha1:c230ad87d6b72964583a7395871e4827baf9250d</id>
<content type='text'>
The top-level asm assembles a Thumb copy of the syscall and breakpoint
snippets. An ARMv4 core has no Thumb state, so the assembler rejects
both the .thumb switch and the Thumb SVC encoding and the gemini
(fa526) build fails. Emit the Thumb snippets only where the ISA has
Thumb: a core that cannot execute Thumb never has a tracee in it.

Fixes: f15d0c407c09 ("jail: apply OCI seccomp filters via ptrace syscall injection")
Signed-off-by: Daniel Golle &lt;daniel@makrotopia.org&gt;
</content>
</entry>
<entry>
<title>jail: force classic MIPS encoding for injected instructions</title>
<updated>2026-09-13T11:40:03Z</updated>
<author>
<name>Daniel Golle</name>
</author>
<published>2026-09-13T11:40:03Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/procd/commit/?id=0df1972a90e3316a9e2319ea8b606e89f700b360'/>
<id>urn:sha1:0df1972a90e3316a9e2319ea8b606e89f700b360</id>
<content type='text'>
On MIPS targets built with -mips16 the top-level asm inherits the
command-line ISA, so the assembler rejects the syscall opcode and the
build fails. Emit the snippet inside .set nomips16/.set nomicromips,
which is also what the tracee needs: the injected code is entered at an
even PC and therefore always decoded as classic MIPS.

Fixes: f15d0c407c09 ("jail: apply OCI seccomp filters via ptrace syscall injection")
Signed-off-by: Daniel Golle &lt;daniel@makrotopia.org&gt;
</content>
</entry>
<entry>
<title>jail: add seccomp trace, audit and complain modes</title>
<updated>2026-08-21T04:31:30Z</updated>
<author>
<name>Daniel Golle</name>
</author>
<published>2026-08-21T04:31:30Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/procd/commit/?id=ef2d5fc5e09d72d6d40e2c1bb2d8db00c85afd16'/>
<id>urn:sha1:ef2d5fc5e09d72d6d40e2c1bb2d8db00c85afd16</id>
<content type='text'>
Add a ptrace-based syscall tracer, selected via -m (enforce, trace, audit
or complain) with -M naming an NDJSON log. Trace records every syscall,
classifying each into a startup phase (linker, init, app) resolved from
entry-point and libc breakpoints, so a generated profile can cover the
application phase alone. Audit and complain run the real seccomp filter
but rewrite its returns to SECCOMP_RET_TRACE, logging every denial; audit
then enforces (errno or kill, including the two-stop errno arches), while
complain permits and only records. Events stream to a udebug ring and, as
a fallback, to the NDJSON file.

procd's instance config gains seccomp_mode and seccomp_log, passed
through to ujail as -m and -M.

Signed-off-by: Daniel Golle &lt;daniel@makrotopia.org&gt;
</content>
</entry>
<entry>
<title>jail: apply OCI seccomp filters via ptrace syscall injection</title>
<updated>2026-08-21T04:30:22Z</updated>
<author>
<name>Daniel Golle</name>
</author>
<published>2026-06-17T13:50:35Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/procd/commit/?id=f15d0c407c09c2b10791065c3a2f2ef208448b46'/>
<id>urn:sha1:f15d0c407c09c2b10791065c3a2f2ef208448b46</id>
<content type='text'>
Arm the compiled cBPF profile by injecting prctl(NO_NEW_PRIVS) and
seccomp(SET_MODE_FILTER) into the freshly-execve'd workload over ptrace.
The child does PTRACE_TRACEME before its final execve; the parent catches
the post-execve stop, drives the two syscalls via a temporary trap at the
program counter, restores registers and code, then detaches. This installs
the filter for static binaries too, closing the gap left by the dropped
LD_PRELOAD installer (preload.c, seccomp.c and the shared library are removed).

A dynamic binary needs extra loader and libc pre-main syscalls. They are
granted once in a phase-1 app + linker_base filter, then revoked with deny
deltas at the entry and main boundaries (located via AT_BASE/auxv and ELF
marker addresses), each delta reverting to the profile default. Static and
Go-style binaries collapse to fewer phases. NOTIFY or flag profiles still go
in-process; audit and complain modes reuse the same staging to log denials.

Signed-off-by: Daniel Golle &lt;daniel@makrotopia.org&gt;
</content>
</entry>
</feed>
