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: <202406170854.MYWoYsla-lkp@intel.com>
Date: Mon, 17 Jun 2024 09:04:38 +0800
From: kernel test robot <lkp@...el.com>
To: Vanillan Wang <songjinjian@...mail.com>,
	chandrashekar.devegowda@...el.com,
	chiranjeevi.rapolu@...ux.intel.com, haijun.liu@...iatek.com,
	m.chetan.kumar@...ux.intel.com, ricardo.martinez@...ux.intel.com,
	loic.poulain@...aro.org, ryazanov.s.a@...il.com,
	johannes@...solutions.net, davem@...emloft.net, edumazet@...gle.com,
	kuba@...nel.org, pabeni@...hat.com
Cc: oe-kbuild-all@...ts.linux.dev, linux-kernel@...r.kernel.org,
	netdev@...r.kernel.org, Jinjian Song <jinjian.song@...ocom.com>
Subject: Re: [net-next v1] net: wwan: t7xx: Add debug port

Hi Vanillan,

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/Vanillan-Wang/net-wwan-t7xx-Add-debug-port/20240614-175858
base:   net-next/main
patch link:    https://lore.kernel.org/r/MEYP282MB269762C5070B97CD769C8CD5BBC22%40MEYP282MB2697.AUSP282.PROD.OUTLOOK.COM
patch subject: [net-next v1] net: wwan: t7xx: Add debug port
config: x86_64-randconfig-161-20240617 (https://download.01.org/0day-ci/archive/20240617/202406170854.MYWoYsla-lkp@intel.com/config)
compiler: gcc-13 (Ubuntu 13.2.0-4ubuntu3) 13.2.0

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/202406170854.MYWoYsla-lkp@intel.com/

smatch warnings:
drivers/net/wwan/t7xx/t7xx_port_debug.c:153 port_char_write() warn: unsigned 'txq_mtu' is never less than zero.

vim +/txq_mtu +153 drivers/net/wwan/t7xx/t7xx_port_debug.c

   132	
   133	static ssize_t port_char_write(struct file *file, const char __user *buf,
   134				       size_t count, loff_t *ppos)
   135	{
   136		unsigned int header_len = sizeof(struct ccci_header);
   137		size_t  offset, txq_mtu, chunk_len = 0;
   138		struct t7xx_port *port;
   139		struct sk_buff *skb;
   140		bool blocking;
   141		int ret;
   142	
   143		port = file->private_data;
   144	
   145		blocking = !(file->f_flags & O_NONBLOCK);
   146		if (!blocking)
   147			return -EAGAIN;
   148	
   149		if (!port->chan_enable)
   150			return -EINVAL;
   151	
   152		txq_mtu = t7xx_get_port_mtu(port);
 > 153		if (txq_mtu < 0)
   154			return -EINVAL;
   155	
   156		for (offset = 0; offset < count; offset += chunk_len) {
   157			chunk_len = min(count - offset, txq_mtu - header_len);
   158	
   159			skb = __dev_alloc_skb(chunk_len + header_len, GFP_KERNEL);
   160			if (!skb)
   161				return -ENOMEM;
   162	
   163			ret = copy_from_user(skb_put(skb, chunk_len), buf + offset, chunk_len);
   164	
   165			if (ret) {
   166				dev_kfree_skb(skb);
   167				return -EFAULT;
   168			}
   169	
   170			ret = t7xx_port_send_skb(port, skb, 0, 0);
   171			if (ret) {
   172				if (ret == -EBUSY && !blocking)
   173					ret = -EAGAIN;
   174				dev_kfree_skb_any(skb);
   175				return ret;
   176			}
   177		}
   178	
   179		return count;
   180	}
   181	

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