kallsyms: increase maximum kernel symbol length to 512
[linux-2.6-microblaze.git] / kernel / livepatch / core.c
index bc475e6..ec06ce5 100644 (file)
@@ -213,7 +213,7 @@ static int klp_resolve_symbols(Elf_Shdr *sechdrs, const char *strtab,
         * we use the smallest/strictest upper bound possible (56, based on
         * the current definition of MODULE_NAME_LEN) to prevent overflows.
         */
-       BUILD_BUG_ON(MODULE_NAME_LEN < 56 || KSYM_NAME_LEN != 128);
+       BUILD_BUG_ON(MODULE_NAME_LEN < 56 || KSYM_NAME_LEN != 512);
 
        relas = (Elf_Rela *) relasec->sh_addr;
        /* For each rela in this klp relocation section */
@@ -227,7 +227,7 @@ static int klp_resolve_symbols(Elf_Shdr *sechdrs, const char *strtab,
 
                /* Format: .klp.sym.sym_objname.sym_name,sympos */
                cnt = sscanf(strtab + sym->st_name,
-                            ".klp.sym.%55[^.].%127[^,],%lu",
+                            ".klp.sym.%55[^.].%511[^,],%lu",
                             sym_objname, sym_name, &sympos);
                if (cnt != 3) {
                        pr_err("symbol %s has an incorrectly formatted name\n",