error: unknown target CPU 'r4300'
by kernel test robot
CC: linux-kernel(a)vger.kernel.org
TO: Lauri Kasanen <cand(a)gmx.com>
CC: Thomas Bogendoerfer <tsbogend(a)alpha.franken.de>
Hi Lauri,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: a96bfed64c8986d6404e553f18203cae1f5ac7e6
commit: baec970aa5ba11099ad7a91773350c91fb2113f0 mips: Add N64 machine type
date: 5 months ago
config: mips-randconfig-r022-20210622 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project b3634d3e88b7f26534a5057bff182b7dced584fc)
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
# install mips cross compiling tool for clang build
# apt-get install binutils-mips-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout baec970aa5ba11099ad7a91773350c91fb2113f0
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=mips
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
>> error: unknown target CPU 'r4300'
note: valid target CPU values are: mips1, mips2, mips3, mips4, mips5, mips32, mips32r2, mips32r3, mips32r5, mips32r6, mips64, mips64r2, mips64r3, mips64r5, mips64r6, octeon, octeon+, p5600
--
>> error: unknown target CPU 'r4300'
note: valid target CPU values are: mips1, mips2, mips3, mips4, mips5, mips32, mips32r2, mips32r3, mips32r5, mips32r6, mips64, mips64r2, mips64r3, mips64r5, mips64r6, octeon, octeon+, p5600
>> error: unknown target CPU 'r4300'
note: valid target CPU values are: mips1, mips2, mips3, mips4, mips5, mips32, mips32r2, mips32r3, mips32r5, mips32r6, mips64, mips64r2, mips64r3, mips64r5, mips64r6, octeon, octeon+, p5600
make[2]: *** [scripts/Makefile.build:117: kernel/bounds.s] Error 1
make[2]: Target 'missing-syscalls' not remade because of errors.
make[1]: *** [arch/mips/Makefile:418: archprepare] Error 2
make[1]: Target 'modules_prepare' not remade because of errors.
make: *** [Makefile:185: __sub-make] Error 2
make: Target 'modules_prepare' not remade because of errors.
--
>> error: unknown target CPU 'r4300'
note: valid target CPU values are: mips1, mips2, mips3, mips4, mips5, mips32, mips32r2, mips32r3, mips32r5, mips32r6, mips64, mips64r2, mips64r3, mips64r5, mips64r6, octeon, octeon+, p5600
scripts/genksyms/parse.y: warning: 9 shift/reduce conflicts [-Wconflicts-sr]
scripts/genksyms/parse.y: warning: 5 reduce/reduce conflicts [-Wconflicts-rr]
>> error: unknown target CPU 'r4300'
note: valid target CPU values are: mips1, mips2, mips3, mips4, mips5, mips32, mips32r2, mips32r3, mips32r5, mips32r6, mips64, mips64r2, mips64r3, mips64r5, mips64r6, octeon, octeon+, p5600
make[2]: *** [scripts/Makefile.build:117: kernel/bounds.s] Error 1
make[2]: Target 'missing-syscalls' not remade because of errors.
make[1]: *** [arch/mips/Makefile:418: archprepare] Error 2
make[1]: Target 'prepare' not remade because of errors.
make: *** [Makefile:185: __sub-make] Error 2
make: Target 'prepare' not remade because of errors.
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 3 months
[p2pmem:martin/map_sg_cleanup 5/15] arch/mips/jazz/jazzdma.c:95:6: error: conflicting types for 'vdma_alloc'
by kernel test robot
tree: https://github.com/sbates130272/linux-p2pmem.git martin/map_sg_cleanup
head: eafab2a966d95c80db362d536a3e1bb2444be72d
commit: 791c15fb5de785e78fb8c844d3d218c03d193e2c [5/15] MIPS/jazzdma: return error code from vdma_alloc()
config: mips-jazz_defconfig (attached as .config)
compiler: mipsel-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/sbates130272/linux-p2pmem/commit/791c15fb5de785e78fb8c...
git remote add p2pmem https://github.com/sbates130272/linux-p2pmem.git
git fetch --no-tags p2pmem martin/map_sg_cleanup
git checkout 791c15fb5de785e78fb8c844d3d218c03d193e2c
# 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(a)intel.com>
All errors (new ones prefixed by >>):
>> arch/mips/jazz/jazzdma.c:95:6: error: conflicting types for 'vdma_alloc'
95 | long vdma_alloc(unsigned long paddr, unsigned long size)
| ^~~~~~~~~~
In file included from arch/mips/jazz/jazzdma.c:25:
arch/mips/include/asm/jazzdma.h:11:22: note: previous declaration of 'vdma_alloc' was here
11 | extern unsigned long vdma_alloc(unsigned long paddr, unsigned long size);
| ^~~~~~~~~~
In file included from include/linux/linkage.h:7,
from include/linux/kernel.h:8,
from arch/mips/jazz/jazzdma.c:11:
arch/mips/jazz/jazzdma.c:177:15: error: conflicting types for 'vdma_alloc'
177 | EXPORT_SYMBOL(vdma_alloc);
| ^~~~~~~~~~
include/linux/export.h:98:21: note: in definition of macro '___EXPORT_SYMBOL'
98 | extern typeof(sym) sym; \
| ^~~
include/linux/export.h:155:34: note: in expansion of macro '__EXPORT_SYMBOL'
155 | #define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, "")
| ^~~~~~~~~~~~~~~
include/linux/export.h:158:29: note: in expansion of macro '_EXPORT_SYMBOL'
158 | #define EXPORT_SYMBOL(sym) _EXPORT_SYMBOL(sym, "")
| ^~~~~~~~~~~~~~
arch/mips/jazz/jazzdma.c:177:1: note: in expansion of macro 'EXPORT_SYMBOL'
177 | EXPORT_SYMBOL(vdma_alloc);
| ^~~~~~~~~~~~~
In file included from arch/mips/jazz/jazzdma.c:25:
arch/mips/include/asm/jazzdma.h:11:22: note: previous declaration of 'vdma_alloc' was here
11 | extern unsigned long vdma_alloc(unsigned long paddr, unsigned long size);
| ^~~~~~~~~~
arch/mips/jazz/jazzdma.c: In function 'jazz_dma_map_sg':
>> arch/mips/jazz/jazzdma.c:554:13: error: 'sg_dma_address' undeclared (first use in this function); did you mean 'set_dma_addr'?
554 | if ((int) sg_dma_address < 0)
| ^~~~~~~~~~~~~~
| set_dma_addr
arch/mips/jazz/jazzdma.c:554:13: note: each undeclared identifier is reported only once for each function it appears in
vim +/vdma_alloc +95 arch/mips/jazz/jazzdma.c
91
92 /*
93 * Allocate DMA pagetables using a simple first-fit algorithm
94 */
> 95 long vdma_alloc(unsigned long paddr, unsigned long size)
96 {
97 int first, last, pages, frame, i;
98 unsigned long laddr, flags;
99
100 /* check arguments */
101
102 if (paddr > 0x1fffffff) {
103 if (vdma_debug)
104 printk("vdma_alloc: Invalid physical address: %08lx\n",
105 paddr);
106 return -EINVAL; /* invalid physical address */
107 }
108 if (size > 0x400000 || size == 0) {
109 if (vdma_debug)
110 printk("vdma_alloc: Invalid size: %08lx\n", size);
111 return -EINVAL; /* invalid physical address */
112 }
113
114 spin_lock_irqsave(&vdma_lock, flags);
115 /*
116 * Find free chunk
117 */
118 pages = VDMA_PAGE(paddr + size) - VDMA_PAGE(paddr) + 1;
119 first = 0;
120 while (1) {
121 while (pgtbl[first].owner != VDMA_PAGE_EMPTY &&
122 first < VDMA_PGTBL_ENTRIES) first++;
123 if (first + pages > VDMA_PGTBL_ENTRIES) { /* nothing free */
124 spin_unlock_irqrestore(&vdma_lock, flags);
125 return -ENOMEM;
126 }
127
128 last = first + 1;
129 while (pgtbl[last].owner == VDMA_PAGE_EMPTY
130 && last - first < pages)
131 last++;
132
133 if (last - first == pages)
134 break; /* found */
135 first = last + 1;
136 }
137
138 /*
139 * Mark pages as allocated
140 */
141 laddr = (first << 12) + (paddr & (VDMA_PAGESIZE - 1));
142 frame = paddr & ~(VDMA_PAGESIZE - 1);
143
144 for (i = first; i < last; i++) {
145 pgtbl[i].frame = frame;
146 pgtbl[i].owner = laddr;
147 frame += VDMA_PAGESIZE;
148 }
149
150 /*
151 * Update translation table and return logical start address
152 */
153 r4030_write_reg32(JAZZ_R4030_TRSTBL_INV, 0);
154
155 if (vdma_debug > 1)
156 printk("vdma_alloc: Allocated %d pages starting from %08lx\n",
157 pages, laddr);
158
159 if (vdma_debug > 2) {
160 printk("LADDR: ");
161 for (i = first; i < last; i++)
162 printk("%08x ", i << 12);
163 printk("\nPADDR: ");
164 for (i = first; i < last; i++)
165 printk("%08x ", pgtbl[i].frame);
166 printk("\nOWNER: ");
167 for (i = first; i < last; i++)
168 printk("%08x ", pgtbl[i].owner);
169 printk("\n");
170 }
171
172 spin_unlock_irqrestore(&vdma_lock, flags);
173
174 return laddr;
175 }
176
> 177 EXPORT_SYMBOL(vdma_alloc);
178
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 3 months
Re: [PATCH 1/2] hantro: vp8: Move noisy WARN_ON to vpu_debug
by kernel test robot
Hi Ezequiel,
I love your patch! Perhaps something to improve:
[auto build test WARNING on linuxtv-media/master]
[also build test WARNING on rockchip/for-next pza/reset/next v5.13-rc7 next-20210621]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Ezequiel-Garcia/hantro-Small-nit...
base: git://linuxtv.org/media_tree.git master
config: x86_64-randconfig-a006-20210622 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project b3634d3e88b7f26534a5057bff182b7dced584fc)
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
# install x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# https://github.com/0day-ci/linux/commit/a4118b182653ffbf6229d186eb46052c3...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Ezequiel-Garcia/hantro-Small-nitpicks/20210622-071354
git checkout a4118b182653ffbf6229d186eb46052c34ae995c
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> drivers/staging/media/hantro/hantro_g1_vp8_dec.c:381:6: warning: format specifies type 'long' but the argument has type '__u64' (aka 'unsigned long long') [-Wformat]
hdr->last_frame_ts);
^~~~~~~~~~~~~~~~~~
drivers/staging/media/hantro/hantro.h:322:28: note: expanded from macro 'vpu_debug'
__func__, __LINE__, ##args); \
^~~~
include/linux/printk.h:373:34: note: expanded from macro 'pr_info'
printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
drivers/staging/media/hantro/hantro_g1_vp8_dec.c:389:6: warning: format specifies type 'long' but the argument has type '__u64' (aka 'unsigned long long') [-Wformat]
hdr->golden_frame_ts);
^~~~~~~~~~~~~~~~~~~~
drivers/staging/media/hantro/hantro.h:322:28: note: expanded from macro 'vpu_debug'
__func__, __LINE__, ##args); \
^~~~
include/linux/printk.h:373:34: note: expanded from macro 'pr_info'
printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
drivers/staging/media/hantro/hantro_g1_vp8_dec.c:399:6: warning: format specifies type 'long' but the argument has type '__u64' (aka 'unsigned long long') [-Wformat]
hdr->alt_frame_ts);
^~~~~~~~~~~~~~~~~
drivers/staging/media/hantro/hantro.h:322:28: note: expanded from macro 'vpu_debug'
__func__, __LINE__, ##args); \
^~~~
include/linux/printk.h:373:34: note: expanded from macro 'pr_info'
printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
3 warnings generated.
--
>> drivers/staging/media/hantro/rockchip_vpu2_hw_vp8_dec.c:458:6: warning: format specifies type 'long' but the argument has type '__u64' (aka 'unsigned long long') [-Wformat]
hdr->last_frame_ts);
^~~~~~~~~~~~~~~~~~
drivers/staging/media/hantro/hantro.h:322:28: note: expanded from macro 'vpu_debug'
__func__, __LINE__, ##args); \
^~~~
include/linux/printk.h:373:34: note: expanded from macro 'pr_info'
printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
drivers/staging/media/hantro/rockchip_vpu2_hw_vp8_dec.c:466:6: warning: format specifies type 'long' but the argument has type '__u64' (aka 'unsigned long long') [-Wformat]
hdr->golden_frame_ts);
^~~~~~~~~~~~~~~~~~~~
drivers/staging/media/hantro/hantro.h:322:28: note: expanded from macro 'vpu_debug'
__func__, __LINE__, ##args); \
^~~~
include/linux/printk.h:373:34: note: expanded from macro 'pr_info'
printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
drivers/staging/media/hantro/rockchip_vpu2_hw_vp8_dec.c:476:6: warning: format specifies type 'long' but the argument has type '__u64' (aka 'unsigned long long') [-Wformat]
hdr->alt_frame_ts);
^~~~~~~~~~~~~~~~~
drivers/staging/media/hantro/hantro.h:322:28: note: expanded from macro 'vpu_debug'
__func__, __LINE__, ##args); \
^~~~
include/linux/printk.h:373:34: note: expanded from macro 'pr_info'
printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
3 warnings generated.
vim +381 drivers/staging/media/hantro/hantro_g1_vp8_dec.c
368
369 static void cfg_ref(struct hantro_ctx *ctx,
370 const struct v4l2_ctrl_vp8_frame *hdr)
371 {
372 struct hantro_dev *vpu = ctx->dev;
373 struct vb2_v4l2_buffer *vb2_dst;
374 dma_addr_t ref;
375
376 vb2_dst = hantro_get_dst_buf(ctx);
377
378 ref = hantro_get_ref(ctx, hdr->last_frame_ts);
379 if (!ref) {
380 vpu_debug(0, "failed to find last frame ts=%ld\n",
> 381 hdr->last_frame_ts);
382 ref = vb2_dma_contig_plane_dma_addr(&vb2_dst->vb2_buf, 0);
383 }
384 vdpu_write_relaxed(vpu, ref, G1_REG_ADDR_REF(0));
385
386 ref = hantro_get_ref(ctx, hdr->golden_frame_ts);
387 if (!ref && hdr->golden_frame_ts)
388 vpu_debug(0, "failed to find golden frame ts=%ld\n",
389 hdr->golden_frame_ts);
390 if (!ref)
391 ref = vb2_dma_contig_plane_dma_addr(&vb2_dst->vb2_buf, 0);
392 if (hdr->flags & V4L2_VP8_FRAME_FLAG_SIGN_BIAS_GOLDEN)
393 ref |= G1_REG_ADDR_REF_TOPC_E;
394 vdpu_write_relaxed(vpu, ref, G1_REG_ADDR_REF(4));
395
396 ref = hantro_get_ref(ctx, hdr->alt_frame_ts);
397 if (!ref && hdr->alt_frame_ts)
398 vpu_debug(0, "failed to find alt frame ts=%ld\n",
399 hdr->alt_frame_ts);
400 if (!ref)
401 ref = vb2_dma_contig_plane_dma_addr(&vb2_dst->vb2_buf, 0);
402 if (hdr->flags & V4L2_VP8_FRAME_FLAG_SIGN_BIAS_ALT)
403 ref |= G1_REG_ADDR_REF_TOPC_E;
404 vdpu_write_relaxed(vpu, ref, G1_REG_ADDR_REF(5));
405 }
406
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 3 months
[kees:kspp/memcpy/next-20210621/v0 76/86] include/linux/fortify-string.h:194:4: warning: call to '__write_overflow_field' declared with attribute warning: detected write beyond size of field (1st parameter); maybe use struct_group()?
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git kspp/memcpy/next-20210621/v0
head: 711a2c0c23d479d212e8d80f5dcaaf267162c8de
commit: bcd1e43915effef8bcc583726d55e91780ad7a63 [76/86] fortify: Detect struct member overflows in memset()
config: mips-randconfig-r011-20210621 (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
# https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git/commit/?id...
git remote add kees https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git
git fetch --no-tags kees kspp/memcpy/next-20210621/v0
git checkout bcd1e43915effef8bcc583726d55e91780ad7a63
# 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(a)intel.com>
All warnings (new ones prefixed by >>):
In file included from include/linux/string.h:253,
from include/linux/bitmap.h:10,
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:60,
from include/linux/uio.h:9,
from include/linux/socket.h:8,
from include/uapi/linux/can.h:50,
from drivers/net/can/flexcan.c:14:
In function '__fortify_memset',
inlined from 'flexcan_ram_init' at arch/mips/include/asm/io.h:495:2,
inlined from 'flexcan_chip_start' at drivers/net/can/flexcan.c:1485:3:
>> include/linux/fortify-string.h:194:4: warning: call to '__write_overflow_field' declared with attribute warning: detected write beyond size of field (1st parameter); maybe use struct_group()? [-Wattribute-warning]
194 | __write_overflow_field();
| ^~~~~~~~~~~~~~~~~~~~~~~~
In function '__fortify_memset',
inlined from 'flexcan_ram_init' at arch/mips/include/asm/io.h:495:2,
inlined from 'flexcan_chip_start' at drivers/net/can/flexcan.c:1485:3:
>> include/linux/fortify-string.h:194:4: warning: call to '__write_overflow_field' declared with attribute warning: detected write beyond size of field (1st parameter); maybe use struct_group()? [-Wattribute-warning]
194 | __write_overflow_field();
| ^~~~~~~~~~~~~~~~~~~~~~~~
vim +/__write_overflow_field +194 include/linux/fortify-string.h
178
179 #define memset(p, c, s) __fortify_memset(p, c, s)
180 __FORTIFY_INLINE void *__fortify_memset(void *p, int c, __kernel_size_t size)
181 {
182 size_t p_size = __builtin_object_size(p, 0);
183 size_t p_size_field = __builtin_object_size(p, 1);
184
185 if (__builtin_constant_p(size)) {
186 /*
187 * Length argument is a constant expression, so we
188 * can perform compile-time bounds checking where
189 * buffer sizes are known.
190 */
191
192 /* Disallow size argument larger than dest field. */
193 if (p_size_field < size)
> 194 __write_overflow_field();
195 } else {
196 /*
197 * Length argument is not a constant expression, so
198 * run-time bounds checking can happen where buffer
199 * sizes are known.
200 */
201
202 /*
203 * Warn when writing beyond destination field size.
204 * Since flexible-arrays are considered 0 bytes, we
205 * must ignore 0 sizes at runtime for now.
206 */
207 if (p_size_field && p_size != p_size_field && p_size_field < size)
208 fortify_warn_write("memset", p_size_field, size);
209
210 /*
211 * Always stop accesses beyond the struct that contains the
212 * field, when the buffer's remaining size is known.
213 */
214 if (p_size != (size_t)(-1) && p_size < size)
215 fortify_panic("memset");
216 }
217 return __underlying_memset(p, c, size);
218 }
219
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 3 months
[kees:kspp/memcpy/next-20210621/v0 53/86] arch/arm/boot/compressed/misc.c:164:6: warning: no previous prototype for 'fortify_warn_write'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git kspp/memcpy/next-20210621/v0
head: 711a2c0c23d479d212e8d80f5dcaaf267162c8de
commit: b14704acbcd3290c2ab263615639d7e2f2a2e501 [53/86] fortify: Detect struct member overflows in memcpy()
config: arm-randconfig-r021-20210621 (attached as .config)
compiler: arm-linux-gnueabi-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/kees/linux.git/commit/?id...
git remote add kees https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git
git fetch --no-tags kees kspp/memcpy/next-20210621/v0
git checkout b14704acbcd3290c2ab263615639d7e2f2a2e501
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
arch/arm/boot/compressed/misc.c:126:17: warning: no previous prototype for '__div0' [-Wmissing-prototypes]
126 | asmlinkage void __div0(void)
| ^~~~~~
arch/arm/boot/compressed/misc.c:133:6: warning: no previous prototype for '__stack_chk_fail' [-Wmissing-prototypes]
133 | void __stack_chk_fail(void)
| ^~~~~~~~~~~~~~~~
arch/arm/boot/compressed/misc.c:142:1: warning: no previous prototype for 'decompress_kernel' [-Wmissing-prototypes]
142 | decompress_kernel(unsigned long output_start, unsigned long free_mem_ptr_p,
| ^~~~~~~~~~~~~~~~~
>> arch/arm/boot/compressed/misc.c:164:6: warning: no previous prototype for 'fortify_warn_write' [-Wmissing-prototypes]
164 | void fortify_warn_write(const char *func, size_t buffer_size, size_t write_size)
| ^~~~~~~~~~~~~~~~~~
arch/arm/boot/compressed/misc.c:169:6: warning: no previous prototype for 'fortify_panic' [-Wmissing-prototypes]
169 | void fortify_panic(const char *name)
| ^~~~~~~~~~~~~
vim +/fortify_warn_write +164 arch/arm/boot/compressed/misc.c
163
> 164 void fortify_warn_write(const char *func, size_t buffer_size, size_t write_size)
165 {
166 putstr("warning: detected buffer overflow\n");
167 }
168
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 3 months
[p2pmem:martin/map_sg_cleanup 11/15] arch/sparc/kernel/iommu.c:165:3: error: expected ')' before 'return'
by kernel test robot
tree: https://github.com/sbates130272/linux-p2pmem.git martin/map_sg_cleanup
head: 820685259796d140a9daaf67c2889a188f0080f6
commit: 03f23088d07a92e502728eb2234a6ed52ea7794a [11/15] sparc: return error code from iommu_tbl_range_alloc()
config: sparc-randconfig-p001-20210621 (attached as .config)
compiler: sparc64-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/sbates130272/linux-p2pmem/commit/03f23088d07a92e502728...
git remote add p2pmem https://github.com/sbates130272/linux-p2pmem.git
git fetch --no-tags p2pmem martin/map_sg_cleanup
git checkout 03f23088d07a92e502728eb2234a6ed52ea7794a
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=sparc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
arch/sparc/kernel/iommu.c: In function 'alloc_npages':
>> arch/sparc/kernel/iommu.c:165:3: error: expected ')' before 'return'
165 | return NULL;
| ^~~~~~
arch/sparc/kernel/iommu.c:164:5: note: to match this '('
164 | if (unlikely((entry < 0))
| ^
>> arch/sparc/kernel/iommu.c:168:1: error: expected expression before '}' token
168 | }
| ^
arch/sparc/kernel/iommu.c:168:1: error: no return statement in function returning non-void [-Werror=return-type]
cc1: all warnings being treated as errors
--
>> arch/sparc/kernel/iommu-common.c:97:6: error: conflicting types for 'iommu_tbl_range_alloc'
97 | long iommu_tbl_range_alloc(struct device *dev,
| ^~~~~~~~~~~~~~~~~~~~~
In file included from arch/sparc/kernel/iommu-common.c:13:
arch/sparc/include/asm/iommu-common.h:42:22: note: previous declaration of 'iommu_tbl_range_alloc' was here
42 | extern unsigned long iommu_tbl_range_alloc(struct device *dev,
| ^~~~~~~~~~~~~~~~~~~~~
vim +165 arch/sparc/kernel/iommu.c
^1da177e4c3f415 arch/sparc64/kernel/pci_iommu.c Linus Torvalds 2005-04-16 155
bb620c3d3925aec arch/sparc/kernel/iommu.c Sowmini Varadhan 2015-04-09 156 static inline iopte_t *alloc_npages(struct device *dev,
bb620c3d3925aec arch/sparc/kernel/iommu.c Sowmini Varadhan 2015-04-09 157 struct iommu *iommu,
d284142cbad6683 arch/sparc64/kernel/iommu.c David S. Miller 2008-02-08 158 unsigned long npages)
^1da177e4c3f415 arch/sparc64/kernel/pci_iommu.c Linus Torvalds 2005-04-16 159 {
03f23088d07a92e arch/sparc/kernel/iommu.c Martin Oliveira 2021-06-21 160 long entry;
^1da177e4c3f415 arch/sparc64/kernel/pci_iommu.c Linus Torvalds 2005-04-16 161
bb620c3d3925aec arch/sparc/kernel/iommu.c Sowmini Varadhan 2015-04-09 162 entry = iommu_tbl_range_alloc(dev, &iommu->tbl, npages, NULL,
bb620c3d3925aec arch/sparc/kernel/iommu.c Sowmini Varadhan 2015-04-09 163 (unsigned long)(-1), 0);
03f23088d07a92e arch/sparc/kernel/iommu.c Martin Oliveira 2021-06-21 164 if (unlikely((entry < 0))
^1da177e4c3f415 arch/sparc64/kernel/pci_iommu.c Linus Torvalds 2005-04-16 @165 return NULL;
^1da177e4c3f415 arch/sparc64/kernel/pci_iommu.c Linus Torvalds 2005-04-16 166
03f23088d07a92e arch/sparc/kernel/iommu.c Martin Oliveira 2021-06-21 167 return iommu->page_table + (unsigned long) entry;
^1da177e4c3f415 arch/sparc64/kernel/pci_iommu.c Linus Torvalds 2005-04-16 @168 }
^1da177e4c3f415 arch/sparc64/kernel/pci_iommu.c Linus Torvalds 2005-04-16 169
:::::: The code at line 165 was first introduced by commit
:::::: 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 Linux-2.6.12-rc2
:::::: TO: Linus Torvalds <torvalds(a)ppc970.osdl.org>
:::::: CC: Linus Torvalds <torvalds(a)ppc970.osdl.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 3 months
[freescale-fslc:5.4-2.3.x-imx 15436/19460] drivers/soc/imx/soc-imx8.c:339:5: warning: no previous prototype for function 'imx8mp_get_ldo_trim'
by kernel test robot
Hi Oliver,
FYI, the error/warning still remains.
tree: https://github.com/Freescale/linux-fslc 5.4-2.3.x-imx
head: 4efcf5cb62af1dae546bc1022b4edf6dedb6c983
commit: 53ecae250dd9e334787ede9eb40e0555b7fd0c00 [15436/19460] MLK-24911-1: soc: imx: Add support to get iMX8mp LDO trim fuse value
config: arm64-randconfig-r014-20210621 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project e1adf90826a57b674eee79b071fb46c1f5683cd0)
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
# install arm64 cross compiling tool for clang build
# apt-get install binutils-aarch64-linux-gnu
# https://github.com/Freescale/linux-fslc/commit/53ecae250dd9e334787ede9eb4...
git remote add freescale-fslc https://github.com/Freescale/linux-fslc
git fetch --no-tags freescale-fslc 5.4-2.3.x-imx
git checkout 53ecae250dd9e334787ede9eb40e0555b7fd0c00
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
In file included from drivers/soc/imx/soc-imx8.c:8:
In file included from include/linux/io.h:13:
In file included from arch/arm64/include/asm/io.h:16:
In file included from arch/arm64/include/asm/pgtable.h:14:
arch/arm64/include/asm/tlbflush.h:200:16: warning: variable 'mask' set but not used [-Wunused-but-set-variable]
unsigned long mask = (1 << 20) - 1;
^
drivers/soc/imx/soc-imx8.c:324:5: warning: no previous prototype for function 'check_m4_enabled' [-Wmissing-prototypes]
int check_m4_enabled(void)
^
drivers/soc/imx/soc-imx8.c:324:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int check_m4_enabled(void)
^
static
>> drivers/soc/imx/soc-imx8.c:339:5: warning: no previous prototype for function 'imx8mp_get_ldo_trim' [-Wmissing-prototypes]
int imx8mp_get_ldo_trim(int ldo)
^
drivers/soc/imx/soc-imx8.c:339:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int imx8mp_get_ldo_trim(int ldo)
^
static
3 warnings generated.
vim +/imx8mp_get_ldo_trim +339 drivers/soc/imx/soc-imx8.c
338
> 339 int imx8mp_get_ldo_trim(int ldo)
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 3 months
[kees:kspp/memcpy/next-20210621/v0 53/86] include/linux/fortify-string.h:246:4: warning: call to '__read_overflow2_field' declared with attribute warning: detected read beyond size of field (2nd parameter); maybe use struct_group()?
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git kspp/memcpy/next-20210621/v0
head: 711a2c0c23d479d212e8d80f5dcaaf267162c8de
commit: b14704acbcd3290c2ab263615639d7e2f2a2e501 [53/86] fortify: Detect struct member overflows in memcpy()
config: i386-randconfig-r025-20210621 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git/commit/?id...
git remote add kees https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git
git fetch --no-tags kees kspp/memcpy/next-20210621/v0
git checkout b14704acbcd3290c2ab263615639d7e2f2a2e501
# save the attached .config to linux build tree
make W=1 ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
In file included from include/linux/string.h:253,
from arch/x86/include/asm/page_32.h:35,
from arch/x86/include/asm/page.h:14,
from arch/x86/include/asm/processor.h:19,
from arch/x86/include/asm/timex.h:5,
from include/linux/timex.h:65,
from include/linux/time32.h:13,
from include/linux/time.h:60,
from include/linux/ktime.h:24,
from include/linux/timer.h:6,
from include/linux/netdevice.h:24,
from net/mac80211/wpa.c:9:
In function '__fortify_memcpy_chk',
inlined from '__fortify_memcpy' at include/linux/fortify-string.h:281:2,
inlined from 'bip_aad.isra.0' at net/mac80211/wpa.c:912:2:
>> include/linux/fortify-string.h:246:4: warning: call to '__read_overflow2_field' declared with attribute warning: detected read beyond size of field (2nd parameter); maybe use struct_group()? [-Wattribute-warning]
246 | __read_overflow2_field();
| ^~~~~~~~~~~~~~~~~~~~~~~~
In function '__fortify_memcpy_chk',
inlined from '__fortify_memcpy' at include/linux/fortify-string.h:281:2,
inlined from 'ccmp_special_blocks.isra.0' at net/mac80211/wpa.c:365:2:
>> include/linux/fortify-string.h:246:4: warning: call to '__read_overflow2_field' declared with attribute warning: detected read beyond size of field (2nd parameter); maybe use struct_group()? [-Wattribute-warning]
246 | __read_overflow2_field();
| ^~~~~~~~~~~~~~~~~~~~~~~~
In function '__fortify_memcpy_chk',
inlined from '__fortify_memcpy' at include/linux/fortify-string.h:281:2,
inlined from 'gcmp_special_blocks.isra.0' at net/mac80211/wpa.c:597:2:
>> include/linux/fortify-string.h:246:4: warning: call to '__read_overflow2_field' declared with attribute warning: detected read beyond size of field (2nd parameter); maybe use struct_group()? [-Wattribute-warning]
246 | __read_overflow2_field();
| ^~~~~~~~~~~~~~~~~~~~~~~~
vim +/__read_overflow2_field +246 include/linux/fortify-string.h
189
190 /*
191 * To make sure the compiler can enforce protection against buffer overflows,
192 * memcpy(), memmove(), and memset() must not be used beyond individual
193 * struct members. If you need to copy across multiple members, please use
194 * struct_group() to create a named mirror of an anonymous struct union.
195 * (e.g. see struct sk_buff.)
196 *
197 * Mitigation coverage
198 * Bounds checking at:
199 * +-------+-------+-------+-------+
200 * | Compile time | Run time |
201 * memcpy() argument sizes: | write | read | write | read |
202 * +-------+-------+-------+-------+
203 * memcpy(known, known, constant) | y | y | n/a | n/a |
204 * memcpy(unknown, known, constant) | n | y | V | n/a |
205 * memcpy(known, unknown, constant) | y | n | n/a | V |
206 * memcpy(unknown, unknown, constant) | n | n | V | V |
207 * memcpy(known, known, dynamic) | n | n | b | B |
208 * memcpy(unknown, known, dynamic) | n | n | V | B |
209 * memcpy(known, unknown, dynamic) | n | n | b | V |
210 * memcpy(unknown, unknown, dynamic) | n | n | V | V |
211 * +-------+-------+-------+-------+
212 *
213 * y = deterministic compile-time bounds checking
214 * n = cannot do deterministic compile-time bounds checking
215 * n/a = no run-time bounds checking needed since compile-time deterministic
216 * b = perform run-time bounds checking
217 * B = can perform run-time bounds checking, but current unenforced
218 * V = vulnerable to run-time overflow
219 *
220 */
221 __FORTIFY_INLINE void __fortify_memcpy_chk(void *p, const void *q,
222 __kernel_size_t size,
223 const char *func)
224 {
225 size_t p_size = __builtin_object_size(p, 0);
226 size_t q_size = __builtin_object_size(q, 0);
227 size_t p_size_field = __builtin_object_size(p, 1);
228 size_t q_size_field = __builtin_object_size(q, 1);
229
230 if (__builtin_constant_p(size)) {
231 /*
232 * Length argument is a constant expression, so we
233 * can perform compile-time bounds checking where
234 * buffer sizes are known.
235 */
236
237 /* Warn when write size argument larger than dest field. */
238 if (p_size_field < size)
239 __write_overflow_field();
240 /*
241 * Warn for over-read under W=1 or when an over-write
242 * happened, so both can be fixed at the same time.
243 */
244 if ((IS_ENABLED(KBUILD_EXTRA_WARN1) || p_size_field < size) &&
245 q_size_field < size)
> 246 __read_overflow2_field();
247 } else {
248 /*
249 * Length argument is not a constant expression, so
250 * run-time bounds checking can happen where buffer
251 * sizes are known.
252 */
253
254 /*
255 * Warn when writing beyond destination field size.
256 * Since flexible-arrays are considered 0 bytes, we
257 * must ignore 0 sizes at runtime for now.
258 */
259 if (p_size_field && p_size != p_size_field && p_size_field < size)
260 fortify_warn_write(func, p_size_field, size);
261 /* Warn when reading beyond source field size. */
262 /*
263 if (q_size_field && q_size != q_size_field && q_size_field < size)
264 fortify_warn_read(func, q_size_field, size);
265 */
266
267 /*
268 * Always stop accesses beyond the struct that contains the
269 * field, when the buffer's remaining size is known.
270 */
271 if ((p_size != (size_t)(-1) && p_size < size) ||
272 (q_size != (size_t)(-1) && q_size < size))
273 fortify_panic(func);
274 }
275 }
276
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 3 months