sys_lsm_list_modules(9)
π 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 ofids, 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
- 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