scx_bpf_sub_caps(9)
π scx_bpf_sub_caps(9)
ok so bestie, welcome to the Kernel API Manual β¨ β this page is literally about reading cap cmasks for yourself or your direct child, and honestly it's giving "small function, big feelings". Let's get into it π«Ά
πΈ NAME πΈ
scx_bpf_sub_caps β read self's or a direct child's cap cmasks π
β¨ SYNOPSIS β¨
__bpf_kfunc s32 scx_bpf_sub_caps (u64 cgroup_id , u64 caps , struct
scx_cmask *out__arena , const struct bpf_prog_aux *aux );
π ARGUMENTS π
cgroup_idβ pass0for self, or hand over a direct child's cgroup id. that's the whole vibe β¨capsβ one or moreSCX_CAP_*bits. yes, more than one, go off king πout__arenaβ the cmask that receives the union ofcapswithin its range. it's the little bucket your answer drops into πͺ£πauxβ implicit BPF argument. not me having to explain this every time π it's just there, bestie.
π DESCRIPTION π
So what does it actually do? It reads the cap cmasks granted on each cid β for self when cgroup_id is 0, or for a direct child otherwise. it's the literal granted set, no cap, fr fr π
and there's a boundary, okay? a sched can read only itself or a direct child. that's the rule, periodt. π§
Return values, because iykyk:
0β slay, it worked β-ENODEVβcgroup_idnames no direct child, so likeβ¦ who even is she π-EINVALβ bad inputs. check ur args bestie π
π¦ SEE ALSO π¦
the whole friend group π β Kernel file ./kernel/sched/ext/sub.c and literally all of these:
scx_skip_subtree_pre(9)scx_next_descendant_pre(9)scx_rescue_charge(9)scx_rescue_end(9)scx_rescue_keep(9)scx_rescue_accrue(9)scx_rescue_admit(9)scx_rescue_try_admit(9)scx_rescue_check_overload(9)scx_rescue_timerfn(9)scx_resolve_local_dsq(9)queue_sync_ecaps(9)scx_process_sync_ecaps(9)scx_unbypass_replay_ecaps(9)scx_discard_stale_ecaps_syncs(9)scx_rehome_task(9)scx_punt_task(9)scx_cgroup_claim_subtree(9)scx_cgroup_return_subtree(9)scx_cgroup_task_migrating(9)scx_cgroup_task_migrated(9)scx_cgroup_task_migrate_canceled(9)scx_bpf_sub_dispatch(9)scx_bpf_sub_grant(9)scx_bpf_sub_revoke(9)scx_bpf_sub_kill_bstr(9)
and that's the whole page bestie πβ¨ this one's straight outta ./kernel/sched/ext, dated October 2026 β go forth and read those cmasks, icon π
ππ
π¦ 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