Hi Kumar, [FYI, it's a private test report for your RFC patch.] [auto build test ERROR on bpf-next/master] url: https://github.com/0day-ci/linux/commits/Kumar-Kartikeya-Dwivedi/Add-bpf_link-based-TC-BPF-API/20210529-040147 base: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master config: s390-randconfig-r025-20210528 (attached as .config) compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 6505c630407c5feec818f0bb1c284f9eeebf2071) 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://github.com/0day-ci/linux/commit/7f3d2ad7de9869028e50b1749a8144ccb75a76b8 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Kumar-Kartikeya-Dwivedi/Add-bpf_link-based-TC-BPF-API/20210529-040147 git checkout 7f3d2ad7de9869028e50b1749a8144ccb75a76b8 # 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 All errors (new ones prefixed by >>): In file included from net/sched/cls_bpf.c:14: 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:75: include/asm-generic/io.h:464:31: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] val = __raw_readb(PCI_IOBASE + addr); ~~~~~~~~~~ ^ include/asm-generic/io.h:477:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] val = __le16_to_cpu((__le16 __force)__raw_readw(PCI_IOBASE + addr)); ~~~~~~~~~~ ^ include/uapi/linux/byteorder/big_endian.h:36:59: note: expanded from macro '__le16_to_cpu' #define __le16_to_cpu(x) __swab16((__force __u16)(__le16)(x)) ^ include/uapi/linux/swab.h:102:54: note: expanded from macro '__swab16' #define __swab16(x) (__u16)__builtin_bswap16((__u16)(x)) ^ In file included from net/sched/cls_bpf.c:14: 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:75: 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:115:54: note: expanded from macro '__swab32' #define __swab32(x) (__u32)__builtin_bswap32((__u32)(x)) ^ In file included from net/sched/cls_bpf.c:14: 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:75: 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); ~~~~~~~~~~ ^ >> net/sched/cls_bpf.c:921:13: error: no member named 'net' in 'struct tcf_exts' prog->exts.net = net; ~~~~~~~~~~ ^ 12 warnings and 1 error generated. vim +921 net/sched/cls_bpf.c 873 874 static int cls_bpf_link_change(struct net *net, struct tcf_proto *tp, 875 struct bpf_prog *filter, void **arg, 876 u32 handle, u32 gen_flags) 877 { 878 struct cls_bpf_head *head = rtnl_dereference(tp->root); 879 struct cls_bpf_prog *oldprog = *arg, *prog; 880 struct bpf_link_primer primer; 881 struct cls_bpf_link *link; 882 int ret; 883 884 if (gen_flags & ~CLS_BPF_SUPPORTED_GEN_FLAGS) 885 return -EINVAL; 886 887 if (oldprog) 888 return -EEXIST; 889 890 prog = kzalloc(sizeof(*prog), GFP_KERNEL); 891 if (!prog) 892 return -ENOMEM; 893 894 link = kzalloc(sizeof(*link), GFP_KERNEL); 895 if (!link) { 896 ret = -ENOMEM; 897 goto err_prog; 898 } 899 900 bpf_link_init(&link->link, BPF_LINK_TYPE_TC, &cls_bpf_link_ops, 901 filter); 902 903 ret = bpf_link_prime(&link->link, &primer); 904 if (ret < 0) 905 goto err_link; 906 907 /* We don't init exts to save on memory, but we still need to store the 908 * net_ns pointer, as during delete whether the deletion work will be 909 * queued or executed inline depends on the refcount of net_ns. In 910 * __cls_bpf_delete the reference is taken to keep the action IDR alive 911 * (which we don't require), but its maybe_get_net also allows us to 912 * detect whether we are being invoked in netns destruction path or not. 913 * In the former case deletion will have to be done synchronously. 914 * 915 * Leaving it NULL would prevent us from doing deletion work 916 * asynchronously, so set it here. 917 * 918 * On the tcf_classify side, exts->actions are not touched for 919 * exts_integrated progs, so we should be good. 920 */ > 921 prog->exts.net = net; 922 923 ret = __cls_bpf_alloc_idr(head, handle, prog, oldprog); 924 if (ret < 0) 925 goto err_primer; 926 927 prog->exts_integrated = true; 928 prog->bpf_link = link; 929 prog->filter = filter; 930 prog->tp = tp; 931 link->prog = prog; 932 933 prog->bpf_name = cls_bpf_link_name(filter->aux->id, filter->aux->name); 934 if (!prog->bpf_name) { 935 ret = -ENOMEM; 936 goto err_idr; 937 } 938 939 ret = __cls_bpf_change(head, tp, prog, oldprog, NULL); 940 if (ret < 0) 941 goto err_name; 942 943 bpf_prog_inc(filter); 944 945 if (filter->dst_needed) 946 tcf_block_netif_keep_dst(tp->chain->block); 947 948 return bpf_link_settle(&primer); 949 950 err_name: 951 kfree(prog->bpf_name); 952 err_idr: 953 idr_remove(&head->handle_idr, prog->handle); 954 err_primer: 955 bpf_link_cleanup(&primer); 956 err_link: 957 kfree(link); 958 err_prog: 959 kfree(prog); 960 return ret; 961 } 962 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org