__module_text_address(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… __module_text_address(9) πŸ’…

okay so this page is from the Kernel API Manual, and it's literally here to answer: β€œwhich module's code contains this address?” No cap. 🫢

✨ NAME ✨

__module_text_address β€” get the module whose code contains an address.

🌸 SYNOPSIS 🌸

struct module * __module_text_address (unsigned long addr );

πŸŽ€ ARGUMENTS πŸŽ€

  • addr β€” the address. Like, the address you're asking about, bestie. πŸ’–

πŸ¦‹ DESCRIPTION πŸ¦‹

Okay so real talk: you must call this within an RCU read section or with the module mutex held. Why? So that the module doesn't get freed during this. That's the safety condition, and it is not optional, periodt. 🚨

πŸ‘‘ SEE ALSO πŸ‘‘

Kernel file ./kernel/module/main.c, plus these iconic little references:


xoxo, bestie πŸ’– β€” source/version: ./kernel/module, date: October 2026, and the page itself is __module_text_address(9). Slay. ✨

πŸ“¦ where this page comes from