sys_lsm_get_self_attr(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– 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, or NULL. yes, NULL is 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_SINGLE means only attributes associated with the LSM identified in the passed ctx get 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 πŸ¦‹


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