STRUCT ACTION_CACHE(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct action_cache(9) β€” like, the whole kernel API manual vibe πŸŽ€

okay so bestie, welcome to the struct action_cache(9) page πŸ’– this is straight out of the Kernel API Manual, and it's genuinely such a cute little struct. let's get into it ✨


🌸 NAME 🌸

struct action_cache β€” a per-filter cache of seccomp actions, one for each arch/syscall pair πŸ¦‹

like, per filter. per arch. per syscall. she's organised, she's tracking everything, she's that girl πŸ’…


✨ SYNOPSIS ✨

struct action_cache {
    unsigned long allow_native[BITS_TO_LONGS( SECCOMP_ARCH_NATIVE_NR)];
  #ifdef SECCOMP_ARCH_COMPAT;
    unsigned long allow_compat[BITS_TO_LONGS( SECCOMP_ARCH_COMPAT_NR)];
  #endif;
 };

no cap, this is the whole thing. two bitmaps and a dream 🫢


🌈 Members 🌈

  • allow_native β€” a bitmap where each bit is like "does this filter always allow this syscall?" for the native architecture. one bit, one verdict, no ambiguity πŸ’«
  • allow_compat β€” same energy, but for the compat architecture. that one's tucked behind #ifdef SECCOMP_ARCH_COMPAT; so she only shows up when compat arch is actually a thing, iykyk πŸ”₯
lowkey the whole point is that each bit answers a yes/no for one syscall, so the filter doesn't have to redo the work every single time. iconic behaviour, honestly πŸ‘‘

πŸ¦‹ SEE ALSO πŸ¦‹

the kernel file lives at ./kernel/seccomp.c β€” go say hi to her πŸ’œ and while you're in there, the whole friend group:

like, that's the entire group chat and every one of them ate πŸ”₯


and that's the page!! this one ships from ./kernel and it's dated October 2026, so yeah, she's stamped and official ⭐ mwah, go forth and cache those actions bestie πŸ’–πŸ§šβ€β™€οΈ

πŸ“¦ where this page comes from