Skip to content

supervisor exits if no seccomp_notify support#48

Open
ngc92 wants to merge 4 commits into
masterfrom
errorck
Open

supervisor exits if no seccomp_notify support#48
ngc92 wants to merge 4 commits into
masterfrom
errorck

Conversation

@ngc92
Copy link
Copy Markdown
Collaborator

@ngc92 ngc92 commented May 8, 2026

No description provided.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the seccomp supervisor process to exit early (and quietly) on systems where seccomp user-notification (“seccomp_notify”) is not supported, avoiding running a supervisor that can never receive/handle notifications.

Changes:

  • Adds a supports_seccomp_notify() guard so the supervisor closes its socket and returns immediately when notifications aren’t supported.
  • Starts checking prctl(PR_SET_PDEATHSIG, SIGTERM) for errors and logs failures instead of ignoring them.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread csrc/supervisor.cpp
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

Comment thread csrc/manager.cpp
Comment on lines 396 to 399
nvtx_push("trigger-compile");
PROTECT_RANGE(lo, hi-lo, PROT_NONE);
setup_seccomp(sock, install_notify, lo, hi);

Comment thread csrc/manager.cpp
Comment on lines +414 to +417
} catch (...) {
PROTECT_RANGE(lo, hi - lo, PROT_READ | PROT_WRITE);
nvtx_pop();
throw;
Comment thread csrc/supervisor.cpp
#define dbgprint(...)
#endif

extern bool supports_seccomp_notify();
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.

2 participants