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: <202112061646.kfEhMbff-lkp@intel.com>
Date:   Mon, 6 Dec 2021 16:28:49 +0800
From:   kernel test robot <lkp@...el.com>
To:     Michael Kelley <mikelley@...rosoft.com>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
        Wei Liu <wei.liu@...nel.org>
Subject: drivers/hv/hv_common.c:61:21: sparse: sparse: incorrect type in
 argument 1 (different address spaces)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   0fcfb00b28c0b7884635dacf38e46d60bf3d4eb1
commit: afca4d95dd7d7936d46a0ff02169cc40f534a6a3 Drivers: hv: Make portions of Hyper-V init code be arch neutral
date:   5 months ago
config: x86_64-randconfig-s022-20211206 (https://download.01.org/0day-ci/archive/20211206/202112061646.kfEhMbff-lkp@intel.com/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=afca4d95dd7d7936d46a0ff02169cc40f534a6a3
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout afca4d95dd7d7936d46a0ff02169cc40f534a6a3
        # save the config file to linux build tree
        mkdir build_dir
        make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/hv/

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/hv/hv_common.c:61:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void [noderef] __percpu *__pdata @@     got void [noderef] __percpu **[addressable] [toplevel] hyperv_pcpu_output_arg @@
   drivers/hv/hv_common.c:61:21: sparse:     expected void [noderef] __percpu *__pdata
   drivers/hv/hv_common.c:61:21: sparse:     got void [noderef] __percpu **[addressable] [toplevel] hyperv_pcpu_output_arg
>> drivers/hv/hv_common.c:64:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void [noderef] __percpu *__pdata @@     got void [noderef] __percpu **[addressable] [toplevel] hyperv_pcpu_input_arg @@
   drivers/hv/hv_common.c:64:21: sparse:     expected void [noderef] __percpu *__pdata
   drivers/hv/hv_common.c:64:21: sparse:     got void [noderef] __percpu **[addressable] [toplevel] hyperv_pcpu_input_arg
>> drivers/hv/hv_common.c:78:31: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected void [noderef] __percpu **[addressable] [assigned] [toplevel] hyperv_pcpu_input_arg @@     got void *[noderef] __percpu * @@
   drivers/hv/hv_common.c:78:31: sparse:     expected void [noderef] __percpu **[addressable] [assigned] [toplevel] hyperv_pcpu_input_arg
   drivers/hv/hv_common.c:78:31: sparse:     got void *[noderef] __percpu *
>> drivers/hv/hv_common.c:83:40: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected void [noderef] __percpu **[addressable] [assigned] [toplevel] hyperv_pcpu_output_arg @@     got void *[noderef] __percpu * @@
   drivers/hv/hv_common.c:83:40: sparse:     expected void [noderef] __percpu **[addressable] [assigned] [toplevel] hyperv_pcpu_output_arg
   drivers/hv/hv_common.c:83:40: sparse:     got void *[noderef] __percpu *
   drivers/hv/hv_common.c:116:29: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected void const [noderef] __percpu *__vpp_verify @@     got void [noderef] __percpu ** @@
   drivers/hv/hv_common.c:116:29: sparse:     expected void const [noderef] __percpu *__vpp_verify
   drivers/hv/hv_common.c:116:29: sparse:     got void [noderef] __percpu **
   drivers/hv/hv_common.c:122:38: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected void const [noderef] __percpu *__vpp_verify @@     got void [noderef] __percpu ** @@
   drivers/hv/hv_common.c:122:38: sparse:     expected void const [noderef] __percpu *__vpp_verify
   drivers/hv/hv_common.c:122:38: sparse:     got void [noderef] __percpu **
   drivers/hv/hv_common.c:144:29: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected void const [noderef] __percpu *__vpp_verify @@     got void [noderef] __percpu ** @@
   drivers/hv/hv_common.c:144:29: sparse:     expected void const [noderef] __percpu *__vpp_verify
   drivers/hv/hv_common.c:144:29: sparse:     got void [noderef] __percpu **
   drivers/hv/hv_common.c:149:38: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected void const [noderef] __percpu *__vpp_verify @@     got void [noderef] __percpu ** @@
   drivers/hv/hv_common.c:149:38: sparse:     expected void const [noderef] __percpu *__vpp_verify
   drivers/hv/hv_common.c:149:38: sparse:     got void [noderef] __percpu **

vim +61 drivers/hv/hv_common.c

    49	
    50	/*
    51	 * Hyper-V specific initialization and shutdown code that is
    52	 * common across all architectures.  Called from architecture
    53	 * specific initialization functions.
    54	 */
    55	
    56	void __init hv_common_free(void)
    57	{
    58		kfree(hv_vp_index);
    59		hv_vp_index = NULL;
    60	
  > 61		free_percpu(hyperv_pcpu_output_arg);
    62		hyperv_pcpu_output_arg = NULL;
    63	
  > 64		free_percpu(hyperv_pcpu_input_arg);
    65		hyperv_pcpu_input_arg = NULL;
    66	}
    67	
    68	int __init hv_common_init(void)
    69	{
    70		int i;
    71	
    72		/*
    73		 * Allocate the per-CPU state for the hypercall input arg.
    74		 * If this allocation fails, we will not be able to setup
    75		 * (per-CPU) hypercall input page and thus this failure is
    76		 * fatal on Hyper-V.
    77		 */
  > 78		hyperv_pcpu_input_arg = alloc_percpu(void  *);
    79		BUG_ON(!hyperv_pcpu_input_arg);
    80	
    81		/* Allocate the per-CPU state for output arg for root */
    82		if (hv_root_partition) {
  > 83			hyperv_pcpu_output_arg = alloc_percpu(void *);
    84			BUG_ON(!hyperv_pcpu_output_arg);
    85		}
    86	
    87		hv_vp_index = kmalloc_array(num_possible_cpus(), sizeof(*hv_vp_index),
    88					    GFP_KERNEL);
    89		if (!hv_vp_index) {
    90			hv_common_free();
    91			return -ENOMEM;
    92		}
    93	
    94		for (i = 0; i < num_possible_cpus(); i++)
    95			hv_vp_index[i] = VP_INVAL;
    96	
    97		return 0;
    98	}
    99	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ