is_module_address(9)
π is_module_address β kernel API manual, but make it make sense π
okay so real talk, we're in the is_module_address(9) page of the Kernel API Manual, and honestly? it's a short one. a little baby page. but it's important, so grab your iced coffee and let's go π
β¨ NAME β¨
is_module_address β literally just: is this address inside a module? that's it. that's the whole vibe check π«Ά
β¨ SYNOPSIS β¨
bool is_module_address (unsigned long addr );
it hands you back a bool, no cap β so you're getting a yes or a no, nothing in between π
πΈ ARGUMENTS πΈ
addrβ the address you wanna check. that's the one. that's the address. drop it in and let the function do its little investigation π
π¦ DESCRIPTION π¦
so here's the thing bestie β if what you actually wanna know is whether the address is code and not data, then you don't want this function, you want to go see is_module_text_address. that's the one for the code-only question. this page is just pointing you there, and honestly? respect. it knows its limits π
no like genuinely, that's the whole description. short king behavior π
π SEE ALSO π
okay this is the part where it goes off. the kernel file to look at is ./kernel/module/main.c, and then there's a whole friend group of pages:
find_any_unique_sec(9)is_module_percpu_address(9)module_refcount(9)verify_module_namespace(9)elf_validity_ehdr(9)elf_validity_cache_sechdrs(9)elf_validity_cache_secstrings(9)elf_validity_cache_index_info(9)elf_validity_cache_index_mod(9)elf_validity_cache_index_sym(9)elf_validity_cache_index_str(9)elf_validity_cache_index_versions(9)elf_validity_cache_index(9)elf_validity_cache_strtab(9)__module_address(9)is_module_text_address(9)__module_text_address(9)
like, the whole elf_validity_cache_* squad showed up. iconic. they ate and left no crumbs πβ
and that's the page!! mwah π signed off from ./kernel/module, dated October 2026, author of record is_module_address(9) β okay bye, ily, go check your module addresses 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