-
Notifications
You must be signed in to change notification settings - Fork 72
Copy edit uVisor documents #411
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
AnotherButler
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left several queries in the form of comments in addition to my copy edits. Please review my suggested changes to make sure I'm not accidentally changing content.
| | `ARMv7M_ALIGNMENR_BITS` | TODO | | ||
| | `ARMv7M_MPU_RESERVED_REGIONS` | TODO | | ||
| | `UVISOR_MAX_ACLS` | TODO | | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should all of these TODOs be here?
| </td> | ||
| <td> | ||
| It contains constant data in flash that describes the configuration of the secure boxes. It comprises the configuration tables (<code>.keep.uvisor.cfgtbl</code>) and the pointers to them (<code>.keep.uvisor.cfgtbl_ptr[_first]</code>), which are used by uVisor for box enumeration. | ||
| It contains constant data in flash that describes the configuration of the secure boxes. It comprises the configuration tables (<code>.keep.uvisor.cfgtbl</code>) and the pointers to them (<code>.keep.uvisor.cfgtbl_ptr[_first]</code>), which uVisor uses for box enumeration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does uvisor.secure make up the configuration tables and pointers to them, or do the configuration tables and pointers make up uvisor.secure?
| - Allocating a new stack also quickly exhausts the available pages when pages are large. You want large pages to avoid MPU fragmentation and slow downs due to excessive memory faults. | ||
| Likewise, using the process stack for thread stacks is also not feasible. This is because multiple threads cannot share the same stack if they are not guaranteed to stack and unstack in a consistent order (first in, first out). Consider the situation where a thread performs a secure gateway to another process, and then yields and gets swapped out by the RTOS, saving its registers on the process stack. Next, a different thread performs a secure gateway to this same process, and it also yields and gets swapped out. Now, the RTOS wants to swap back in the original thread. The RTOS uses the stack pointer for that thread and the registers are restored without any issue. The original thread then does a stack allocation that blaps over the saved state of the second thread, and the original thread then yields and gets swapped out. Finally, the RTOS wants to swap back in the second thread. It uses the stack pointer for the second thread, but this pointer is now pointed to some "garbage" data leftover from the first thread's stack allocation. | ||
| Likewise, using the process stack for thread stacks is also not feasible. This is because multiple threads cannot share the same stack if they are not guaranteed to stack and unstack in a consistent order (first in, first out). Consider the situation where a thread performs a secure gateway to another process, and then yields and gets swapped out by the RTOS, saving its registers on the process stack. Next, a different thread performs a secure gateway to this same process, and it also yields and gets swapped out. Now, the RTOS wants to swap back in the original thread. The RTOS uses the stack pointer for that thread, and the registers are restored without any issue. The original thread then does a stack allocation that blaps over the saved state of the second thread, and the original thread then yields and is swapped out. Finally, the RTOS wants to swap the second thread back in. It uses the stack pointer for the second thread, but this pointer is now pointed to some "garbage" data leftover from the first thread's stack allocation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is a better word for "blaps"?
| ``` | ||
|
|
||
| The function causes a unicorn to barf up some barfable thing (imaginarily, of course). | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please replace this example with a less graphic one.
|
|
||
| ### RTOS Integration Mechanics | ||
| As currently integrated with uVisor, the RTOS runs with uVisor privileges. This must be fixed. [This issue is tracked on GitHub](https://github.com/ARMmbed/uvisor/issues/235). For now, the RTOS is a privileged component of the overall system, sharing privileged residence with uVisor. uVisor and the RTOS must trust each other because of this. Generally, uVisor is the manager of interrupts and the MPU, and the RTOS is the manager of context switching. | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This paragraph is confusing to me. Is it saying that RTOS has privileges but shouldn't? If so, why does the next paragraph list capabilities that support such integration? If not, what is it saying?
| An asynchronous secure gateway is also introduced, to make asynchronous RPC easier than setting up a queue and using `uvisor_ipc_send`. | ||
| --> | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this whole section supposed to be hidden? If so, should we find a way to hide it properly, so users can't see it?
|
|
||
| <!-- | ||
| >>> Comment: This concept has been rejected for now, since this is prone to fragmentation. | ||
| >>> Comment: This concept has been rejected for now because this is prone to fragmentation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To what does this comment refer? Just the note above it? The whole section? If it doesn't work, should we take it out of the docs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes it refers to the previous note. I'd keep it for now!
AlessandroA
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you very much for the changes!
Update uVisor documents for active voice, consistency, grammar and spelling
990107a to
4daae23
Compare
Update uVisor documents for active voice, consistency, grammar and spelling