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: <202406101404.oWWqbJmG-lkp@intel.com>
Date: Mon, 10 Jun 2024 14:55:15 +0800
From: kernel test robot <lkp@...el.com>
To: Richard chien <m8809301@...il.com>, davem@...emloft.net,
	edumazet@...gle.com, kuba@...nel.org, pabeni@...hat.com
Cc: oe-kbuild-all@...ts.linux.dev, jesse.brandeburg@...el.com,
	anthony.l.nguyen@...el.com, intel-wired-lan@...ts.osuosl.org,
	netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
	Richard chien <richard.chien@....com>
Subject: Re: [PATCH] igb: Add support for firmware update

Hi Richard,

kernel test robot noticed the following build warnings:

[auto build test WARNING on tnguy-next-queue/dev-queue]
[also build test WARNING on tnguy-net-queue/dev-queue linus/master v6.10-rc3 next-20240607]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Richard-chien/igb-Add-support-for-firmware-update/20240609-162047
base:   https://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue.git dev-queue
patch link:    https://lore.kernel.org/r/20240609081526.5621-1-richard.chien%40hpe.com
patch subject: [PATCH] igb: Add support for firmware update
config: alpha-randconfig-r112-20240610 (https://download.01.org/0day-ci/archive/20240610/202406101404.oWWqbJmG-lkp@intel.com/config)
compiler: alpha-linux-gcc (GCC) 13.2.0
reproduce: (https://download.01.org/0day-ci/archive/20240610/202406101404.oWWqbJmG-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/202406101404.oWWqbJmG-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
>> drivers/net/ethernet/intel/igb/igb_ethtool.c:923:34: sparse: sparse: cast to restricted __le16
   drivers/net/ethernet/intel/igb/igb_ethtool.c: note: in included file (through include/linux/mmzone.h, include/linux/gfp.h, include/linux/stackdepot.h, ...):
   include/linux/page-flags.h:240:46: sparse: sparse: self-comparison always evaluates to false
   include/linux/page-flags.h:240:46: sparse: sparse: self-comparison always evaluates to false

vim +923 drivers/net/ethernet/intel/igb/igb_ethtool.c

   874	
   875	static int igb_get_eeprom(struct net_device *netdev,
   876	                          struct ethtool_eeprom *eeprom, u8 *bytes)
   877	{
   878	        struct igb_adapter *adapter = netdev_priv(netdev);
   879	        struct e1000_hw *hw = &adapter->hw;
   880	        u16 *eeprom_buff;
   881	        int first_word, last_word;
   882	        int ret_val = 0;
   883	        struct e1000_nvm_access *nvm;
   884	        u32 magic;
   885	        u16 i;
   886	
   887	        if (eeprom->len == 0)
   888	                return -EINVAL;
   889	
   890	        magic = hw->vendor_id | (hw->device_id << 16);
   891	        if (eeprom->magic && eeprom->magic != magic) {
   892	                nvm = (struct e1000_nvm_access *)eeprom;
   893	                ret_val = igb_nvmupd_command(hw, nvm, bytes);
   894	                return ret_val;
   895	        }
   896	          
   897	        /* normal ethtool get_eeprom support */
   898	        eeprom->magic = hw->vendor_id | (hw->device_id << 16);
   899	
   900	        first_word = eeprom->offset >> 1;
   901	        last_word = (eeprom->offset + eeprom->len - 1) >> 1;
   902	
   903	        eeprom_buff = kmalloc(sizeof(u16) *
   904	                        (last_word - first_word + 1), GFP_KERNEL);
   905	        if (!eeprom_buff)
   906	                return -ENOMEM;
   907	
   908	        if (hw->nvm.type == e1000_nvm_eeprom_spi)
   909	                ret_val = e1000_read_nvm(hw, first_word,
   910	                                         last_word - first_word + 1,
   911	                                         eeprom_buff);
   912	        else {
   913	                for (i = 0; i < last_word - first_word + 1; i++) {
   914	                        ret_val = e1000_read_nvm(hw, first_word + i, 1,
   915	                                                 &eeprom_buff[i]);
   916	                        if (ret_val)
   917	                                break;
   918	                }
   919	        }
   920	
   921	        /* Device's eeprom is always little-endian, word addressable */
   922	        for (i = 0; i < last_word - first_word + 1; i++)
 > 923	                eeprom_buff[i] = le16_to_cpu(eeprom_buff[i]);
   924	
   925	        memcpy(bytes, (u8 *)eeprom_buff + (eeprom->offset & 1),
   926	                        eeprom->len);
   927	        kfree(eeprom_buff);
   928	
   929	        return ret_val;
   930	}
   931	

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