seccomp_set_mode_filter(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… seccomp_set_mode_filter β€” like, the internal function for setting seccomp filter (this is from the Kernel API Manual, bestie, section 9) πŸŽ€


✨ NAME ✨

seccomp_set_mode_filter β€” the internal function that handles setting up your seccomp filter. yes it's internal, no you can't just call it from your little userspace program, it's kernel business πŸ’…


🌸 SYNOPSIS 🌸

long seccomp_set_mode_filter (unsigned int flags , const char __user
       *filter );

πŸ¦‹ ARGUMENTS πŸ¦‹

  • flags β€” the flags that change how the filter behaves, icon behavior fr
  • filter β€” a struct sock_fprog that's holding your filter, she's the main character here πŸ‘‘

πŸ’– DESCRIPTION πŸ’–

okay so the way this works is β€” you can literally call this function repeatedly to install additional filters. like, stack them. the more the merrier, no cap.

Every filter that gets successfully installed will be evaluated in reverse order for each system call the task makes. so the last one you added gets checked first, iykyk πŸ”₯

Once current->seccomp.mode is non-zero, it may not be changed. that's it, that's the rule, it's locked in, periodt. πŸ’€

Returns 0 on success or -EINVAL on failure. that's literally it, those are the two outcomes, she's not complicated 🫢


🌈 SEE ALSO 🌈

go read them, they're all in their slay era too ⭐


okay that's the whole page!! this little gem lives in ./kernel, dated October 2026, and it's seccomp_set_mode_filter(9) all day every day πŸ§šπŸ’œ hope you understood it bestie, mwah πŸ’‹

πŸ“¦ where this page comes from