From: kernel test robot <lkp@intel.com>
To: matthias.bgg@kernel.org, arend.vanspriel@broadcom.com,
kvalo@codeaurora.org, davem@davemloft.net, kuba@kernel.org
Cc: kbuild-all@lists.01.org, franky.lin@broadcom.com,
hante.meuleman@broadcom.com, chi-hsien.lin@cypress.com,
wright.feng@cypress.com, mbrugger@suse.com,
linux-wireless@vger.kernel.org
Subject: Re: [PATCH] brcmfmac: Transform compatible string for FW loading
Date: Fri, 26 Jun 2020 05:00:49 +0800 [thread overview]
Message-ID: <202006260449.YArxZlib%lkp@intel.com> (raw)
In-Reply-To: <20200625160725.31581-1-matthias.bgg@kernel.org>
[-- Attachment #1: Type: text/plain, Size: 8239 bytes --]
Hi,
I love your patch! Perhaps something to improve:
[auto build test WARNING on wireless-drivers-next/master]
[also build test WARNING on wireless-drivers/master sparc-next/master v5.8-rc2 next-20200625]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/matthias-bgg-kernel-org/brcmfmac-Transform-compatible-string-for-FW-loading/20200626-001324
base: https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next.git master
config: mips-allyesconfig (attached as .config)
compiler: mips-linux-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
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=mips
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <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 arch/mips/include/asm/processor.h:15,
from arch/mips/include/asm/thread_info.h:16,
from include/linux/thread_info.h:38,
from include/asm-generic/current.h:5,
from ./arch/mips/include/generated/asm/current.h:1,
from include/linux/mutex.h:14,
from include/linux/kernfs.h:12,
from include/linux/sysfs.h:16,
from include/linux/kobject.h:20,
from include/linux/of.h:17,
from drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c:6:
In function 'strncpy',
inlined from 'brcmf_of_probe' at drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c:35:3:
>> include/linux/string.h:297:30: warning: '__builtin_strncpy' output truncated before terminating nul copying as many bytes from a string as its length [-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);
| ^~~~~~~~~~~~~~~~~~~~
drivers/net/wireless/broadcom/brcm80211/brcmfmac/of.c: In function 'brcmf_of_probe':
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_strncpy +297 include/linux/string.h
47227d27e2fcb01 Daniel Axtens 2020-06-03 275
47227d27e2fcb01 Daniel Axtens 2020-06-03 276 #ifdef CONFIG_KASAN
47227d27e2fcb01 Daniel Axtens 2020-06-03 277 extern void *__underlying_memchr(const void *p, int c, __kernel_size_t size) __RENAME(memchr);
47227d27e2fcb01 Daniel Axtens 2020-06-03 278 extern int __underlying_memcmp(const void *p, const void *q, __kernel_size_t size) __RENAME(memcmp);
47227d27e2fcb01 Daniel Axtens 2020-06-03 279 extern void *__underlying_memcpy(void *p, const void *q, __kernel_size_t size) __RENAME(memcpy);
47227d27e2fcb01 Daniel Axtens 2020-06-03 280 extern void *__underlying_memmove(void *p, const void *q, __kernel_size_t size) __RENAME(memmove);
47227d27e2fcb01 Daniel Axtens 2020-06-03 281 extern void *__underlying_memset(void *p, int c, __kernel_size_t size) __RENAME(memset);
47227d27e2fcb01 Daniel Axtens 2020-06-03 282 extern char *__underlying_strcat(char *p, const char *q) __RENAME(strcat);
47227d27e2fcb01 Daniel Axtens 2020-06-03 283 extern char *__underlying_strcpy(char *p, const char *q) __RENAME(strcpy);
47227d27e2fcb01 Daniel Axtens 2020-06-03 284 extern __kernel_size_t __underlying_strlen(const char *p) __RENAME(strlen);
47227d27e2fcb01 Daniel Axtens 2020-06-03 285 extern char *__underlying_strncat(char *p, const char *q, __kernel_size_t count) __RENAME(strncat);
47227d27e2fcb01 Daniel Axtens 2020-06-03 286 extern char *__underlying_strncpy(char *p, const char *q, __kernel_size_t size) __RENAME(strncpy);
47227d27e2fcb01 Daniel Axtens 2020-06-03 287 #else
47227d27e2fcb01 Daniel Axtens 2020-06-03 288 #define __underlying_memchr __builtin_memchr
47227d27e2fcb01 Daniel Axtens 2020-06-03 289 #define __underlying_memcmp __builtin_memcmp
47227d27e2fcb01 Daniel Axtens 2020-06-03 290 #define __underlying_memcpy __builtin_memcpy
47227d27e2fcb01 Daniel Axtens 2020-06-03 291 #define __underlying_memmove __builtin_memmove
47227d27e2fcb01 Daniel Axtens 2020-06-03 292 #define __underlying_memset __builtin_memset
47227d27e2fcb01 Daniel Axtens 2020-06-03 293 #define __underlying_strcat __builtin_strcat
47227d27e2fcb01 Daniel Axtens 2020-06-03 294 #define __underlying_strcpy __builtin_strcpy
47227d27e2fcb01 Daniel Axtens 2020-06-03 295 #define __underlying_strlen __builtin_strlen
47227d27e2fcb01 Daniel Axtens 2020-06-03 296 #define __underlying_strncat __builtin_strncat
47227d27e2fcb01 Daniel Axtens 2020-06-03 @297 #define __underlying_strncpy __builtin_strncpy
47227d27e2fcb01 Daniel Axtens 2020-06-03 298 #endif
47227d27e2fcb01 Daniel Axtens 2020-06-03 299
6974f0c4555e285 Daniel Micay 2017-07-12 300 __FORTIFY_INLINE char *strncpy(char *p, const char *q, __kernel_size_t size)
6974f0c4555e285 Daniel Micay 2017-07-12 301 {
6974f0c4555e285 Daniel Micay 2017-07-12 302 size_t p_size = __builtin_object_size(p, 0);
6974f0c4555e285 Daniel Micay 2017-07-12 303 if (__builtin_constant_p(size) && p_size < size)
6974f0c4555e285 Daniel Micay 2017-07-12 304 __write_overflow();
6974f0c4555e285 Daniel Micay 2017-07-12 305 if (p_size < size)
6974f0c4555e285 Daniel Micay 2017-07-12 306 fortify_panic(__func__);
47227d27e2fcb01 Daniel Axtens 2020-06-03 307 return __underlying_strncpy(p, q, size);
6974f0c4555e285 Daniel Micay 2017-07-12 308 }
6974f0c4555e285 Daniel Micay 2017-07-12 309
6974f0c4555e285 Daniel Micay 2017-07-12 310 __FORTIFY_INLINE char *strcat(char *p, const char *q)
6974f0c4555e285 Daniel Micay 2017-07-12 311 {
6974f0c4555e285 Daniel Micay 2017-07-12 312 size_t p_size = __builtin_object_size(p, 0);
6974f0c4555e285 Daniel Micay 2017-07-12 313 if (p_size == (size_t)-1)
47227d27e2fcb01 Daniel Axtens 2020-06-03 314 return __underlying_strcat(p, q);
6974f0c4555e285 Daniel Micay 2017-07-12 315 if (strlcat(p, q, p_size) >= p_size)
6974f0c4555e285 Daniel Micay 2017-07-12 316 fortify_panic(__func__);
6974f0c4555e285 Daniel Micay 2017-07-12 317 return p;
6974f0c4555e285 Daniel Micay 2017-07-12 318 }
6974f0c4555e285 Daniel Micay 2017-07-12 319
6974f0c4555e285 Daniel Micay 2017-07-12 320 __FORTIFY_INLINE __kernel_size_t strlen(const char *p)
6974f0c4555e285 Daniel Micay 2017-07-12 321 {
6974f0c4555e285 Daniel Micay 2017-07-12 322 __kernel_size_t ret;
6974f0c4555e285 Daniel Micay 2017-07-12 323 size_t p_size = __builtin_object_size(p, 0);
146734b091430c8 Arnd Bergmann 2017-12-14 324
146734b091430c8 Arnd Bergmann 2017-12-14 325 /* Work around gcc excess stack consumption issue */
146734b091430c8 Arnd Bergmann 2017-12-14 326 if (p_size == (size_t)-1 ||
146734b091430c8 Arnd Bergmann 2017-12-14 327 (__builtin_constant_p(p[p_size - 1]) && p[p_size - 1] == '\0'))
47227d27e2fcb01 Daniel Axtens 2020-06-03 @328 return __underlying_strlen(p);
6974f0c4555e285 Daniel Micay 2017-07-12 329 ret = strnlen(p, p_size);
6974f0c4555e285 Daniel Micay 2017-07-12 330 if (p_size <= ret)
6974f0c4555e285 Daniel Micay 2017-07-12 331 fortify_panic(__func__);
6974f0c4555e285 Daniel Micay 2017-07-12 332 return ret;
6974f0c4555e285 Daniel Micay 2017-07-12 333 }
6974f0c4555e285 Daniel Micay 2017-07-12 334
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 67075 bytes --]
prev parent reply other threads:[~2020-06-25 21:02 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-25 16:07 [PATCH] brcmfmac: Transform compatible string for FW loading matthias.bgg
2020-06-25 17:09 ` Hans de Goede
2020-06-25 20:43 ` kernel test robot
2020-06-25 21:00 ` kernel test robot [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202006260449.YArxZlib%lkp@intel.com \
--to=lkp@intel.com \
--cc=arend.vanspriel@broadcom.com \
--cc=chi-hsien.lin@cypress.com \
--cc=davem@davemloft.net \
--cc=franky.lin@broadcom.com \
--cc=hante.meuleman@broadcom.com \
--cc=kbuild-all@lists.01.org \
--cc=kuba@kernel.org \
--cc=kvalo@codeaurora.org \
--cc=linux-wireless@vger.kernel.org \
--cc=matthias.bgg@kernel.org \
--cc=mbrugger@suse.com \
--cc=wright.feng@cypress.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox