diff options
| author | Greg Kroah-Hartman <gregkh@suse.de> | 2006-03-20 16:17:13 -0500 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-03-20 16:42:58 -0500 |
| commit | 9f28bb7e1d0188a993403ab39b774785892805e1 (patch) | |
| tree | 939660c2531335dc899cc66fa7f3f05aa343d1e0 /include/linux/module.h | |
| parent | 3fd6805f4dfb02bcfb5634972eabad0e790f119a (diff) | |
[PATCH] add EXPORT_SYMBOL_GPL_FUTURE()
This patch adds the ability to mark symbols that will be changed in the
future, so that kernel modules that don't include MODULE_LICENSE("GPL")
and use the symbols, will be flagged and printed out to the system log.
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'include/linux/module.h')
| -rw-r--r-- | include/linux/module.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/module.h b/include/linux/module.h index 84d75f3a8a..a25d5f6154 100644 --- a/include/linux/module.h +++ b/include/linux/module.h | |||
| @@ -198,6 +198,9 @@ void *__symbol_get_gpl(const char *symbol); | |||
| 198 | #define EXPORT_SYMBOL_GPL(sym) \ | 198 | #define EXPORT_SYMBOL_GPL(sym) \ |
| 199 | __EXPORT_SYMBOL(sym, "_gpl") | 199 | __EXPORT_SYMBOL(sym, "_gpl") |
| 200 | 200 | ||
| 201 | #define EXPORT_SYMBOL_GPL_FUTURE(sym) \ | ||
| 202 | __EXPORT_SYMBOL(sym, "_gpl_future") | ||
| 203 | |||
| 201 | #endif | 204 | #endif |
| 202 | 205 | ||
| 203 | struct module_ref | 206 | struct module_ref |
| @@ -255,6 +258,11 @@ struct module | |||
| 255 | unsigned int num_gpl_syms; | 258 | unsigned int num_gpl_syms; |
| 256 | const unsigned long *gpl_crcs; | 259 | const unsigned long *gpl_crcs; |
| 257 | 260 | ||
| 261 | /* symbols that will be GPL-only in the near future. */ | ||
| 262 | const struct kernel_symbol *gpl_future_syms; | ||
| 263 | unsigned int num_gpl_future_syms; | ||
| 264 | const unsigned long *gpl_future_crcs; | ||
| 265 | |||
| 258 | /* Exception table */ | 266 | /* Exception table */ |
| 259 | unsigned int num_exentries; | 267 | unsigned int num_exentries; |
| 260 | const struct exception_table_entry *extable; | 268 | const struct exception_table_entry *extable; |
| @@ -441,6 +449,7 @@ void module_remove_driver(struct device_driver *); | |||
| 441 | #else /* !CONFIG_MODULES... */ | 449 | #else /* !CONFIG_MODULES... */ |
| 442 | #define EXPORT_SYMBOL(sym) | 450 | #define EXPORT_SYMBOL(sym) |
| 443 | #define EXPORT_SYMBOL_GPL(sym) | 451 | #define EXPORT_SYMBOL_GPL(sym) |
| 452 | #define EXPORT_SYMBOL_GPL_FUTURE(sym) | ||
| 444 | 453 | ||
| 445 | /* Given an address, look for it in the exception tables. */ | 454 | /* Given an address, look for it in the exception tables. */ |
| 446 | static inline const struct exception_table_entry * | 455 | static inline const struct exception_table_entry * |
