doc/wg/core/notes/core-notes-2022-07-08.md
Attendees:
Brad: Hudson and I met to talk about grants. Goal to save space by refactoring grant layouts. Tried to clean up structure of grant layout as well.
Brad: Also we need to make sure there are no references to a grant after its left. We came up with a solution that marks "leave_grant" as unsafe, which puts the onus on the caller to make sure there are no lingering references. That PR is ready for final review.
Alyssa: What was the circumstance that would violate safety?
Brad: The kernel would have to be implemented poorly. Something in grant.rs where this type is created and it's maintained after the file calls leave_grant(). It's not something where a malicious capsule could exploit it, but instead we want the grants structured so it's really hard to make this mistake.
Alexandru: https://github.com/tock/tock/pull/3077
Alexandru: Vadim had a concern about wanting to pack multiple system calls into a single context switch. I submitted a PR that follows Leon's idea for how to do so. It's still a work in progress.
Branden: A technical question: a context switch causes a single system call to happen. For packed system calls, how do we "loop" back to cause the next one to occur?
Alexandru: When the special system call occurs, it tracks how many system calls are packed. When switch_to_process() is called, it checks and just executes the next system call if there is one.