* [arnd-playground:warnings-5.10 68/69] arch/arm64/kernel/vdso.c:86:37: warning: array subscript 1 is above array bounds of 'struct
@ 2020-10-23 23:37 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2020-10-23 23:37 UTC (permalink / raw
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 3761 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/arnd/playground.git warnings-5.10
head: 615aebf38433a96a4b449c9ff1965aa345f3a7e6
commit: 2a4358d2b0950147d19f9533cca5d39617e9825c [68/69] Kbuild: enable more warnings by default
config: arm64-allyesconfig (attached as .config)
compiler: aarch64-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://git.kernel.org/pub/scm/linux/kernel/git/arnd/playground.git/commit/?id=2a4358d2b0950147d19f9533cca5d39617e9825c
git remote add arnd-playground https://git.kernel.org/pub/scm/linux/kernel/git/arnd/playground.git
git fetch --no-tags arnd-playground warnings-5.10
git checkout 2a4358d2b0950147d19f9533cca5d39617e9825c
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm64
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 >>):
arch/arm64/kernel/vdso.c: In function 'aarch32_vdso_mremap':
>> arch/arm64/kernel/vdso.c:86:37: warning: array subscript 1 is above array bounds of 'struct vdso_abi_info[1]' [-Warray-bounds]
86 | unsigned long vdso_size = vdso_info[abi].vdso_code_end -
| ~~~~~~~~~^~~~~
arch/arm64/kernel/vdso.c:57:29: note: while referencing 'vdso_info'
57 | static struct vdso_abi_info vdso_info[] __ro_after_init = {
| ^~~~~~~~~
arch/arm64/kernel/vdso.c:87:16: warning: array subscript 1 is above array bounds of 'struct vdso_abi_info[1]' [-Warray-bounds]
87 | vdso_info[abi].vdso_code_start;
| ~~~~~~~~~^~~~~
arch/arm64/kernel/vdso.c:57:29: note: while referencing 'vdso_info'
57 | static struct vdso_abi_info vdso_info[] __ro_after_init = {
| ^~~~~~~~~
vim +86 arch/arm64/kernel/vdso.c
9031fefde6f2ac1 Will Deacon 2012-03-05 80
d3418f3839b6678 Mark Rutland 2020-04-28 81 static int __vdso_remap(enum vdso_abi abi,
c7aa2d71020d74d Vincenzo Frascino 2019-06-21 82 const struct vm_special_mapping *sm,
c7aa2d71020d74d Vincenzo Frascino 2019-06-21 83 struct vm_area_struct *new_vma)
c7aa2d71020d74d Vincenzo Frascino 2019-06-21 84 {
c7aa2d71020d74d Vincenzo Frascino 2019-06-21 85 unsigned long new_size = new_vma->vm_end - new_vma->vm_start;
d3418f3839b6678 Mark Rutland 2020-04-28 @86 unsigned long vdso_size = vdso_info[abi].vdso_code_end -
d3418f3839b6678 Mark Rutland 2020-04-28 87 vdso_info[abi].vdso_code_start;
c7aa2d71020d74d Vincenzo Frascino 2019-06-21 88
c7aa2d71020d74d Vincenzo Frascino 2019-06-21 89 if (vdso_size != new_size)
c7aa2d71020d74d Vincenzo Frascino 2019-06-21 90 return -EINVAL;
c7aa2d71020d74d Vincenzo Frascino 2019-06-21 91
c7aa2d71020d74d Vincenzo Frascino 2019-06-21 92 current->mm->context.vdso = (void *)new_vma->vm_start;
c7aa2d71020d74d Vincenzo Frascino 2019-06-21 93
c7aa2d71020d74d Vincenzo Frascino 2019-06-21 94 return 0;
c7aa2d71020d74d Vincenzo Frascino 2019-06-21 95 }
c7aa2d71020d74d Vincenzo Frascino 2019-06-21 96
:::::: The code at line 86 was first introduced by commit
:::::: d3418f3839b667842eba8688ca8ebe84eca158db arm64: vdso: use consistent 'abi' nomenclature
:::::: TO: Mark Rutland <mark.rutland@arm.com>
:::::: CC: Will Deacon <will@kernel.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: 75400 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-10-23 23:37 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-10-23 23:37 [arnd-playground:warnings-5.10 68/69] arch/arm64/kernel/vdso.c:86:37: warning: array subscript 1 is above array bounds of 'struct 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.