tree:
https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git master
head: e1d9d7b91302593d1951fcb12feddda6fb58a3c0
commit: 85ce50d337d10a6fd328fa70b0a15543bf5c0f64 [181/184] net: kcov: don't select
SKB_EXTENSIONS when there is no NET
config: s390-randconfig-r036-20201113 (attached as .config)
compiler: clang version 12.0.0 (
https://github.com/llvm/llvm-project
9e0c35655b6e8186baef8840b26ba4090503b554)
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 s390 cross compiling tool for clang build
# apt-get install binutils-s390x-linux-gnu
#
https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git/commi...
git remote add netdev-net-next
https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git
git fetch --no-tags netdev-net-next master
git checkout 85ce50d337d10a6fd328fa70b0a15543bf5c0f64
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=s390
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 >>):
include/asm-generic/io.h:490:61: warning: performing pointer arithmetic on a null
pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro
'__le32_to_cpu'
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:119:21: note: expanded from macro '__swab32'
___constant_swab32(x) : \
^
include/uapi/linux/swab.h:21:12: note: expanded from macro
'___constant_swab32'
(((__u32)(x) & (__u32)0x00ff0000UL) >> 8) | \
^
In file included from arch/s390/kernel/asm-offsets.c:11:
In file included from include/linux/kvm_host.h:32:
In file included from include/linux/kvm_para.h:5:
In file included from include/uapi/linux/kvm_para.h:36:
In file included from arch/s390/include/asm/kvm_para.h:25:
In file included from arch/s390/include/asm/diag.h:12:
In file included from include/linux/if_ether.h:19:
In file included from include/linux/skbuff.h:31:
In file included from include/linux/dma-mapping.h:10:
In file included from include/linux/scatterlist.h:9:
In file included from arch/s390/include/asm/io.h:80:
include/asm-generic/io.h:490:61: warning: performing pointer arithmetic on a null
pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro
'__le32_to_cpu'
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:119:21: note: expanded from macro '__swab32'
___constant_swab32(x) : \
^
include/uapi/linux/swab.h:22:12: note: expanded from macro
'___constant_swab32'
(((__u32)(x) & (__u32)0xff000000UL) >> 24)))
^
In file included from arch/s390/kernel/asm-offsets.c:11:
In file included from include/linux/kvm_host.h:32:
In file included from include/linux/kvm_para.h:5:
In file included from include/uapi/linux/kvm_para.h:36:
In file included from arch/s390/include/asm/kvm_para.h:25:
In file included from arch/s390/include/asm/diag.h:12:
In file included from include/linux/if_ether.h:19:
In file included from include/linux/skbuff.h:31:
In file included from include/linux/dma-mapping.h:10:
In file included from include/linux/scatterlist.h:9:
In file included from arch/s390/include/asm/io.h:80:
include/asm-generic/io.h:490:61: warning: performing pointer arithmetic on a null
pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro
'__le32_to_cpu'
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:120:12: note: expanded from macro '__swab32'
__fswab32(x))
^
In file included from arch/s390/kernel/asm-offsets.c:11:
In file included from include/linux/kvm_host.h:32:
In file included from include/linux/kvm_para.h:5:
In file included from include/uapi/linux/kvm_para.h:36:
In file included from arch/s390/include/asm/kvm_para.h:25:
In file included from arch/s390/include/asm/diag.h:12:
In file included from include/linux/if_ether.h:19:
In file included from include/linux/skbuff.h:31:
In file included from include/linux/dma-mapping.h:10:
In file included from include/linux/scatterlist.h:9:
In file included from arch/s390/include/asm/io.h:80:
include/asm-generic/io.h:501:33: warning: performing pointer arithmetic on a null
pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writeb(value, PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:511:59: warning: performing pointer arithmetic on a null
pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:521:59: warning: performing pointer arithmetic on a null
pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:609:20: warning: performing pointer arithmetic on a null
pointer has undefined behavior [-Wnull-pointer-arithmetic]
readsb(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:617:20: warning: performing pointer arithmetic on a null
pointer has undefined behavior [-Wnull-pointer-arithmetic]
readsw(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:625:20: warning: performing pointer arithmetic on a null
pointer has undefined behavior [-Wnull-pointer-arithmetic]
readsl(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:634:21: warning: performing pointer arithmetic on a null
pointer has undefined behavior [-Wnull-pointer-arithmetic]
writesb(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:643:21: warning: performing pointer arithmetic on a null
pointer has undefined behavior [-Wnull-pointer-arithmetic]
writesw(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:652:21: warning: performing pointer arithmetic on a null
pointer has undefined behavior [-Wnull-pointer-arithmetic]
writesl(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
In file included from arch/s390/kernel/asm-offsets.c:11:
In file included from include/linux/kvm_host.h:32:
In file included from include/linux/kvm_para.h:5:
In file included from include/uapi/linux/kvm_para.h:36:
In file included from arch/s390/include/asm/kvm_para.h:25:
In file included from arch/s390/include/asm/diag.h:12:
In file included from include/linux/if_ether.h:19:
> include/linux/skbuff.h:4622:26: error: implicit declaration of
function 'skb_ext_add' [-Werror,-Wimplicit-function-declaration]
u64 *kcov_handle_ptr = skb_ext_add(skb, SKB_EXT_KCOV_HANDLE);
^
> include/linux/skbuff.h:4622:43: error: use of undeclared
identifier 'SKB_EXT_KCOV_HANDLE'
u64 *kcov_handle_ptr =
skb_ext_add(skb, SKB_EXT_KCOV_HANDLE);
^
> include/linux/skbuff.h:4631:21: error: implicit declaration of
function 'skb_ext_find' [-Werror,-Wimplicit-function-declaration]
u64 *kcov_handle = skb_ext_find(skb, SKB_EXT_KCOV_HANDLE);
^
include/linux/skbuff.h:4631:39: error: use of undeclared identifier
'SKB_EXT_KCOV_HANDLE'
u64 *kcov_handle = skb_ext_find(skb, SKB_EXT_KCOV_HANDLE);
^
20 warnings and 4 errors generated.
make[2]: *** [scripts/Makefile.build:117: arch/s390/kernel/asm-offsets.s] Error 1
make[2]: Target '__build' not remade because of errors.
make[1]: *** [Makefile:1200: prepare0] 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.
vim +/skb_ext_add +4622 include/linux/skbuff.h
2c64605b590edad Pablo Neira Ayuso 2020-03-25 4610
6370cc3bbd8a0f9 Aleksandr Nogikh 2020-10-29 4611 #ifdef CONFIG_KCOV
6370cc3bbd8a0f9 Aleksandr Nogikh 2020-10-29 4612 static inline void
skb_set_kcov_handle(struct sk_buff *skb,
6370cc3bbd8a0f9 Aleksandr Nogikh 2020-10-29 4613 const u64 kcov_handle)
6370cc3bbd8a0f9 Aleksandr Nogikh 2020-10-29 4614 {
6370cc3bbd8a0f9 Aleksandr Nogikh 2020-10-29 4615 /* Do not allocate skb extensions
only to set kcov_handle to zero
6370cc3bbd8a0f9 Aleksandr Nogikh 2020-10-29 4616 * (as it is zero by default).
However, if the extensions are
6370cc3bbd8a0f9 Aleksandr Nogikh 2020-10-29 4617 * already allocated, update
kcov_handle anyway since
6370cc3bbd8a0f9 Aleksandr Nogikh 2020-10-29 4618 * skb_set_kcov_handle can be called
to zero a previously set
6370cc3bbd8a0f9 Aleksandr Nogikh 2020-10-29 4619 * value.
6370cc3bbd8a0f9 Aleksandr Nogikh 2020-10-29 4620 */
6370cc3bbd8a0f9 Aleksandr Nogikh 2020-10-29 4621 if (skb_has_extensions(skb) ||
kcov_handle) {
6370cc3bbd8a0f9 Aleksandr Nogikh 2020-10-29 @4622 u64 *kcov_handle_ptr =
skb_ext_add(skb, SKB_EXT_KCOV_HANDLE);
6370cc3bbd8a0f9 Aleksandr Nogikh 2020-10-29 4623
6370cc3bbd8a0f9 Aleksandr Nogikh 2020-10-29 4624 if (kcov_handle_ptr)
6370cc3bbd8a0f9 Aleksandr Nogikh 2020-10-29 4625 *kcov_handle_ptr = kcov_handle;
6370cc3bbd8a0f9 Aleksandr Nogikh 2020-10-29 4626 }
6370cc3bbd8a0f9 Aleksandr Nogikh 2020-10-29 4627 }
6370cc3bbd8a0f9 Aleksandr Nogikh 2020-10-29 4628
6370cc3bbd8a0f9 Aleksandr Nogikh 2020-10-29 4629 static inline u64
skb_get_kcov_handle(struct sk_buff *skb)
6370cc3bbd8a0f9 Aleksandr Nogikh 2020-10-29 4630 {
6370cc3bbd8a0f9 Aleksandr Nogikh 2020-10-29 @4631 u64 *kcov_handle = skb_ext_find(skb,
SKB_EXT_KCOV_HANDLE);
6370cc3bbd8a0f9 Aleksandr Nogikh 2020-10-29 4632
6370cc3bbd8a0f9 Aleksandr Nogikh 2020-10-29 4633 return kcov_handle ? *kcov_handle :
0;
6370cc3bbd8a0f9 Aleksandr Nogikh 2020-10-29 4634 }
6370cc3bbd8a0f9 Aleksandr Nogikh 2020-10-29 4635 #else
6370cc3bbd8a0f9 Aleksandr Nogikh 2020-10-29 4636 static inline void
skb_set_kcov_handle(struct sk_buff *skb,
6370cc3bbd8a0f9 Aleksandr Nogikh 2020-10-29 4637 const u64 kcov_handle) { }
6370cc3bbd8a0f9 Aleksandr Nogikh 2020-10-29 4638 static inline u64
skb_get_kcov_handle(struct sk_buff *skb) { return 0; }
6370cc3bbd8a0f9 Aleksandr Nogikh 2020-10-29 4639 #endif /* CONFIG_KCOV */
6370cc3bbd8a0f9 Aleksandr Nogikh 2020-10-29 4640
:::::: The code at line 4622 was first introduced by commit
:::::: 6370cc3bbd8a0f9bf975b013781243ab147876c6 net: add kcov handle to skb extensions
:::::: TO: Aleksandr Nogikh <nogikh(a)google.com>
:::::: CC: Jakub Kicinski <kuba(a)kernel.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org