sys_lsm_get_self_attr(9)
π sys_lsm_get_self_attr(9) π
okay so bestie, welcome to sys_lsm_get_self_attr(9) from the Kernel API Manual β this is the one that returns the current task's security module attributes, and yes it ate. β¨
β¨ NAME β¨
sys_lsm_get_self_attr β returns the current task's security module attributes. No cap, that's the whole vibe. π
π SYNOPSIS π
long sys_lsm_get_self_attr (unsigned int attr , struct lsm_ctx __user *
ctx , u32 __user * size , u32 flags );
π ARGUMENTS π
attrβ which attribute to return. simple as that, bestie.ctxβ the user-space destination for the information, orNULL. yes,NULLis allowed, icon behavior.sizeβ pointer to the size of space available to receive the data. it's giving capacity check.flagsβ special handling options.LSM_FLAG_SINGLEmeans only attributes associated with the LSM identified in the passedctxget reported. iykyk.
πΈ DESCRIPTION πΈ
okay so here's the tea: this returns the calling task's LSM contexts. π On success, it returns the number of ctx array elements. That number can be zero if there are no LSM contexts assigned β not a whole crisis, just a cute empty-array moment. π«Ά
If size is insufficient to contain the return data, -E2BIG is returned and size is set to the minimum required size. In all other cases, a negative value indicating the error is returned. π
π¦ SEE ALSO π¦
- Kernel file:
./security/lsm_syscalls.c lsm_name_to_attr(9)sys_lsm_set_self_attr(9)sys_lsm_list_modules(9)
bye bestie π β this one comes from ./security, dated October 2026, and itβs sys_lsm_get_self_attr(9). Periodt. π«Ά
π¦ 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