lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <201903011150.QPf3aT1p%fengguang.wu@intel.com>
Date:   Fri, 1 Mar 2019 11:07:06 +0800
From:   kbuild test robot <lkp@...el.com>
To:     Toke Høiland-Jørgensen <toke@...hat.com>
Cc:     kbuild-all@...org, David Miller <davem@...emloft.net>,
        netdev@...r.kernel.org, Jesper Dangaard Brouer <brouer@...hat.com>,
        Daniel Borkmann <daniel@...earbox.net>,
        Alexei Starovoitov <ast@...nel.org>,
        Jakub Kicinski <jakub.kicinski@...ronome.com>
Subject: Re: [PATCH net-next v2 3/3] xdp: Add devmap_idx map type for looking
 up devices by ifindex

Hi Toke,

I love your patch! Yet something to improve:

[auto build test ERROR on net-next/master]

url:    https://github.com/0day-ci/linux/commits/Toke-H-iland-J-rgensen/xdp-Use-a-default-map-for-xdp_redirect-helper/20190301-021039
config: powerpc-acadia_defconfig (attached as .config)
compiler: powerpc-linux-gnu-gcc (Debian 8.2.0-11) 8.2.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        GCC_VERSION=8.2.0 make.cross ARCH=powerpc 

All errors (new ones prefixed by >>):

   In file included from include/linux/bpf-cgroup.h:5,
                    from include/linux/cgroup-defs.h:22,
                    from include/linux/cgroup.h:28,
                    from include/net/netprio_cgroup.h:17,
                    from include/linux/netdevice.h:46,
                    from include/net/sock.h:51,
                    from include/linux/sock_diag.h:8,
                    from net//core/filter.c:29:
   include/linux/bpf.h: In function 'dev_map_inc_redirect_count':
   include/linux/bpf.h:731:1: warning: no return statement in function returning non-void [-Wreturn-type]
    }
    ^
   include/linux/bpf.h: At top level:
   include/linux/bpf.h:738:13: warning: 'struct bpf_dtab_netdev' declared inside parameter list will not be visible outside of this definition or declaration
         struct bpf_dtab_netdev *dst)
                ^~~~~~~~~~~~~~~
   net//core/filter.c: In function '__bpf_tx_xdp_map':
>> net//core/filter.c:3355:29: error: passing argument 2 of '__dev_map_insert_ctx' from incompatible pointer type [-Werror=incompatible-pointer-types]
      __dev_map_insert_ctx(map, dst);
                                ^~~
   In file included from include/linux/bpf-cgroup.h:5,
                    from include/linux/cgroup-defs.h:22,
                    from include/linux/cgroup.h:28,
                    from include/net/netprio_cgroup.h:17,
                    from include/linux/netdevice.h:46,
                    from include/net/sock.h:51,
                    from include/linux/sock_diag.h:8,
                    from net//core/filter.c:29:
   include/linux/bpf.h:738:30: note: expected 'struct bpf_dtab_netdev *' but argument is of type 'struct bpf_dtab_netdev *'
         struct bpf_dtab_netdev *dst)
         ~~~~~~~~~~~~~~~~~~~~~~~~^~~
   cc1: some warnings being treated as errors

vim +/__dev_map_insert_ctx +3355 net//core/filter.c

  3339	
  3340	static int __bpf_tx_xdp_map(struct net_device *dev_rx, void *fwd,
  3341				    struct bpf_map *map,
  3342				    struct xdp_buff *xdp,
  3343				    u32 index)
  3344	{
  3345		int err;
  3346	
  3347		switch (map->map_type) {
  3348		case BPF_MAP_TYPE_DEVMAP:
  3349		case BPF_MAP_TYPE_DEVMAP_IDX: {
  3350			struct bpf_dtab_netdev *dst = fwd;
  3351	
  3352			err = dev_map_enqueue(dst, xdp, dev_rx);
  3353			if (unlikely(err))
  3354				return err;
> 3355			__dev_map_insert_ctx(map, dst);
  3356			break;
  3357		}
  3358		case BPF_MAP_TYPE_CPUMAP: {
  3359			struct bpf_cpu_map_entry *rcpu = fwd;
  3360	
  3361			err = cpu_map_enqueue(rcpu, xdp, dev_rx);
  3362			if (unlikely(err))
  3363				return err;
  3364			__cpu_map_insert_ctx(map, index);
  3365			break;
  3366		}
  3367		case BPF_MAP_TYPE_XSKMAP: {
  3368			struct xdp_sock *xs = fwd;
  3369	
  3370			err = __xsk_map_redirect(map, xdp, xs);
  3371			return err;
  3372		}
  3373		default:
  3374			break;
  3375		}
  3376		return 0;
  3377	}
  3378	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Download attachment ".config.gz" of type "application/gzip" (11789 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ