Skip to content
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

add a no-op dispatch.dropExports to the kernel-to-vat pathway #2653

Closed
warner opened this issue Mar 15, 2021 · 0 comments · Fixed by #2656
Closed

add a no-op dispatch.dropExports to the kernel-to-vat pathway #2653

warner opened this issue Mar 15, 2021 · 0 comments · Fixed by #2656
Assignees
Labels
enhancement New feature or request SwingSet package: SwingSet

Comments

@warner
Copy link
Member

warner commented Mar 15, 2021

What is the Problem Being Solved?

The second preparation step for #2615 is to provide a dispatch.dropExports() call to all vats. It doesn't need to do anything yet, but as long as it exists, we can proceed with kernel-side work that might emit dropExports without fear of crashing upon a missing method.

The signature will be dispatch.dropExports(vrefs), taking an array of vat-side object references. We won't support dropping promises for now.

This needs to be added to both liveslots, the comms vat, and the vat workers (if they look closely enough at the vat/kernel protocol to notice the individual messages being sent).

Description of the Design

A later step will make dropExports do real work: it needs to delete a strong reference from the planned exports Set, and remove slotToVal/valToSlot entries for the vref, so that liveslots is no longer keeping the exported Remoteable alive. (It might be kept alive by other local references, but not liveslots).

When the kernel calls dropExports, it promises to never mention those identifiers again, at least until the vat re-exports one of them by mentioning it in some subsequent syscall. As a result, it would be an error for the kernel to dropExports the same vref twice (without an intervening re-export).

Security Considerations

Test Plan

test-liveslots.js will be augmented to invoke dropExports and make sure it doesn't crash.

@warner warner added enhancement New feature or request SwingSet package: SwingSet labels Mar 15, 2021
@warner warner self-assigned this Mar 15, 2021
warner added a commit that referenced this issue Mar 16, 2021
The new `dropExports()` doesn't do anything yet, but at least test that it
can be called directly in liveslots. It should be reachable through all vat
worker types, but I won't be able to test that until we have a kernel
mechanism to provoke it.

closes #2653
warner added a commit that referenced this issue Mar 16, 2021
The new `dropExports()` doesn't do anything yet, but at least test that it
can be called directly in liveslots. It should be reachable through all vat
worker types, but I won't be able to test that until we have a kernel
mechanism to provoke it.

closes #2653
warner added a commit that referenced this issue Mar 17, 2021
The new `dropExports()` doesn't do anything yet, but at least test that it
can be called directly in liveslots. It should be reachable through all vat
worker types, but I won't be able to test that until we have a kernel
mechanism to provoke it.

closes #2653
warner added a commit that referenced this issue Mar 17, 2021
…gers

The new `dropExports()` doesn't do anything yet, but at least test that it
can be called directly in liveslots and comms. It should be reachable through
all vat worker types, but I won't be able to test that until we have a kernel
mechanism to provoke it.

closes #2653
warner added a commit that referenced this issue Mar 22, 2021
…gers

The new `dropExports()` doesn't do anything yet, but at least test that it
can be called directly in liveslots and comms. It should be reachable through
all vat worker types, but I won't be able to test that until we have a kernel
mechanism to provoke it.

closes #2653
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request SwingSet package: SwingSet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant