sys_lsm_set_self_attr(9)
πΈ NAME πΈ
sys_lsm_set_self_attr β bestie, this one sets the current task's security module attribute π
β¨ SYNOPSIS β¨
long sys_lsm_set_self_attr (unsigned int attr , struct lsm_ctx __user *
ctx , u32 size , u32 flags );
okay so that's the whole signature, copy it exactly, no cap π«Ά
π ARGUMENTS π
attrβ which attribute you're setting, like literally which one πctxβ the LSM contexts, the actual vibe content π¦sizeβ size ofctx, gotta know how much you're working with πflagsβ reserved for future use, so rn it's just sitting there being iconic and unused β
π DESCRIPTION π
So this function sets the calling task's LSM context. That's the whole main character moment β¨
On success it returns 0 β slay, we love a clean success π
But if the attribute specified cannot be set, it returns a negative value indicating the reason for the error π like it's not being mean, it's just telling you what went wrong, iykyk π
ngl, if you see a negative return, that's your sign to actually read the reason instead of ignoring it π
π SEE ALSO π
- Kernel file
./security/lsm_syscalls.c lsm_name_to_attr(9)sys_lsm_get_self_attr(9)sys_lsm_list_modules(9)
go read those too, they're all part of the same friend group fr fr π«Ά
and that's the whole page, bestie π this one lives in ./security, October 2026 edition β ty for coming to my ted talk, 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