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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:   Sun, 9 Aug 2020 03:52:22 +0800
From:   kernel test robot <lkp@...el.com>
To:     Hari Bathini <hbathini@...ux.vnet.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.h:134:33: sparse: sparse:
 restricted __be64 degrades to integer

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   11030fe96b57ad843518b0e9430f3cd4b3610ce2
commit: 6f713d18144ce86c9f01cdf64222d6339e26129e powerpc/opalcore: export /sys/firmware/opal/core for analysing opal crashes
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 6f713d18144ce86c9f01cdf64222d6339e26129e
        # 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:103: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:103:41: sparse:     expected unsigned long long [usertype] boot_mem_dest_addr
   arch/powerpc/platforms/powernv/opal-fadump.c:103:41: sparse:     got restricted __be64 const [usertype] dest
   arch/powerpc/platforms/powernv/opal-fadump.c:129:47: sparse: sparse: invalid assignment: +=
   arch/powerpc/platforms/powernv/opal-fadump.c:129:47: sparse:    left side has type unsigned long
   arch/powerpc/platforms/powernv/opal-fadump.c:129:47: sparse:    right side has type restricted __be64
   arch/powerpc/platforms/powernv/opal-fadump.c:136: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:136:46: sparse:     expected unsigned long reserve_dump_area_start
   arch/powerpc/platforms/powernv/opal-fadump.c:136:46: sparse:     got restricted __be64 const [usertype] dest
   arch/powerpc/platforms/powernv/opal-fadump.c:195: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:195:58: sparse:     expected restricted __be64 [usertype] src
   arch/powerpc/platforms/powernv/opal-fadump.c:195:58: sparse:     got unsigned long long [assigned] [usertype] src_addr
   arch/powerpc/platforms/powernv/opal-fadump.c:196: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:196:58: sparse:     expected restricted __be64 [usertype] dest
   arch/powerpc/platforms/powernv/opal-fadump.c:196:58: sparse:     got unsigned long long [assigned] [usertype] dest_addr
   arch/powerpc/platforms/powernv/opal-fadump.c:197: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:197:58: sparse:     expected restricted __be64 [usertype] size
   arch/powerpc/platforms/powernv/opal-fadump.c:197:58: sparse:     got int [assigned] cur_size
   arch/powerpc/platforms/powernv/opal-fadump.c:209:53: sparse: sparse: restricted __be64 degrades to integer
   arch/powerpc/platforms/powernv/opal-fadump.c:272: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:272:56: sparse:     expected unsigned long long [usertype] src
   arch/powerpc/platforms/powernv/opal-fadump.c:272:56: sparse:     got restricted __be64 [usertype] src
   arch/powerpc/platforms/powernv/opal-fadump.c:273: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:273:56: sparse:     expected unsigned long long [usertype] dest
   arch/powerpc/platforms/powernv/opal-fadump.c:273:56: sparse:     got restricted __be64 [usertype] dest
   arch/powerpc/platforms/powernv/opal-fadump.c:274: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:274:56: sparse:     expected unsigned long long [usertype] size
   arch/powerpc/platforms/powernv/opal-fadump.c:274:56: sparse:     got restricted __be64 [usertype] size
   arch/powerpc/platforms/powernv/opal-fadump.c:569: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:569:38: sparse:     expected unsigned long long [usertype] dumped_bytes
   arch/powerpc/platforms/powernv/opal-fadump.c:569:38: sparse:     got restricted __be64 const [usertype] size
   arch/powerpc/platforms/powernv/opal-fadump.c:657:16: sparse: sparse: cast to restricted __be64
   arch/powerpc/platforms/powernv/opal-fadump.c:675:24: sparse: sparse: cast to restricted __be64
   arch/powerpc/platforms/powernv/opal-fadump.c: note: in included file:
>> arch/powerpc/platforms/powernv/opal-fadump.h:134:33: sparse: sparse: restricted __be64 degrades to integer
--
>> arch/powerpc/platforms/powernv/opal-core.c:96:24: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int [usertype] n_namesz @@     got restricted __be32 [usertype] @@
>> arch/powerpc/platforms/powernv/opal-core.c:96:24: sparse:     expected unsigned int [usertype] n_namesz
>> arch/powerpc/platforms/powernv/opal-core.c:96:24: sparse:     got restricted __be32 [usertype]
>> arch/powerpc/platforms/powernv/opal-core.c:97:24: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int [usertype] n_descsz @@     got restricted __be32 [usertype] @@
>> arch/powerpc/platforms/powernv/opal-core.c:97:24: sparse:     expected unsigned int [usertype] n_descsz
   arch/powerpc/platforms/powernv/opal-core.c:97:24: sparse:     got restricted __be32 [usertype]
>> arch/powerpc/platforms/powernv/opal-core.c:98:24: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int [usertype] n_type @@     got restricted __be32 [usertype] @@
>> arch/powerpc/platforms/powernv/opal-core.c:98:24: sparse:     expected unsigned int [usertype] n_type
   arch/powerpc/platforms/powernv/opal-core.c:98:24: sparse:     got restricted __be32 [usertype]
>> arch/powerpc/platforms/powernv/opal-core.c:119:27: sparse: sparse: incorrect type in assignment (different base types) @@     expected int [usertype] pr_pid @@     got restricted __be32 [usertype] @@
>> arch/powerpc/platforms/powernv/opal-core.c:119:27: sparse:     expected int [usertype] pr_pid
   arch/powerpc/platforms/powernv/opal-core.c:119:27: sparse:     got restricted __be32 [usertype]
>> arch/powerpc/platforms/powernv/opal-core.c:120:27: sparse: sparse: incorrect type in assignment (different base types) @@     expected int [usertype] pr_ppid @@     got restricted __be32 [usertype] @@
>> arch/powerpc/platforms/powernv/opal-core.c:120:27: sparse:     expected int [usertype] pr_ppid
   arch/powerpc/platforms/powernv/opal-core.c:120:27: sparse:     got restricted __be32 [usertype]
>> arch/powerpc/platforms/powernv/opal-core.c:130:37: sparse: sparse: incorrect type in assignment (different base types) @@     expected short pr_cursig @@     got restricted __be16 [usertype] @@
>> arch/powerpc/platforms/powernv/opal-core.c:130:37: sparse:     expected short pr_cursig
>> arch/powerpc/platforms/powernv/opal-core.c:130:37: sparse:     got restricted __be16 [usertype]
>> arch/powerpc/platforms/powernv/opal-core.c:143:21: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned long long [usertype] @@     got restricted __be64 [usertype] @@
>> arch/powerpc/platforms/powernv/opal-core.c:143:21: sparse:     expected unsigned long long [usertype]
>> arch/powerpc/platforms/powernv/opal-core.c:143:21: sparse:     got restricted __be64 [usertype]
   arch/powerpc/platforms/powernv/opal-core.c:144:21: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned long long [usertype] @@     got restricted __be64 [usertype] @@
   arch/powerpc/platforms/powernv/opal-core.c:144:21: sparse:     expected unsigned long long [usertype]
   arch/powerpc/platforms/powernv/opal-core.c:144:21: sparse:     got restricted __be64 [usertype]
   arch/powerpc/platforms/powernv/opal-core.c:147:21: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned long long [usertype] @@     got restricted __be64 [usertype] @@
   arch/powerpc/platforms/powernv/opal-core.c:147:21: sparse:     expected unsigned long long [usertype]
   arch/powerpc/platforms/powernv/opal-core.c:147:21: sparse:     got restricted __be64 [usertype]
>> arch/powerpc/platforms/powernv/opal-core.c:274:17: sparse: sparse: cast to restricted __be64
>> arch/powerpc/platforms/powernv/opal-core.c:274:17: sparse: sparse: cast to restricted __be64
>> arch/powerpc/platforms/powernv/opal-core.c:360:21: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned short [usertype] e_type @@     got restricted __be16 [usertype] @@
>> arch/powerpc/platforms/powernv/opal-core.c:360:21: sparse:     expected unsigned short [usertype] e_type
   arch/powerpc/platforms/powernv/opal-core.c:360:21: sparse:     got restricted __be16 [usertype]
>> arch/powerpc/platforms/powernv/opal-core.c:361:24: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned short [usertype] e_machine @@     got restricted __be16 [usertype] @@
>> arch/powerpc/platforms/powernv/opal-core.c:361:24: sparse:     expected unsigned short [usertype] e_machine
   arch/powerpc/platforms/powernv/opal-core.c:361:24: sparse:     got restricted __be16 [usertype]
>> arch/powerpc/platforms/powernv/opal-core.c:362:24: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int [usertype] e_version @@     got restricted __be32 [usertype] @@
>> arch/powerpc/platforms/powernv/opal-core.c:362:24: sparse:     expected unsigned int [usertype] e_version
   arch/powerpc/platforms/powernv/opal-core.c:362:24: sparse:     got restricted __be32 [usertype]
>> arch/powerpc/platforms/powernv/opal-core.c:364:22: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned long long [usertype] e_phoff @@     got restricted __be64 [usertype] @@
>> arch/powerpc/platforms/powernv/opal-core.c:364:22: sparse:     expected unsigned long long [usertype] e_phoff
   arch/powerpc/platforms/powernv/opal-core.c:364:22: sparse:     got restricted __be64 [usertype]
>> arch/powerpc/platforms/powernv/opal-core.c:368:23: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned short [usertype] e_ehsize @@     got restricted __be16 [usertype] @@
>> arch/powerpc/platforms/powernv/opal-core.c:368:23: sparse:     expected unsigned short [usertype] e_ehsize
   arch/powerpc/platforms/powernv/opal-core.c:368:23: sparse:     got restricted __be16 [usertype]
>> arch/powerpc/platforms/powernv/opal-core.c:369:26: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned short [usertype] e_phentsize @@     got restricted __be16 [usertype] @@
>> arch/powerpc/platforms/powernv/opal-core.c:369:26: sparse:     expected unsigned short [usertype] e_phentsize
   arch/powerpc/platforms/powernv/opal-core.c:369:26: sparse:     got restricted __be16 [usertype]
>> arch/powerpc/platforms/powernv/opal-core.c:377:25: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int [usertype] p_type @@     got restricted __be32 [usertype] @@
>> arch/powerpc/platforms/powernv/opal-core.c:377:25: sparse:     expected unsigned int [usertype] p_type
   arch/powerpc/platforms/powernv/opal-core.c:377:25: sparse:     got restricted __be32 [usertype]
>> arch/powerpc/platforms/powernv/opal-core.c:381:25: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned long long [usertype] p_offset @@     got restricted __be64 [usertype] @@
>> arch/powerpc/platforms/powernv/opal-core.c:381:25: sparse:     expected unsigned long long [usertype] p_offset
   arch/powerpc/platforms/powernv/opal-core.c:381:25: sparse:     got restricted __be64 [usertype]
>> arch/powerpc/platforms/powernv/opal-core.c:382:41: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned long long [usertype] p_memsz @@     got restricted __be64 [usertype] @@
>> arch/powerpc/platforms/powernv/opal-core.c:382:41: sparse:     expected unsigned long long [usertype] p_memsz
   arch/powerpc/platforms/powernv/opal-core.c:382:41: sparse:     got restricted __be64 [usertype]
   arch/powerpc/platforms/powernv/opal-core.c:391:33: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int [usertype] p_type @@     got restricted __be32 [usertype] @@
   arch/powerpc/platforms/powernv/opal-core.c:391:33: sparse:     expected unsigned int [usertype] p_type
   arch/powerpc/platforms/powernv/opal-core.c:391:33: sparse:     got restricted __be32 [usertype]
>> arch/powerpc/platforms/powernv/opal-core.c:392:33: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int [usertype] p_flags @@     got restricted __be32 [usertype] @@
>> arch/powerpc/platforms/powernv/opal-core.c:392:33: sparse:     expected unsigned int [usertype] p_flags
   arch/powerpc/platforms/powernv/opal-core.c:392:33: sparse:     got restricted __be32 [usertype]
>> arch/powerpc/platforms/powernv/opal-core.c:403:33: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned long long [usertype] p_paddr @@     got restricted __be64 [usertype] @@
>> arch/powerpc/platforms/powernv/opal-core.c:403:33: sparse:     expected unsigned long long [usertype] p_paddr
   arch/powerpc/platforms/powernv/opal-core.c:403:33: sparse:     got restricted __be64 [usertype]
>> arch/powerpc/platforms/powernv/opal-core.c:404:33: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned long long [usertype] p_vaddr @@     got restricted __be64 [usertype] @@
>> arch/powerpc/platforms/powernv/opal-core.c:404:33: sparse:     expected unsigned long long [usertype] p_vaddr
   arch/powerpc/platforms/powernv/opal-core.c:404:33: sparse:     got restricted __be64 [usertype]
   arch/powerpc/platforms/powernv/opal-core.c:405:50: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned long long [usertype] p_memsz @@     got restricted __be64 [usertype] @@
   arch/powerpc/platforms/powernv/opal-core.c:405:50: sparse:     expected unsigned long long [usertype] p_memsz
   arch/powerpc/platforms/powernv/opal-core.c:405:50: sparse:     got restricted __be64 [usertype]
   arch/powerpc/platforms/powernv/opal-core.c:407:33: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned long long [usertype] p_offset @@     got restricted __be64 [usertype] @@
   arch/powerpc/platforms/powernv/opal-core.c:407:33: sparse:     expected unsigned long long [usertype] p_offset
   arch/powerpc/platforms/powernv/opal-core.c:407:33: sparse:     got restricted __be64 [usertype]
>> arch/powerpc/platforms/powernv/opal-core.c:414:22: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned short [usertype] e_phnum @@     got restricted __be16 [usertype] @@
>> arch/powerpc/platforms/powernv/opal-core.c:414:22: sparse:     expected unsigned short [usertype] e_phnum
   arch/powerpc/platforms/powernv/opal-core.c:414:22: sparse:     got restricted __be16 [usertype]
   arch/powerpc/platforms/powernv/opal-core.c:479:16: sparse: sparse: cast to restricted __be64
   arch/powerpc/platforms/powernv/opal-core.c:490:16: sparse: sparse: cast to restricted __be64
   arch/powerpc/platforms/powernv/opal-core.c: note: in included file:
>> arch/powerpc/platforms/powernv/opal-fadump.h:134:33: sparse: sparse: restricted __be64 degrades to integer

vim +134 arch/powerpc/platforms/powernv/opal-fadump.h

   119	
   120	static inline void opal_fadump_read_regs(char *bufp, unsigned int regs_cnt,
   121						 unsigned int reg_entry_size,
   122						 bool cpu_endian,
   123						 struct pt_regs *regs)
   124	{
   125		struct hdat_fadump_reg_entry *reg_entry;
   126		u64 val;
   127		int i;
   128	
   129		memset(regs, 0, sizeof(struct pt_regs));
   130	
   131		for (i = 0; i < regs_cnt; i++, bufp += reg_entry_size) {
   132			reg_entry = (struct hdat_fadump_reg_entry *)bufp;
   133			val = (cpu_endian ? be64_to_cpu(reg_entry->reg_val) :
 > 134			       reg_entry->reg_val);
   135			opal_fadump_set_regval_regnum(regs,
   136						      be32_to_cpu(reg_entry->reg_type),
   137						      be32_to_cpu(reg_entry->reg_num),
   138						      val);
   139		}
   140	}
   141	

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

Powered by blists - more mailing lists