From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: [freescale-fslc:pr/325 15428/18355] include/linux/string.h:399:4: error: call to '__read_overflow2' declared with attribute error: detected read beyond size of object passed as 2nd parameter
Date: Mon, 03 May 2021 02:36:48 +0800 [thread overview]
Message-ID: <202105030239.oJrQqOGV-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 8110 bytes --]
Hi Adrian,
FYI, the error/warning still remains.
tree: https://github.com/Freescale/linux-fslc pr/325
head: 2f748dbefdd0b68a450dbbbc6486901baea93b96
commit: a452c44357d9c68c27c39327e50b41e4b6cffe8d [15428/18355] MLK-25015: sound: soc: codecs: pcm512x: set input sclk
config: s390-allyesconfig (attached as .config)
compiler: s390-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
# https://github.com/Freescale/linux-fslc/commit/a452c44357d9c68c27c39327e50b41e4b6cffe8d
git remote add freescale-fslc https://github.com/Freescale/linux-fslc
git fetch --no-tags freescale-fslc pr/325
git checkout a452c44357d9c68c27c39327e50b41e4b6cffe8d
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross W=1 ARCH=s390
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 sound/soc/fsl/imx-pcm512x.c:21:
sound/soc/fsl/imx-pcm512x.c:357:23: warning: initialized field overwritten [-Woverride-init]
357 | SND_SOC_DAILINK_REG(hifi),
| ^~~~
include/sound/soc.h:919:13: note: in definition of macro 'SND_SOC_DAILINK_REG3'
919 | .codecs = codec, \
| ^~~~~
include/sound/soc.h:924:53: note: in expansion of macro 'SND_SOC_DAILINK_REG1'
924 | #define SND_SOC_DAILINK_REGx(_1, _2, _3, func, ...) func
| ^~~~
sound/soc/fsl/imx-pcm512x.c:357:3: note: in expansion of macro 'SND_SOC_DAILINK_REG'
357 | SND_SOC_DAILINK_REG(hifi),
| ^~~~~~~~~~~~~~~~~~~
sound/soc/fsl/imx-pcm512x.c:357:23: note: (near initialization for 'imx_pcm512x_dai[0].codecs')
357 | SND_SOC_DAILINK_REG(hifi),
| ^~~~
include/sound/soc.h:919:13: note: in definition of macro 'SND_SOC_DAILINK_REG3'
919 | .codecs = codec, \
| ^~~~~
include/sound/soc.h:924:53: note: in expansion of macro 'SND_SOC_DAILINK_REG1'
924 | #define SND_SOC_DAILINK_REGx(_1, _2, _3, func, ...) func
| ^~~~
sound/soc/fsl/imx-pcm512x.c:357:3: note: in expansion of macro 'SND_SOC_DAILINK_REG'
357 | SND_SOC_DAILINK_REG(hifi),
| ^~~~~~~~~~~~~~~~~~~
In file included from include/linux/list.h:9,
from include/linux/module.h:9,
from sound/soc/fsl/imx-pcm512x.c:13:
include/linux/kernel.h:47:25: warning: initialized field overwritten [-Woverride-init]
47 | #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
| ^
include/sound/soc.h:920:16: note: in expansion of macro 'ARRAY_SIZE'
920 | .num_codecs = ARRAY_SIZE(codec), \
| ^~~~~~~~~~
include/sound/soc.h:914:37: note: in expansion of macro 'SND_SOC_DAILINK_REG3'
914 | #define SND_SOC_DAILINK_REG1(name) SND_SOC_DAILINK_REG3(name##_cpus, name##_codecs, name##_platforms)
| ^~~~~~~~~~~~~~~~~~~~
include/sound/soc.h:924:53: note: in expansion of macro 'SND_SOC_DAILINK_REG1'
924 | #define SND_SOC_DAILINK_REGx(_1, _2, _3, func, ...) func
| ^~~~
include/sound/soc.h:926:2: note: in expansion of macro 'SND_SOC_DAILINK_REGx'
926 | SND_SOC_DAILINK_REGx(__VA_ARGS__, \
| ^~~~~~~~~~~~~~~~~~~~
sound/soc/fsl/imx-pcm512x.c:357:3: note: in expansion of macro 'SND_SOC_DAILINK_REG'
357 | SND_SOC_DAILINK_REG(hifi),
| ^~~~~~~~~~~~~~~~~~~
include/linux/kernel.h:47:25: note: (near initialization for 'imx_pcm512x_dai[0].num_codecs')
47 | #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
| ^
include/sound/soc.h:920:16: note: in expansion of macro 'ARRAY_SIZE'
920 | .num_codecs = ARRAY_SIZE(codec), \
| ^~~~~~~~~~
include/sound/soc.h:914:37: note: in expansion of macro 'SND_SOC_DAILINK_REG3'
914 | #define SND_SOC_DAILINK_REG1(name) SND_SOC_DAILINK_REG3(name##_cpus, name##_codecs, name##_platforms)
| ^~~~~~~~~~~~~~~~~~~~
include/sound/soc.h:924:53: note: in expansion of macro 'SND_SOC_DAILINK_REG1'
924 | #define SND_SOC_DAILINK_REGx(_1, _2, _3, func, ...) func
| ^~~~
include/sound/soc.h:926:2: note: in expansion of macro 'SND_SOC_DAILINK_REGx'
926 | SND_SOC_DAILINK_REGx(__VA_ARGS__, \
| ^~~~~~~~~~~~~~~~~~~~
sound/soc/fsl/imx-pcm512x.c:357:3: note: in expansion of macro 'SND_SOC_DAILINK_REG'
357 | SND_SOC_DAILINK_REG(hifi),
| ^~~~~~~~~~~~~~~~~~~
In file included from include/linux/bitmap.h:9,
from include/linux/cpumask.h:12,
from arch/s390/include/asm/processor.h:39,
from arch/s390/include/asm/thread_info.h:27,
from include/linux/thread_info.h:38,
from arch/s390/include/asm/preempt.h:6,
from include/linux/preempt.h:78,
from include/linux/spinlock.h:51,
from include/linux/seqlock.h:36,
from include/linux/time.h:6,
from include/linux/stat.h:19,
from include/linux/module.h:10,
from sound/soc/fsl/imx-pcm512x.c:13:
In function 'memcpy',
inlined from 'imx_pcm512x_probe' at sound/soc/fsl/imx-pcm512x.c:429:2:
>> include/linux/string.h:399:4: error: call to '__read_overflow2' declared with attribute error: detected read beyond size of object passed as 2nd parameter
399 | __read_overflow2();
| ^~~~~~~~~~~~~~~~~~
Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for PCIE_MOBIVEIL_HOST
Depends on PCI && PCI_MSI_IRQ_DOMAIN
Selected by
- PCIE_MOBIVEIL_PLAT && PCI && (ARCH_ZYNQMP || COMPILE_TEST && OF
vim +/__read_overflow2 +399 include/linux/string.h
6974f0c4555e28 Daniel Micay 2017-07-12 390
6974f0c4555e28 Daniel Micay 2017-07-12 391 __FORTIFY_INLINE void *memcpy(void *p, const void *q, __kernel_size_t size)
6974f0c4555e28 Daniel Micay 2017-07-12 392 {
6974f0c4555e28 Daniel Micay 2017-07-12 393 size_t p_size = __builtin_object_size(p, 0);
6974f0c4555e28 Daniel Micay 2017-07-12 394 size_t q_size = __builtin_object_size(q, 0);
6974f0c4555e28 Daniel Micay 2017-07-12 395 if (__builtin_constant_p(size)) {
6974f0c4555e28 Daniel Micay 2017-07-12 396 if (p_size < size)
6974f0c4555e28 Daniel Micay 2017-07-12 397 __write_overflow();
6974f0c4555e28 Daniel Micay 2017-07-12 398 if (q_size < size)
6974f0c4555e28 Daniel Micay 2017-07-12 @399 __read_overflow2();
6974f0c4555e28 Daniel Micay 2017-07-12 400 }
6974f0c4555e28 Daniel Micay 2017-07-12 401 if (p_size < size || q_size < size)
6974f0c4555e28 Daniel Micay 2017-07-12 402 fortify_panic(__func__);
b008ae4cc74d3a Daniel Axtens 2020-06-03 403 return __underlying_memcpy(p, q, size);
6974f0c4555e28 Daniel Micay 2017-07-12 404 }
6974f0c4555e28 Daniel Micay 2017-07-12 405
:::::: The code@line 399 was first introduced by commit
:::::: 6974f0c4555e285ab217cee58b6e874f776ff409 include/linux/string.h: add the option of fortified string.h functions
:::::: TO: Daniel Micay <danielmicay@gmail.com>
:::::: 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
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 58461 bytes --]
reply other threads:[~2021-05-02 18:36 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=202105030239.oJrQqOGV-lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.org \
/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 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.