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

[FEATURE] Feature request - Change all handles to be global #38

Open
3 tasks done
bSchnepp opened this issue Apr 17, 2022 · 1 comment
Open
3 tasks done

[FEATURE] Feature request - Change all handles to be global #38

bSchnepp opened this issue Apr 17, 2022 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@bSchnepp
Copy link
Owner

Issue Checklist

  • A related or similar issue is not already marked as open
  • Another issue describing a similar feature has not already been marked as wontfix or closed
  • This feature is not already present in the software

=====================================================
Feature Description
The kernel should use global handles instead of the current per-process handle scheme. This decouples the process block from handles, and greatly eases the ability of passing ownership of a kernel object to another process.

Feature Benefits
List the reasons why this feature would be beneficial

  • Eases implementation of ports
  • Eases process management and handle lifecycle

Use case examples
List examples where this feature could be useful for end users.

  • A service designates itself as such by communicating with a server for advertisement of it, and with a permissions server for access permissions of the service.
  • It then delegates a handle to the advertisement server, and sends an RPC request with permissions to the permissions server
  • Then, sessions can be used from the port by clients accessing them. All permission checks remain in userspace, and port access is only regulated by ownership of the handle

Additional information
Any additional information should be placed here.

@bSchnepp bSchnepp self-assigned this Apr 17, 2022
@bSchnepp bSchnepp added the enhancement New feature or request label Apr 17, 2022
@bSchnepp
Copy link
Owner Author

This problem might actually be possible to mitigate:

Consider a scenario where two process have a shared Connection between them. A special type of message can be transferred, where instead of data, a description of handles can be passed along. This can then be read by the receiving process and then signal the kernel to accept these handles, removing them from the sender and adding them to the receiver, or ignored, in which case no transfer will be done.

This requires signaling in a handle, and a per-table way to prevent handle reuse (a global incrementing counter? hash tables?) to signal when a handle is "safe" or not, or if it might be taken from the current context.

This will avoid any need for a global table, and allow for a (reasonably) simple way to transfer handle ownership.

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

No branches or pull requests

1 participant