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: <202301071414.ritICMHu-lkp@intel.com>
Date:   Sat, 7 Jan 2023 11:46:32 +0300
From:   Dan Carpenter <error27@...il.com>
To:     oe-kbuild@...ts.linux.dev,
        Gerhard Engleder <gerhard@...leder-embedded.com>,
        netdev@...r.kernel.org
Cc:     lkp@...el.com, oe-kbuild-all@...ts.linux.dev, davem@...emloft.net,
        kuba@...nel.org, edumazet@...gle.com, pabeni@...hat.com,
        Gerhard Engleder <gerhard@...leder-embedded.com>
Subject: Re: [PATCH net-next v3 9/9] tsnep: Add XDP RX support

Hi Gerhard,

url:    https://github.com/intel-lab-lkp/linux/commits/Gerhard-Engleder/tsnep-Use-spin_lock_bh-for-TX/20230105-034351
patch link:    https://lore.kernel.org/r/20230104194132.24637-10-gerhard%40engleder-embedded.com
patch subject: [PATCH net-next v3 9/9] tsnep: Add XDP RX support
config: arc-randconfig-m041-20230106
compiler: arc-elf-gcc (GCC) 12.1.0

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

New smatch warnings:
drivers/net/ethernet/engleder/tsnep_main.c:641 tsnep_xdp_xmit_back() warn: signedness bug returning '(-14)'

vim +641 drivers/net/ethernet/engleder/tsnep_main.c

dd23b834a352b5 Gerhard Engleder 2023-01-04  631  static bool tsnep_xdp_xmit_back(struct tsnep_adapter *adapter,
                                                        ^^^^
dd23b834a352b5 Gerhard Engleder 2023-01-04  632  				struct xdp_buff *xdp)
dd23b834a352b5 Gerhard Engleder 2023-01-04  633  {
dd23b834a352b5 Gerhard Engleder 2023-01-04  634  	struct xdp_frame *xdpf = xdp_convert_buff_to_frame(xdp);
dd23b834a352b5 Gerhard Engleder 2023-01-04  635  	int cpu = smp_processor_id();
dd23b834a352b5 Gerhard Engleder 2023-01-04  636  	struct netdev_queue *nq;
dd23b834a352b5 Gerhard Engleder 2023-01-04  637  	int queue;
dd23b834a352b5 Gerhard Engleder 2023-01-04  638  	bool xmit;
dd23b834a352b5 Gerhard Engleder 2023-01-04  639  
dd23b834a352b5 Gerhard Engleder 2023-01-04  640  	if (unlikely(!xdpf))
dd23b834a352b5 Gerhard Engleder 2023-01-04 @641  		return -EFAULT;

return false?

dd23b834a352b5 Gerhard Engleder 2023-01-04  642  
dd23b834a352b5 Gerhard Engleder 2023-01-04  643  	queue = cpu % adapter->num_tx_queues;
dd23b834a352b5 Gerhard Engleder 2023-01-04  644  	nq = netdev_get_tx_queue(adapter->netdev, queue);
dd23b834a352b5 Gerhard Engleder 2023-01-04  645  
dd23b834a352b5 Gerhard Engleder 2023-01-04  646  	__netif_tx_lock(nq, cpu);
dd23b834a352b5 Gerhard Engleder 2023-01-04  647  
dd23b834a352b5 Gerhard Engleder 2023-01-04  648  	/* Avoid transmit queue timeout since we share it with the slow path */
dd23b834a352b5 Gerhard Engleder 2023-01-04  649  	txq_trans_cond_update(nq);
dd23b834a352b5 Gerhard Engleder 2023-01-04  650  
dd23b834a352b5 Gerhard Engleder 2023-01-04  651  	xmit = tsnep_xdp_xmit_frame_ring(xdpf, &adapter->tx[queue],
dd23b834a352b5 Gerhard Engleder 2023-01-04  652  					 TSNEP_TX_TYPE_XDP_TX);
dd23b834a352b5 Gerhard Engleder 2023-01-04  653  
dd23b834a352b5 Gerhard Engleder 2023-01-04  654  	__netif_tx_unlock(nq);
dd23b834a352b5 Gerhard Engleder 2023-01-04  655  
dd23b834a352b5 Gerhard Engleder 2023-01-04  656  	return xmit;
dd23b834a352b5 Gerhard Engleder 2023-01-04  657  }

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