-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added Runtime Support for Naming (#252)
* Switch init to use new runtime. * Cleanup tests. * Reorg. * Added secure gate naming library * reverted changes * refactored naming service * removed changes in main * did fmt * removed unnecessary dependency * updated naming service * added naming support to etl system * fixed bug with using twzid instead of path * changed naming to twizzler vec * Implement dynamic gate lookup. * Implement dynamic gate calling. * Move pager init and add pager dynamic gate lookup. * Added runtime naming support * Added std::fs support for etl_twizzler * cargo fmt --------- Co-authored-by: Daniel Bittman <[email protected]>
- Loading branch information
1 parent
4a789f1
commit 3d4a600
Showing
36 changed files
with
659 additions
and
300 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
[package] | ||
name = "naming-core" | ||
version = "0.1.0" | ||
edition = "2021" | ||
|
||
[dependencies] | ||
arrayvec = "0.7.6" | ||
secgate = { path = "../../../lib/secgate" } | ||
monitor-api = { path = "../../../rt/monitor-api" } | ||
twizzler-rt-abi = "0.99" | ||
twizzler = { path = "../../../lib/twizzler" } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
use monitor_api::CompartmentHandle; | ||
use secgate::{ | ||
util::{Descriptor, Handle, SimpleBuffer}, | ||
DynamicSecGate, SecGateReturn, | ||
}; | ||
use twizzler_rt_abi::object::ObjID; | ||
|
||
use crate::NamingHandle; | ||
|
||
pub trait NamerAPI { | ||
fn put(&self, desc: Descriptor) -> SecGateReturn<()>; | ||
fn get(&self, desc: Descriptor) -> SecGateReturn<Option<u128>>; | ||
fn open_handle(&self) -> SecGateReturn<Option<(Descriptor, ObjID)>>; | ||
fn close_handle(&self, desc: Descriptor) -> SecGateReturn<()>; | ||
fn enumerate_names(&self, desc: Descriptor) -> SecGateReturn<Option<usize>>; | ||
fn remove(&self, desc: Descriptor) -> SecGateReturn<()>; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
use arrayvec::ArrayString; | ||
use twizzler::marker::Invariant; | ||
|
||
pub const MAX_KEY_SIZE: usize = 255; | ||
|
||
#[repr(C)] | ||
#[derive(Debug, Clone, Copy)] | ||
pub struct Schema { | ||
pub key: ArrayString<MAX_KEY_SIZE>, | ||
pub val: u128, | ||
} | ||
|
||
unsafe impl Invariant for Schema {} |
Oops, something went wrong.