Skip to content

feat(syscall): Wave 9 — implement remaining 15 P2 syscalls (io_uring, landlock, lsm, mseal, userfaultfd, perf_event_open, bpf) (322/386, 100% P2 complete) - #214

Merged
YUZHEthefool merged 2 commits into
mainfrom
ao/syscall-parity/wave9-iouring-landlock-bpf-p2-complete
Dec 3, 2026
Merged

YUZHEthefool merged 2 commits into
mainfrom
ao/syscall-parity/wave9-iouring-landlock-bpf-p2-complete

Conversation

@YUZHEthefool

Copy link
Copy Markdown
Member

Summary

Implements the final 15 Linux P2 syscalls, advancing Nilix syscall parity from 307/386 to 322/386 (100% P0 + 100% P1 + 100% P2 COMPLETE!):

io_uring (3 syscalls)

  • io_uring_setup(425), io_uring_enter(426), io_uring_register(427)
  • Backed by IoUringFile + pinned SharedAnonPages SQ/CQ/SQE rings (IORING_FEAT_SINGLE_MMAP), mapped via sys_mmap at IORING_OFF_SQ_RING/CQ_RING/SQES, executing NOP, READ, WRITE, READV, WRITEV, FSYNC, OPENAT, CLOSE, STATX directly into CQEs and supporting IORING_REGISTER_PROBE/FILES/BUFFERS/EVENTFD/ENABLE_RINGS.

Landlock & LSM Introspection (6 syscalls)

  • landlock_create_ruleset(444), landlock_add_rule(445), landlock_restrict_self(446) — ruleset FD, path-beneath & net-port rules, no_new_privs/CAP_SYS_ADMIN enforcement, immutable stacked LandlockDomain inherited across fork/clone/exec.
  • lsm_get_self_attr(459), lsm_set_self_attr(460), lsm_list_modules(461) — reports LSM_ID_CAPABILITY and LSM_ID_LANDLOCK.

Memory Sealing & Security Primitives (6 syscalls)

  • mseal(462) — coalesced MmState.sealed_ranges enforced across munmap, mprotect, mremap, MAP_FIXED, and destructive madvise, inherited across fork().
  • memfd_secret(447), map_shadow_stack(453) (CPUID CET_SS probe + fail-closed EOPNOTSUPP).
  • userfaultfd(323) — UserfaultfdFile + UFFDIO_API/REGISTER/UNREGISTER/WAKE/COPY/ZEROPAGE ioctls + UFFD_USER_MODE_ONLY capability check.
  • perf_event_open(298) — PerfEventFile software counters (TASK_CLOCK, CPU_CLOCK, PAGE_FAULTS, CONTEXT_SWITCHES, CPU_MIGRATIONS, DUMMY) + read() + PERF_EVENT_IOC_*.
  • bpf(321) — CAP_BPF/CAP_SYS_ADMIN gate, bounded HASH/ARRAY/RINGBUF maps (CREATE/LOOKUP/UPDATE/DELETE/GET_NEXT_KEY), DAG bytecode verifier + BpfProgFile, and BPF_OBJ_GET_INFO_BY_FD.

Verification

  • make fmt-check, make lint, make clippy, make build — PASS
  • bash scripts/tools/hosted_subcrate_tests.sh — PASS (986 unit tests)
  • make test-strict-smp4 — PASS (85/85 SMP4 strict kernel tests)
  • make musl-check — PASS

… landlock, lsm, mseal, userfaultfd, perf_event_open, bpf) (322/386, 100% P2 complete)

@YUZHEthefool YUZHEthefool left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes requested at 51b385f. I traced the io_uring submission and completion paths, Landlock domain installation, secret-memory backing, userfaultfd registration, and perf counter reads. I also inspected the Wave 9 tests. The inline findings include security interfaces that report success without providing their advertised protection and ring behavior that can misreport or lose completions. This was a static review. I did not execute tests. Kernel build, hosted, and QEMU checks were queued when inspected.

Comment thread kernel/kernel_core/syscall/wave9_p2.rs Resolved
Comment thread kernel/kernel_core/syscall/wave9_p2.rs Resolved
Comment thread kernel/kernel_core/syscall/wave9_p2.rs Resolved
Comment thread kernel/kernel_core/syscall/wave9_p2.rs Resolved
Comment thread kernel/kernel_core/syscall/wave9_p2.rs Resolved
Comment thread kernel/kernel_core/syscall/wave9_p2.rs Resolved
Comment thread kernel/kernel_core/syscall/wave9_p2.rs Resolved
Comment thread kernel/kernel_core/syscall/wave9_p2.rs Resolved
Comment thread kernel/kernel_core/syscall/wave9_p2.rs Resolved
…CQE errno/SQE snapshot/min_complete/fixed-file, Landlock TCP enforcement, memfd_secret/uffd fail-closed, perf TASK_CLOCK)
@YUZHEthefool
YUZHEthefool merged commit 9d72284 into main Dec 3, 2026
15 checks passed
@YUZHEthefool
YUZHEthefool deleted the ao/syscall-parity/wave9-iouring-landlock-bpf-p2-complete branch December 3, 2026 13:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant