gpoulios commented on code in PR #16356:
URL: https://github.com/apache/nuttx/pull/16356#discussion_r2083467486


##########
drivers/misc/optee.c:
##########
@@ -890,21 +941,32 @@ optee_ioctl_shm_alloc(FAR struct tee_ioctl_shm_alloc_data 
*data)
 
   if (ftruncate(memfd, data->size) < 0)
     {
+      ret = get_errno();
       goto err;
     }
 
-  data->id = (uintptr_t)mmap(NULL, data->size, PROT_READ | PROT_WRITE,
-                             MAP_SHARED, memfd, 0);
-  if (data->id == (uintptr_t)MAP_FAILED)
+  kaddr = mmap(NULL, data->size, PROT_READ | PROT_WRITE, MAP_SHARED,

Review Comment:
   no it's not. I'll change the variable name. And it's not passed to optee 
unless CONFIG_OPTEE_OPENVELA_COMPAT is set, **which is what the original socket 
implementation did, not my change.**
   
   This PR passes only PAs of pagelists to OP-TEE.
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to