--- zzzz-none-000/linux-4.19.183/lib/vsprintf.c 2021-03-24 10:07:39.000000000 +0000 +++ bcm63-7530ax-756/linux-4.19.183/lib/vsprintf.c 2023-06-28 08:54:21.000000000 +0000 @@ -45,6 +45,14 @@ #include /* cpu_to_le16 */ #include + +#if defined(CONFIG_AVM_ENHANCED) +#include +#include +#endif/*--- #if defined(CONFIG_AVM_ENHANCED) ---*/ + +#include + #include "kstrtox.h" /** @@ -693,12 +701,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/*--- #if defined(CONFIG_AVM_ENHANCED) ---*/ else - sprint_symbol_no_offset(sym, value); + kallsyms_lookup(value, NULL, NULL, NULL, sym); return string(buf, end, sym, spec); #else +#if defined(CONFIG_AVM_BOOTMEM) + if(!IS_ERR(module_alloc_find_module_name)) { + char sym[KSYM_SYMBOL_LEN]; + module_alloc_find_module_name(sym, sym + sizeof(sym), value); + return string(buf, end, sym, spec); + } +#endif/*--- #if defined(CONFIG_AVM_BOOTMEM) ---*/ return special_hex_number(buf, end, value, sizeof(void *)); #endif } @@ -1972,8 +1991,13 @@ return pointer_string(buf, end, ptr, spec); } - /* default is to _not_ leak addresses, hash before printing */ - return ptr_to_id(buf, end, ptr, spec); + if (IS_ENABLED(CONFIG_AVM_ENHANCED)) { + /* print pointer values unmodified for crv and debugging */ + return pointer_string(buf, end, ptr, spec); + } else { + /* default is to _not_ leak addresses, hash before printing */ + return ptr_to_id(buf, end, ptr, spec); + } } /*