Conversation
There was a problem hiding this comment.
Pull request overview
This PR aims to increase isolation against adversarial kernels by moving sensitive Python execution into separate threads (to obscure the Python call stack) and tightening memory-related behavior during kernel import/warmup.
Changes:
- Add a new seccomp filter helper intended to block memory-mapping syscalls for warmup/benchmark threads.
- Refactor kernel import + warmup into a protected/threaded path and split reporting/cleanup into separate
BenchmarkManagermethods. - Run benchmark setup + execution on a spawned C++ thread from the nanobind binding layer.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| csrc/seccomp.cpp | Adds seccomp_install_memory_block() helper to deny mmap/mprotect-family syscalls. |
| csrc/manager.h | Exposes send_report() / clean_up(), adds mTestOrder + mMedianEventTime, adjusts result message signature. |
| csrc/manager.cpp | Refactors initial kernel setup into a worker thread, stores test order/event overhead in members, splits reporting/cleanup. |
| csrc/landlock.cpp | Removes an outdated TODO/commented-out seccomp rules block. |
| csrc/binding.cpp | Wraps benchmark execution in a new std::thread with explicit GIL release/acquire. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Not any strong protection, but adds more nuisances to trying to access "protected" memory:
Python call stack is completely invisible from python; We also protect the benchmark manager during warmup calls.