cloudflare / foundations

Cloudflare's Rust service foundations library.
https://blog.cloudflare.com/introducing-foundations-our-open-source-rust-service-foundation-library
BSD 3-Clause "New" or "Revised" License
1.25k stars 51 forks source link

Consider removing seccomp setup in memory_profiler #46

Closed dqminh closed 1 month ago

dqminh commented 4 months ago

It's unusual to handle the library responsiblity to setup seccomp by itself. The seccomp setup will require some additional syscalls, such as prctl, and if the process has setup seccomp already and do not allow those syscalls anymore, then it will fail. And if the main process didn't setup seccomp, then it does not make sense for memory_profile to setup seccomp itself, because obviously we didn't care.

I would propose to remove the seccomp setup in memory_profiler.