Hi Amirreza,
kernel test robot noticed the following build warnings:
[auto build test WARNING on 5303936d609e09665deda94eaedf26a0e5c3a087]
url: https://github.com/intel-lab-lkp/linux/commits/Amirreza-Zarrabi/tee-allow-a-... base: 5303936d609e09665deda94eaedf26a0e5c3a087 patch link: https://lore.kernel.org/r/20250820-qcom-tee-using-tee-ss-without-mem-obj-v8-... patch subject: [PATCH v8 03/11] tee: add TEE_IOCTL_PARAM_ATTR_TYPE_UBUF config: arm-randconfig-r133-20250821 (https://download.01.org/0day-ci/archive/20250822/202508220436.qjXO4p8r-lkp@i...) compiler: clang version 22.0.0git (https://github.com/llvm/llvm-project 93d24b6b7b148c47a2fa228a4ef31524fa1d9f3f) reproduce: (https://download.01.org/0day-ci/archive/20250822/202508220436.qjXO4p8r-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/202508220436.qjXO4p8r-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
drivers/tee/tee_core.c:640:33: sparse: sparse: cast removes address space '__user' of expression
vim +/__user +640 drivers/tee/tee_core.c
618 619 static int params_to_supp(struct tee_context *ctx, 620 struct tee_ioctl_param __user *uparams, 621 size_t num_params, struct tee_param *params) 622 { 623 size_t n; 624 625 for (n = 0; n < num_params; n++) { 626 struct tee_ioctl_param ip; 627 struct tee_param *p = params + n; 628 629 ip.attr = p->attr; 630 switch (p->attr & TEE_IOCTL_PARAM_ATTR_TYPE_MASK) { 631 case TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INPUT: 632 case TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT: 633 ip.a = p->u.value.a; 634 ip.b = p->u.value.b; 635 ip.c = p->u.value.c; 636 break; 637 case TEE_IOCTL_PARAM_ATTR_TYPE_UBUF_INPUT: 638 case TEE_IOCTL_PARAM_ATTR_TYPE_UBUF_OUTPUT: 639 case TEE_IOCTL_PARAM_ATTR_TYPE_UBUF_INOUT:
640 ip.a = (u64)p->u.ubuf.uaddr;
641 ip.b = p->u.ubuf.size; 642 ip.c = 0; 643 break; 644 case TEE_IOCTL_PARAM_ATTR_TYPE_MEMREF_INPUT: 645 case TEE_IOCTL_PARAM_ATTR_TYPE_MEMREF_OUTPUT: 646 case TEE_IOCTL_PARAM_ATTR_TYPE_MEMREF_INOUT: 647 ip.b = p->u.memref.size; 648 if (!p->u.memref.shm) { 649 ip.a = 0; 650 ip.c = (u64)-1; /* invalid shm id */ 651 break; 652 } 653 ip.a = p->u.memref.shm_offs; 654 ip.c = p->u.memref.shm->id; 655 break; 656 default: 657 ip.a = 0; 658 ip.b = 0; 659 ip.c = 0; 660 break; 661 } 662 663 if (copy_to_user(uparams + n, &ip, sizeof(ip))) 664 return -EFAULT; 665 } 666 667 return 0; 668 } 669
linaro-mm-sig@lists.linaro.org