tree:
https://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux.git for-5.9/firmware
head: 4e87189912bd2167998d82c95bb68f73185069e2
commit: 5e37b9c137ee5a3a9dc2815ca51f71746c2609a6 [4/5] firmware: tegra: Add support for
in-band debug
config: arm-allyesconfig (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 5e37b9c137ee5a3a9dc2815ca51f71746c2609a6
# 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: kernel test robot <lkp(a)intel.com>
All warnings (new 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/dcache.h:7,
from include/linux/fs.h:8,
from include/linux/debugfs.h:15,
from drivers/firmware/tegra/bpmp-debugfs.c:5:
In function 'strncat',
inlined from 'bpmp_populate_debugfs_inband' at
drivers/firmware/tegra/bpmp-debugfs.c:422:4:
> include/linux/string.h:296:30: warning:
'__builtin_strncat' output truncated before terminating nul copying as many bytes
from a string as its length [-Wstringop-truncation]
296 | #define
__underlying_strncat __builtin_strncat
| ^
include/linux/string.h:374:10: note: in expansion of macro
'__underlying_strncat'
374 | return __underlying_strncat(p, q, count);
| ^~~~~~~~~~~~~~~~~~~~
drivers/firmware/tegra/bpmp-debugfs.c: In function
'bpmp_populate_debugfs_inband':
include/linux/string.h:295:29: note: length computed here
295 | #define __underlying_strlen __builtin_strlen
| ^
include/linux/string.h:328:10: note: in expansion of macro
'__underlying_strlen'
328 | return __underlying_strlen(p);
| ^~~~~~~~~~~~~~~~~~~
vim +/__builtin_strncat +296 include/linux/string.h
47227d27e2fcb0 Daniel Axtens 2020-06-03 275
47227d27e2fcb0 Daniel Axtens 2020-06-03 276 #ifdef CONFIG_KASAN
47227d27e2fcb0 Daniel Axtens 2020-06-03 277 extern void *__underlying_memchr(const void
*p, int c, __kernel_size_t size) __RENAME(memchr);
47227d27e2fcb0 Daniel Axtens 2020-06-03 278 extern int __underlying_memcmp(const void
*p, const void *q, __kernel_size_t size) __RENAME(memcmp);
47227d27e2fcb0 Daniel Axtens 2020-06-03 279 extern void *__underlying_memcpy(void *p,
const void *q, __kernel_size_t size) __RENAME(memcpy);
47227d27e2fcb0 Daniel Axtens 2020-06-03 280 extern void *__underlying_memmove(void *p,
const void *q, __kernel_size_t size) __RENAME(memmove);
47227d27e2fcb0 Daniel Axtens 2020-06-03 281 extern void *__underlying_memset(void *p,
int c, __kernel_size_t size) __RENAME(memset);
47227d27e2fcb0 Daniel Axtens 2020-06-03 282 extern char *__underlying_strcat(char *p,
const char *q) __RENAME(strcat);
47227d27e2fcb0 Daniel Axtens 2020-06-03 283 extern char *__underlying_strcpy(char *p,
const char *q) __RENAME(strcpy);
47227d27e2fcb0 Daniel Axtens 2020-06-03 284 extern __kernel_size_t
__underlying_strlen(const char *p) __RENAME(strlen);
47227d27e2fcb0 Daniel Axtens 2020-06-03 285 extern char *__underlying_strncat(char *p,
const char *q, __kernel_size_t count) __RENAME(strncat);
47227d27e2fcb0 Daniel Axtens 2020-06-03 286 extern char *__underlying_strncpy(char *p,
const char *q, __kernel_size_t size) __RENAME(strncpy);
47227d27e2fcb0 Daniel Axtens 2020-06-03 287 #else
47227d27e2fcb0 Daniel Axtens 2020-06-03 288 #define
__underlying_memchr __builtin_memchr
47227d27e2fcb0 Daniel Axtens 2020-06-03 289 #define
__underlying_memcmp __builtin_memcmp
47227d27e2fcb0 Daniel Axtens 2020-06-03 290 #define
__underlying_memcpy __builtin_memcpy
47227d27e2fcb0 Daniel Axtens 2020-06-03 291 #define
__underlying_memmove __builtin_memmove
47227d27e2fcb0 Daniel Axtens 2020-06-03 292 #define
__underlying_memset __builtin_memset
47227d27e2fcb0 Daniel Axtens 2020-06-03 293 #define
__underlying_strcat __builtin_strcat
47227d27e2fcb0 Daniel Axtens 2020-06-03 294 #define
__underlying_strcpy __builtin_strcpy
47227d27e2fcb0 Daniel Axtens 2020-06-03 295 #define
__underlying_strlen __builtin_strlen
47227d27e2fcb0 Daniel Axtens 2020-06-03 @296 #define
__underlying_strncat __builtin_strncat
47227d27e2fcb0 Daniel Axtens 2020-06-03 297 #define
__underlying_strncpy __builtin_strncpy
47227d27e2fcb0 Daniel Axtens 2020-06-03 298 #endif
47227d27e2fcb0 Daniel Axtens 2020-06-03 299
:::::: The code at line 296 was first introduced by commit
:::::: 47227d27e2fcb01a9e8f5958d8997cf47a820afc string.h: fix incompatibility between
FORTIFY_SOURCE and KASAN
:::::: TO: Daniel Axtens <dja(a)axtens.net>
:::::: CC: Linus Torvalds <torvalds(a)linux-foundation.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org