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>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <202301171203.U9OOt3Jm-lkp@intel.com>
Date:   Tue, 17 Jan 2023 12:56:08 +0800
From:   kernel test robot <lkp@...el.com>
To:     Etienne Carriere <etienne.carriere@...aro.org>,
        linux-kernel@...r.kernel.org
Cc:     oe-kbuild-all@...ts.linux.dev,
        Jens Wiklander <jens.wiklander@...aro.org>,
        Sumit Garg <sumit.garg@...aro.org>,
        Marc Zyngier <maz@...nel.org>,
        op-tee@...ts.trustedfirmware.org, devicetree@...r.kernel.org,
        Krzysztof Kozlowski <krzk@...nel.org>,
        Rob Herring <robh+dt@...nel.org>,
        Etienne Carriere <etienne.carriere@...aro.org>,
        Alexandre Torgue <alexandre.torgue@...s.st.com>
Subject: Re: [PATCH 1/3] optee: add per cpu asynchronous notification

Hi Etienne,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on robh/for-next]
[also build test WARNING on krzk/for-next krzk-dt/for-next krzk-mem-ctrl/for-next linus/master v6.2-rc4]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Etienne-Carriere/optee-add-per-cpu-asynchronous-notification/20230112-232957
base:   https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next
patch link:    https://lore.kernel.org/r/20230112145424.3791276-2-etienne.carriere%40linaro.org
patch subject: [PATCH 1/3] optee: add per cpu asynchronous notification
config: arm64-randconfig-s043-20230116
compiler: aarch64-linux-gcc (GCC) 12.1.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.4-39-gce1a6720-dirty
        # https://github.com/intel-lab-lkp/linux/commit/3ae0dd52e3ae0cb2b3847b7c1e83381563751041
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Etienne-Carriere/optee-add-per-cpu-asynchronous-notification/20230112-232957
        git checkout 3ae0dd52e3ae0cb2b3847b7c1e83381563751041
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=arm64 olddefconfig
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=arm64 SHELL=/bin/bash drivers/tee/optee/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@...el.com>

sparse warnings: (new ones prefixed by >>)
>> drivers/tee/optee/smc_abi.c:1071:20: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected struct optee_pcpu *optee_pcpu @@     got struct optee_pcpu [noderef] __percpu * @@
   drivers/tee/optee/smc_abi.c:1071:20: sparse:     expected struct optee_pcpu *optee_pcpu
   drivers/tee/optee/smc_abi.c:1071:20: sparse:     got struct optee_pcpu [noderef] __percpu *
>> drivers/tee/optee/smc_abi.c:1076:40: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected void const [noderef] __percpu *__vpp_verify @@     got struct optee_pcpu * @@
   drivers/tee/optee/smc_abi.c:1076:40: sparse:     expected void const [noderef] __percpu *__vpp_verify
   drivers/tee/optee/smc_abi.c:1076:40: sparse:     got struct optee_pcpu *
>> drivers/tee/optee/smc_abi.c:1082:60: sparse: sparse: incorrect type in argument 4 (different address spaces) @@     expected void [noderef] __percpu *percpu_dev_id @@     got struct optee_pcpu *optee_pcpu @@
   drivers/tee/optee/smc_abi.c:1082:60: sparse:     expected void [noderef] __percpu *percpu_dev_id
   drivers/tee/optee/smc_abi.c:1082:60: sparse:     got struct optee_pcpu *optee_pcpu
>> drivers/tee/optee/smc_abi.c:1099:31: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected struct optee_pcpu [noderef] __percpu *optee_pcpu @@     got struct optee_pcpu *optee_pcpu @@
   drivers/tee/optee/smc_abi.c:1099:31: sparse:     expected struct optee_pcpu [noderef] __percpu *optee_pcpu
   drivers/tee/optee/smc_abi.c:1099:31: sparse:     got struct optee_pcpu *optee_pcpu
>> drivers/tee/optee/smc_abi.c:1108:30: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void [noderef] __percpu * @@     got struct optee_pcpu *optee_pcpu @@
   drivers/tee/optee/smc_abi.c:1108:30: sparse:     expected void [noderef] __percpu *
   drivers/tee/optee/smc_abi.c:1108:30: sparse:     got struct optee_pcpu *optee_pcpu
>> drivers/tee/optee/smc_abi.c:1110:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void [noderef] __percpu *__pdata @@     got struct optee_pcpu *optee_pcpu @@
   drivers/tee/optee/smc_abi.c:1110:21: sparse:     expected void [noderef] __percpu *__pdata
   drivers/tee/optee/smc_abi.c:1110:21: sparse:     got struct optee_pcpu *optee_pcpu

vim +1071 drivers/tee/optee/smc_abi.c

  1063	
  1064	static int init_pcpu_irq(struct optee *optee, u_int irq)
  1065	{
  1066		struct optee_pcpu *optee_pcpu;
  1067		spinlock_t lock;
  1068		int cpu;
  1069		int rc;
  1070	
> 1071		optee_pcpu = alloc_percpu(struct optee_pcpu);
  1072		if (!optee_pcpu)
  1073			return -ENOMEM;
  1074	
  1075		for_each_present_cpu(cpu) {
> 1076			struct optee_pcpu *p = per_cpu_ptr(optee_pcpu, cpu);
  1077	
  1078			p->optee = optee;
  1079		}
  1080	
  1081		rc = request_percpu_irq(irq, notif_irq_handler,
> 1082					"optee_pcpu_notification", optee_pcpu);
  1083		if (rc)
  1084			goto err_free_pcpu;
  1085	
  1086		spin_lock_init(&lock);
  1087	
  1088		spin_lock(&lock);
  1089		enable_percpu_irq(irq, 0);
  1090		spin_unlock(&lock);
  1091	
  1092		INIT_WORK(&optee->smc.notif_pcpu_work, notif_pcpu_irq_work_fn);
  1093		optee->smc.notif_pcpu_wq = create_workqueue("optee_pcpu_notification");
  1094		if (!optee->smc.notif_pcpu_wq) {
  1095			rc = -EINVAL;
  1096			goto err_free_pcpu_irq;
  1097		}
  1098	
> 1099		optee->smc.optee_pcpu = optee_pcpu;
  1100		optee->smc.notif_irq = irq;
  1101	
  1102		return 0;
  1103	
  1104	err_free_pcpu_irq:
  1105		spin_lock(&lock);
  1106		disable_percpu_irq(irq);
  1107		spin_unlock(&lock);
> 1108		free_percpu_irq(irq, optee_pcpu);
  1109	err_free_pcpu:
> 1110		free_percpu(optee_pcpu);
  1111	
  1112		return rc;
  1113	}
  1114	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests

View attachment "config" of type "text/plain" (194174 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ