Messages in this thread | | | Date | Mon, 27 Jul 2020 19:56:19 +0800 | From | kernel test robot <> | Subject | arch/arm64/kvm/arm.c:1288:37: sparse: sparse: incorrect type in initializer (different address spaces) |
| |
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: 92ed301919932f777713b9172e525674157e983d commit: 670d0a4b10704667765f7d18f7592993d02783aa sparse: use identifiers to define address spaces date: 6 weeks ago config: arm64-randconfig-s031-20200727 (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-94-geb6779f6-dirty git checkout 670d0a4b10704667765f7d18f7592993d02783aa # 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@intel.com>
sparse warnings: (new ones prefixed by >>)
>> arch/arm64/kvm/arm.c:1288:37: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void *val @@ got struct kvm_host_data [noderef] __percpu * @@ arch/arm64/kvm/arm.c:1288:37: sparse: expected void *val >> arch/arm64/kvm/arm.c:1288:37: sparse: got struct kvm_host_data [noderef] __percpu * -- >> arch/arm64/kvm/arch_timer.c:927:66: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void *vcpu_info @@ got struct kvm_vcpu *[noderef] __percpu * @@ arch/arm64/kvm/arch_timer.c:927:66: sparse: expected void *vcpu_info >> arch/arm64/kvm/arch_timer.c:927:66: sparse: got struct kvm_vcpu *[noderef] __percpu * arch/arm64/kvm/arch_timer.c:960:74: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void *vcpu_info @@ got struct kvm_vcpu *[noderef] __percpu * @@ arch/arm64/kvm/arch_timer.c:960:74: sparse: expected void *vcpu_info arch/arm64/kvm/arch_timer.c:960:74: sparse: got struct kvm_vcpu *[noderef] __percpu * -- net/802/mrp.c:864:9: sparse: sparse: cast removes address space '__rcu' of expression >> net/802/mrp.c:864:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile *p @@ got struct mrp_applicant [noderef] __rcu *[noderef] __rcu *__p @@ net/802/mrp.c:864:9: sparse: expected void const volatile *p >> net/802/mrp.c:864:9: sparse: got struct mrp_applicant [noderef] __rcu *[noderef] __rcu *__p net/802/mrp.c:864:9: sparse: sparse: dereference of noderef expression net/802/mrp.c:864:9: sparse: sparse: dereference of noderef expression -- net/netfilter/nf_tables_api.c:1405:25: sparse: sparse: cast between address spaces (__percpu -> __rcu) net/netfilter/nf_tables_api.c:1405:25: sparse: sparse: incompatible types in comparison expression (different address spaces): net/netfilter/nf_tables_api.c:1405:25: sparse: struct nft_stats [noderef] __rcu * net/netfilter/nf_tables_api.c:1405:25: sparse: struct nft_stats [noderef] __percpu * net/netfilter/nf_tables_api.c:1567:31: sparse: sparse: incorrect type in return expression (different address spaces) @@ expected struct nft_stats [noderef] __percpu * @@ got void * @@ net/netfilter/nf_tables_api.c:1570:31: sparse: sparse: incorrect type in return expression (different address spaces) @@ expected struct nft_stats [noderef] __percpu * @@ got void * @@ net/netfilter/nf_tables_api.c:1574:31: sparse: sparse: incorrect type in return expression (different address spaces) @@ expected struct nft_stats [noderef] __percpu * @@ got void * @@ net/netfilter/nf_tables_api.c:1596:17: sparse: sparse: cast between address spaces (__percpu -> __rcu) net/netfilter/nf_tables_api.c:1596:17: sparse: sparse: incompatible types in comparison expression (different address spaces): net/netfilter/nf_tables_api.c:1596:17: sparse: struct nft_stats [noderef] __rcu * net/netfilter/nf_tables_api.c:1596:17: sparse: struct nft_stats [noderef] __percpu * net/netfilter/nf_tables_api.c:1596:17: sparse: sparse: incompatible types in comparison expression (different address spaces): net/netfilter/nf_tables_api.c:1596:17: sparse: struct nft_stats [noderef] __rcu * net/netfilter/nf_tables_api.c:1596:17: sparse: struct nft_stats [noderef] __percpu * net/netfilter/nf_tables_api.c:1639:21: sparse: sparse: cast between address spaces (__percpu -> __rcu) net/netfilter/nf_tables_api.c:1639:21: sparse: sparse: incompatible types in comparison expression (different address spaces): net/netfilter/nf_tables_api.c:1639:21: sparse: struct nft_stats [noderef] __rcu * net/netfilter/nf_tables_api.c:1639:21: sparse: struct nft_stats [noderef] __percpu * net/netfilter/nf_tables_api.c:1947:25: sparse: sparse: cast between address spaces (__percpu -> __rcu) net/netfilter/nf_tables_api.c:1947:25: sparse: sparse: incompatible types in comparison expression (different address spaces): net/netfilter/nf_tables_api.c:1947:25: sparse: struct nft_stats [noderef] __rcu * net/netfilter/nf_tables_api.c:1947:25: sparse: struct nft_stats [noderef] __percpu * net/netfilter/nf_tables_api.c:2097:23: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct nft_stats *stats @@ got struct nft_stats [noderef] __percpu * @@ net/netfilter/nf_tables_api.c:2097:23: sparse: expected struct nft_stats *stats >> net/netfilter/nf_tables_api.c:2097:23: sparse: got struct nft_stats [noderef] __percpu * net/netfilter/nf_tables_api.c:2108:38: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct nft_stats [noderef] __percpu *stats @@ got struct nft_stats *stats @@ >> net/netfilter/nf_tables_api.c:2108:38: sparse: expected struct nft_stats [noderef] __percpu *stats net/netfilter/nf_tables_api.c:2108:38: sparse: got struct nft_stats *stats net/netfilter/nf_tables_api.c:2144:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void [noderef] __percpu *__pdata @@ got struct nft_stats *stats @@ >> net/netfilter/nf_tables_api.c:2144:21: sparse: expected void [noderef] __percpu *__pdata net/netfilter/nf_tables_api.c:2144:21: sparse: got struct nft_stats *stats net/netfilter/nf_tables_api.c:759:12: sparse: sparse: context imbalance in 'nft_netlink_dump_start_rcu' - unexpected unlock
vim +1288 arch/arm64/kvm/arm.c
749cf76c5a363e arch/arm/kvm/arm.c Christoffer Dall 2013-01-20 1271 7e0befd521b6d4 virt/kvm/arm/arm.c Miaohe Lin 2019-11-21 1272 static void cpu_init_hyp_mode(void) 342cd0ab0e6ca3 arch/arm/kvm/arm.c Christoffer Dall 2013-01-20 1273 { dac288f7b38a74 arch/arm/kvm/arm.c Marc Zyngier 2013-05-14 1274 phys_addr_t pgd_ptr; 342cd0ab0e6ca3 arch/arm/kvm/arm.c Christoffer Dall 2013-01-20 1275 unsigned long hyp_stack_ptr; 342cd0ab0e6ca3 arch/arm/kvm/arm.c Christoffer Dall 2013-01-20 1276 unsigned long vector_ptr; 71b3ec5f221b8b arch/arm64/kvm/arm.c David Brazdil 2020-05-15 1277 unsigned long tpidr_el2; 342cd0ab0e6ca3 arch/arm/kvm/arm.c Christoffer Dall 2013-01-20 1278 342cd0ab0e6ca3 arch/arm/kvm/arm.c Christoffer Dall 2013-01-20 1279 /* Switch from the HYP stub to our own HYP init vector */ 5a677ce044f18a arch/arm/kvm/arm.c Marc Zyngier 2013-04-12 1280 __hyp_set_vectors(kvm_get_idmap_vector()); 342cd0ab0e6ca3 arch/arm/kvm/arm.c Christoffer Dall 2013-01-20 1281 71b3ec5f221b8b arch/arm64/kvm/arm.c David Brazdil 2020-05-15 1282 /* 71b3ec5f221b8b arch/arm64/kvm/arm.c David Brazdil 2020-05-15 1283 * Calculate the raw per-cpu offset without a translation from the 71b3ec5f221b8b arch/arm64/kvm/arm.c David Brazdil 2020-05-15 1284 * kernel's mapping to the linear mapping, and store it in tpidr_el2 71b3ec5f221b8b arch/arm64/kvm/arm.c David Brazdil 2020-05-15 1285 * so that we can use adr_l to access per-cpu variables in EL2. 71b3ec5f221b8b arch/arm64/kvm/arm.c David Brazdil 2020-05-15 1286 */ 71b3ec5f221b8b arch/arm64/kvm/arm.c David Brazdil 2020-05-15 1287 tpidr_el2 = ((unsigned long)this_cpu_ptr(&kvm_host_data) - 71b3ec5f221b8b arch/arm64/kvm/arm.c David Brazdil 2020-05-15 @1288 (unsigned long)kvm_ksym_ref(kvm_host_data)); 71b3ec5f221b8b arch/arm64/kvm/arm.c David Brazdil 2020-05-15 1289 dac288f7b38a74 arch/arm/kvm/arm.c Marc Zyngier 2013-05-14 1290 pgd_ptr = kvm_mmu_get_httbr(); 71b3ec5f221b8b arch/arm64/kvm/arm.c David Brazdil 2020-05-15 1291 hyp_stack_ptr = __this_cpu_read(kvm_arm_hyp_stack_page) + PAGE_SIZE; 6840bdd73d0721 virt/kvm/arm/arm.c Marc Zyngier 2018-01-03 1292 vector_ptr = (unsigned long)kvm_get_hyp_vector(); 342cd0ab0e6ca3 arch/arm/kvm/arm.c Christoffer Dall 2013-01-20 1293 71b3ec5f221b8b arch/arm64/kvm/arm.c David Brazdil 2020-05-15 1294 /* 71b3ec5f221b8b arch/arm64/kvm/arm.c David Brazdil 2020-05-15 1295 * Call initialization code, and switch to the full blown HYP code. 71b3ec5f221b8b arch/arm64/kvm/arm.c David Brazdil 2020-05-15 1296 * If the cpucaps haven't been finalized yet, something has gone very 71b3ec5f221b8b arch/arm64/kvm/arm.c David Brazdil 2020-05-15 1297 * wrong, and hyp will crash and burn when it uses any 71b3ec5f221b8b arch/arm64/kvm/arm.c David Brazdil 2020-05-15 1298 * cpus_have_const_cap() wrapper. 71b3ec5f221b8b arch/arm64/kvm/arm.c David Brazdil 2020-05-15 1299 */ 71b3ec5f221b8b arch/arm64/kvm/arm.c David Brazdil 2020-05-15 1300 BUG_ON(!system_capabilities_finalized()); 71b3ec5f221b8b arch/arm64/kvm/arm.c David Brazdil 2020-05-15 1301 __kvm_call_hyp((void *)pgd_ptr, hyp_stack_ptr, vector_ptr, tpidr_el2); 71b3ec5f221b8b arch/arm64/kvm/arm.c David Brazdil 2020-05-15 1302 71b3ec5f221b8b arch/arm64/kvm/arm.c David Brazdil 2020-05-15 1303 /* 71b3ec5f221b8b arch/arm64/kvm/arm.c David Brazdil 2020-05-15 1304 * Disabling SSBD on a non-VHE system requires us to enable SSBS 71b3ec5f221b8b arch/arm64/kvm/arm.c David Brazdil 2020-05-15 1305 * at EL2. 71b3ec5f221b8b arch/arm64/kvm/arm.c David Brazdil 2020-05-15 1306 */ 71b3ec5f221b8b arch/arm64/kvm/arm.c David Brazdil 2020-05-15 1307 if (this_cpu_has_cap(ARM64_SSBS) && 71b3ec5f221b8b arch/arm64/kvm/arm.c David Brazdil 2020-05-15 1308 arm64_get_ssbd_state() == ARM64_SSBD_FORCE_DISABLE) { 71b3ec5f221b8b arch/arm64/kvm/arm.c David Brazdil 2020-05-15 1309 kvm_call_hyp(__kvm_enable_ssbs); 71b3ec5f221b8b arch/arm64/kvm/arm.c David Brazdil 2020-05-15 1310 } 342cd0ab0e6ca3 arch/arm/kvm/arm.c Christoffer Dall 2013-01-20 1311 } 342cd0ab0e6ca3 arch/arm/kvm/arm.c Christoffer Dall 2013-01-20 1312
:::::: The code at line 1288 was first introduced by commit :::::: 71b3ec5f221b8b3ff545639be83ddfcd5d7c9800 KVM: arm64: Clean up cpu_init_hyp_mode()
:::::: TO: David Brazdil <dbrazdil@google.com> :::::: CC: Marc Zyngier <maz@kernel.org>
--- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org [unhandled content-type:application/gzip] | |