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] [thread-next>] [day] [month] [year] [list]
Message-ID: <202601232124.fqzsosEi-lkp@intel.com>
Date: Fri, 23 Jan 2026 21:22:09 +0800
From: kernel test robot <lkp@...el.com>
To: Ratheesh Kannoth <rkannoth@...vell.com>, netdev@...r.kernel.org,
	linux-kernel@...r.kernel.org
Cc: oe-kbuild-all@...ts.linux.dev, sgoutham@...vell.com,
	davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org,
	pabeni@...hat.com, andrew+netdev@...n.ch,
	Saeed Mahameed <saeedm@...dia.com>,
	Ratheesh Kannoth <rkannoth@...vell.com>
Subject: Re: [PATCH net-next] devlink: Implement devlink param multi
 attribute nested data values

Hi Ratheesh,

kernel test robot noticed the following build warnings:

[auto build test WARNING on net-next/main]

url:    https://github.com/intel-lab-lkp/linux/commits/Ratheesh-Kannoth/devlink-Implement-devlink-param-multi-attribute-nested-data-values/20260123-145646
base:   net-next/main
patch link:    https://lore.kernel.org/r/20260123065257.2993735-1-rkannoth%40marvell.com
patch subject: [PATCH net-next] devlink: Implement devlink param multi attribute nested data values
config: arc-allmodconfig (https://download.01.org/0day-ci/archive/20260123/202601232124.fqzsosEi-lkp@intel.com/config)
compiler: arc-linux-gcc (GCC) 15.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260123/202601232124.fqzsosEi-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202601232124.fqzsosEi-lkp@intel.com/

All warnings (new ones prefixed by >>):

   net/devlink/param.c: In function 'devlink_nl_param_fill.constprop':
>> net/devlink/param.c:410:1: warning: the frame size of 1300 bytes is larger than 1280 bytes [-Wframe-larger-than=]
     410 | }
         | ^


vim +410 net/devlink/param.c

830c41e1e987d9 Jiri Pirko   2023-08-28  304  
830c41e1e987d9 Jiri Pirko   2023-08-28  305  static int devlink_nl_param_fill(struct sk_buff *msg, struct devlink *devlink,
830c41e1e987d9 Jiri Pirko   2023-08-28  306  				 unsigned int port_index,
830c41e1e987d9 Jiri Pirko   2023-08-28  307  				 struct devlink_param_item *param_item,
830c41e1e987d9 Jiri Pirko   2023-08-28  308  				 enum devlink_command cmd,
011d133bb988f8 Daniel Zahka 2025-11-18  309  				 u32 portid, u32 seq, int flags,
011d133bb988f8 Daniel Zahka 2025-11-18  310  				 struct netlink_ext_ack *extack)
830c41e1e987d9 Jiri Pirko   2023-08-28  311  {
2a367002ed321e Daniel Zahka 2025-11-18  312  	union devlink_param_value default_value[DEVLINK_PARAM_CMODE_MAX + 1];
830c41e1e987d9 Jiri Pirko   2023-08-28  313  	union devlink_param_value param_value[DEVLINK_PARAM_CMODE_MAX + 1];
2a367002ed321e Daniel Zahka 2025-11-18  314  	bool default_value_set[DEVLINK_PARAM_CMODE_MAX + 1] = {};
830c41e1e987d9 Jiri Pirko   2023-08-28  315  	bool param_value_set[DEVLINK_PARAM_CMODE_MAX + 1] = {};
830c41e1e987d9 Jiri Pirko   2023-08-28  316  	const struct devlink_param *param = param_item->param;
830c41e1e987d9 Jiri Pirko   2023-08-28  317  	struct devlink_param_gset_ctx ctx;
830c41e1e987d9 Jiri Pirko   2023-08-28  318  	struct nlattr *param_values_list;
830c41e1e987d9 Jiri Pirko   2023-08-28  319  	struct nlattr *param_attr;
830c41e1e987d9 Jiri Pirko   2023-08-28  320  	void *hdr;
830c41e1e987d9 Jiri Pirko   2023-08-28  321  	int err;
830c41e1e987d9 Jiri Pirko   2023-08-28  322  	int i;
830c41e1e987d9 Jiri Pirko   2023-08-28  323  
830c41e1e987d9 Jiri Pirko   2023-08-28  324  	/* Get value from driver part to driverinit configuration mode */
830c41e1e987d9 Jiri Pirko   2023-08-28  325  	for (i = 0; i <= DEVLINK_PARAM_CMODE_MAX; i++) {
830c41e1e987d9 Jiri Pirko   2023-08-28  326  		if (!devlink_param_cmode_is_supported(param, i))
830c41e1e987d9 Jiri Pirko   2023-08-28  327  			continue;
830c41e1e987d9 Jiri Pirko   2023-08-28  328  		if (i == DEVLINK_PARAM_CMODE_DRIVERINIT) {
830c41e1e987d9 Jiri Pirko   2023-08-28  329  			if (param_item->driverinit_value_new_valid)
830c41e1e987d9 Jiri Pirko   2023-08-28  330  				param_value[i] = param_item->driverinit_value_new;
830c41e1e987d9 Jiri Pirko   2023-08-28  331  			else if (param_item->driverinit_value_valid)
830c41e1e987d9 Jiri Pirko   2023-08-28  332  				param_value[i] = param_item->driverinit_value;
830c41e1e987d9 Jiri Pirko   2023-08-28  333  			else
830c41e1e987d9 Jiri Pirko   2023-08-28  334  				return -EOPNOTSUPP;
2a367002ed321e Daniel Zahka 2025-11-18  335  
2a367002ed321e Daniel Zahka 2025-11-18  336  			if (param_item->driverinit_value_valid) {
2a367002ed321e Daniel Zahka 2025-11-18  337  				default_value[i] = param_item->driverinit_default;
2a367002ed321e Daniel Zahka 2025-11-18  338  				default_value_set[i] = true;
2a367002ed321e Daniel Zahka 2025-11-18  339  			}
830c41e1e987d9 Jiri Pirko   2023-08-28  340  		} else {
830c41e1e987d9 Jiri Pirko   2023-08-28  341  			ctx.cmode = i;
011d133bb988f8 Daniel Zahka 2025-11-18  342  			err = devlink_param_get(devlink, param, &ctx, extack);
830c41e1e987d9 Jiri Pirko   2023-08-28  343  			if (err)
830c41e1e987d9 Jiri Pirko   2023-08-28  344  				return err;
830c41e1e987d9 Jiri Pirko   2023-08-28  345  			param_value[i] = ctx.val;
2a367002ed321e Daniel Zahka 2025-11-18  346  
2a367002ed321e Daniel Zahka 2025-11-18  347  			err = devlink_param_get_default(devlink, param, &ctx,
2a367002ed321e Daniel Zahka 2025-11-18  348  							extack);
2a367002ed321e Daniel Zahka 2025-11-18  349  			if (!err) {
2a367002ed321e Daniel Zahka 2025-11-18  350  				default_value[i] = ctx.val;
2a367002ed321e Daniel Zahka 2025-11-18  351  				default_value_set[i] = true;
2a367002ed321e Daniel Zahka 2025-11-18  352  			} else if (err != -EOPNOTSUPP) {
2a367002ed321e Daniel Zahka 2025-11-18  353  				return err;
2a367002ed321e Daniel Zahka 2025-11-18  354  			}
830c41e1e987d9 Jiri Pirko   2023-08-28  355  		}
830c41e1e987d9 Jiri Pirko   2023-08-28  356  		param_value_set[i] = true;
830c41e1e987d9 Jiri Pirko   2023-08-28  357  	}
830c41e1e987d9 Jiri Pirko   2023-08-28  358  
830c41e1e987d9 Jiri Pirko   2023-08-28  359  	hdr = genlmsg_put(msg, portid, seq, &devlink_nl_family, flags, cmd);
830c41e1e987d9 Jiri Pirko   2023-08-28  360  	if (!hdr)
830c41e1e987d9 Jiri Pirko   2023-08-28  361  		return -EMSGSIZE;
830c41e1e987d9 Jiri Pirko   2023-08-28  362  
830c41e1e987d9 Jiri Pirko   2023-08-28  363  	if (devlink_nl_put_handle(msg, devlink))
830c41e1e987d9 Jiri Pirko   2023-08-28  364  		goto genlmsg_cancel;
830c41e1e987d9 Jiri Pirko   2023-08-28  365  
830c41e1e987d9 Jiri Pirko   2023-08-28  366  	if (cmd == DEVLINK_CMD_PORT_PARAM_GET ||
830c41e1e987d9 Jiri Pirko   2023-08-28  367  	    cmd == DEVLINK_CMD_PORT_PARAM_NEW ||
830c41e1e987d9 Jiri Pirko   2023-08-28  368  	    cmd == DEVLINK_CMD_PORT_PARAM_DEL)
830c41e1e987d9 Jiri Pirko   2023-08-28  369  		if (nla_put_u32(msg, DEVLINK_ATTR_PORT_INDEX, port_index))
830c41e1e987d9 Jiri Pirko   2023-08-28  370  			goto genlmsg_cancel;
830c41e1e987d9 Jiri Pirko   2023-08-28  371  
830c41e1e987d9 Jiri Pirko   2023-08-28  372  	param_attr = nla_nest_start_noflag(msg, DEVLINK_ATTR_PARAM);
830c41e1e987d9 Jiri Pirko   2023-08-28  373  	if (!param_attr)
830c41e1e987d9 Jiri Pirko   2023-08-28  374  		goto genlmsg_cancel;
830c41e1e987d9 Jiri Pirko   2023-08-28  375  	if (nla_put_string(msg, DEVLINK_ATTR_PARAM_NAME, param->name))
830c41e1e987d9 Jiri Pirko   2023-08-28  376  		goto param_nest_cancel;
830c41e1e987d9 Jiri Pirko   2023-08-28  377  	if (param->generic && nla_put_flag(msg, DEVLINK_ATTR_PARAM_GENERIC))
830c41e1e987d9 Jiri Pirko   2023-08-28  378  		goto param_nest_cancel;
f9e78932eac650 Jiri Pirko   2025-05-05  379  	if (nla_put_u8(msg, DEVLINK_ATTR_PARAM_TYPE, param->type))
830c41e1e987d9 Jiri Pirko   2023-08-28  380  		goto param_nest_cancel;
830c41e1e987d9 Jiri Pirko   2023-08-28  381  
830c41e1e987d9 Jiri Pirko   2023-08-28  382  	param_values_list = nla_nest_start_noflag(msg,
830c41e1e987d9 Jiri Pirko   2023-08-28  383  						  DEVLINK_ATTR_PARAM_VALUES_LIST);
830c41e1e987d9 Jiri Pirko   2023-08-28  384  	if (!param_values_list)
830c41e1e987d9 Jiri Pirko   2023-08-28  385  		goto param_nest_cancel;
830c41e1e987d9 Jiri Pirko   2023-08-28  386  
830c41e1e987d9 Jiri Pirko   2023-08-28  387  	for (i = 0; i <= DEVLINK_PARAM_CMODE_MAX; i++) {
830c41e1e987d9 Jiri Pirko   2023-08-28  388  		if (!param_value_set[i])
830c41e1e987d9 Jiri Pirko   2023-08-28  389  			continue;
830c41e1e987d9 Jiri Pirko   2023-08-28  390  		err = devlink_nl_param_value_fill_one(msg, param->type,
2a367002ed321e Daniel Zahka 2025-11-18  391  						      i, param_value[i],
2a367002ed321e Daniel Zahka 2025-11-18  392  						      default_value[i],
2a367002ed321e Daniel Zahka 2025-11-18  393  						      default_value_set[i]);
830c41e1e987d9 Jiri Pirko   2023-08-28  394  		if (err)
830c41e1e987d9 Jiri Pirko   2023-08-28  395  			goto values_list_nest_cancel;
830c41e1e987d9 Jiri Pirko   2023-08-28  396  	}
830c41e1e987d9 Jiri Pirko   2023-08-28  397  
830c41e1e987d9 Jiri Pirko   2023-08-28  398  	nla_nest_end(msg, param_values_list);
830c41e1e987d9 Jiri Pirko   2023-08-28  399  	nla_nest_end(msg, param_attr);
830c41e1e987d9 Jiri Pirko   2023-08-28  400  	genlmsg_end(msg, hdr);
830c41e1e987d9 Jiri Pirko   2023-08-28  401  	return 0;
830c41e1e987d9 Jiri Pirko   2023-08-28  402  
830c41e1e987d9 Jiri Pirko   2023-08-28  403  values_list_nest_cancel:
830c41e1e987d9 Jiri Pirko   2023-08-28  404  	nla_nest_end(msg, param_values_list);
830c41e1e987d9 Jiri Pirko   2023-08-28  405  param_nest_cancel:
830c41e1e987d9 Jiri Pirko   2023-08-28  406  	nla_nest_cancel(msg, param_attr);
830c41e1e987d9 Jiri Pirko   2023-08-28  407  genlmsg_cancel:
830c41e1e987d9 Jiri Pirko   2023-08-28  408  	genlmsg_cancel(msg, hdr);
830c41e1e987d9 Jiri Pirko   2023-08-28  409  	return -EMSGSIZE;
830c41e1e987d9 Jiri Pirko   2023-08-28 @410  }
830c41e1e987d9 Jiri Pirko   2023-08-28  411  

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ