* [openeuler:OLK-6.6 2411/2411] drivers/crypto/ccp/hygon/tdm-kernel-guard.c:151:5: warning: no previous prototype for 'tdm_service_run'
@ 2025-06-29 8:31 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-06-29 8:31 UTC (permalink / raw)
To: kernel; +Cc: oe-kbuild-all
tree: https://gitee.com/openeuler/kernel.git OLK-6.6
head: c02455c4cce8052f74fc11c09e9073c01c7f33a4
commit: 3ad98583441f7c8a2553e1e8d6340ed4397033e2 [2411/2411] crypto: tdm: Support dynamic protection for SCT and IDT by HYGON TDM
config: x86_64-buildonly-randconfig-2001-20250626 (https://download.01.org/0day-ci/archive/20250629/202506291019.RJatdUXf-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/20250629/202506291019.RJatdUXf-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/202506291019.RJatdUXf-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> drivers/crypto/ccp/hygon/tdm-kernel-guard.c:151:5: warning: no previous prototype for 'tdm_service_run' [-Wmissing-prototypes]
151 | int tdm_service_run(struct tdm_security_enhance *data)
| ^~~~~~~~~~~~~~~
>> drivers/crypto/ccp/hygon/tdm-kernel-guard.c:212:5: warning: no previous prototype for 'tdm_service_exit' [-Wmissing-prototypes]
212 | int tdm_service_exit(struct tdm_security_enhance *data)
| ^~~~~~~~~~~~~~~~
Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for ACPI_HOTPLUG_IGNORE_OSC
Depends on [n]: ACPI [=y] && ACPI_HOTPLUG_CPU [=n]
Selected by [y]:
- X86 [=y] && ACPI [=y] && HOTPLUG_CPU [=y]
vim +/tdm_service_run +151 drivers/crypto/ccp/hygon/tdm-kernel-guard.c
150
> 151 int tdm_service_run(struct tdm_security_enhance *data)
152 {
153 int ret = 0;
154 struct addr_range_info *addr_range = NULL;
155
156 // Allocate memory for addr_range
157 addr_range = kzalloc(sizeof(struct addr_range_info) + sizeof(struct addr_info), GFP_KERNEL);
158 if (!addr_range) {
159 ret = -DYN_ERR_MEM;
160 pr_err("addr_range kzalloc memory failed\n");
161 goto end;
162 }
163
164 // Fill in addr_range
165 addr_range->count = 1;
166 addr_range->addr[0].addr_start = data->vaddr;
167 addr_range->addr[0].length = data->size;
168 data->mem_range = addr_range;
169
170 // Context configuration
171 data->context |= TASK_CREATE_VADDR;
172
173 // Allocate memory for authcode
174 data->authcode = kzalloc(sizeof(struct authcode_2b) + AUTHCODE_MAX, GFP_KERNEL);
175 if (!data->authcode) {
176 ret = -DYN_ERR_MEM;
177 pr_err("authcode_2b kzalloc memory failed\n");
178 goto free_addr_range_info;
179 }
180
181 data->authcode->len = AUTHCODE_MAX;
182
183 // Measurement data configuration
184 data->mdata.hash_algo = HASH_ALGO_SM3;
185 data->mdata.period_ms = 0;
186 ret = calc_expected_hash((uint8_t *)data->vaddr, data->size,
187 data->mdata.expected_measurement);
188 if (ret) {
189 pr_err("calculate expected hash failed!\n");
190 goto free_authcode;
191 }
192
193 // Create and start tdm task
194 ret = tdm_task_create_and_run(data);
195 if (ret) {
196 pr_err("tdm_task_create_and_run failed!\n");
197 goto free_authcode;
198 }
199
200 return ret;
201
202 free_authcode:
203 kfree(data->authcode);
204 data->authcode = NULL;
205 free_addr_range_info:
206 kfree(data->mem_range);
207 data->mem_range = NULL;
208 end:
209 return ret;
210 }
211
> 212 int tdm_service_exit(struct tdm_security_enhance *data)
213 {
214 int ret = 0;
215 int task_status = 0;
216
217 task_status = psp_startstop_measure_task(data->task_id, data->authcode, false);
218 if (task_status < 0) {
219 ret = task_status;
220 pr_err("task_id %d stop failed with 0x%x\n", data->task_id, ret);
221 goto end;
222 }
223
224 // Waiting for the task to end
225 msleep(40);
226
227 psp_destroy_measure_task(data->task_id, data->authcode);
228
229 kfree(data->authcode);
230 data->authcode = NULL;
231 kfree(data->mem_range);
232 data->mem_range = NULL;
233 end:
234 return ret;
235 }
236
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2025-06-29 8:32 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-29 8:31 [openeuler:OLK-6.6 2411/2411] drivers/crypto/ccp/hygon/tdm-kernel-guard.c:151:5: warning: no previous prototype for 'tdm_service_run' kernel test robot
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.