[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202005200457.wt5oXb8O%lkp@intel.com>
Date: Wed, 20 May 2020 04:41:22 +0800
From: kbuild test robot <lkp@...el.com>
To: Maxim Uvarov <maxim.uvarov@...aro.org>,
linux-kernel@...r.kernel.org, tee-dev@...ts.linaro.org
Cc: kbuild-all@...ts.01.org, peterhuewe@....de,
jarkko.sakkinen@...ux.intel.com, jgg@...pe.ca,
gregkh@...uxfoundation.org, jens.wiklander@...aro.org,
linux-integrity@...r.kernel.org, arnd@...aro.org,
sumit.garg@...aro.org, Maxim Uvarov <maxim.uvarov@...aro.org>
Subject: Re: [PATCH 1/2] optee: do drivers initialization before and after
tee-supplicant run
Hi Maxim,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on char-misc/char-misc-testing]
[also build test WARNING on linus/master v5.7-rc6 next-20200519]
[cannot apply to linux/master]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Maxim-Uvarov/optee-register-drivers-on-optee-bus/20200518-213659
base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git 57c76221d5af648c8355a55c09b050c5d8d38189
config: arm64-allyesconfig (attached as .config)
compiler: aarch64-linux-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp@...el.com>
All warnings (new ones prefixed by >>, old ones prefixed by <<):
>> drivers/tee/optee/device.c:90:5: warning: no previous prototype for '__optee_enumerate_devices' [-Wmissing-prototypes]
90 | int __optee_enumerate_devices(u32 func)
| ^~~~~~~~~~~~~~~~~~~~~~~~~
vim +/__optee_enumerate_devices +90 drivers/tee/optee/device.c
89
> 90 int __optee_enumerate_devices(u32 func)
91 {
92 const uuid_t pta_uuid =
93 UUID_INIT(0x7011a688, 0xddde, 0x4053,
94 0xa5, 0xa9, 0x7b, 0x3c, 0x4d, 0xdf, 0x13, 0xb8);
95 struct tee_ioctl_open_session_arg sess_arg;
96 struct tee_shm *device_shm = NULL;
97 const uuid_t *device_uuid = NULL;
98 struct tee_context *ctx = NULL;
99 u32 shm_size = 0, idx, num_devices = 0;
100 int rc;
101
102 memset(&sess_arg, 0, sizeof(sess_arg));
103
104 /* Open context with OP-TEE driver */
105 ctx = tee_client_open_context(NULL, optee_ctx_match, NULL, NULL);
106 if (IS_ERR(ctx))
107 return -ENODEV;
108
109 /* Open session with device enumeration pseudo TA */
110 memcpy(sess_arg.uuid, pta_uuid.b, TEE_IOCTL_UUID_LEN);
111 sess_arg.clnt_login = TEE_IOCTL_LOGIN_PUBLIC;
112 sess_arg.num_params = 0;
113
114 rc = tee_client_open_session(ctx, &sess_arg, NULL);
115 if ((rc < 0) || (sess_arg.ret != TEEC_SUCCESS)) {
116 /* Device enumeration pseudo TA not found */
117 rc = 0;
118 goto out_ctx;
119 }
120
121 rc = get_devices(ctx, sess_arg.session, NULL, &shm_size, func);
122 if (rc < 0 || !shm_size)
123 goto out_sess;
124
125 device_shm = tee_shm_alloc(ctx, shm_size,
126 TEE_SHM_MAPPED | TEE_SHM_DMA_BUF);
127 if (IS_ERR(device_shm)) {
128 pr_err("tee_shm_alloc failed\n");
129 rc = PTR_ERR(device_shm);
130 goto out_sess;
131 }
132
133 rc = get_devices(ctx, sess_arg.session, device_shm, &shm_size, func);
134 if (rc < 0)
135 goto out_shm;
136
137 device_uuid = tee_shm_get_va(device_shm, 0);
138 if (IS_ERR(device_uuid)) {
139 pr_err("tee_shm_get_va failed\n");
140 rc = PTR_ERR(device_uuid);
141 goto out_shm;
142 }
143
144 num_devices = shm_size / sizeof(uuid_t);
145
146 for (idx = 0; idx < num_devices; idx++) {
147 rc = optee_register_device(&device_uuid[idx], idx);
148 if (rc)
149 goto out_shm;
150 }
151
152 out_shm:
153 tee_shm_free(device_shm);
154 out_sess:
155 tee_client_close_session(ctx, sess_arg.session);
156 out_ctx:
157 tee_client_close_context(ctx);
158
159 return rc;
160 }
161
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
Download attachment ".config.gz" of type "application/gzip" (71757 bytes)
Powered by blists - more mailing lists