Skip to content

Enable seccomp filter#805

Open
CvvT wants to merge 4 commits intomainfrom
weiteng/enable_seccomp
Open

Enable seccomp filter#805
CvvT wants to merge 4 commits intomainfrom
weiteng/enable_seccomp

Conversation

@CvvT
Copy link
Copy Markdown
Contributor

@CvvT CvvT commented Apr 24, 2026

Address #793 to enable seccomp filter for Linux userland.

In debug mode, disallowed syscalls would be only logged but proceed normally. This may help make development easier because some syscalls are implicitly called by libc function and thus it might not be obvious to figure out we miss some seccomp rules. We can still tell there are missing seccomp rules by comparing debug and release runs.

@CvvT CvvT marked this pull request as ready for review April 24, 2026 18:47
@github-actions
Copy link
Copy Markdown

🤖 SemverChecks 🤖 No breaking API changes detected

Note: this does not mean API is unchanged, or even that there are no breaking changes; simply, none of the detections triggered.

Comment on lines +483 to +487
// In debug builds, log violations instead of silently returning an error so that
// it won't fail silently during development (which may hard to debug) and we can
// tell there are missing seccomp rules to be added by comparing debug and release runs.
if cfg!(debug_assertions) {
SeccompAction::Log
Copy link
Copy Markdown
Member

@jaybosamiya-ms jaybosamiya-ms Apr 25, 2026

Choose a reason for hiding this comment

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

Minor suggestion: we can use SCMP_ACT_TRAP to get a SIGSYS with SYS_SECCOMP that we can use to actually log via litebox_util_log::error!(...) which might be nicer than needing to diff debug/release runs

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