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: <202111110526.4qqthI3i-lkp@intel.com>
Date:   Thu, 11 Nov 2021 05:08:33 +0800
From:   kernel test robot <lkp@...el.com>
To:     Bean Huo <beanhuo@...ron.com>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
        "Martin K. Petersen" <martin.petersen@...cle.com>,
        Avri Altman <avri.altman@....com>
Subject: drivers/scsi/ufs/ufshpb.c:335:27: sparse: sparse: cast from
 restricted __be64

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   881007522c8fcc3785c75432dbb149ca1b78e106
commit: 63522bf3aced0a782b59f0314dbad5cdc8b14c59 scsi: ufs: core: Add L2P entry swap quirk for Micron UFS
date:   3 months ago
config: i386-randconfig-s001-20211109 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.4-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=63522bf3aced0a782b59f0314dbad5cdc8b14c59
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout 63522bf3aced0a782b59f0314dbad5cdc8b14c59
        # save the attached .config to linux build tree
        make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=i386 SHELL=/bin/bash drivers/scsi/ufs/

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/scsi/ufs/ufshpb.c:335:27: sparse: sparse: cast from restricted __be64
>> drivers/scsi/ufs/ufshpb.c:335:25: sparse: sparse: incorrect type in assignment (different base types) @@     expected restricted __be64 [usertype] ppn_tmp @@     got unsigned long long [usertype] @@
   drivers/scsi/ufs/ufshpb.c:335:25: sparse:     expected restricted __be64 [usertype] ppn_tmp
   drivers/scsi/ufs/ufshpb.c:335:25: sparse:     got unsigned long long [usertype]

vim +335 drivers/scsi/ufs/ufshpb.c

   324	
   325	static void
   326	ufshpb_set_hpb_read_to_upiu(struct ufs_hba *hba, struct ufshpb_lu *hpb,
   327				    struct ufshcd_lrb *lrbp, u32 lpn, __be64 ppn,
   328				    u8 transfer_len, int read_id)
   329	{
   330		unsigned char *cdb = lrbp->cmd->cmnd;
   331		__be64 ppn_tmp = ppn;
   332		cdb[0] = UFSHPB_READ;
   333	
   334		if (hba->dev_quirks & UFS_DEVICE_QUIRK_SWAP_L2P_ENTRY_FOR_HPB_READ)
 > 335			ppn_tmp = swab64(ppn);
   336	
   337		/* ppn value is stored as big-endian in the host memory */
   338		memcpy(&cdb[6], &ppn_tmp, sizeof(__be64));
   339		cdb[14] = transfer_len;
   340		cdb[15] = read_id;
   341	
   342		lrbp->cmd->cmd_len = UFS_CDB_SIZE;
   343	}
   344	

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ