jlaitine commented on PR #18712:
URL: https://github.com/apache/nuttx/pull/18712#issuecomment-4327399905

   A quick idea / opinion:
   
   I believe what is being done here is basically right, and analysis of the 
issue looks correct. There is, imho, an issue with the blocking socket 
functions that wrong addrenv might be used by the underlying driver while 
copying the data. This is just sometimes saved by iob copying with readahead 
etc....
   
   The copying between kernel and user buffers is anyhow specific to struct 
msghdr , but perhaps it the CONFIG_BUILD_KERNEL specific stuff should be 
isolated to a separate file and just have minimal calls in recvmsg/sendmsg, 
before and after "psock_sendmsg / psock_recvmsg" surrounded by "ifdef 
CONFIG_BUILD_KERNEL".
   
   Also, maybe we should try to use IOBs for kernel side buffering instead of 
allocating/freeing from heap every time?
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to