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]
Date:   Sun, 29 Jan 2023 23:44:33 +0800
From:   kernel test robot <lkp@...el.com>
To:     Leon Romanovsky <leon@...nel.org>,
        "David S . Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>
Cc:     llvm@...ts.linux.dev, oe-kbuild-all@...ts.linux.dev,
        Leon Romanovsky <leonro@...dia.com>,
        Andrew Lunn <andrew@...n.ch>,
        bridge@...ts.linux-foundation.org,
        Eric Dumazet <edumazet@...gle.com>,
        Florian Fainelli <f.fainelli@...il.com>,
        Herbert Xu <herbert@...dor.apana.org.au>,
        netdev@...r.kernel.org, Nikolay Aleksandrov <razor@...ckwall.org>,
        Paolo Abeni <pabeni@...hat.com>,
        Roopa Prabhu <roopa@...dia.com>,
        Steffen Klassert <steffen.klassert@...unet.com>,
        Vladimir Oltean <olteanv@...il.com>
Subject: Re: [PATCH net-next v1] netlink: provide an ability to set default
 extack message

Hi Leon,

I love your patch! Yet something to improve:

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

url:    https://github.com/intel-lab-lkp/linux/commits/Leon-Romanovsky/netlink-provide-an-ability-to-set-default-extack-message/20230129-203242
patch link:    https://lore.kernel.org/r/d4843760219f20367c27472f084bd8aa729cf321.1674995155.git.leon%40kernel.org
patch subject: [PATCH net-next v1] netlink: provide an ability to set default extack message
config: x86_64-rhel-8.3-rust (https://download.01.org/0day-ci/archive/20230129/202301292320.pYrX8egS-lkp@intel.com/config)
compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project f28c006a5895fc0e329fe15fead81e37457cb1d1)
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
        # https://github.com/intel-lab-lkp/linux/commit/f0b11fb09eb6708058858b0cf95d1fec34eba956
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Leon-Romanovsky/netlink-provide-an-ability-to-set-default-extack-message/20230129-203242
        git checkout f0b11fb09eb6708058858b0cf95d1fec34eba956
        # 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=x86_64 olddefconfig
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash net/bridge/

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

All errors (new ones prefixed by >>):

>> net/bridge/br_switchdev.c:107:3: error: called object type 'char[9]' is not a function or function pointer
                   NL_SET_ERR_MSG_WEAK_MOD(extack,
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/netlink.h:140:32: note: expanded from macro 'NL_SET_ERR_MSG_WEAK_MOD'
                   NL_SET_ERR_MSG_MOD((extack), (msg));    \
                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
   include/linux/netlink.h:128:47: note: expanded from macro 'NL_SET_ERR_MSG_MOD'
           NL_SET_ERR_MSG((extack), KBUILD_MODNAME ": " msg)
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
   include/linux/netlink.h:99:30: note: expanded from macro 'NL_SET_ERR_MSG'
           static const char __msg[] = msg;                \
                                       ^~~
   net/bridge/br_switchdev.c:117:3: error: called object type 'char[9]' is not a function or function pointer
                   NL_SET_ERR_MSG_WEAK_MOD(extack,
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/netlink.h:140:32: note: expanded from macro 'NL_SET_ERR_MSG_WEAK_MOD'
                   NL_SET_ERR_MSG_MOD((extack), (msg));    \
                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
   include/linux/netlink.h:128:47: note: expanded from macro 'NL_SET_ERR_MSG_MOD'
           NL_SET_ERR_MSG((extack), KBUILD_MODNAME ": " msg)
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
   include/linux/netlink.h:99:30: note: expanded from macro 'NL_SET_ERR_MSG'
           static const char __msg[] = msg;                \
                                       ^~~
   2 errors generated.


vim +107 net/bridge/br_switchdev.c

    72	
    73	/* Flags that can be offloaded to hardware */
    74	#define BR_PORT_FLAGS_HW_OFFLOAD (BR_LEARNING | BR_FLOOD | BR_PORT_MAB | \
    75					  BR_MCAST_FLOOD | BR_BCAST_FLOOD | BR_PORT_LOCKED | \
    76					  BR_HAIRPIN_MODE | BR_ISOLATED | BR_MULTICAST_TO_UNICAST)
    77	
    78	int br_switchdev_set_port_flag(struct net_bridge_port *p,
    79				       unsigned long flags,
    80				       unsigned long mask,
    81				       struct netlink_ext_ack *extack)
    82	{
    83		struct switchdev_attr attr = {
    84			.orig_dev = p->dev,
    85		};
    86		struct switchdev_notifier_port_attr_info info = {
    87			.attr = &attr,
    88		};
    89		int err;
    90	
    91		mask &= BR_PORT_FLAGS_HW_OFFLOAD;
    92		if (!mask)
    93			return 0;
    94	
    95		attr.id = SWITCHDEV_ATTR_ID_PORT_PRE_BRIDGE_FLAGS;
    96		attr.u.brport_flags.val = flags;
    97		attr.u.brport_flags.mask = mask;
    98	
    99		/* We run from atomic context here */
   100		err = call_switchdev_notifiers(SWITCHDEV_PORT_ATTR_SET, p->dev,
   101					       &info.info, extack);
   102		err = notifier_to_errno(err);
   103		if (err == -EOPNOTSUPP)
   104			return 0;
   105	
   106		if (err) {
 > 107			NL_SET_ERR_MSG_WEAK_MOD(extack,
   108						"bridge flag offload is not supported");
   109			return -EOPNOTSUPP;
   110		}
   111	
   112		attr.id = SWITCHDEV_ATTR_ID_PORT_BRIDGE_FLAGS;
   113		attr.flags = SWITCHDEV_F_DEFER;
   114	
   115		err = switchdev_port_attr_set(p->dev, &attr, extack);
   116		if (err) {
   117			NL_SET_ERR_MSG_WEAK_MOD(extack,
   118						"error setting offload flag on port");
   119			return err;
   120		}
   121	
   122		return 0;
   123	}
   124	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ