sk_capable(9)
π sk_capable(9) π
okay bestie, welcome to the Kernel API Manual entry for sk_capable β she's short, she's sweet, she's a socket capability check, and honestly? iconic. β¨
πΈ NAME πΈ
sk_capable β Socket global capability test π«Ά
π¦ SYNOPSIS π¦
bool sk_capable (const struct sock *sk , int cap );
like literally that's it, that's the whole signature, no cap π
π ARGUMENTS π
skβ the socket you're gonna use a capability on, or through, if you will. the main character socket, fr fr πcapβ the global capability you want to use. that's the one we're checking for π
β¨ DESCRIPTION β¨
so the vibe check here is a test β
β you're asking: did the opener of this socket already have this capability back when the socket was created? π°οΈ and does the current process have the capability cap in all user namespaces? π
both of those need to be true, and if they are β slay, the test passes π β¨
ngl, this is the "was it valid then, and is it valid now" double-check. two eras, one capability check. periodt. π
π SEE ALSO π
peep these, bestie β the whole friend group π«Ά:
Kernel file ./net/core/sock.c plus:
sk_ns_capable(9)sk_net_capable(9)sk_set_memalloc(9)sk_alloc(9)sk_clone(9)skb_page_frag_refill(9)sk_wait_data(9)__sk_mem_raise_allocated(9)__sk_mem_schedule(9)__sk_mem_reduce_allocated(9)__sk_mem_reclaim(9)
okay that's the whole page, go be capable π
and finally, the cute little sign-off: this one comes from ./net/core, dated October 2026, and she's filed under sk_capable(9) in the Kernel API Manual. bye bestie, mwah πππΈ
π¦ 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