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: <202405082251.rL1Lk120-lkp@intel.com>
Date: Wed, 8 May 2024 22:24:30 +0800
From: kernel test robot <lkp@...el.com>
To: Ziwei Xiao <ziweixiao@...gle.com>, netdev@...r.kernel.org
Cc: oe-kbuild-all@...ts.linux.dev, jeroendb@...gle.com,
	pkaligineedi@...gle.com, shailend@...gle.com, davem@...emloft.net,
	edumazet@...gle.com, kuba@...nel.org, pabeni@...hat.com,
	willemb@...gle.com, hramamurthy@...gle.com, rushilg@...gle.com,
	ziweixiao@...gle.com, jfraker@...gle.com,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next 4/5] gve: Add flow steering adminq commands

Hi Ziwei,

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/Ziwei-Xiao/gve-Add-adminq-mutex-lock/20240508-071419
base:   net-next/main
patch link:    https://lore.kernel.org/r/20240507225945.1408516-5-ziweixiao%40google.com
patch subject: [PATCH net-next 4/5] gve: Add flow steering adminq commands
config: arm-allyesconfig (https://download.01.org/0day-ci/archive/20240508/202405082251.rL1Lk120-lkp@intel.com/config)
compiler: arm-linux-gnueabi-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240508/202405082251.rL1Lk120-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/202405082251.rL1Lk120-lkp@intel.com/

All warnings (new ones prefixed by >>):

   drivers/net/ethernet/google/gve/gve_adminq.c: In function 'gve_adminq_process_flow_rules_query':
>> drivers/net/ethernet/google/gve/gve_adminq.c:1259:15: warning: variable 'descriptor_end' set but not used [-Wunused-but-set-variable]
    1259 |         void *descriptor_end, *rule_info;
         |               ^~~~~~~~~~~~~~


vim +/descriptor_end +1259 drivers/net/ethernet/google/gve/gve_adminq.c

  1248	
  1249	/* In the dma memory that the driver allocated for the device to query the flow rules, the device
  1250	 * will first write it with a struct of gve_query_flow_rules_descriptor. Next to it, the device
  1251	 * will write an array of rules or rule ids with the count that specified in the descriptor.
  1252	 * For GVE_FLOW_RULE_QUERY_STATS, the device will only write the descriptor.
  1253	 */
  1254	static int gve_adminq_process_flow_rules_query(struct gve_priv *priv, u16 query_opcode,
  1255						       struct gve_query_flow_rules_descriptor *descriptor)
  1256	{
  1257		struct gve_flow_rules_cache *flow_rules_cache = &priv->flow_rules_cache;
  1258		u32 num_queried_rules, total_memory_len, rule_info_len;
> 1259		void *descriptor_end, *rule_info;
  1260	
  1261		total_memory_len = be32_to_cpu(descriptor->total_length);
  1262		if (total_memory_len > GVE_ADMINQ_BUFFER_SIZE) {
  1263			dev_err(&priv->dev->dev, "flow rules query is out of memory.\n");
  1264			return -ENOMEM;
  1265		}
  1266	
  1267		num_queried_rules = be32_to_cpu(descriptor->num_queried_rules);
  1268		descriptor_end = (void *)descriptor + total_memory_len;
  1269		rule_info = (void *)(descriptor + 1);
  1270	
  1271		switch (query_opcode) {
  1272		case GVE_FLOW_RULE_QUERY_RULES:
  1273			rule_info_len = num_queried_rules * sizeof(*flow_rules_cache->rules_cache);
  1274	
  1275			memcpy(flow_rules_cache->rules_cache, rule_info, rule_info_len);
  1276			flow_rules_cache->rules_cache_num = num_queried_rules;
  1277			break;
  1278		case GVE_FLOW_RULE_QUERY_IDS:
  1279			rule_info_len = num_queried_rules * sizeof(*flow_rules_cache->rule_ids_cache);
  1280	
  1281			memcpy(flow_rules_cache->rule_ids_cache, rule_info, rule_info_len);
  1282			flow_rules_cache->rule_ids_cache_num = num_queried_rules;
  1283			break;
  1284		case GVE_FLOW_RULE_QUERY_STATS:
  1285			priv->num_flow_rules = be32_to_cpu(descriptor->num_flow_rules);
  1286			priv->max_flow_rules = be32_to_cpu(descriptor->max_flow_rules);
  1287			return 0;
  1288		default:
  1289			return -EINVAL;
  1290		}
  1291	
  1292		return  0;
  1293	}
  1294	

-- 
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