KGIndex

India --:--:-- --

All work

04 · Linux internals

SysCV

Watch a C program talk to the kernel, one system call at a time.

When
2026
Role
Sole author
Built with
Go, ptrace, Docker, WebSockets, React Flow, Monaco
Source
KrishG7/SysCV ↗

See it

SysCV showing a decoded openat system call beside the C editor and the kernel graph
Every call, decodedWrite C in the editor, press Run, and every system call appears in order. Opening one shows its decoded arguments, the path it was given, the return value and a plain-English line about what it does. The chips filter calls into I/O, files, memory and processes, and the graph on the right follows the step you select.

The problem

System calls are where a program actually touches the machine, and they are invisible. strace prints a wall of text; nobody learns the kernel from that.

Numbers, with dates

  • 10 of 10end-to-end scenarios pass (file I/O, memory, fork, signals, exec, output flood, SIGSEGV)tests/test_comprehensive.js, 28 Oct 2026
  • About 60 / 40syscall definitions for x86-64 / ARM64table_amd64.go (62) and table_arm64.go (40)
  • One weekstart to finish, 9 commits, all minegit history, 9 to 15 Apr 2026

How it works

  1. 01 · write

    Write C in the browser

    A Monaco editor and one Run button. Nothing to install but Docker.

  2. 02 · trace

    Trace under ptrace

    The program runs in a Linux container; every syscall entry and exit stops the tracee so registers can be read.

  3. 03 · hydrate

    Hydrate the arguments

    Raw registers become paths, buffers and flags, with a plain-English line for each call.

  4. 04 · replay

    Step through the kernel

    Collect, then replay: step back and forth while the kernel graph grows and shrinks with the program.

What I built

  • A Go server that compiles your C with gcc and runs it under ptrace inside a Linux container.
  • Architecture-specific register reading for x86-64 and ARM64 to recover each call’s arguments and return value.
  • A replayable timeline and a kernel graph where file descriptors, heap growth and reads and writes appear as the program makes them.