From 4a3150a894526ebebff2f7da0ea678fe9e4ad0d0 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Tue, 31 Mar 2009 13:05:34 -0600 Subject: [PATCH] --- yaml --- r: 140523 b: refs/heads/master c: 8c8ef42aee8fcfb4128bb94c50d55c9f80ade525 h: refs/heads/master i: 140521: ca7b2a2cee88a4435aea3166304a7615aafc0a4e 140519: b02884376dab9149fe1b3ebe3b606c1d36966338 v: v3 --- [refs] | 2 +- trunk/kernel/module.c | 18 +++++++++++++----- trunk/scripts/mod/modpost.c | 4 ++-- 3 files changed, 16 insertions(+), 8 deletions(-) diff --git a/[refs] b/[refs] index aa13016eb665..bf5efa0ca2d1 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 9cb610d8e35fe3ec95a2fe2030b02f85aeea83c1 +refs/heads/master: 8c8ef42aee8fcfb4128bb94c50d55c9f80ade525 diff --git a/trunk/kernel/module.c b/trunk/kernel/module.c index 784bf6d8f8c4..e8cf636e614b 100644 --- a/trunk/kernel/module.c +++ b/trunk/kernel/module.c @@ -1052,9 +1052,9 @@ static inline int check_modstruct_version(Elf_Shdr *sechdrs, { const unsigned long *crc; - if (!find_symbol("struct_module", NULL, &crc, true, false)) + if (!find_symbol("module_layout", NULL, &crc, true, false)) BUG(); - return check_version(sechdrs, versindex, "struct_module", mod, crc); + return check_version(sechdrs, versindex, "module_layout", mod, crc); } /* First part is kernel version, which we ignore if module has crcs. */ @@ -2858,9 +2858,17 @@ void print_modules(void) } #ifdef CONFIG_MODVERSIONS -/* Generate the signature for struct module here, too, for modversions. */ -void struct_module(struct module *mod) { return; } -EXPORT_SYMBOL(struct_module); +/* Generate the signature for all relevant module structures here. + * If these change, we don't want to try to parse the module. */ +void module_layout(struct module *mod, + struct modversion_info *ver, + struct kernel_param *kp, + struct kernel_symbol *ks, + struct marker *marker, + struct tracepoint *tp) +{ +} +EXPORT_SYMBOL(module_layout); #endif #ifdef CONFIG_MARKERS diff --git a/trunk/scripts/mod/modpost.c b/trunk/scripts/mod/modpost.c index 7e62303133dc..8cc70612984c 100644 --- a/trunk/scripts/mod/modpost.c +++ b/trunk/scripts/mod/modpost.c @@ -1607,12 +1607,12 @@ static void read_symbols(char *modname) parse_elf_finish(&info); - /* Our trick to get versioning for struct_module - it's + /* Our trick to get versioning for module struct etc. - it's * never passed as an argument to an exported function, so * the automatic versioning doesn't pick it up, but it's really * important anyhow */ if (modversions) - mod->unres = alloc_symbol("struct_module", 0, mod->unres); + mod->unres = alloc_symbol("module_layout", 0, mod->unres); } #define SZ 500