__is_kernel_text(9)
π __is_kernel_text (9) β the Kernel API Manual, bestie edition β¨
okay so real talk, this one lives in the Kernel API Manual and it's literally just here to tell you if a pointer is hanging out in the .text section. that's it. that's the whole vibe. π
πΈ NAME πΈ
__is_kernel_text β checks if the pointer address is located in the .text section π¦
β¨ SYNOPSIS β¨
bool __is_kernel_text (unsigned long addr );
π«Ά ARGUMENTS π«Ά
addrβ the address to check π like, the one you're wondering about
π RETURN π
trueif the address is located in.textβfalseotherwise β
no in-between, no "it depends", just true or false. periodt. π
π₯ NOTE π₯
okay so listen β this is an internal helper, meaning it's not out here trying to be your main character. it only checks the range of _stext to _etext. that's the whole scope, no cap. π§
π SEE ALSO π
Kernel file ./include/asm-generic/sections.h β and the whole friend group:
memory_contains(9)memory_intersects(9)init_section_contains(9)init_section_intersects(9)is_kernel_core_data(9)is_kernel_rodata(9)is_kernel_inittext(9)__is_kernel(9)
and that's the whole page, bestie π«Ά this iconic little helper came from ./include/asm-generic and it's dated October 2026 β go forth and vibe check those pointers π
π¦ 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