diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2009-03-31 13:05:31 -0600 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2009-03-31 13:05:31 +1030 |
commit | e610499e2656e61975affd0af56b26eb73964c84 (patch) | |
tree | e870def77ba17f717a8cf2766f0b4ac8c2ae89f3 /include/linux/module.h | |
parent | 414fd31b2553aaf160ca9b9afe45aa0372b01b92 (diff) | |
download | lwn-e610499e2656e61975affd0af56b26eb73964c84.tar.gz lwn-e610499e2656e61975affd0af56b26eb73964c84.zip |
module: __module_address
Impact: New API, cleanup
ksplice wants to know the bounds of a module, not just the module text.
It makes sense to have __module_address. We then implement
is_module_address and __module_text_address in terms of this (and
change is_module_text_address() to bool while we're at it).
Also, add proper kerneldoc for them all.
Cc: Anders Kaseorg <andersk@mit.edu>
Cc: Jeff Arnold <jbarnold@mit.edu>
Cc: Tim Abbott <tabbott@mit.edu>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'include/linux/module.h')
-rw-r--r-- | include/linux/module.h | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/include/linux/module.h b/include/linux/module.h index 08e5e75d6122..fd1241e1416f 100644 --- a/include/linux/module.h +++ b/include/linux/module.h @@ -365,7 +365,9 @@ static inline int module_is_live(struct module *mod) /* Is this address in a module? (second is with no locks, for oops) */ struct module *module_text_address(unsigned long addr); struct module *__module_text_address(unsigned long addr); -int is_module_address(unsigned long addr); +struct module *__module_address(unsigned long addr); +bool is_module_address(unsigned long addr); +bool is_module_text_address(unsigned long addr); static inline int within_module_core(unsigned long addr, struct module *mod) { @@ -494,21 +496,29 @@ search_module_extables(unsigned long addr) return NULL; } -/* Is this address in a module? */ static inline struct module *module_text_address(unsigned long addr) { return NULL; } -/* Is this address in a module? (don't take a lock, we're oopsing) */ +static inline struct module *__module_address(unsigned long addr) +{ + return NULL; +} + static inline struct module *__module_text_address(unsigned long addr) { return NULL; } -static inline int is_module_address(unsigned long addr) +static inline bool is_module_address(unsigned long addr) { - return 0; + return false; +} + +static inline bool is_module_text_address(unsigned long addr) +{ + return false; } /* Get/put a kernel symbol (calls should be symmetric) */ |