* [freescale-fslc:pr/502 8935/15836] include/linux/string.h:290:33: error: '__builtin_strncpy' output may be truncated copying 15 bytes from a string of length 15
@ 2021-11-29 0:44 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-11-29 0:44 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 7832 bytes --]
tree: https://github.com/Freescale/linux-fslc pr/502
head: f040ed8ce37b5dc2c7d94005a4788549dcb608d1
commit: 1db839bda044bf4568b6d9191a6a850ba89dbe67 [8935/15836] fsl_qbman: usdpaa: clear ioctl_dma_map string buffers
config: arm-allmodconfig (https://download.01.org/0day-ci/archive/20211129/202111290845.2Wk5eNwX-lkp(a)intel.com/config)
compiler: arm-linux-gnueabi-gcc (GCC) 11.2.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
# https://github.com/Freescale/linux-fslc/commit/1db839bda044bf4568b6d9191a6a850ba89dbe67
git remote add freescale-fslc https://github.com/Freescale/linux-fslc
git fetch --no-tags freescale-fslc pr/502
git checkout 1db839bda044bf4568b6d9191a6a850ba89dbe67
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=arm SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
In file included from include/linux/fsl_usdpaa.h:17,
from drivers/staging/fsl_qbman/dpa_sys.h:66,
from drivers/staging/fsl_qbman/fsl_usdpaa.c:29:
include/linux/fsl_qman.h:415:1: error: alignment 1 of 'struct qm_eqcr_entry' is less than 8 [-Werror=packed-not-aligned]
415 | } __packed;
| ^
include/linux/fsl_qman.h:469:17: error: alignment 1 of 'struct <anonymous>' is less than 8 [-Werror=packed-not-aligned]
469 | } __packed ern;
| ^
include/linux/fsl_qman.h:468:38: error: 'fd' offset 15 in 'struct <anonymous>' isn't aligned to 8 [-Werror=packed-not-aligned]
468 | struct qm_fd fd;
| ^~
include/linux/fsl_qman.h:486:17: error: alignment 1 of 'struct <anonymous>' is less than 8 [-Werror=packed-not-aligned]
486 | } __packed dcern;
| ^
include/linux/fsl_qman.h:485:38: error: 'fd' offset 15 in 'struct <anonymous>' isn't aligned to 8 [-Werror=packed-not-aligned]
485 | struct qm_fd fd;
| ^~
include/linux/fsl_qman.h:1679:1: error: alignment 1 of 'struct qm_mcr_ceetm_cq_peek_pop_xsfdrread' is less than 8 [-Werror=packed-not-aligned]
1679 | } __packed;
| ^
include/linux/fsl_qman.h:1677:22: error: 'fd' offset 14 in 'struct qm_mcr_ceetm_cq_peek_pop_xsfdrread' isn't aligned to 8 [-Werror=packed-not-aligned]
1677 | struct qm_fd fd;
| ^~
In file included from drivers/staging/fsl_qbman/fsl_usdpaa.c:32:
drivers/staging/fsl_qbman/qman_low.h: In function 'qm_shutdown_fq':
drivers/staging/fsl_qbman/qman_low.h:1291:29: error: variable 'dequeue_wq' set but not used [-Werror=unused-but-set-variable]
1291 | u16 dequeue_wq = 0;
| ^~~~~~~~~~
drivers/staging/fsl_qbman/fsl_usdpaa.c: At top level:
drivers/staging/fsl_qbman/fsl_usdpaa.c:406:6: error: no previous prototype for 'dbci_portal' [-Werror=missing-prototypes]
406 | void dbci_portal(void *addr)
| ^~~~~~~~~~~
In file included from include/linux/bitmap.h:9,
from include/linux/cpumask.h:12,
from include/linux/smp.h:13,
from include/linux/lockdep.h:14,
from include/linux/rcupdate.h:29,
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/miscdevice.h:7,
from drivers/staging/fsl_qbman/fsl_usdpaa.c:13:
In function 'strncpy',
inlined from 'ioctl_dma_map' at drivers/staging/fsl_qbman/fsl_usdpaa.c:1161:3:
>> include/linux/string.h:290:33: error: '__builtin_strncpy' output may be truncated copying 15 bytes from a string of length 15 [-Werror=stringop-truncation]
290 | #define __underlying_strncpy __builtin_strncpy
| ^
include/linux/string.h:300:16: note: in expansion of macro '__underlying_strncpy'
300 | return __underlying_strncpy(p, q, size);
| ^~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
vim +/__builtin_strncpy +290 include/linux/string.h
47227d27e2fcb0 Daniel Axtens 2020-06-03 268
47227d27e2fcb0 Daniel Axtens 2020-06-03 269 #ifdef CONFIG_KASAN
47227d27e2fcb0 Daniel Axtens 2020-06-03 270 extern void *__underlying_memchr(const void *p, int c, __kernel_size_t size) __RENAME(memchr);
47227d27e2fcb0 Daniel Axtens 2020-06-03 271 extern int __underlying_memcmp(const void *p, const void *q, __kernel_size_t size) __RENAME(memcmp);
47227d27e2fcb0 Daniel Axtens 2020-06-03 272 extern void *__underlying_memcpy(void *p, const void *q, __kernel_size_t size) __RENAME(memcpy);
47227d27e2fcb0 Daniel Axtens 2020-06-03 273 extern void *__underlying_memmove(void *p, const void *q, __kernel_size_t size) __RENAME(memmove);
47227d27e2fcb0 Daniel Axtens 2020-06-03 274 extern void *__underlying_memset(void *p, int c, __kernel_size_t size) __RENAME(memset);
47227d27e2fcb0 Daniel Axtens 2020-06-03 275 extern char *__underlying_strcat(char *p, const char *q) __RENAME(strcat);
47227d27e2fcb0 Daniel Axtens 2020-06-03 276 extern char *__underlying_strcpy(char *p, const char *q) __RENAME(strcpy);
47227d27e2fcb0 Daniel Axtens 2020-06-03 277 extern __kernel_size_t __underlying_strlen(const char *p) __RENAME(strlen);
47227d27e2fcb0 Daniel Axtens 2020-06-03 278 extern char *__underlying_strncat(char *p, const char *q, __kernel_size_t count) __RENAME(strncat);
47227d27e2fcb0 Daniel Axtens 2020-06-03 279 extern char *__underlying_strncpy(char *p, const char *q, __kernel_size_t size) __RENAME(strncpy);
47227d27e2fcb0 Daniel Axtens 2020-06-03 280 #else
47227d27e2fcb0 Daniel Axtens 2020-06-03 281 #define __underlying_memchr __builtin_memchr
47227d27e2fcb0 Daniel Axtens 2020-06-03 282 #define __underlying_memcmp __builtin_memcmp
47227d27e2fcb0 Daniel Axtens 2020-06-03 283 #define __underlying_memcpy __builtin_memcpy
47227d27e2fcb0 Daniel Axtens 2020-06-03 284 #define __underlying_memmove __builtin_memmove
47227d27e2fcb0 Daniel Axtens 2020-06-03 285 #define __underlying_memset __builtin_memset
47227d27e2fcb0 Daniel Axtens 2020-06-03 286 #define __underlying_strcat __builtin_strcat
47227d27e2fcb0 Daniel Axtens 2020-06-03 287 #define __underlying_strcpy __builtin_strcpy
47227d27e2fcb0 Daniel Axtens 2020-06-03 288 #define __underlying_strlen __builtin_strlen
47227d27e2fcb0 Daniel Axtens 2020-06-03 289 #define __underlying_strncat __builtin_strncat
47227d27e2fcb0 Daniel Axtens 2020-06-03 @290 #define __underlying_strncpy __builtin_strncpy
47227d27e2fcb0 Daniel Axtens 2020-06-03 291 #endif
47227d27e2fcb0 Daniel Axtens 2020-06-03 292
:::::: The code at line 290 was first introduced by commit
:::::: 47227d27e2fcb01a9e8f5958d8997cf47a820afc string.h: fix incompatibility between FORTIFY_SOURCE and KASAN
:::::: TO: Daniel Axtens <dja@axtens.net>
:::::: CC: Linus Torvalds <torvalds@linux-foundation.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-11-29 0:44 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-29 0:44 [freescale-fslc:pr/502 8935/15836] include/linux/string.h:290:33: error: '__builtin_strncpy' output may be truncated copying 15 bytes from a string of length 15 kernel test robot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.