Subject: [merged] kernel-add-support-for-init_array-constructors-fix.patch removed from -mm tree To: rusty@xxxxxxxxxxxxxxx,agospoda@xxxxxxxxxx,arnd@xxxxxxxx,fhrbata@xxxxxxxxxx,jstancek@xxxxxxxxxx,keescook@xxxxxxxxxxxx,peter.oberparleiter@xxxxxxxxxx,mm-commits@xxxxxxxxxxxxxxx From: akpm@xxxxxxxxxxxxxxxxxxxx Date: Thu, 31 Oct 2013 11:00:01 -0700 The patch titled Subject: kernel: add support for init_array constructors has been removed from the -mm tree. Its filename was kernel-add-support-for-init_array-constructors-fix.patch This patch was dropped because it was merged into mainline or a subsystem tree ------------------------------------------------------ From: Rusty Russell <rusty@xxxxxxxxxxxxxxx> Subject: kernel: add support for init_array constructors v2: - reuse mod->ctors for .init_array section for modules, because gcc uses .ctors or .init_array, but not both at the same time v3: - fail to load if that does happen somehow. Signed-off-by: Frantisek Hrbata <fhrbata@xxxxxxxxxx> Signed-off-by: Rusty Russell <rusty@xxxxxxxxxxxxxxx> Cc: Jan Stancek <jstancek@xxxxxxxxxx> Cc: Kees Cook <keescook@xxxxxxxxxxxx> Cc: Peter Oberparleiter <peter.oberparleiter@xxxxxxxxxx> Cc: Arnd Bergmann <arnd@xxxxxxxx> Cc: Andy Gospodarek <agospoda@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- kernel/module.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff -puN kernel/module.c~kernel-add-support-for-init_array-constructors-fix kernel/module.c --- a/kernel/module.c~kernel-add-support-for-init_array-constructors-fix +++ a/kernel/module.c @@ -2738,7 +2738,7 @@ static int check_modinfo(struct module * return 0; } -static void find_module_sections(struct module *mod, struct load_info *info) +static int find_module_sections(struct module *mod, struct load_info *info) { mod->kp = section_objs(info, "__param", sizeof(*mod->kp), &mod->num_kp); @@ -2771,6 +2771,15 @@ static void find_module_sections(struct if (!mod->ctors) mod->ctors = section_objs(info, ".init_array", sizeof(*mod->ctors), &mod->num_ctors); + else if (find_sec(info, ".init_array")) { + /* + * This shouldn't happen with same compiler and binutils + * building all parts of the module. + */ + printk(KERN_WARNING "%s: has both .ctors and .init_array.\n", + mod->name); + return -EINVAL; + } #endif #ifdef CONFIG_TRACEPOINTS @@ -2809,6 +2818,8 @@ static void find_module_sections(struct info->debug = section_objs(info, "__verbose", sizeof(*info->debug), &info->num_debug); + + return 0; } static int move_module(struct module *mod, struct load_info *info) @@ -3266,7 +3277,9 @@ static int load_module(struct load_info /* Now we've got everything in the final locations, we can * find optional sections. */ - find_module_sections(mod, info); + err = find_module_sections(mod, info); + if (err) + goto free_unload; err = check_module_license_and_versions(mod); if (err) _ Patches currently in -mm which might be from rusty@xxxxxxxxxxxxxxx are scripts-sortextable-support-objects-with-more-than-64k-sections.patch gcov-move-gcov-structs-definitions-to-a-gcc-version-specific-file.patch gcov-add-support-for-gcc-47-gcov-format.patch gcov-compile-specific-gcov-implementation-based-on-gcc-version.patch kernel-modulec-use-pr_foo.patch kernel-gcov-fsc-use-pr_warn.patch linux-next.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html