--- zzzz-none-000/linux-4.9.276/lib/vsprintf.c 2021-07-20 14:21:16.000000000 +0000 +++ falcon-5530-750/linux-4.9.276/lib/vsprintf.c 2023-04-05 08:19:02.000000000 +0000 @@ -669,8 +669,10 @@ struct printf_spec spec, const char *fmt) { unsigned long value; -#ifdef CONFIG_KALLSYMS char sym[KSYM_SYMBOL_LEN]; +#ifndef CONFIG_KALLSYMS + struct module *mod; + int len; #endif if (fmt[1] == 'R') @@ -681,14 +683,23 @@ if (*fmt == 'B') sprint_backtrace(sym, value); else if (*fmt != 'f' && *fmt != 's') +#if defined(CONFIG_AVM_ENHANCED) + print_memory_classifier(sym, sizeof(sym), value, 1); +#else sprint_symbol(sym, value); +#endif else sprint_symbol_no_offset(sym, value); - - return string(buf, end, sym, spec); #else - return special_hex_number(buf, end, value, sizeof(void *)); + len = snprintf(sym, sizeof(sym), "0x%lx", value); + + mod = __module_address(value); + if (mod) + snprintf(sym + len, sizeof(sym) - len, " [%s@%p+0x%x]", + mod->name, mod->core_layout.base, + mod->core_layout.size); #endif + return string(buf, end, sym, spec); } static noinline_for_stack