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 for Android: free password hash cracker in your pocket
[<prev] [next>] [day] [month] [year] [list]
Date:   Fri, 15 Jan 2021 06:20:30 +0800
From:   kernel test robot <lkp@...el.com>
To:     Mordechay Goodstein <mordechay.goodstein@...el.com>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
        Luca Coelho <luciano.coelho@...el.com>
Subject: drivers/net/wireless/intel/iwlwifi/iwl-trans.c:154:34: sparse:
 sparse: incorrect type in assignment (different address spaces)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   65f0d2414b7079556fbbcc070b3d1c9f9587606d
commit: 0cd1ad2d7fd41e0de4969fd1dd0aa846c99830d1 iwlwifi: move all bus-independent TX functions to common code
date:   4 months ago
config: i386-randconfig-s002-20210115 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.3-208-g46a52ca4-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=0cd1ad2d7fd41e0de4969fd1dd0aa846c99830d1
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout 0cd1ad2d7fd41e0de4969fd1dd0aa846c99830d1
        # save the attached .config to linux build tree
        make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=i386 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>


"sparse warnings: (new ones prefixed by >>)"
   drivers/net/wireless/intel/iwlwifi/iwl-trans.c: note: in included file (through drivers/net/wireless/intel/iwlwifi/fw/img.h, drivers/net/wireless/intel/iwlwifi/iwl-trans.h):
   drivers/net/wireless/intel/iwlwifi/fw/file.h:330:19: sparse: sparse: mixed bitwiseness
   drivers/net/wireless/intel/iwlwifi/fw/file.h:485:19: sparse: sparse: mixed bitwiseness
   drivers/net/wireless/intel/iwlwifi/iwl-trans.c: note: in included file:
   drivers/net/wireless/intel/iwlwifi/iwl-trans.h:788:52: sparse: sparse: array of flexible structures
>> drivers/net/wireless/intel/iwlwifi/iwl-trans.c:154:34: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected struct iwl_tso_hdr_page *tso_hdr_page @@     got struct iwl_tso_hdr_page [noderef] __percpu * @@
   drivers/net/wireless/intel/iwlwifi/iwl-trans.c:154:34: sparse:     expected struct iwl_tso_hdr_page *tso_hdr_page
   drivers/net/wireless/intel/iwlwifi/iwl-trans.c:154:34: sparse:     got struct iwl_tso_hdr_page [noderef] __percpu *
>> drivers/net/wireless/intel/iwlwifi/iwl-trans.c:169:25: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected void const [noderef] __percpu *__vpp_verify @@     got struct iwl_tso_hdr_page * @@
   drivers/net/wireless/intel/iwlwifi/iwl-trans.c:169:25: sparse:     expected void const [noderef] __percpu *__vpp_verify
   drivers/net/wireless/intel/iwlwifi/iwl-trans.c:169:25: sparse:     got struct iwl_tso_hdr_page *
>> drivers/net/wireless/intel/iwlwifi/iwl-trans.c:175:32: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void [noderef] __percpu *__pdata @@     got struct iwl_tso_hdr_page *tso_hdr_page @@
   drivers/net/wireless/intel/iwlwifi/iwl-trans.c:175:32: sparse:     expected void [noderef] __percpu *__pdata
   drivers/net/wireless/intel/iwlwifi/iwl-trans.c:175:32: sparse:     got struct iwl_tso_hdr_page *tso_hdr_page
--
   drivers/net/wireless/intel/iwlwifi/queue/tx.c: note: in included file (through drivers/net/wireless/intel/iwlwifi/fw/img.h, drivers/net/wireless/intel/iwlwifi/iwl-trans.h, ...):
   drivers/net/wireless/intel/iwlwifi/fw/file.h:330:19: sparse: sparse: mixed bitwiseness
   drivers/net/wireless/intel/iwlwifi/fw/file.h:485:19: sparse: sparse: mixed bitwiseness
   drivers/net/wireless/intel/iwlwifi/queue/tx.c: note: in included file (through drivers/net/wireless/intel/iwlwifi/iwl-devtrace.h, drivers/net/wireless/intel/iwlwifi/iwl-io.h):
   drivers/net/wireless/intel/iwlwifi/iwl-trans.h:788:52: sparse: sparse: array of flexible structures
>> drivers/net/wireless/intel/iwlwifi/queue/tx.c:354:38: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected void const [noderef] __percpu *__vpp_verify @@     got struct iwl_tso_hdr_page * @@
   drivers/net/wireless/intel/iwlwifi/queue/tx.c:354:38: sparse:     expected void const [noderef] __percpu *__vpp_verify
   drivers/net/wireless/intel/iwlwifi/queue/tx.c:354:38: sparse:     got struct iwl_tso_hdr_page *

vim +154 drivers/net/wireless/intel/iwlwifi/iwl-trans.c

   110	
   111		trans->dev = dev;
   112		trans->ops = ops;
   113		trans->num_rx_queues = 1;
   114	
   115		if (trans->trans_cfg->device_family >= IWL_DEVICE_FAMILY_AX210)
   116			trans->txqs.bc_tbl_size = sizeof(struct iwl_gen3_bc_tbl);
   117		else
   118			trans->txqs.bc_tbl_size = sizeof(struct iwlagn_scd_bc_tbl);
   119		/*
   120		 * For gen2 devices, we use a single allocation for each byte-count
   121		 * table, but they're pretty small (1k) so use a DMA pool that we
   122		 * allocate here.
   123		 */
   124		if (trans->trans_cfg->gen2) {
   125			trans->txqs.bc_pool = dmam_pool_create("iwlwifi:bc", dev,
   126							       trans->txqs.bc_tbl_size,
   127							       256, 0);
   128			if (!trans->txqs.bc_pool)
   129				return NULL;
   130		}
   131	
   132		if (trans->trans_cfg->use_tfh) {
   133			trans->txqs.tfd.addr_size = 64;
   134			trans->txqs.tfd.max_tbs = IWL_TFH_NUM_TBS;
   135			trans->txqs.tfd.size = sizeof(struct iwl_tfh_tfd);
   136		} else {
   137			trans->txqs.tfd.addr_size = 36;
   138			trans->txqs.tfd.max_tbs = IWL_NUM_OF_TBS;
   139			trans->txqs.tfd.size = sizeof(struct iwl_tfd);
   140		}
   141		trans->max_skb_frags = IWL_TRANS_MAX_FRAGS(trans);
   142	
   143		snprintf(trans->dev_cmd_pool_name, sizeof(trans->dev_cmd_pool_name),
   144			 "iwl_cmd_pool:%s", dev_name(trans->dev));
   145		trans->dev_cmd_pool =
   146			kmem_cache_create(trans->dev_cmd_pool_name,
   147					  txcmd_size, txcmd_align,
   148					  SLAB_HWCACHE_ALIGN, NULL);
   149		if (!trans->dev_cmd_pool)
   150			return NULL;
   151	
   152		WARN_ON(!ops->wait_txq_empty && !ops->wait_tx_queues_empty);
   153	
 > 154		trans->txqs.tso_hdr_page = alloc_percpu(struct iwl_tso_hdr_page);
   155		if (!trans->txqs.tso_hdr_page) {
   156			kmem_cache_destroy(trans->dev_cmd_pool);
   157			return NULL;
   158		}
   159	
   160		return trans;
   161	}
   162	
   163	void iwl_trans_free(struct iwl_trans *trans)
   164	{
   165		int i;
   166	
   167		for_each_possible_cpu(i) {
   168			struct iwl_tso_hdr_page *p =
 > 169				per_cpu_ptr(trans->txqs.tso_hdr_page, i);
   170	
   171			if (p->page)
   172				__free_page(p->page);
   173		}
   174	
 > 175		free_percpu(trans->txqs.tso_hdr_page);
   176	
   177		kmem_cache_destroy(trans->dev_cmd_pool);
   178	}
   179	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

Download attachment ".config.gz" of type "application/gzip" (41428 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ