Re: [PATCH v3 1/2] vsprintf: Don't leak pointers for %ps without KALLSYMS enabled

From: kernel test robot

Date: Thu Oct 15 2026 - 23:30:18 EST


Hi Sebastian,

kernel test robot noticed the following build warnings:

[auto build test WARNING on ec8bf8280261294a9b9b4520414b42704c7f9f6b]

url: https://github.com/intel-lab-lkp/linux/commits/Sebastian-Andrzej-Siewior/vsprintf-Don-t-leak-pointers-for-ps-without-KALLSYMS-enabled/20261015-180648
base: ec8bf8280261294a9b9b4520414b42704c7f9f6b
patch link: https://lore.kernel.org/r/20261015-vsprintf_kallsym-v3-1-c175c27f38b7%40linutronix.de
patch subject: [PATCH v3 1/2] vsprintf: Don't leak pointers for %ps without KALLSYMS enabled
config: openrisc-defconfig (https://download.01.org/0day-ci/archive/20261016/202610161107.ckH3ptvE-lkp@xxxxxxxxx/config)
compiler: or1k-linux-gcc (GCC) 16.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261016/202610161107.ckH3ptvE-lkp@xxxxxxxxx/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202610161107.ckH3ptvE-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

lib/vsprintf.c: In function 'symbol_string':
>> lib/vsprintf.c:988:23: warning: variable 'value' set but not used [-Wunused-but-set-variable=]
988 | unsigned long value;
| ^~~~~


vim +/value +988 lib/vsprintf.c

1031bc589228ca3 Dmitry Monakhov 2015-04-13 983
cf3b429b03e827c Joe Perches 2010-05-24 984 static noinline_for_stack
cf3b429b03e827c Joe Perches 2010-05-24 985 char *symbol_string(char *buf, char *end, void *ptr,
b0d33c2bd77bcf2 Joe Perches 2012-12-12 986 struct printf_spec spec, const char *fmt)
0fe1ef24f7bd002 Linus Torvalds 2008-07-06 987 {
b0d33c2bd77bcf2 Joe Perches 2012-12-12 @988 unsigned long value;
0fe1ef24f7bd002 Linus Torvalds 2008-07-06 989 #ifdef CONFIG_KALLSYMS
0fe1ef24f7bd002 Linus Torvalds 2008-07-06 990 char sym[KSYM_SYMBOL_LEN];
b0d33c2bd77bcf2 Joe Perches 2012-12-12 991 #endif
b0d33c2bd77bcf2 Joe Perches 2012-12-12 992
b0d33c2bd77bcf2 Joe Perches 2012-12-12 993 if (fmt[1] == 'R')
b0d33c2bd77bcf2 Joe Perches 2012-12-12 994 ptr = __builtin_extract_return_addr(ptr);
b0d33c2bd77bcf2 Joe Perches 2012-12-12 995 value = (unsigned long)ptr;
b0d33c2bd77bcf2 Joe Perches 2012-12-12 996

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki