ENUM EXECMEM_TYPE(9)
π enum execmem_type(9) β Kernel API Manual, bestie π
okay so before we even get into it: this is a page from the Kernel API Manual, section 9, and it's all about enum execmem_type. yes it's a mouthful. no I will not be pronouncing it out loud. let's go β¨
πΈ NAME πΈ
enum execmem_type β literally just: the types of executable memory ranges. that's the whole vibe. π¦
β¨ SYNOPSIS β¨
enum execmem_type {
EXECMEM_DEFAULT ,
EXECMEM_MODULE_TEXT ,
EXECMEM_KPROBES ,
EXECMEM_FTRACE ,
EXECMEM_BPF ,
EXECMEM_MODULE_DATA ,
EXECMEM_TYPE_MAX
};
like. look at her. an absolute icon of an enum π
π§ Constants π§
EXECMEM_DEFAULTβ the default parameters, aka the fallback fit for any type that isn't explicitly defined. she's the safety net bestie π«ΆEXECMEM_MODULE_TEXTβ parameters for module text sections πEXECMEM_KPROBESβ parameters for kprobes πEXECMEM_FTRACEβ parameters for ftrace π§΅EXECMEM_BPFβ parameters for BPF β‘EXECMEM_MODULE_DATAβ parameters for module data sections πEXECMEM_TYPE_MAXβ the max. the ceiling. the end of the list. nothing to see here, just a boundary marker π§
π Description π
okay so real talk: there are several subsystems that allocate executable memory, right? and each architecture has opinions β different restrictions on placement, permissions, alignment and other parameters for the memory those subsystems can use. very "every architecture is a different person with different boundaries" energy. π
and that's exactly what this enum is for: the types in enum execmem_type identify the subsystems that allocate executable memory, and they let architectures define parameters for ranges that are suitable for allocations by each subsystem. it's giving matchmaker but for memory ranges and subsystems. iconic. π
π SEE ALSO π
Kernel file ./include/linux/execmem.h, plus these absolute legends:
enum execmem_range_flags(9)execmem_fill_trapping_insns(9)execmem_restore_rox(9)struct execmem_range(9)struct execmem_info(9)execmem_arch_setup(9)execmem_alloc(9)execmem_alloc_rw(9)execmem_free(9)execmem_vmap(9)execmem_is_rox(9)
go read them. iykyk π₯
ngl this whole page lives in ./include/linux and it's dated October 2026 β so yeah, future girl summer π. mwah, go allocate responsibly π
π¦ 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