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  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:   Sun, 9 Aug 2020 01:37:57 +0800
From:   kernel test robot <lkp@...el.com>
To:     Hari Bathini <hbathini@...ux.ibm.com>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
        Michael Ellerman <mpe@...erman.id.au>
Subject: arch/powerpc/platforms/powernv/opal-fadump.c:70:46: sparse: sparse:
 incorrect type in assignment (different base types)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   449dc8c97089a6e09fb2dac4d92b1b7ac0eb7c1e
commit: 2a1b06dd3a17ac278494da3c15cac84684346d22 powerpc/fadump: process the crashdump by exporting it as /proc/vmcore
date:   11 months ago
config: powerpc64-randconfig-s032-20200808 (attached as .config)
compiler: powerpc64-linux-gcc (GCC) 9.3.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # apt-get install sparse
        # sparse version: v0.6.2-118-ge1578773-dirty
        git checkout 2a1b06dd3a17ac278494da3c15cac84684346d22
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=powerpc64 

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

   arch/powerpc/platforms/powernv/opal-fadump.c:37:41: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned long long [usertype] boot_mem_dest_addr @@     got restricted __be64 const [usertype] dest @@
   arch/powerpc/platforms/powernv/opal-fadump.c:37:41: sparse:     expected unsigned long long [usertype] boot_mem_dest_addr
   arch/powerpc/platforms/powernv/opal-fadump.c:37:41: sparse:     got restricted __be64 const [usertype] dest
   arch/powerpc/platforms/powernv/opal-fadump.c:63:47: sparse: sparse: invalid assignment: +=
   arch/powerpc/platforms/powernv/opal-fadump.c:63:47: sparse:    left side has type unsigned long
   arch/powerpc/platforms/powernv/opal-fadump.c:63:47: sparse:    right side has type restricted __be64
>> arch/powerpc/platforms/powernv/opal-fadump.c:70:46: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned long reserve_dump_area_start @@     got restricted __be64 const [usertype] dest @@
>> arch/powerpc/platforms/powernv/opal-fadump.c:70:46: sparse:     expected unsigned long reserve_dump_area_start
   arch/powerpc/platforms/powernv/opal-fadump.c:70:46: sparse:     got restricted __be64 const [usertype] dest
   arch/powerpc/platforms/powernv/opal-fadump.c:105:58: sparse: sparse: incorrect type in assignment (different base types) @@     expected restricted __be64 [usertype] src @@     got unsigned long long [assigned] [usertype] src_addr @@
   arch/powerpc/platforms/powernv/opal-fadump.c:105:58: sparse:     expected restricted __be64 [usertype] src
   arch/powerpc/platforms/powernv/opal-fadump.c:105:58: sparse:     got unsigned long long [assigned] [usertype] src_addr
   arch/powerpc/platforms/powernv/opal-fadump.c:106:58: sparse: sparse: incorrect type in assignment (different base types) @@     expected restricted __be64 [usertype] dest @@     got unsigned long long [assigned] [usertype] dest_addr @@
   arch/powerpc/platforms/powernv/opal-fadump.c:106:58: sparse:     expected restricted __be64 [usertype] dest
   arch/powerpc/platforms/powernv/opal-fadump.c:106:58: sparse:     got unsigned long long [assigned] [usertype] dest_addr
   arch/powerpc/platforms/powernv/opal-fadump.c:107:58: sparse: sparse: incorrect type in assignment (different base types) @@     expected restricted __be64 [usertype] size @@     got int [assigned] cur_size @@
   arch/powerpc/platforms/powernv/opal-fadump.c:107:58: sparse:     expected restricted __be64 [usertype] size
   arch/powerpc/platforms/powernv/opal-fadump.c:107:58: sparse:     got int [assigned] cur_size
   arch/powerpc/platforms/powernv/opal-fadump.c:119:53: sparse: sparse: restricted __be64 degrades to integer
   arch/powerpc/platforms/powernv/opal-fadump.c:171:56: sparse: sparse: incorrect type in argument 2 (different base types) @@     expected unsigned long long [usertype] src @@     got restricted __be64 [usertype] src @@
   arch/powerpc/platforms/powernv/opal-fadump.c:171:56: sparse:     expected unsigned long long [usertype] src
   arch/powerpc/platforms/powernv/opal-fadump.c:171:56: sparse:     got restricted __be64 [usertype] src
   arch/powerpc/platforms/powernv/opal-fadump.c:172:56: sparse: sparse: incorrect type in argument 3 (different base types) @@     expected unsigned long long [usertype] dest @@     got restricted __be64 [usertype] dest @@
   arch/powerpc/platforms/powernv/opal-fadump.c:172:56: sparse:     expected unsigned long long [usertype] dest
   arch/powerpc/platforms/powernv/opal-fadump.c:172:56: sparse:     got restricted __be64 [usertype] dest
   arch/powerpc/platforms/powernv/opal-fadump.c:173:56: sparse: sparse: incorrect type in argument 4 (different base types) @@     expected unsigned long long [usertype] size @@     got restricted __be64 [usertype] size @@
   arch/powerpc/platforms/powernv/opal-fadump.c:173:56: sparse:     expected unsigned long long [usertype] size
   arch/powerpc/platforms/powernv/opal-fadump.c:173:56: sparse:     got restricted __be64 [usertype] size
>> arch/powerpc/platforms/powernv/opal-fadump.c:323:38: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned long long [usertype] dumped_bytes @@     got restricted __be64 const [usertype] size @@
>> arch/powerpc/platforms/powernv/opal-fadump.c:323:38: sparse:     expected unsigned long long [usertype] dumped_bytes
>> arch/powerpc/platforms/powernv/opal-fadump.c:323:38: sparse:     got restricted __be64 const [usertype] size
   arch/powerpc/platforms/powernv/opal-fadump.c:403:16: sparse: sparse: cast to restricted __be64

vim +70 arch/powerpc/platforms/powernv/opal-fadump.c

    43	
    44	/*
    45	 * This function is called in the capture kernel to get configuration details
    46	 * from metadata setup by the first kernel.
    47	 */
    48	static void opal_fadump_get_config(struct fw_dump *fadump_conf,
    49					   const struct opal_fadump_mem_struct *fdm)
    50	{
    51		int i;
    52	
    53		if (!fadump_conf->dump_active)
    54			return;
    55	
    56		fadump_conf->boot_memory_size = 0;
    57	
    58		pr_debug("Boot memory regions:\n");
    59		for (i = 0; i < fdm->region_cnt; i++) {
    60			pr_debug("\t%d. base: 0x%llx, size: 0x%llx\n",
    61				 (i + 1), fdm->rgn[i].src, fdm->rgn[i].size);
    62	
    63			fadump_conf->boot_memory_size += fdm->rgn[i].size;
    64		}
    65	
    66		/*
    67		 * Start address of reserve dump area (permanent reservation) for
    68		 * re-registering FADump after dump capture.
    69		 */
  > 70		fadump_conf->reserve_dump_area_start = fdm->rgn[0].dest;
    71	
    72		opal_fadump_update_config(fadump_conf, fdm);
    73	}
    74	

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

Powered by blists - more mailing lists