selinux_getselfattr(9)
π selinux_getselfattr(9) π
okay so bestie, this page is from the Kernel API Manual, and it's literally the βget my own SELinux task attributesβ girlie. Tiny page, important vibes. Let's go β¨
πΈ NAME πΈ
selinux_getselfattr - Get SELinux current task attributes
π¦ SYNOPSIS π¦
int selinux_getselfattr (unsigned int attr , struct lsm_ctx __user *ctx
, u32 *size , u32 flags );
π ARGUMENTS π
attrβ the requested attribute. You're telling her which one you want, periodt.ctxβ buffer to receive the result. This is the user space cutie that gets filled with the goods.sizeβ buffer size (input), buffer size used (output). So it's giving input-then-output energy, iykyk.flagsβ unused. Not me checking it anyway; it's literally unused π
π DESCRIPTION π
So what she does is fill the passed user space ctx with the details of the requested attribute. That's the whole job. No cap.
She returns the number of attributes on success, and an error code otherwise. And the tea is: there will only ever be one attribute. Just one. Singular. One-attribute energy π
π SEE ALSO π
Kernel file ./security/selinux/hooks.c, plus these function besties:
selinux_secmark_enabled(9)selinux_peerlbl_enabled(9)task_avdcache_reset(9)task_avdcache_search(9)task_avdcache_update(9)selinux_inode_permission(9)selinux_inode_xattr_skipcap(9)selinux_mmap_backing_file(9)selinux_skb_peerlbl_sid(9)selinux_conn_sid(9)selinux_uring_override_creds(9)selinux_uring_sqpoll(9)selinux_uring_cmd(9)selinux_uring_allowed(9)
mwah π that's the page, bestie. Source/version situation is ./security/selinux, dated October 2026, and yes the page itself is selinux_getselfattr(9) β slay and goodbye π«Άβ¨
π¦ 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