Hi Amirreza,
kernel test robot noticed the following build warnings:
[auto build test WARNING on 3be1a7a31fbda82f3604b6c31e4f390110de1b46]
url: https://github.com/intel-lab-lkp/linux/commits/Amirreza-Zarrabi/tee-allow-a-... base: 3be1a7a31fbda82f3604b6c31e4f390110de1b46 patch link: https://lore.kernel.org/r/20250526-qcom-tee-using-tee-ss-without-mem-obj-v5-... patch subject: [PATCH v5 09/12] tee: add Qualcomm TEE driver config: i386-randconfig-062-20250528 (https://download.01.org/0day-ci/archive/20250528/202505280538.DVSrdWK7-lkp@i...) compiler: gcc-12 (Debian 12.2.0-14) 12.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250528/202505280538.DVSrdWK7-lkp@i...)
If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot lkp@intel.com | Closes: https://lore.kernel.org/oe-kbuild-all/202505280538.DVSrdWK7-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
drivers/tee/qcomtee/call.c:227:38: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void [noderef] __user *uaddr @@ got void *[noderef] uaddr @@
drivers/tee/qcomtee/call.c:227:38: sparse: expected void [noderef] __user *uaddr drivers/tee/qcomtee/call.c:227:38: sparse: got void *[noderef] uaddr
vim +227 drivers/tee/qcomtee/call.c
203 204 /** 205 * qcomtee_params_to_args() - Convert TEE parameters to QTEE arguments. 206 * @u: QTEE arguments. 207 * @params: TEE parameters. 208 * @num_params: number of elements in the parameter array. 209 * @ctx: context in which the conversion should happen. 210 * 211 * It assumes @u has at least @num_params + 1 entries and has been initialized 212 * with %QCOMTEE_ARG_TYPE_INV as &struct qcomtee_arg.type. 213 * 214 * Return: On success, returns 0; on failure, returns < 0. 215 */ 216 static int qcomtee_params_to_args(struct qcomtee_arg *u, 217 struct tee_param *params, int num_params, 218 struct tee_context *ctx) 219 { 220 int i; 221 222 for (i = 0; i < num_params; i++) { 223 switch (params[i].attr) { 224 case TEE_IOCTL_PARAM_ATTR_TYPE_UBUF_INPUT: 225 case TEE_IOCTL_PARAM_ATTR_TYPE_UBUF_OUTPUT: 226 u[i].flags = QCOMTEE_ARG_FLAGS_UADDR;
227 u[i].b.uaddr = params[i].u.ubuf.uaddr;
228 u[i].b.size = params[i].u.ubuf.size; 229 230 if (params[i].attr == 231 TEE_IOCTL_PARAM_ATTR_TYPE_UBUF_INPUT) 232 u[i].type = QCOMTEE_ARG_TYPE_IB; 233 else /* TEE_IOCTL_PARAM_ATTR_TYPE_UBUF_OUTPUT */ 234 u[i].type = QCOMTEE_ARG_TYPE_OB; 235 236 break; 237 case TEE_IOCTL_PARAM_ATTR_TYPE_OBJREF_INPUT: 238 u[i].type = QCOMTEE_ARG_TYPE_IO; 239 if (qcomtee_objref_to_arg(&u[i], ¶ms[i], ctx)) 240 goto out_failed; 241 242 break; 243 case TEE_IOCTL_PARAM_ATTR_TYPE_OBJREF_OUTPUT: 244 u[i].type = QCOMTEE_ARG_TYPE_OO; 245 u[i].o = NULL_QCOMTEE_OBJECT; 246 break; 247 default: 248 goto out_failed; 249 } 250 } 251 252 return 0; 253 254 out_failed: 255 /* Undo qcomtee_objref_to_arg(). */ 256 for (i--; i >= 0; i--) { 257 if (u[i].type != QCOMTEE_ARG_TYPE_IO) 258 continue; 259 260 qcomtee_user_object_set_notify(u[i].o, false); 261 if (typeof_qcomtee_object(u[i].o) == QCOMTEE_OBJECT_TYPE_CB) 262 qcomtee_object_put(u[i].o); 263 264 qcomtee_object_put(u[i].o); 265 } 266 267 return -EINVAL; 268 } 269