Skip to content

feat(syscall): Wave 8 — implement 22 P2 syscalls (New Mount API, Futex2, Modern VFS/NS/MM) (307/386) - #213

Merged
YUZHEthefool merged 2 commits into
mainfrom
ao/syscall-parity/wave8-new-mount-futex2-modern-vfs
Dec 3, 2026
Merged

YUZHEthefool merged 2 commits into
mainfrom
ao/syscall-parity/wave8-new-mount-futex2-modern-vfs

Conversation

@YUZHEthefool

Copy link
Copy Markdown
Member

Summary

Implements 22 Linux 5.x/6.x P2 syscalls, advancing Nilix syscall parity from 285/386 to 307/386:

New Mount API (10 syscalls)

  • open_tree(428), open_tree_attr(467), move_mount(429), fsopen(430), fsconfig(431), fsmount(432), fspick(433)
  • mount_setattr(442), statmount(457), listmount(458)
  • Backed by FsContextFile & MountTreeFile descriptors and VFS callbacks (VfsWave8Callbacks) reusing Mount::try_set_flags writer-gate exclusion and mount-namespace views.

Futex2 (4 syscalls)

  • futex_waitv(449), futex_wake(454), futex_wait(455), futex_requeue(456)
  • Supports Linux 5.16/6.7 sized futex flags (U8/U16/U32, FUTEX2_PRIVATE), absolute CLOCK_MONOTONIC/CLOCK_REALTIME timeouts, bitset masks, and multi-waiter futex_waitv.

Modern VFS / NS / MM / Sched (8 syscalls)

  • process_madvise(440), process_mrelease(448), cachestat(451)
  • file_getattr(468), file_setattr(469) (24-byte FILE_ATTR_SIZE_VER0 backed by bounded FILE_ATTR_STORE purged on inode drop)
  • listns(470), rseq_slice_yield(471), fchroot(472) (enforces CAP_SYS_CHROOT in root user namespace + LSM execute permission)

Verification

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

@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 a4102c3. I traced the mount and futex operations, cachestat, process_madvise, and file attributes through their syscall and VFS implementations, and inspected the Wave 8 tests. The findings include a recursive process-lock acquisition, lost futex wakes, and mount operations that can change the wrong object or leave partial state. This was a static review. I did not run local tests. Hosted, kernel build, and QEMU checks were still running when inspected.

Comment thread kernel/kernel_core/syscall/modern_p2.rs Resolved
Comment thread kernel/kernel_core/syscall/modern_p2.rs Resolved
Comment thread kernel/kernel_core/syscall/futex.rs Resolved
Comment thread kernel/kernel_core/syscall/futex.rs Resolved
Comment thread kernel/kernel_core/syscall/modern_p2.rs Resolved
Comment thread kernel/kernel_core/syscall/modern_p2.rs Resolved
Comment thread kernel/vfs/operations.rs Resolved
Comment thread kernel/kernel_core/syscall/modern_p2.rs Resolved
Comment thread kernel/vfs/operations.rs Resolved
…tv, pinned mount trees, move_mount, atomic mount_setattr, cachestat, process_madvise, file_setattr)
@YUZHEthefool
YUZHEthefool merged commit e6aa563 into main Dec 3, 2026
28 of 30 checks passed
@YUZHEthefool
YUZHEthefool deleted the ao/syscall-parity/wave8-new-mount-futex2-modern-vfs branch December 3, 2026 13:01
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