[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202207152038.c936y9fU-lkp@intel.com>
Date: Fri, 15 Jul 2022 23:17:19 +0800
From: kernel test robot <lkp@...el.com>
To: Dylan Yudaken <dylany@...com>
Cc: llvm@...ts.linux.dev, kbuild-all@...ts.01.org,
Ammar Faizi <ammarfaizi2@...weeb.org>,
GNU/Weeb Mailing List <gwml@...r.gnuweeb.org>,
linux-kernel@...r.kernel.org, Jens Axboe <axboe@...nel.dk>
Subject: [ammarfaizi2-block:axboe/linux-block/for-next 18/97]
io_uring/net.c:332:6: warning: comparison of distinct pointer types ('typeof
(sizeof(struct io_uring_recvmsg_out)) *' (aka 'unsigned int *') and 'typeof
((unsigned long)iomsg->namelen) *' (aka 'unsigned long *'))
tree: https://github.com/ammarfaizi2/linux-block axboe/linux-block/for-next
head: f46c4db86bee760a24f38093a76a2a2688a6b76e
commit: a8b38c4ce7240d869c820d457bcd51e452149510 [18/97] io_uring: support multishot in recvmsg
config: powerpc-lite5200b_defconfig
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 5e61b9c556267086ef9b743a0b57df302eef831b)
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 powerpc cross compiling tool for clang build
# apt-get install binutils-powerpc-linux-gnu
# https://github.com/ammarfaizi2/linux-block/commit/a8b38c4ce7240d869c820d457bcd51e452149510
git remote add ammarfaizi2-block https://github.com/ammarfaizi2/linux-block
git fetch --no-tags ammarfaizi2-block axboe/linux-block/for-next
git checkout a8b38c4ce7240d869c820d457bcd51e452149510
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=powerpc SHELL=/bin/bash
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@...el.com>
All warnings (new ones prefixed by >>):
^
arch/powerpc/include/asm/io.h:579:56: note: expanded from macro '__do_insw'
#define __do_insw(p, b, n) readsw((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from io_uring/net.c:13:
In file included from io_uring/io_uring.h:6:
In file included from include/linux/io_uring_types.h:4:
In file included from include/linux/blkdev.h:9:
In file included from include/linux/blk_types.h:10:
In file included from include/linux/bvec.h:10:
In file included from include/linux/highmem.h:11:
In file included from include/linux/hardirq.h:11:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:641:
arch/powerpc/include/asm/io-defs.h:47:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(insl, (unsigned long p, void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:638:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:5:1: note: expanded from here
__do_insl
^
arch/powerpc/include/asm/io.h:580:56: note: expanded from macro '__do_insl'
#define __do_insl(p, b, n) readsl((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from io_uring/net.c:13:
In file included from io_uring/io_uring.h:6:
In file included from include/linux/io_uring_types.h:4:
In file included from include/linux/blkdev.h:9:
In file included from include/linux/blk_types.h:10:
In file included from include/linux/bvec.h:10:
In file included from include/linux/highmem.h:11:
In file included from include/linux/hardirq.h:11:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:641:
arch/powerpc/include/asm/io-defs.h:49:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsb, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:638:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:7:1: note: expanded from here
__do_outsb
^
arch/powerpc/include/asm/io.h:581:58: note: expanded from macro '__do_outsb'
#define __do_outsb(p, b, n) writesb((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from io_uring/net.c:13:
In file included from io_uring/io_uring.h:6:
In file included from include/linux/io_uring_types.h:4:
In file included from include/linux/blkdev.h:9:
In file included from include/linux/blk_types.h:10:
In file included from include/linux/bvec.h:10:
In file included from include/linux/highmem.h:11:
In file included from include/linux/hardirq.h:11:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:641:
arch/powerpc/include/asm/io-defs.h:51:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsw, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:638:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:9:1: note: expanded from here
__do_outsw
^
arch/powerpc/include/asm/io.h:582:58: note: expanded from macro '__do_outsw'
#define __do_outsw(p, b, n) writesw((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from io_uring/net.c:13:
In file included from io_uring/io_uring.h:6:
In file included from include/linux/io_uring_types.h:4:
In file included from include/linux/blkdev.h:9:
In file included from include/linux/blk_types.h:10:
In file included from include/linux/bvec.h:10:
In file included from include/linux/highmem.h:11:
In file included from include/linux/hardirq.h:11:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:641:
arch/powerpc/include/asm/io-defs.h:53:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsl, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:638:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:11:1: note: expanded from here
__do_outsl
^
arch/powerpc/include/asm/io.h:583:58: note: expanded from macro '__do_outsl'
#define __do_outsl(p, b, n) writesl((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
>> io_uring/net.c:332:6: warning: comparison of distinct pointer types ('typeof (sizeof(struct io_uring_recvmsg_out)) *' (aka 'unsigned int *') and 'typeof ((unsigned long)iomsg->namelen) *' (aka 'unsigned long *')) [-Wcompare-distinct-pointer-types]
if (check_add_overflow(sizeof(struct io_uring_recvmsg_out),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/overflow.h:67:15: note: expanded from macro 'check_add_overflow'
(void) (&__a == &__b); \
~~~~ ^ ~~~~
>> io_uring/net.c:332:6: warning: comparison of distinct pointer types ('typeof (sizeof(struct io_uring_recvmsg_out)) *' (aka 'unsigned int *') and 'typeof (&hdr)' (aka 'unsigned long *')) [-Wcompare-distinct-pointer-types]
if (check_add_overflow(sizeof(struct io_uring_recvmsg_out),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/overflow.h:68:15: note: expanded from macro 'check_add_overflow'
(void) (&__a == __d); \
~~~~ ^ ~~~
>> io_uring/net.c:335:6: warning: comparison of distinct pointer types ('typeof (hdr) *' (aka 'unsigned long *') and 'typeof (iomsg->controllen) *' (aka 'unsigned int *')) [-Wcompare-distinct-pointer-types]
if (check_add_overflow(hdr, iomsg->controllen, &hdr))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/overflow.h:67:15: note: expanded from macro 'check_add_overflow'
(void) (&__a == &__b); \
~~~~ ^ ~~~~
9 warnings generated.
vim +332 io_uring/net.c
327
328 static bool io_recvmsg_multishot_overflow(struct io_async_msghdr *iomsg)
329 {
330 unsigned long hdr;
331
> 332 if (check_add_overflow(sizeof(struct io_uring_recvmsg_out),
333 (unsigned long)iomsg->namelen, &hdr))
334 return true;
> 335 if (check_add_overflow(hdr, iomsg->controllen, &hdr))
336 return true;
337 if (hdr > INT_MAX)
338 return true;
339
340 return false;
341 }
342
--
0-DAY CI Kernel Test Service
https://01.org/lkp
View attachment "config" of type "text/plain" (57310 bytes)
Powered by blists - more mailing lists