tree: https://gitee.com/openeuler/kernel.git OLK-5.10 head: 48ec47c01c3800fd4419afd91af83e95ba9584d5 commit: a1666f44c2250f7413e73e2f4c02cb2c01f9e3b0 [2499/2499] crypto: hisilicon/qm - support no-sva feature config: arm64-randconfig-002-20241128 (https://download.01.org/0day-ci/archive/20241128/202411281656.uJnZiWID-lkp@i...) compiler: aarch64-linux-gcc (GCC) 14.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241128/202411281656.uJnZiWID-lkp@i...)
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@intel.com | Closes: https://lore.kernel.org/oe-kbuild-all/202411281656.uJnZiWID-lkp@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/smp.h:13, from include/linux/lockdep.h:14, from include/linux/mutex.h:17, from include/linux/kernfs.h:13, from include/linux/sysfs.h:17, from include/linux/kobject.h:21, from include/linux/of.h:17, from include/linux/irqdomain.h:35, from include/linux/acpi.h:13, from drivers/crypto/hisilicon/qm.c:4: In function 'strncpy', inlined from 'qm_alloc_uacce' at drivers/crypto/hisilicon/qm.c:2755:2, inlined from 'hisi_qm_init' at drivers/crypto/hisilicon/qm.c:5542:8:
include/linux/string.h:290:33: warning: '__builtin_strncpy' specified bound depends on the length of the source argument [-Wstringop-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); | ^~~~~~~~~~~~~~~~~~~~ In function 'strlen', inlined from 'qm_alloc_uacce' at drivers/crypto/hisilicon/qm.c:2748:13, inlined from 'hisi_qm_init' at drivers/crypto/hisilicon/qm.c:5542:8: include/linux/string.h:288:33: note: length computed here 288 | #define __underlying_strlen __builtin_strlen | ^ include/linux/string.h:321:24: note: in expansion of macro '__underlying_strlen' 321 | return __underlying_strlen(p); | ^~~~~~~~~~~~~~~~~~~
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