All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Amirreza Zarrabi <quic_azarrabi@quicinc.com>,
	Jens Wiklander <jens.wiklander@linaro.org>,
	Sumit Garg <sumit.garg@linaro.org>,
	Bjorn Andersson <andersson@kernel.org>,
	Konrad Dybcio <konradybcio@kernel.org>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Bartosz Golaszewski <bartosz.golaszewski@linaro.org>,
	Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: oe-kbuild-all@lists.linux.dev, linux-arm-msm@vger.kernel.org,
	op-tee@lists.trustedfirmware.org, linux-kernel@vger.kernel.org,
	devicetree@vger.kernel.org, linux-doc@vger.kernel.org,
	Amirreza Zarrabi <quic_azarrabi@quicinc.com>
Subject: Re: [PATCH 02/10] tee: add TEE_IOCTL_PARAM_ATTR_TYPE_MEMBUF
Date: Tue, 3 Dec 2024 16:01:25 +0800	[thread overview]
Message-ID: <202412031510.Oh9kNGeK-lkp@intel.com> (raw)
In-Reply-To: <20241202-qcom-tee-using-tee-ss-without-mem-obj-v1-2-f502ef01e016@quicinc.com>

Hi Amirreza,

kernel test robot noticed the following build warnings:

[auto build test WARNING on f486c8aa16b8172f63bddc70116a0c897a7f3f02]

url:    https://github.com/intel-lab-lkp/linux/commits/Amirreza-Zarrabi/tee-allow-a-driver-to-allocate-a-tee_device-without-a-pool/20241203-122412
base:   f486c8aa16b8172f63bddc70116a0c897a7f3f02
patch link:    https://lore.kernel.org/r/20241202-qcom-tee-using-tee-ss-without-mem-obj-v1-2-f502ef01e016%40quicinc.com
patch subject: [PATCH 02/10] tee: add TEE_IOCTL_PARAM_ATTR_TYPE_MEMBUF
config: i386-buildonly-randconfig-002-20241203 (https://download.01.org/0day-ci/archive/20241203/202412031510.Oh9kNGeK-lkp@intel.com/config)
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/20241203/202412031510.Oh9kNGeK-lkp@intel.com/reproduce)

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/202412031510.Oh9kNGeK-lkp@intel.com/

All warnings (new ones prefixed by >>):

   drivers/tee/tee_core.c: In function 'params_to_supp':
>> drivers/tee/tee_core.c:669:32: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
     669 |                         ip.a = (u64)p->u.membuf.uaddr;
         |                                ^


vim +669 drivers/tee/tee_core.c

   648	
   649	static int params_to_supp(struct tee_context *ctx,
   650				  struct tee_ioctl_param __user *uparams,
   651				  size_t num_params, struct tee_param *params)
   652	{
   653		size_t n;
   654	
   655		for (n = 0; n < num_params; n++) {
   656			struct tee_ioctl_param ip;
   657			struct tee_param *p = params + n;
   658	
   659			ip.attr = p->attr;
   660			switch (p->attr & TEE_IOCTL_PARAM_ATTR_TYPE_MASK) {
   661			case TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INPUT:
   662			case TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT:
   663				ip.a = p->u.value.a;
   664				ip.b = p->u.value.b;
   665				ip.c = p->u.value.c;
   666				break;
   667			case TEE_IOCTL_PARAM_ATTR_TYPE_MEMBUF_INPUT:
   668			case TEE_IOCTL_PARAM_ATTR_TYPE_MEMBUF_INOUT:
 > 669				ip.a = (u64)p->u.membuf.uaddr;
   670				ip.b = p->u.membuf.size;
   671				ip.c = 0;
   672				break;
   673			case TEE_IOCTL_PARAM_ATTR_TYPE_MEMREF_INPUT:
   674			case TEE_IOCTL_PARAM_ATTR_TYPE_MEMREF_OUTPUT:
   675			case TEE_IOCTL_PARAM_ATTR_TYPE_MEMREF_INOUT:
   676				ip.b = p->u.memref.size;
   677				if (!p->u.memref.shm) {
   678					ip.a = 0;
   679					ip.c = (u64)-1; /* invalid shm id */
   680					break;
   681				}
   682				ip.a = p->u.memref.shm_offs;
   683				ip.c = p->u.memref.shm->id;
   684				break;
   685			default:
   686				ip.a = 0;
   687				ip.b = 0;
   688				ip.c = 0;
   689				break;
   690			}
   691	
   692			if (copy_to_user(uparams + n, &ip, sizeof(ip)))
   693				return -EFAULT;
   694		}
   695	
   696		return 0;
   697	}
   698	

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

WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: op-tee@lists.trustedfirmware.org
Subject: Re: [PATCH 02/10] tee: add TEE_IOCTL_PARAM_ATTR_TYPE_MEMBUF
Date: Tue, 03 Dec 2024 16:01:25 +0800	[thread overview]
Message-ID: <202412031510.Oh9kNGeK-lkp@intel.com> (raw)
In-Reply-To: <<20241202-qcom-tee-using-tee-ss-without-mem-obj-v1-2-f502ef01e016@quicinc.com>>

[-- Attachment #1: Type: text/plain, Size: 3171 bytes --]

Hi Amirreza,

kernel test robot noticed the following build warnings:

[auto build test WARNING on f486c8aa16b8172f63bddc70116a0c897a7f3f02]

url:    https://github.com/intel-lab-lkp/linux/commits/Amirreza-Zarrabi/tee-allow-a-driver-to-allocate-a-tee_device-without-a-pool/20241203-122412
base:   f486c8aa16b8172f63bddc70116a0c897a7f3f02
patch link:    https://lore.kernel.org/r/20241202-qcom-tee-using-tee-ss-without-mem-obj-v1-2-f502ef01e016%40quicinc.com
patch subject: [PATCH 02/10] tee: add TEE_IOCTL_PARAM_ATTR_TYPE_MEMBUF
config: i386-buildonly-randconfig-002-20241203 (https://download.01.org/0day-ci/archive/20241203/202412031510.Oh9kNGeK-lkp(a)intel.com/config)
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/20241203/202412031510.Oh9kNGeK-lkp(a)intel.com/reproduce)

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/202412031510.Oh9kNGeK-lkp(a)intel.com/

All warnings (new ones prefixed by >>):

   drivers/tee/tee_core.c: In function 'params_to_supp':
>> drivers/tee/tee_core.c:669:32: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
     669 |                         ip.a = (u64)p->u.membuf.uaddr;
         |                                ^


vim +669 drivers/tee/tee_core.c

   648	
   649	static int params_to_supp(struct tee_context *ctx,
   650				  struct tee_ioctl_param __user *uparams,
   651				  size_t num_params, struct tee_param *params)
   652	{
   653		size_t n;
   654	
   655		for (n = 0; n < num_params; n++) {
   656			struct tee_ioctl_param ip;
   657			struct tee_param *p = params + n;
   658	
   659			ip.attr = p->attr;
   660			switch (p->attr & TEE_IOCTL_PARAM_ATTR_TYPE_MASK) {
   661			case TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INPUT:
   662			case TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT:
   663				ip.a = p->u.value.a;
   664				ip.b = p->u.value.b;
   665				ip.c = p->u.value.c;
   666				break;
   667			case TEE_IOCTL_PARAM_ATTR_TYPE_MEMBUF_INPUT:
   668			case TEE_IOCTL_PARAM_ATTR_TYPE_MEMBUF_INOUT:
 > 669				ip.a = (u64)p->u.membuf.uaddr;
   670				ip.b = p->u.membuf.size;
   671				ip.c = 0;
   672				break;
   673			case TEE_IOCTL_PARAM_ATTR_TYPE_MEMREF_INPUT:
   674			case TEE_IOCTL_PARAM_ATTR_TYPE_MEMREF_OUTPUT:
   675			case TEE_IOCTL_PARAM_ATTR_TYPE_MEMREF_INOUT:
   676				ip.b = p->u.memref.size;
   677				if (!p->u.memref.shm) {
   678					ip.a = 0;
   679					ip.c = (u64)-1; /* invalid shm id */
   680					break;
   681				}
   682				ip.a = p->u.memref.shm_offs;
   683				ip.c = p->u.memref.shm->id;
   684				break;
   685			default:
   686				ip.a = 0;
   687				ip.b = 0;
   688				ip.c = 0;
   689				break;
   690			}
   691	
   692			if (copy_to_user(uparams + n, &ip, sizeof(ip)))
   693				return -EFAULT;
   694		}
   695	
   696		return 0;
   697	}
   698	

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

  reply	other threads:[~2024-12-03  8:02 UTC|newest]

Thread overview: 68+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-03  4:19 [PATCH 00/10] Trusted Execution Environment (TEE) driver for Qualcomm TEE (QTEE) Amirreza Zarrabi
2024-12-03  4:19 ` Amirreza Zarrabi
2024-12-03  4:19 ` [PATCH 01/10] tee: allow a driver to allocate a tee_device without a pool Amirreza Zarrabi
2024-12-03  4:19   ` Amirreza Zarrabi
2024-12-03  4:19 ` [PATCH 02/10] tee: add TEE_IOCTL_PARAM_ATTR_TYPE_MEMBUF Amirreza Zarrabi
2024-12-03  4:19   ` Amirreza Zarrabi
2024-12-03  8:01   ` kernel test robot [this message]
2024-12-03  8:01     ` kernel test robot
2024-12-09 15:46   ` Jens Wiklander
2024-12-09 15:46     ` Jens Wiklander
2024-12-09 23:00     ` Amirreza Zarrabi
2024-12-09 23:00       ` Amirreza Zarrabi
2024-12-03  4:19 ` [PATCH 03/10] tee: add TEE_IOCTL_PARAM_ATTR_TYPE_OBJREF Amirreza Zarrabi
2024-12-03  4:19   ` Amirreza Zarrabi
2024-12-03  4:19 ` [PATCH 04/10] firmware: qcom: scm: add support for object invocation Amirreza Zarrabi
2024-12-03  4:19   ` Amirreza Zarrabi
2024-12-03  4:19 ` [PATCH 05/10] qcomtee: implement object invoke support Amirreza Zarrabi
2024-12-03  4:19   ` Amirreza Zarrabi
2024-12-09 18:43   ` Jens Wiklander
2024-12-09 18:43     ` Jens Wiklander
2024-12-10 21:42     ` Amirreza Zarrabi
2024-12-10 21:42       ` Amirreza Zarrabi
2024-12-10 10:24   ` Jens Wiklander
2024-12-10 10:24     ` Jens Wiklander
2024-12-10 21:44     ` Amirreza Zarrabi
2024-12-10 21:44       ` Amirreza Zarrabi
2024-12-03  4:19 ` [PATCH 06/10] qcomtee: add primordial object Amirreza Zarrabi
2024-12-03  4:19   ` Amirreza Zarrabi
2024-12-03  4:19 ` [PATCH 07/10] dt-bindings: arm: qcomtee: add QTEE driver devicetree binding for TEE subsystem Amirreza Zarrabi
2024-12-03  4:19   ` Amirreza Zarrabi
2024-12-03  7:55   ` Krzysztof Kozlowski
2024-12-03  7:55     ` Krzysztof Kozlowski
2024-12-03  4:19 ` [PATCH 08/10] tee: add Qualcomm TEE driver Amirreza Zarrabi
2024-12-03  4:19   ` Amirreza Zarrabi
2024-12-03  7:57   ` Krzysztof Kozlowski
2024-12-03  7:57     ` Krzysztof Kozlowski
2024-12-10 11:58   ` Jens Wiklander
2024-12-10 11:58     ` Jens Wiklander
2024-12-11  2:30     ` Amirreza Zarrabi
2024-12-11  2:30       ` Amirreza Zarrabi
2024-12-11 14:04       ` Jens Wiklander
2024-12-11 14:04         ` Jens Wiklander
2024-12-12  0:19         ` Amirreza Zarrabi
2024-12-12  0:19           ` Amirreza Zarrabi
2024-12-12  7:07           ` Jens Wiklander
2024-12-12  7:07             ` Jens Wiklander
2024-12-03  4:19 ` [PATCH 09/10] arm64: dts: qcom: sm8650: add support for QTEE Amirreza Zarrabi
2024-12-03  4:19   ` Amirreza Zarrabi
2024-12-03  7:59   ` Krzysztof Kozlowski
2024-12-03  7:59     ` Krzysztof Kozlowski
2024-12-04  1:00     ` Amirreza Zarrabi
2024-12-04  1:00       ` Amirreza Zarrabi
2024-12-03  4:19 ` [PATCH 10/10] Documentation: tee: Add Qualcomm TEE driver Amirreza Zarrabi
2024-12-03  4:19   ` Amirreza Zarrabi
2024-12-03  7:58   ` Krzysztof Kozlowski
2024-12-03  7:58     ` Krzysztof Kozlowski
2024-12-03  6:06 ` [PATCH 00/10] Trusted Execution Environment (TEE) driver for Qualcomm TEE (QTEE) Trilok Soni
2024-12-03  6:06   ` Trilok Soni
2024-12-03 22:13   ` Amirreza Zarrabi
2024-12-03 22:13     ` Amirreza Zarrabi
2024-12-03 23:43     ` Dmitry Baryshkov
2024-12-03 23:43       ` Dmitry Baryshkov
2024-12-04  0:45       ` Amirreza Zarrabi
2024-12-04  0:45         ` Amirreza Zarrabi
2024-12-18 14:25 ` Sumit Garg
2024-12-18 14:25   ` Sumit Garg
2024-12-18 19:20   ` Amirreza Zarrabi
2024-12-18 19:20     ` Amirreza Zarrabi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202412031510.Oh9kNGeK-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=andersson@kernel.org \
    --cc=bartosz.golaszewski@linaro.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=jens.wiklander@linaro.org \
    --cc=konradybcio@kernel.org \
    --cc=krzk@kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=op-tee@lists.trustedfirmware.org \
    --cc=quic_azarrabi@quicinc.com \
    --cc=robh@kernel.org \
    --cc=srinivas.kandagatla@linaro.org \
    --cc=sumit.garg@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.