From d3ad94a6812f21728b18f7587260452d7062e3db Mon Sep 17 00:00:00 2001 From: gongchangsui Date: Mon, 10 Nov 2025 22:19:57 -0500 Subject: [PATCH] remove file_size check to support build-in ta Signed-off-by: gongchangsui --- trustzone-awared-vm/VM/vtzdriver/vtzf.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/trustzone-awared-vm/VM/vtzdriver/vtzf.c b/trustzone-awared-vm/VM/vtzdriver/vtzf.c index 9c9f597..c78d116 100644 --- a/trustzone-awared-vm/VM/vtzdriver/vtzf.c +++ b/trustzone-awared-vm/VM/vtzdriver/vtzf.c @@ -724,10 +724,12 @@ static int tc_ns_open_session(struct vtzf_dev_file *dev_file, file_size = (size_t)packet_cmd.cliContext.file_size; tlogd("file_size = %lu \n", file_size); buffer = (char *)alloc_res_shm(file_size); + /* if (ZERO_OR_NULL_PTR((unsigned long)(uintptr_t)buffer)) { tloge("vtzf_dev_file malloc failed\n"); return -ENOMEM; } + */ tmp_buffer = packet_cmd.cliContext.file_buffer; tlogd("buffer addr = %016llx ,tmp_buffer =%016llx \n", @@ -2152,4 +2154,4 @@ MODULE_AUTHOR("TrustCute"); module_init(vtzf_init); module_exit(vtzf_exit); -MODULE_LICENSE("GPL"); \ No newline at end of file +MODULE_LICENSE("GPL"); -- Gitee