@@ -210,10 +210,10 @@ static int klp_resolve_symbols(Elf64_Shdr *sechdrs, const char *strtab,
210210 * and KSYM_NAME_LEN have the values we expect them to have.
211211 *
212212 * Because the value of MODULE_NAME_LEN can differ among architectures,
213- * we use the smallest/strictest upper bound possible (248 , based on
213+ * we use the smallest/strictest upper bound possible (56 , based on
214214 * the current definition of MODULE_NAME_LEN) to prevent overflows.
215215 */
216- BUILD_BUG_ON (MODULE_NAME_LEN < 248 || KSYM_NAME_LEN != 512 );
216+ BUILD_BUG_ON (MODULE_NAME_LEN < 56 || KSYM_NAME_LEN != 512 );
217217
218218 relas = (Elf_Rela * ) relasec -> sh_addr ;
219219 /* For each rela in this klp relocation section */
@@ -227,7 +227,7 @@ static int klp_resolve_symbols(Elf64_Shdr *sechdrs, const char *strtab,
227227
228228 /* Format: .klp.sym.sym_objname.sym_name,sympos */
229229 cnt = sscanf (strtab + sym -> st_name ,
230- ".klp.sym.%247 [^.].%511[^,],%lu" ,
230+ ".klp.sym.%55 [^.].%511[^,],%lu" ,
231231 sym_objname , sym_name , & sympos );
232232 if (cnt != 3 ) {
233233 pr_err ("symbol %s has an incorrectly formatted name\n" ,
0 commit comments