STRUCT LSM_INFO(9)
π struct lsm_info(9) π
okay bestie, buckle UP β this is from the Kernel API Manual, section 9, and it's the literal blueprint for defining one single LSM inside the LSM framework. no cap, it's kind of a big deal. π
β¨ NAME β¨
struct lsm_info β defines an individual LSM for the LSM framework. that's it, that's the whole vibe. one struct, one LSM, main character energy. π
πΈ SYNOPSIS πΈ
struct lsm_info {
const struct lsm_id *id;
enum lsm_order order;
unsigned long flags;
struct lsm_blob_sizes *blobs;
int *enabled;
int (*init)(void);
int (*initcall_pure)(void);
int (*initcall_early)(void);
int (*initcall_core)(void);
int (*initcall_subsys)(void);
int (*initcall_fs)(void);
int (*initcall_device)(void);
int (*initcall_late)(void);
int (*initcall_late_sync)(void);
};
like, look at her. fourteen members. absolutely iconic. π¦
π Members π
idβ the LSM's name/ID info. it's giving "who am I" but make it official. πͺͺorderβ where you sit in line compared to the other LSMs. optional β¨flagsβ descriptive flags, just lil vibes describing stuff. optional β¨blobsβ LSM blob sharing. sharing is caring, bestie. optional β¨enabledβ controlled byCONFIG_LSM. the config is literally the parent here. optional β¨initβ the LSM specific initialization routine. the get-ready-with-me moment. πinitcall_pureβ LSM callback forinitcall_puresetup. optional β¨initcall_earlyβ LSM callback forearly_initcallsetup. optional β¨initcall_coreβ LSM callback forcore_initcallsetup. optional β¨initcall_subsysβ LSM callback forsubsys_initcallsetup. optional β¨initcall_fsβ LSM callback forfs_initcallsetup. optional β¨initcall_deviceβ LSM callback fordevice_initcallsetup. optional β¨initcall_lateβ LSM callback forlate_initcallsetup. optional β¨initcall_late_syncβ LSM callback forlate_initcall_syncsetup. optional β¨
lowkey notice how almost everything exceptidandinitis marked optional? yeah. that's the whole mood of this struct β bring what you need, leave the rest. π«Ά
π₯ SEE ALSO π₯
- Kernel file
./include/linux/lsm_hooks.h struct lsm_id(9)lsm_get_xattr_slot(9)
go read those if you wanna understand the whole friend group, iykyk. π
and that's the page, babes! π this lil masterpiece lives in ./include/linux, dated October 2026, and yes β it's struct lsm_info(9) all the way down. slay, stay safe, and don't forget your CONFIG_LSM. π
β¨πΈ
π¦ 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