diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2009-03-31 15:05:31 -0400 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2009-03-30 22:35:31 -0400 |
commit | e610499e2656e61975affd0af56b26eb73964c84 (patch) | |
tree | e870def77ba17f717a8cf2766f0b4ac8c2ae89f3 /include/linux/module.h | |
parent | 414fd31b2553aaf160ca9b9afe45aa0372b01b92 (diff) |
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) | |||
365 | /* Is this address in a module? (second is with no locks, for oops) */ | 365 | /* Is this address in a module? (second is with no locks, for oops) */ |
366 | struct module *module_text_address(unsigned long addr); | 366 | struct module *module_text_address(unsigned long addr); |
367 | struct module *__module_text_address(unsigned long addr); | 367 | struct module *__module_text_address(unsigned long addr); |
368 | int is_module_address(unsigned long addr); | 368 | struct module *__module_address(unsigned long addr); |
369 | bool is_module_address(unsigned long addr); | ||
370 | bool is_module_text_address(unsigned long addr); | ||
369 | 371 | ||
370 | static inline int within_module_core(unsigned long addr, struct module *mod) | 372 | static inline int within_module_core(unsigned long addr, struct module *mod) |
371 | { | 373 | { |
@@ -494,21 +496,29 @@ search_module_extables(unsigned long addr) | |||
494 | return NULL; | 496 | return NULL; |
495 | } | 497 | } |
496 | 498 | ||
497 | /* Is this address in a module? */ | ||
498 | static inline struct module *module_text_address(unsigned long addr) | 499 | static inline struct module *module_text_address(unsigned long addr) |
499 | { | 500 | { |
500 | return NULL; | 501 | return NULL; |
501 | } | 502 | } |
502 | 503 | ||
503 | /* Is this address in a module? (don't take a lock, we're oopsing) */ | 504 | static inline struct module *__module_address(unsigned long addr) |
505 | { | ||
506 | return NULL; | ||
507 | } | ||
508 | |||
504 | static inline struct module *__module_text_address(unsigned long addr) | 509 | static inline struct module *__module_text_address(unsigned long addr) |
505 | { | 510 | { |
506 | return NULL; | 511 | return NULL; |
507 | } | 512 | } |
508 | 513 | ||
509 | static inline int is_module_address(unsigned long addr) | 514 | static inline bool is_module_address(unsigned long addr) |
510 | { | 515 | { |
511 | return 0; | 516 | return false; |
517 | } | ||
518 | |||
519 | static inline bool is_module_text_address(unsigned long addr) | ||
520 | { | ||
521 | return false; | ||
512 | } | 522 | } |
513 | 523 | ||
514 | /* Get/put a kernel symbol (calls should be symmetric) */ | 524 | /* Get/put a kernel symbol (calls should be symmetric) */ |