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: <202008310543.RFjX9OBX%lkp@intel.com>
Date:   Mon, 31 Aug 2020 05:45:45 +0800
From:   kernel test robot <lkp@...el.com>
To:     Marc Zyngier <maz@...nel.org>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org
Subject: arch/arm64/kvm/pvtime.c:33:9: sparse: sparse: incorrect type in
 initializer (different base types)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   dcc5c6f013d841e9ae74d527d312d512dfc2e2f0
commit: 9ed24f4b712b855dcf7be3025b75b051cb73a2b7 KVM: arm64: Move virt/kvm/arm to arch/arm64
date:   4 months ago
config: arm64-randconfig-s031-20200831 (attached as .config)
compiler: aarch64-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-191-g10164920-dirty
        git checkout 9ed24f4b712b855dcf7be3025b75b051cb73a2b7
        # 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=arm64 

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/arm64/kvm/pvtime.c:33:9: sparse: sparse: incorrect type in initializer (different base types) @@     expected unsigned long long __pu_val @@     got restricted __le64 [assigned] [usertype] steal_le @@
>> arch/arm64/kvm/pvtime.c:33:9: sparse:     expected unsigned long long __pu_val
>> arch/arm64/kvm/pvtime.c:33:9: sparse:     got restricted __le64 [assigned] [usertype] steal_le
--
   arch/arm64/kvm/arch_timer.c:936:66: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void *vcpu_info @@     got struct kvm_vcpu *[noderef] <asn:3> * @@
>> arch/arm64/kvm/arch_timer.c:936:66: sparse:     expected void *vcpu_info
   arch/arm64/kvm/arch_timer.c:936:66: sparse:     got struct kvm_vcpu *[noderef] <asn:3> *
   arch/arm64/kvm/arch_timer.c:969:74: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void *vcpu_info @@     got struct kvm_vcpu *[noderef] <asn:3> * @@
   arch/arm64/kvm/arch_timer.c:969:74: sparse:     expected void *vcpu_info
   arch/arm64/kvm/arch_timer.c:969:74: sparse:     got struct kvm_vcpu *[noderef] <asn:3> *
--
>> arch/arm64/kvm/vgic/vgic.c:353:17: sparse: sparse: context imbalance in 'vgic_queue_irq_unlock' - unexpected unlock
>> arch/arm64/kvm/vgic/vgic.c:437:5: sparse: sparse: context imbalance in 'kvm_vgic_inject_irq' - different lock contexts for basic block
--
>> arch/arm64/kvm/vgic/vgic-v3.c:314:5: sparse: sparse: context imbalance in 'vgic_v3_lpi_sync_pending_status' - different lock contexts for basic block
--
>> arch/arm64/kvm/vgic/vgic-mmio.c:854:24: sparse: sparse: cast to restricted __le16
>> arch/arm64/kvm/vgic/vgic-mmio.c:856:24: sparse: sparse: cast to restricted __le32
>> arch/arm64/kvm/vgic/vgic-mmio.c:858:24: sparse: sparse: cast to restricted __le64
>> arch/arm64/kvm/vgic/vgic-mmio.c:878:22: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned long data @@     got restricted __le16 [usertype] @@
>> arch/arm64/kvm/vgic/vgic-mmio.c:878:22: sparse:     expected unsigned long data
>> arch/arm64/kvm/vgic/vgic-mmio.c:878:22: sparse:     got restricted __le16 [usertype]
>> arch/arm64/kvm/vgic/vgic-mmio.c:881:22: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned long data @@     got restricted __le32 [usertype] @@
   arch/arm64/kvm/vgic/vgic-mmio.c:881:22: sparse:     expected unsigned long data
>> arch/arm64/kvm/vgic/vgic-mmio.c:881:22: sparse:     got restricted __le32 [usertype]
>> arch/arm64/kvm/vgic/vgic-mmio.c:884:22: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned long data @@     got restricted __le64 [usertype] @@
   arch/arm64/kvm/vgic/vgic-mmio.c:884:22: sparse:     expected unsigned long data
>> arch/arm64/kvm/vgic/vgic-mmio.c:884:22: sparse:     got restricted __le64 [usertype]
>> arch/arm64/kvm/vgic/vgic-mmio.c:88:17: sparse: sparse: context imbalance in 'vgic_mmio_write_group' - different lock contexts for basic block
>> arch/arm64/kvm/vgic/vgic-mmio.c:124:9: sparse: sparse: context imbalance in 'vgic_mmio_write_senable' - different lock contexts for basic block
>> arch/arm64/kvm/vgic/vgic-mmio.c:195:9: sparse: sparse: context imbalance in 'vgic_uaccess_write_senable' - different lock contexts for basic block
>> arch/arm64/kvm/vgic/vgic-mmio.c:278:9: sparse: sparse: context imbalance in 'vgic_mmio_write_spending' - different lock contexts for basic block
>> arch/arm64/kvm/vgic/vgic-mmio.c:320:9: sparse: sparse: context imbalance in 'vgic_uaccess_write_spending' - different lock contexts for basic block
>> arch/arm64/kvm/vgic/vgic-mmio.c:565:9: sparse: sparse: context imbalance in 'vgic_mmio_change_active' - wrong count at exit
>> arch/arm64/kvm/vgic/vgic-mmio.c:773:30: sparse: sparse: context imbalance in 'vgic_write_irq_line_level_info' - different lock contexts for basic block
--
>> arch/arm64/kvm/vgic/vgic-mmio-v2.c:134:9: sparse: sparse: context imbalance in 'vgic_mmio_write_sgir' - different lock contexts for basic block
>> arch/arm64/kvm/vgic/vgic-mmio-v2.c:244:9: sparse: sparse: context imbalance in 'vgic_mmio_write_sgipends' - different lock contexts for basic block
--
>> arch/arm64/kvm/vgic/vgic-mmio-v3.c:338:9: sparse: sparse: context imbalance in 'vgic_v3_uaccess_write_pending' - different lock contexts for basic block
>> arch/arm64/kvm/vgic/vgic-mmio-v3.c:1025:17: sparse: sparse: context imbalance in 'vgic_v3_dispatch_sgi' - different lock contexts for basic block
--
>> arch/arm64/kvm/vgic/vgic-its.c:825:17: sparse: sparse: cast to restricted __le64
   arch/arm64/kvm/vgic/vgic-its.c:956:24: sparse: sparse: cast to restricted __le64
>> arch/arm64/kvm/vgic/vgic-its.c:2134:13: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned long long [assigned] [usertype] val @@     got restricted __le64 [usertype] @@
>> arch/arm64/kvm/vgic/vgic-its.c:2134:13: sparse:     expected unsigned long long [assigned] [usertype] val
>> arch/arm64/kvm/vgic/vgic-its.c:2134:13: sparse:     got restricted __le64 [usertype]
   arch/arm64/kvm/vgic/vgic-its.c:2160:15: sparse: sparse: cast to restricted __le64
   arch/arm64/kvm/vgic/vgic-its.c:2281:13: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned long long [assigned] [usertype] val @@     got restricted __le64 [usertype] @@
   arch/arm64/kvm/vgic/vgic-its.c:2281:13: sparse:     expected unsigned long long [assigned] [usertype] val
   arch/arm64/kvm/vgic/vgic-its.c:2281:13: sparse:     got restricted __le64 [usertype]
   arch/arm64/kvm/vgic/vgic-its.c:2307:17: sparse: sparse: cast to restricted __le64
   arch/arm64/kvm/vgic/vgic-its.c:2405:17: sparse: sparse: cast to restricted __le64
   arch/arm64/kvm/vgic/vgic-its.c:2461:13: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned long long [assigned] [usertype] val @@     got restricted __le64 [usertype] @@
   arch/arm64/kvm/vgic/vgic-its.c:2461:13: sparse:     expected unsigned long long [assigned] [usertype] val
   arch/arm64/kvm/vgic/vgic-its.c:2461:13: sparse:     got restricted __le64 [usertype]
   arch/arm64/kvm/vgic/vgic-its.c:2477:15: sparse: sparse: cast to restricted __le64
>> arch/arm64/kvm/vgic/vgic-its.c:280:12: sparse: sparse: context imbalance in 'update_lpi_config' - different lock contexts for basic block
>> arch/arm64/kvm/vgic/vgic-its.c:443:9: sparse: sparse: context imbalance in 'its_sync_lpi_pending_table' - different lock contexts for basic block
>> arch/arm64/kvm/vgic/vgic-its.c:730:12: sparse: sparse: context imbalance in 'vgic_its_trigger_msi' - different lock contexts for basic block
>> arch/arm64/kvm/vgic/vgic-its.c:752:5: sparse: sparse: context imbalance in 'vgic_its_inject_cached_translation' - wrong count at exit

# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=9ed24f4b712b855dcf7be3025b75b051cb73a2b7
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 9ed24f4b712b855dcf7be3025b75b051cb73a2b7
vim +33 arch/arm64/kvm/pvtime.c

b48c1a45a19089 virt/kvm/arm/pvtime.c Steven Price 2019-10-21  11  
8564d6372a7d8a virt/kvm/arm/pvtime.c Steven Price 2019-10-21  12  void kvm_update_stolen_time(struct kvm_vcpu *vcpu)
8564d6372a7d8a virt/kvm/arm/pvtime.c Steven Price 2019-10-21  13  {
8564d6372a7d8a virt/kvm/arm/pvtime.c Steven Price 2019-10-21  14  	struct kvm *kvm = vcpu->kvm;
8564d6372a7d8a virt/kvm/arm/pvtime.c Steven Price 2019-10-21  15  	u64 steal;
8564d6372a7d8a virt/kvm/arm/pvtime.c Steven Price 2019-10-21  16  	__le64 steal_le;
8564d6372a7d8a virt/kvm/arm/pvtime.c Steven Price 2019-10-21  17  	u64 offset;
8564d6372a7d8a virt/kvm/arm/pvtime.c Steven Price 2019-10-21  18  	int idx;
8564d6372a7d8a virt/kvm/arm/pvtime.c Steven Price 2019-10-21  19  	u64 base = vcpu->arch.steal.base;
8564d6372a7d8a virt/kvm/arm/pvtime.c Steven Price 2019-10-21  20  
8564d6372a7d8a virt/kvm/arm/pvtime.c Steven Price 2019-10-21  21  	if (base == GPA_INVALID)
8564d6372a7d8a virt/kvm/arm/pvtime.c Steven Price 2019-10-21  22  		return;
8564d6372a7d8a virt/kvm/arm/pvtime.c Steven Price 2019-10-21  23  
8564d6372a7d8a virt/kvm/arm/pvtime.c Steven Price 2019-10-21  24  	/* Let's do the local bookkeeping */
8564d6372a7d8a virt/kvm/arm/pvtime.c Steven Price 2019-10-21  25  	steal = vcpu->arch.steal.steal;
8564d6372a7d8a virt/kvm/arm/pvtime.c Steven Price 2019-10-21  26  	steal += current->sched_info.run_delay - vcpu->arch.steal.last_steal;
8564d6372a7d8a virt/kvm/arm/pvtime.c Steven Price 2019-10-21  27  	vcpu->arch.steal.last_steal = current->sched_info.run_delay;
8564d6372a7d8a virt/kvm/arm/pvtime.c Steven Price 2019-10-21  28  	vcpu->arch.steal.steal = steal;
8564d6372a7d8a virt/kvm/arm/pvtime.c Steven Price 2019-10-21  29  
8564d6372a7d8a virt/kvm/arm/pvtime.c Steven Price 2019-10-21  30  	steal_le = cpu_to_le64(steal);
8564d6372a7d8a virt/kvm/arm/pvtime.c Steven Price 2019-10-21  31  	idx = srcu_read_lock(&kvm->srcu);
8564d6372a7d8a virt/kvm/arm/pvtime.c Steven Price 2019-10-21  32  	offset = offsetof(struct pvclock_vcpu_stolen_time, stolen_time);
8564d6372a7d8a virt/kvm/arm/pvtime.c Steven Price 2019-10-21 @33  	kvm_put_guest(kvm, base + offset, steal_le, u64);
8564d6372a7d8a virt/kvm/arm/pvtime.c Steven Price 2019-10-21  34  	srcu_read_unlock(&kvm->srcu, idx);
8564d6372a7d8a virt/kvm/arm/pvtime.c Steven Price 2019-10-21  35  }
8564d6372a7d8a virt/kvm/arm/pvtime.c Steven Price 2019-10-21  36  

:::::: The code at line 33 was first introduced by commit
:::::: 8564d6372a7d8a6d440441b8ed8020f97f744450 KVM: arm64: Support stolen time reporting via shared structure

:::::: TO: Steven Price <steven.price@....com>
:::::: CC: Marc Zyngier <maz@...nel.org>

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ