pussuw commented on issue #8917:
URL: https://github.com/apache/nuttx/issues/8917#issuecomment-1490218854

   Unfortunately I found another location where tcb->waitobj is accessed from 
the wrong context (happens when a user process is running and `ps` is executed 
from the terminal): 
   
https://github.com/apache/nuttx/blob/f4683713327aaeab0656e3ea83814b44267bdc4a/sched/sched/sched_get_stateinfo.c#L81-L103
   
   This could be kludged together by creating a getter function for the sem_t 
object, which would make a copy of it into kernel addressable memory (e.g. a 
stack variable inside that function). Read only access could then be performed 
on that. Sound like a dirty workaround to me...
   
   I did one kludge fix, I'm wondering if this is going to be a recursive set 
of kludges.. Resolving the kernel addressable virtual address for waitobj might 
be a safer option still. I'll need to think for a moment how this can be 
achieved. 
   
   Walking the page directory in one option, and this support needs to be 
implemented for each platform that supports MMU.
   


-- 
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