-
Notifications
You must be signed in to change notification settings - Fork 212
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
implement clist reachability flag #3108
Labels
Comments
This was referenced May 17, 2021
The set/assert rules for the reachability flag (when translating in either direction) are:
This means:
|
warner
added a commit
that referenced
this issue
May 19, 2021
The kernel-to-vat clist entry for `kref` is stored in the kernelDB under a key of `${vatID}.c.${kref}` . This changes the value at that key from `${vref}` to `${flag} ${vref}`, where `flag` is either `R` (for "reachable and recognizable") or `_` (for "recognizable but not reachable). The "neither reachable nor recognizable" state simply deletes the clist entry altogether. This adds vatKeeper methods to set and clear the flag on a given kref. These will be used by the GC syscall handlers for dropImport and friends. closes #3108
warner
added a commit
that referenced
this issue
May 19, 2021
The kernel-to-vat clist entry for `kref` is stored in the kernelDB under a key of `${vatID}.c.${kref}` . This changes the value at that key from `${vref}` to `${flag} ${vref}`, where `flag` is either `R` (for "reachable and recognizable") or `_` (for "recognizable but not reachable). The "neither reachable nor recognizable" state simply deletes the clist entry altogether. This adds vatKeeper methods to set and clear the flag on a given kref. These will be used by the GC syscall handlers for dropImport and friends. closes #3108
warner
added a commit
that referenced
this issue
May 21, 2021
The kernel-to-vat clist entry for `kref` is stored in the kernelDB under a key of `${vatID}.c.${kref}` . This changes the value at that key from `${vref}` to `${flag} ${vref}`, where `flag` is either `R` (for "reachable and recognizable") or `_` (for "recognizable but not reachable). The "neither reachable nor recognizable" state simply deletes the clist entry altogether. This adds vatKeeper methods to set and clear the flag on a given kref. These will be used by the GC syscall handlers for dropImport and friends. closes #3108
warner
added a commit
that referenced
this issue
May 21, 2021
The kernel-to-vat clist entry for `kref` is stored in the kernelDB under a key of `${vatID}.c.${kref}` . This changes the value at that key from `${vref}` to `${flag} ${vref}`, where `flag` is either `R` (for "reachable and recognizable") or `_` (for "recognizable but not reachable). The "neither reachable nor recognizable" state simply deletes the clist entry altogether. This adds vatKeeper methods to set and clear the flag on a given kref. These will be used by the GC syscall handlers for dropImport and friends. closes #3108
warner
added a commit
that referenced
this issue
Jun 1, 2021
The c-list kernel-to-vat direction uses a value that holds a composite of a "isReachable" flag and the actual vref. This refactors the handling of this composite value to make it easier for upcoming code to query the isReachable status. refs #3108
warner
added a commit
that referenced
this issue
Jun 1, 2021
The c-list kernel-to-vat direction uses a value that holds a composite of a "isReachable" flag and the actual vref. This refactors the handling of this composite value to make it easier for upcoming code to query the isReachable status. refs #3108
warner
added a commit
that referenced
this issue
Jun 1, 2021
The c-list kernel-to-vat direction uses a value that holds a composite of a "isReachable" flag and the actual vref. This refactors the handling of this composite value to make it easier for upcoming code to query the isReachable status. refs #3108
warner
added a commit
that referenced
this issue
Jun 1, 2021
The c-list kernel-to-vat direction uses a value that holds a composite of a "isReachable" flag and the actual vref. This refactors the handling of this composite value to make it easier for upcoming code to query the isReachable status. refs #3108
warner
added a commit
that referenced
this issue
Jun 3, 2021
The c-list kernel-to-vat direction uses a value that holds a composite of a "isReachable" flag and the actual vref. This refactors the handling of this composite value to make it easier for upcoming code to query the isReachable status. refs #3108
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What is the Problem Being Solved?
As the "implement kernel-side
syscall.dropImport
handler, add clist reachability flag" part of #3106 , we need to keep track of when an import-side c-list entry represents the vat's ability to "reach" the swingset object designated by the kref (i.e. it might emit a message that references the kref at some point in the future), or if it can merely "recognize" that object (i.e. if the kref is sent into the vat in the future, the vat can recognize this kref as equal to one it saw before). The "reach" mode is a superset of the "merely recognizable" mode:The kernel will use this information to figure out whether a vat export is still reachable by the kernel, and drop the export if not. The clist exports will be similarly marked to keep track of whether the kernel has told the vat to drop the export, and subsequently updated if the vat re-exports the same kref.
Description of the Design
I plan to change the kref -> vref clist entry format to include the reachability flag as a prefix on the vref. To make things easy to visually parse (for debugging), I'll use "
R
" as the "yes reachable" prefix, and "_
" as the "not reachable" prefix. The vref->kref direction will not be annotated. Some examples:DB.set('v1.c.ko23', 'R o-45')
DB.set('v1.c.ko23', '_ o-45')
DB.delete('v1.c.ko23')
All code that looks up the kref->vref direction will be changed to handle this two-character prefix, using
slice()
to extract the parts.Code that adds a new entry will set the reachability flag. Code that translates from vat space to kernel space will also set the reachability flag, to handle re-importing/re-exporting the vref. A separate task will be to handle
syscall.dropImport
and deliverdispatch.dropExport
, both of which will clear the flag.Security Considerations
Test Plan
Unit tests will be updated. New unit tests will be written for the translation code (to exercise the initial setting of the flag, and re-setting it upon re-import/re-export).
The text was updated successfully, but these errors were encountered: