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>] [day] [month] [year] [list]
Message-ID: <202108062024.yp3UCOvk-lkp@intel.com>
Date:   Fri, 6 Aug 2021 20:13:31 +0800
From:   kernel test robot <lkp@...el.com>
To:     Sven Peter <sven@...npeter.dev>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org
Subject: [asahilinux:nvme/dev 17/17] drivers/nvme/host/pci.c:329:19: sparse:
 sparse: incorrect type in assignment (different base types)

tree:   https://github.com/AsahiLinux/linux nvme/dev
head:   70ce58861f9029c98ddcfb26787a58bbac183cc2
commit: 70ce58861f9029c98ddcfb26787a58bbac183cc2 [17/17] WIP: apple NVMe
config: x86_64-rhel-8.3-kselftests (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.3-348-gf0e6938b-dirty
        # https://github.com/AsahiLinux/linux/commit/70ce58861f9029c98ddcfb26787a58bbac183cc2
        git remote add asahilinux https://github.com/AsahiLinux/linux
        git fetch --no-tags asahilinux nvme/dev
        git checkout 70ce58861f9029c98ddcfb26787a58bbac183cc2
        # save the attached .config to linux build tree
        make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=x86_64 

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/nvme/host/pci.c:329:19: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned long long [usertype] prp1 @@     got restricted __le64 [usertype] prp1 @@
   drivers/nvme/host/pci.c:329:19: sparse:     expected unsigned long long [usertype] prp1
   drivers/nvme/host/pci.c:329:19: sparse:     got restricted __le64 [usertype] prp1
>> drivers/nvme/host/pci.c:330:19: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned long long [usertype] prp2 @@     got restricted __le64 [usertype] prp2 @@
   drivers/nvme/host/pci.c:330:19: sparse:     expected unsigned long long [usertype] prp2
   drivers/nvme/host/pci.c:330:19: sparse:     got restricted __le64 [usertype] prp2
>> drivers/nvme/host/pci.c:331:21: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int [usertype] length @@     got restricted __le16 [usertype] length @@
   drivers/nvme/host/pci.c:331:21: sparse:     expected unsigned int [usertype] length
   drivers/nvme/host/pci.c:331:21: sparse:     got restricted __le16 [usertype] length

vim +329 drivers/nvme/host/pci.c

   318	
   319	static void nvme_apple_submit_cmd(struct nvme_queue *nvmeq,
   320					  struct nvme_command *cmd)
   321	{
   322		u32 tag = cmd->common.command_id;
   323		struct apple_nvmmu_tcb *tcb;
   324	
   325		tcb = nvmeq->ans2_tcb_ptr + tag * sizeof(struct apple_nvmmu_tcb);
   326		memset(tcb, 0, sizeof(*tcb));
   327	
   328		tcb->opcode = cmd->common.opcode;
 > 329		tcb->prp1 = cmd->common.dptr.prp1;
 > 330		tcb->prp2 = cmd->common.dptr.prp2;
 > 331		tcb->length = cmd->rw.length;
   332		tcb->command_id = tag;
   333	
   334		if (nvme_is_write(cmd))
   335			tcb->dma_flags = APPLE_ANS2_TCB_DMA_TO_DEVICE;
   336		else
   337			tcb->dma_flags = APPLE_ANS2_TCB_DMA_FROM_DEVICE;
   338	
   339		memcpy(nvmeq->sq_cmds + (tag << nvmeq->sqes), cmd, sizeof(*cmd));
   340		writel(tag, nvmeq->ans2_q_db);
   341	}
   342	

---
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" (42162 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ