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>] [day] [month] [year] [list]
Date:   Mon, 1 Mar 2021 09:03:13 +0800
From:   kernel test robot <lkp@...el.com>
To:     Vlad Buslov <vladbu@...dia.com>
Cc:     kbuild-all@...ts.01.org, clang-built-linux@...glegroups.com,
        linux-kernel@...r.kernel.org, Saeed Mahameed <saeedm@...dia.com>,
        Dmytro Linkin <dlinkin@...dia.com>, Roi Dayan <roid@...dia.com>
Subject: drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_encap.c:1510:12:
 error: implicit declaration of function 'fib_info_nh'

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   06d5d309a3f17e32cd59926f391db1e1ea652184
commit: 8914add2c9e5518f6a864936658bba5752510b39 net/mlx5e: Handle FIB events to update tunnel endpoint device
date:   3 weeks ago
config: powerpc-randconfig-r004-20210301 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project b077d82b00d81934c7c27ac89dd8b0e7f448bded)
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://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=8914add2c9e5518f6a864936658bba5752510b39
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout 8914add2c9e5518f6a864936658bba5752510b39
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>

All errors (new ones prefixed by >>):

   In file included from drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_encap.c:5:
   In file included from drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_encap.h:7:
   In file included from drivers/net/ethernet/mellanox/mlx5/core/en/tc_priv.h:7:
   In file included from drivers/net/ethernet/mellanox/mlx5/core/en_tc.h:40:
   drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.h:78:5: warning: no previous prototype for function 'mlx5e_tc_tun_update_header_ipv6' [-Wmissing-prototypes]
   int mlx5e_tc_tun_update_header_ipv6(struct mlx5e_priv *priv,
       ^
   drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.h:78:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   int mlx5e_tc_tun_update_header_ipv6(struct mlx5e_priv *priv,
   ^
   static 
>> drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_encap.c:1510:12: error: implicit declaration of function 'fib_info_nh' [-Werror,-Wimplicit-function-declaration]
           fib_dev = fib_info_nh(fen_info->fi, 0)->fib_nh_dev;
                     ^
   drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_encap.c:1510:12: note: did you mean 'fib_info_put'?
   include/net/ip_fib.h:528:20: note: 'fib_info_put' declared here
   static inline void fib_info_put(struct fib_info *fi)
                      ^
>> drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_encap.c:1510:42: error: member reference type 'int' is not a pointer
           fib_dev = fib_info_nh(fen_info->fi, 0)->fib_nh_dev;
                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~  ^
   include/net/ip_fib.h:113:21: note: expanded from macro 'fib_nh_dev'
   #define fib_nh_dev              nh_common.nhc_dev
                                   ^
>> drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_encap.c:1552:13: error: incomplete definition of type 'struct fib6_entry_notifier_info'
           fen_info = container_of(info, struct fib6_entry_notifier_info, info);
                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/kernel.h:694:51: note: expanded from macro 'container_of'
           BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) &&   \
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
   include/linux/compiler_types.h:256:74: note: expanded from macro '__same_type'
   #define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b))
                                                                            ^
   include/linux/build_bug.h:39:58: note: expanded from macro 'BUILD_BUG_ON_MSG'
   #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
                                       ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
   include/linux/compiler_types.h:320:22: note: expanded from macro 'compiletime_assert'
           _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
           ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/compiler_types.h:308:23: note: expanded from macro '_compiletime_assert'
           __compiletime_assert(condition, msg, prefix, suffix)
           ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/compiler_types.h:300:9: note: expanded from macro '__compiletime_assert'
                   if (!(condition))                                       \
                         ^~~~~~~~~
   drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_encap.c:1546:9: note: forward declaration of 'struct fib6_entry_notifier_info'
           struct fib6_entry_notifier_info *fen_info;
                  ^
>> drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_encap.c:1552:13: error: offsetof of incomplete type 'struct fib6_entry_notifier_info'
           fen_info = container_of(info, struct fib6_entry_notifier_info, info);
                      ^                  ~~~~~~
   include/linux/kernel.h:697:21: note: expanded from macro 'container_of'
           ((type *)(__mptr - offsetof(type, member))); })
                              ^        ~~~~
   include/linux/stddef.h:17:32: note: expanded from macro 'offsetof'
   #define offsetof(TYPE, MEMBER)  __compiler_offsetof(TYPE, MEMBER)
                                   ^                   ~~~~
   include/linux/compiler_types.h:140:35: note: expanded from macro '__compiler_offsetof'
   #define __compiler_offsetof(a, b)       __builtin_offsetof(a, b)
                                           ^                  ~
   drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_encap.c:1546:9: note: forward declaration of 'struct fib6_entry_notifier_info'
           struct fib6_entry_notifier_info *fen_info;
                  ^
>> drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_encap.c:1552:11: error: assigning to 'struct fib6_entry_notifier_info *' from incompatible type 'void'
           fen_info = container_of(info, struct fib6_entry_notifier_info, info);
                    ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_encap.c:1553:12: error: implicit declaration of function 'fib6_info_nh_dev' [-Werror,-Wimplicit-function-declaration]
           fib_dev = fib6_info_nh_dev(fen_info->rt);
                     ^
   drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_encap.c:1553:37: error: incomplete definition of type 'struct fib6_entry_notifier_info'
           fib_dev = fib6_info_nh_dev(fen_info->rt);
                                      ~~~~~~~~^
   drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_encap.c:1546:9: note: forward declaration of 'struct fib6_entry_notifier_info'
           struct fib6_entry_notifier_info *fen_info;
                  ^
   drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_encap.c:1555:14: error: incomplete definition of type 'struct fib6_entry_notifier_info'
               fen_info->rt->fib6_dst.plen != 128)
               ~~~~~~~~^
   drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_encap.c:1546:9: note: forward declaration of 'struct fib6_entry_notifier_info'
           struct fib6_entry_notifier_info *fen_info;
                  ^
   drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_encap.c:1562:39: error: incomplete definition of type 'struct fib6_entry_notifier_info'
           memcpy(&key.endpoint_ip.v6, &fen_info->rt->fib6_dst.addr,
                                        ~~~~~~~~^
   drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_encap.c:1546:9: note: forward declaration of 'struct fib6_entry_notifier_info'
           struct fib6_entry_notifier_info *fen_info;
                  ^
   drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_encap.c:1563:24: error: incomplete definition of type 'struct fib6_entry_notifier_info'
                  sizeof(fen_info->rt->fib6_dst.addr));
                         ~~~~~~~~^
   drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_encap.c:1546:9: note: forward declaration of 'struct fib6_entry_notifier_info'
           struct fib6_entry_notifier_info *fen_info;
                  ^
   1 warning and 10 errors generated.


vim +/fib_info_nh +1510 drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_encap.c

  1495	
  1496	static struct mlx5e_tc_fib_event_data *
  1497	mlx5e_init_fib_work_ipv4(struct mlx5e_priv *priv,
  1498				 struct net_device *ul_dev,
  1499				 struct mlx5e_tc_tun_encap *encap,
  1500				 unsigned long event,
  1501				 struct fib_notifier_info *info)
  1502	{
  1503		struct fib_entry_notifier_info *fen_info;
  1504		struct mlx5e_tc_fib_event_data *fib_work;
  1505		struct mlx5e_route_entry *r;
  1506		struct mlx5e_route_key key;
  1507		struct net_device *fib_dev;
  1508	
  1509		fen_info = container_of(info, struct fib_entry_notifier_info, info);
> 1510		fib_dev = fib_info_nh(fen_info->fi, 0)->fib_nh_dev;
  1511		if (fib_dev->netdev_ops != &mlx5e_netdev_ops ||
  1512		    fen_info->dst_len != 32)
  1513			return NULL;
  1514	
  1515		fib_work = mlx5e_tc_init_fib_work(event, ul_dev, GFP_ATOMIC);
  1516		if (!fib_work)
  1517			return ERR_PTR(-ENOMEM);
  1518	
  1519		key.endpoint_ip.v4 = htonl(fen_info->dst);
  1520		key.ip_version = 4;
  1521	
  1522		/* Can't fail after this point because releasing reference to r
  1523		 * requires obtaining sleeping mutex which we can't do in atomic
  1524		 * context.
  1525		 */
  1526		r = mlx5e_route_lookup_for_update(encap, &key);
  1527		if (!r)
  1528			goto out;
  1529		fib_work->r = r;
  1530		dev_hold(ul_dev);
  1531	
  1532		return fib_work;
  1533	
  1534	out:
  1535		kfree(fib_work);
  1536		return NULL;
  1537	}
  1538	
  1539	static struct mlx5e_tc_fib_event_data *
  1540	mlx5e_init_fib_work_ipv6(struct mlx5e_priv *priv,
  1541				 struct net_device *ul_dev,
  1542				 struct mlx5e_tc_tun_encap *encap,
  1543				 unsigned long event,
  1544				 struct fib_notifier_info *info)
  1545	{
  1546		struct fib6_entry_notifier_info *fen_info;
  1547		struct mlx5e_tc_fib_event_data *fib_work;
  1548		struct mlx5e_route_entry *r;
  1549		struct mlx5e_route_key key;
  1550		struct net_device *fib_dev;
  1551	
> 1552		fen_info = container_of(info, struct fib6_entry_notifier_info, info);
> 1553		fib_dev = fib6_info_nh_dev(fen_info->rt);
  1554		if (fib_dev->netdev_ops != &mlx5e_netdev_ops ||
  1555		    fen_info->rt->fib6_dst.plen != 128)
  1556			return NULL;
  1557	
  1558		fib_work = mlx5e_tc_init_fib_work(event, ul_dev, GFP_ATOMIC);
  1559		if (!fib_work)
  1560			return ERR_PTR(-ENOMEM);
  1561	
  1562		memcpy(&key.endpoint_ip.v6, &fen_info->rt->fib6_dst.addr,
  1563		       sizeof(fen_info->rt->fib6_dst.addr));
  1564		key.ip_version = 6;
  1565	
  1566		/* Can't fail after this point because releasing reference to r
  1567		 * requires obtaining sleeping mutex which we can't do in atomic
  1568		 * context.
  1569		 */
  1570		r = mlx5e_route_lookup_for_update(encap, &key);
  1571		if (!r)
  1572			goto out;
  1573		fib_work->r = r;
  1574		dev_hold(ul_dev);
  1575	
  1576		return fib_work;
  1577	
  1578	out:
  1579		kfree(fib_work);
  1580		return NULL;
  1581	}
  1582	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ