The "%ps" format modifier prints the name of the symbol which is more valuable in terms of debugging and does not leak the actual pointer.
Without KALLSYMS it will leak the pointer which is not intended. The default policy for pointers is to print a hashed value and not to leak the actual pointer. Print "(unknown)" for any symbol resolution witout KALLSYMS enabled. Signed-off-by: Sebastian Andrzej Siewior <[email protected]> --- lib/vsprintf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/vsprintf.c b/lib/vsprintf.c index 2bc6ef483576c..ac954cc7bfb31 100644 --- a/lib/vsprintf.c +++ b/lib/vsprintf.c @@ -1008,7 +1008,7 @@ char *symbol_string(char *buf, char *end, void *ptr, return string_nocheck(buf, end, sym, spec); #else - return special_hex_number(buf, end, value, sizeof(void *)); + return string_nocheck(buf, end, "(unknown)", spec); #endif } -- 2.55.0

