Phase 1 — Remote execution with network pinned to the home node

Running CPU remotely while the connection stays on the home node.

1Goal

Run a process's CPU + memory on a remote execution node while its **sockets stay on the home node that owns the connection, and its files are served by the shared OCFS2** mount (native on the execution node). No live migration of a running process yet — Phase 1 launches the process remotely (or migrates it at a quiescent point); live checkpoint/restore is Phase 2.

This is openMosix's deputy/remote split, rebuilt on modern, supported APIs.

2Roles

HOME NODE owns identity + sockets EXECUTION NODE owns CPU + mem task (real CPU / mem) calls recv() / send() on a home-affine fd seccomp filter SECCOMP_RET_USER_NOTIF on net syscalls voltron-agent (REMOTE) owns the notif fd · forwards traps real socket fd (home netns) the accepted connection lives here voltron-agent (DEPUTY) runs the syscall on the real fd shared OCFS2 shared OCFS2 (native file I/O on B) ① trap ② RDMA ③ run on real fd internet ④ client I/O OCFS2
A net syscall on B is trapped by seccomp ①, forwarded over RDMA ②, run on the real socket by the deputy on A ③, and the client sees I/O only from the home node ④ — while files use OCFS2 natively on B.

3Mechanism: seccomp user notification

On the execution node the task is started under a seccomp filter whose action for network + node-identity syscalls is SECCOMP_RET_USER_NOTIF. The remote agent holds the resulting notify fd (SECCOMP_IOCTL_NOTIF_RECV). On each trap it:

  1. reads the syscall nr + args (and, for pointer args, the task's memory via process_vm_readv / /proc/<pid>/mem),
  2. ships a request to the deputy over RDMA,
  3. the deputy performs the real syscall on the real fd in the home netns,
  4. the deputy returns rc (+ any output buffer),
  5. the remote agent writes output back into the task's memory (process_vm_writev) and completes the notification (SECCOMP_IOCTL_NOTIF_SEND) with the return value.

Why seccomp-notif (not syscall-table hijack / kprobes): it is a stable, supported API designed exactly for "handle this task's syscall in another process," including the continue/return-value and ADDFD facilities.

Syscalls trapped (home-affine) — forwarded to deputy

Socket lifecycle & I/O: socket, socketpair, bind, listen, accept, accept4, connect, getsockname, getpeername, setsockopt, getsockopt, shutdown, sendto, recvfrom, sendmsg, recvmsg, sendmmsg, recvmmsg, send, recv

fd ops that may touch a home-affine fd: close, dup, dup2, dup3, fcntl (F_DUPFD/F_GETFL/F_SETFL), poll, ppoll, select, pselect6, epoll_ctl, epoll_wait, read, write (only when the fd is home-affine — see fd classification)

Identity (so the process keeps its home identity): getpid, getppid (optional; configurable — some workloads need home PID)

Syscalls NOT trapped — run natively on the execution node

4fd classification: home-affine vs local

Each fd the task holds is one of:

Implementation: the remote agent keeps an fd map per task. An fd becomes home-affine when created by a forwarded socket()/accept() (the deputy owns the real fd; the task holds a placeholder fd via SECCOMP_IOCTL_NOTIF_ADDFD so the numbering stays consistent). open() is allowed to run locally; at open time we decide affinity by checking whether the path resolves onto the OCFS2 mount (statfs magic / mount id). Node-local opens become home-affine and are forwarded.

read/write dispatch

read/write/poll are trapped but the handler first checks the fd map:

Note: _CONTINUE has a documented TOCTOU caveat for argument-dereferencing syscalls; we only use it for fds we've classified as local and whose operation doesn't depend on re-reading user pointers we validated. Data-carrying ops on home-affine fds are always fully forwarded, never continued.

5The canonical use case: accept-then-offload a connection handler

  1. Server runs on the home node, accept()s a connection → real fd stays home.
  2. Policy (cgroup = auto/manual) says the handler should run elsewhere.
  3. Handler process/child is placed on the execution node with a seccomp filter; its connection fd is represented by a placeholder (ADDFD), the real socket remains on the deputy.
  4. Handler does CPU work locally, reads/writes files on OCFS2 locally, and every recv/send on the connection is forwarded to the deputy → the connection never leaves the node that accepted it.

6Transport

7Wire protocol (draft)

struct vmsg_hdr {
    u32 magic;        // 'VMSG'
    u16 version;
    u16 type;         // REQ_SYSCALL, RSP_SYSCALL, BULK_READY, HELLO, ...
    u64 task_cookie;  // identifies the migrated task context
    u64 seq;
    u32 payload_len;
};
struct vmsg_syscall_req { s32 nr; u64 args[6]; u32 inbuf_len; /* bytes */ };
struct vmsg_syscall_rsp { s64 ret; s32 err; u32 outbuf_len; };

Pointer args are classified per-syscall (in/out/inout) by a small per-syscall descriptor table; in-buffers travel with the request, out-buffers with the reply (or via RDMA READ/WRITE for large transfers).

8Latency budget & mitigations

Forwarded syscalls cross the fabric, so chatty socket loops are the risk.

9Security

10Open questions / risks

  1. io_uring on a home-affine fd bypasses syscalls → seccomp won't see it. Options: deny io_uring for migratable cgroups in Phase 1, or forward the io_uring setup and proxy completions (hard). Lean: deny in Phase 1.
  2. Shared memory / MAP_SHARED of a device — restrict in Phase 1.
  3. Signals & PID semantics: keeping home PID visible may need deputy-side proxying of getpid, kill, /proc/self. Scope carefully.
  4. ADDFD fd-number stability vs the task dup'ing fds — track in the fd map.
  5. threads: a multithreaded task shares the filter; the notif handler must be concurrency-safe across threads hitting traps simultaneously.
  6. Where does the fd map live — remote agent (userspace) or voltrond.ko? Lean userspace for Phase 1; move hot paths to kernel if latency demands.

11Phase 1 deliverables (incremental)

  1. RDMA transport in voltrond.ko + agent channel (HELLO/echo over verbs).
  2. Remote agent: launch a child under the seccomp filter; trap + log net syscalls.
  3. Deputy: execute forwarded socket/bind/listen/accept/send/recv on real fds.
  4. fd classification + OCFS2-local fast path (native read/write).
  5. End-to-end demo: a TCP echo server whose accepted connection is handled on the execution node, data relayed via the home deputy, a file read from OCFS2.