sys_lsm_list_modules(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– sys_lsm_list_modules(9) πŸ’–

okay so this is a page from the Kernel API Manual, section 9, and it's all about sys_lsm_list_modules β€” and yes bestie we're getting into kernel LSM syscall territory, buckle up πŸŽ€


✨ NAME ✨

sys_lsm_list_modules β€” literally just returns a list of the active security modules, that's it, that's the whole job πŸ’…


🌸 SYNOPSIS 🌸

long sys_lsm_list_modules (u64 __user * ids , u32 __user * size , u32 flags );

copy it exactly, no cap, the spacing is giving "written by someone who lives in a terminal" and I respect it ✨


πŸ¦‹ ARGUMENTS πŸ¦‹

  • ids β€” the LSM module ids, aka the actual list you're asking for 🫢
  • size β€” pointer to size of ids, updated on return (so it comes back with new info, keep an eye on it πŸ‘€)
  • flags β€” reserved for future use, must be zero. not "should be zero", must be. zero it or don't come crying to me πŸ’€

πŸ‘‘ DESCRIPTION πŸ‘‘

Returns a list of the active LSM ids. On success the function returns the number of ids array elements β€” and lowkey that value may be zero if there are no LSMs active at all (empty list, still a success, don't panic 😭).

If size is insufficient to contain the return data, -E2BIG is returned and size is set to the minimum required size β€” so it's basically telling you "here's how much room you actually need" 🧚

In all other cases a negative value indicating the error is returned. negative = bad vibes, check the errno, you got this πŸ’œ


πŸ”₯ SEE ALSO πŸ”₯

Kernel file ./security/lsm_syscalls.c

read those too, they're the friend group, this one doesn't exist in a vacuum 🌈


ngl the whole page is short but it's iconic, no filler, just facts πŸ’–

and that's the whole thing bestie!! πŸŽ€ this one's from the Kernel API Manual, file ./security, dated October 2026 β€” go forth and list those modules, you absolute main character πŸ‘‘βœ¨πŸ¦‹

πŸ“¦ where this page comes from