tree:
https://github.com/hnaz/linux-mm master
head: a085ccd0a3e9741df5fe3a0e54228dc033759169
commit: e7c89f2e1992cc557c934608cc27e2b9759cb21a [169/698] string.h: fix incompatibility
between FORTIFY_SOURCE and KASAN
config: arm-aspeed_g5_defconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O
~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout e7c89f2e1992cc557c934608cc27e2b9759cb21a
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>, old ones prefixed by <<):
In file included from include/linux/bitmap.h:9,
from include/linux/cpumask.h:12,
from include/linux/rcupdate.h:31,
from include/linux/rculist.h:11,
from include/linux/pid.h:5,
from include/linux/sched.h:14,
from include/linux/ratelimit.h:6,
from include/linux/dev_printk.h:16,
from include/linux/device.h:15,
from include/linux/hdmi.h:28,
from drivers/video/hdmi.c:28:
In function 'strncpy',
inlined from 'hdmi_spd_infoframe_init' at drivers/video/hdmi.c:230:2:
include/linux/string.h:297:30: warning: '__builtin_strncpy' specified bound 8
equals destination size [-Wstringop-truncation]
297 | #define __underlying_strncpy __builtin_strncpy
| ^
> include/linux/string.h:307:9: note: in expansion of macro
'__underlying_strncpy'
307 | return __underlying_strncpy(p, q, size);
| ^~~~~~~~~~~~~~~~~~~~
In function 'strncpy',
inlined from 'hdmi_spd_infoframe_init' at drivers/video/hdmi.c:231:2:
include/linux/string.h:297:30: warning: '__builtin_strncpy' specified bound 16
equals destination size [-Wstringop-truncation]
297 | #define __underlying_strncpy __builtin_strncpy
| ^
> include/linux/string.h:307:9: note: in expansion of macro
'__underlying_strncpy'
307 | return __underlying_strncpy(p, q, size);
| ^~~~~~~~~~~~~~~~~~~~
vim +/__underlying_strncpy +307 include/linux/string.h
299
300 __FORTIFY_INLINE char *strncpy(char *p, const char *q, __kernel_size_t size)
301 {
302 size_t p_size = __builtin_object_size(p, 0);
303 if (__builtin_constant_p(size) && p_size < size)
304 __write_overflow();
305 if (p_size < size)
306 fortify_panic(__func__);
307 return __underlying_strncpy(p, q, size);
308 }
309
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org