STRUCT ACTION_CACHE(9)
π 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:
struct seccomp_kaddfd(9)struct notification(9)struct seccomp_filter(9)seccomp_check_filter(9)seccomp_cache_check_allow(9)seccomp_run_filters(9)seccomp_can_sync_threads(9)seccomp_filter_release(9)seccomp_sync_threads(9)seccomp_prepare_filter(9)seccomp_prepare_user_filter(9)seccomp_is_const_allow(9)seccomp_cache_prepare(9)seccomp_attach_filter(9)seccomp_set_mode_strict(9)seccomp_set_mode_filter(9)prctl_set_seccomp(9)
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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms