diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 08fc7dca12b..b310cae5af7 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -87,7 +87,7 @@ jobs: uses: actions/cache@v2 env: # Increment this value to invalidate previous cache entries. - CACHE_VERSION: 11 + CACHE_VERSION: 12 with: path: | ./cargo-cache/bin diff --git a/Cargo.lock b/Cargo.lock index 33bf9575068..6017be835f3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -643,19 +643,6 @@ dependencies = [ "zeroize", ] -[[package]] -name = "channel" -version = "0.1.0" -dependencies = [ - "anyhow", - "ciborium-io", - "flatbuffers", - "oak_idl", - "oak_idl_gen_services", - "oak_idl_gen_structs", - "static_assertions", -] - [[package]] name = "chrono" version = "0.4.19" @@ -2227,28 +2214,6 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "kernel" -version = "0.1.0" -dependencies = [ - "anyhow", - "atomic_refcell", - "ciborium-io", - "getrandom 0.2.6", - "lazy_static", - "libm 0.2.2", - "linked_list_allocator", - "log", - "oak_remote_attestation", - "runtime", - "rust-hypervisor-firmware-boot", - "rust-hypervisor-firmware-virtio", - "strum", - "uart_16550", - "virtio", - "x86_64", -] - [[package]] name = "key_value_lookup" version = "0.1.0" @@ -2868,6 +2833,96 @@ dependencies = [ "x509-parser", ] +[[package]] +name = "oak_baremetal_client" +version = "0.1.0" +dependencies = [ + "anyhow", + "clap 3.1.18", + "grpc_unary_attestation", + "oak_remote_attestation", + "oak_utils", + "prost 0.10.4", + "tokio", + "tonic", +] + +[[package]] +name = "oak_baremetal_communication_channel" +version = "0.1.0" +dependencies = [ + "anyhow", + "ciborium-io", + "flatbuffers", + "oak_idl", + "oak_idl_gen_services", + "oak_idl_gen_structs", + "static_assertions", +] + +[[package]] +name = "oak_baremetal_kernel" +version = "0.1.0" +dependencies = [ + "anyhow", + "atomic_refcell", + "ciborium-io", + "getrandom 0.2.6", + "lazy_static", + "libm 0.1.4", + "linked_list_allocator", + "log", + "oak_baremetal_runtime", + "oak_remote_attestation", + "rust-hypervisor-firmware-boot", + "rust-hypervisor-firmware-virtio", + "strum", + "uart_16550", + "virtio", + "x86_64", +] + +[[package]] +name = "oak_baremetal_loader" +version = "0.1.0" +dependencies = [ + "anyhow", + "async-trait", + "bmrng", + "ciborium-io", + "clap 3.1.18", + "command-fds", + "env_logger 0.9.0", + "futures", + "log", + "oak_baremetal_communication_channel", + "oak_idl", + "oak_remote_attestation_sessions", + "oak_utils", + "prost 0.10.4", + "serde", + "tokio", + "tonic", + "vsock", +] + +[[package]] +name = "oak_baremetal_runtime" +version = "0.1.0" +dependencies = [ + "anyhow", + "ciborium-io", + "flatbuffers", + "log", + "oak_baremetal_communication_channel", + "oak_functions_wasm", + "oak_functions_workload_logging", + "oak_idl", + "oak_logger", + "oak_remote_attestation", + "oak_remote_attestation_sessions", +] + [[package]] name = "oak_functions" version = "0.1.0" @@ -4268,23 +4323,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "runtime" -version = "0.1.0" -dependencies = [ - "anyhow", - "channel", - "ciborium-io", - "flatbuffers", - "log", - "oak_functions_wasm", - "oak_functions_workload_logging", - "oak_idl", - "oak_logger", - "oak_remote_attestation", - "oak_remote_attestation_sessions", -] - [[package]] name = "rust-hypervisor-firmware-boot" version = "0.1.0" @@ -5713,44 +5751,6 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "56dee185309b50d1f11bfedef0fe6d036842e3fb77413abef29f8f8d1c5d4c1c" -[[package]] -name = "uefi-client" -version = "0.1.0" -dependencies = [ - "anyhow", - "clap 3.1.18", - "grpc_unary_attestation", - "oak_remote_attestation", - "oak_utils", - "prost 0.10.4", - "tokio", - "tonic", -] - -[[package]] -name = "uefi-loader" -version = "0.1.0" -dependencies = [ - "anyhow", - "async-trait", - "bmrng", - "channel", - "ciborium-io", - "clap 3.1.18", - "command-fds", - "env_logger 0.9.0", - "futures", - "log", - "oak_idl", - "oak_remote_attestation_sessions", - "oak_utils", - "prost 0.10.4", - "serde", - "tokio", - "tonic", - "vsock", -] - [[package]] name = "unicase" version = "2.6.0" diff --git a/Cargo.toml b/Cargo.toml index 727b2c18a88..f5e1ee01b25 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,11 +15,11 @@ members = [ "experimental/trusted_shuffler/common", "experimental/trusted_shuffler/server", "experimental/trusted_shuffler/trusted_shuffler", - "experimental/uefi/channel", - "experimental/uefi/client", - "experimental/uefi/kernel", - "experimental/uefi/loader", - "experimental/uefi/runtime", + "experimental/oak_baremetal_channel", + "experimental/oak_baremetal_client", + "experimental/oak_baremetal_kernel", + "experimental/oak_baremetal_loader", + "experimental/oak_baremetal_runtime", "experimental/virtio", "experimental/vsock/echo", "experimental/web_client", @@ -65,8 +65,8 @@ members = [ "xtask", ] exclude = [ - "experimental/uefi/baremetal", - "experimental/uefi/baremetal-crosvm", + "experimental/oak_baremetal_app_qemu", + "experimental/oak_baremetal_app_crosvm", "oak_functions/loader/fuzz", "third_party/ring", "third_party/curve25519-dalek", diff --git a/experimental/uefi/baremetal-crosvm/.cargo/config.toml b/experimental/oak_baremetal_app_crosvm/.cargo/config.toml similarity index 100% rename from experimental/uefi/baremetal-crosvm/.cargo/config.toml rename to experimental/oak_baremetal_app_crosvm/.cargo/config.toml diff --git a/experimental/uefi/baremetal-crosvm/Cargo.toml b/experimental/oak_baremetal_app_crosvm/Cargo.toml similarity index 81% rename from experimental/uefi/baremetal-crosvm/Cargo.toml rename to experimental/oak_baremetal_app_crosvm/Cargo.toml index 6b3618f55d9..0f075b46a97 100644 --- a/experimental/uefi/baremetal-crosvm/Cargo.toml +++ b/experimental/oak_baremetal_app_crosvm/Cargo.toml @@ -1,12 +1,14 @@ [package] -name = "baremetal-crosvm" +name = "oak_baremetal_app_crosvm" version = "0.1.0" authors = ["Andri Saar "] edition = "2021" license = "Apache-2.0" [dependencies] -kernel = { path = "../kernel", features = ["vsock_channel"] } +oak_baremetal_kernel = { path = "../../experimental/oak_baremetal_kernel", features = [ + "vsock_channel" +] } [patch.crates-io] # Ensure no_std compatibility. TODO(#2920): remove once https://github.com/google/flatbuffers/pull/7338 is merged. diff --git a/experimental/uefi/baremetal-crosvm/build.rs b/experimental/oak_baremetal_app_crosvm/build.rs similarity index 100% rename from experimental/uefi/baremetal-crosvm/build.rs rename to experimental/oak_baremetal_app_crosvm/build.rs diff --git a/experimental/uefi/baremetal-crosvm/layout.ld b/experimental/oak_baremetal_app_crosvm/layout.ld similarity index 100% rename from experimental/uefi/baremetal-crosvm/layout.ld rename to experimental/oak_baremetal_app_crosvm/layout.ld diff --git a/experimental/uefi/baremetal-crosvm/runner b/experimental/oak_baremetal_app_crosvm/runner similarity index 100% rename from experimental/uefi/baremetal-crosvm/runner rename to experimental/oak_baremetal_app_crosvm/runner diff --git a/experimental/uefi/baremetal-crosvm/src/asm/boot.s b/experimental/oak_baremetal_app_crosvm/src/asm/boot.s similarity index 100% rename from experimental/uefi/baremetal-crosvm/src/asm/boot.s rename to experimental/oak_baremetal_app_crosvm/src/asm/boot.s diff --git a/experimental/uefi/baremetal-crosvm/src/asm/mod.rs b/experimental/oak_baremetal_app_crosvm/src/asm/mod.rs similarity index 100% rename from experimental/uefi/baremetal-crosvm/src/asm/mod.rs rename to experimental/oak_baremetal_app_crosvm/src/asm/mod.rs diff --git a/experimental/uefi/baremetal-crosvm/src/bootparam.rs b/experimental/oak_baremetal_app_crosvm/src/bootparam.rs similarity index 99% rename from experimental/uefi/baremetal-crosvm/src/bootparam.rs rename to experimental/oak_baremetal_app_crosvm/src/bootparam.rs index 4404f41bbb1..cdfe8fc4a4a 100644 --- a/experimental/uefi/baremetal-crosvm/src/bootparam.rs +++ b/experimental/oak_baremetal_app_crosvm/src/bootparam.rs @@ -19,7 +19,7 @@ * --ctypes-prefix c_types arch/x86/include/uapi/asm/bootparam.h */ -use kernel::boot::{BootInfo, E820Entry, E820EntryType}; +use oak_baremetal_kernel::boot::{BootInfo, E820Entry, E820EntryType}; #[allow(non_camel_case_types)] mod c_types { diff --git a/experimental/uefi/baremetal-crosvm/src/main.rs b/experimental/oak_baremetal_app_crosvm/src/main.rs similarity index 92% rename from experimental/uefi/baremetal-crosvm/src/main.rs rename to experimental/oak_baremetal_app_crosvm/src/main.rs index 59843b9cdde..62206dcbb7c 100644 --- a/experimental/uefi/baremetal-crosvm/src/main.rs +++ b/experimental/oak_baremetal_app_crosvm/src/main.rs @@ -33,13 +33,13 @@ mod bootparam; #[cfg(test)] pub extern "C" fn rust64_start(_rdi: u64, _rsi: &bootparam::boot_params) -> ! { test_main(); - kernel::i8042::shutdown(); + oak_baremetal_kernel::i8042::shutdown(); } #[no_mangle] #[cfg(not(test))] pub extern "C" fn rust64_start(_rdi: u64, rsi: &bootparam::boot_params) -> ! { - kernel::start_kernel(rsi); + oak_baremetal_kernel::start_kernel(rsi); } #[alloc_error_handler] @@ -49,7 +49,7 @@ fn out_of_memory(layout: ::core::alloc::Layout) -> ! { #[panic_handler] fn panic(info: &PanicInfo) -> ! { - kernel::panic(info); + oak_baremetal_kernel::panic(info); } #[lang = "eh_personality"] diff --git a/experimental/uefi/baremetal-crosvm/target.json b/experimental/oak_baremetal_app_crosvm/target.json similarity index 100% rename from experimental/uefi/baremetal-crosvm/target.json rename to experimental/oak_baremetal_app_crosvm/target.json diff --git a/experimental/uefi/baremetal/.cargo/config.toml b/experimental/oak_baremetal_app_qemu/.cargo/config.toml similarity index 100% rename from experimental/uefi/baremetal/.cargo/config.toml rename to experimental/oak_baremetal_app_qemu/.cargo/config.toml diff --git a/experimental/uefi/baremetal/build.rs b/experimental/oak_baremetal_app_qemu/build.rs similarity index 100% rename from experimental/uefi/baremetal/build.rs rename to experimental/oak_baremetal_app_qemu/build.rs diff --git a/experimental/uefi/baremetal/layout.ld b/experimental/oak_baremetal_app_qemu/layout.ld similarity index 100% rename from experimental/uefi/baremetal/layout.ld rename to experimental/oak_baremetal_app_qemu/layout.ld diff --git a/experimental/uefi/baremetal/runner b/experimental/oak_baremetal_app_qemu/runner similarity index 100% rename from experimental/uefi/baremetal/runner rename to experimental/oak_baremetal_app_qemu/runner diff --git a/experimental/uefi/baremetal/src/hvm_start_info.h b/experimental/oak_baremetal_app_qemu/src/hvm_start_info.h similarity index 100% rename from experimental/uefi/baremetal/src/hvm_start_info.h rename to experimental/oak_baremetal_app_qemu/src/hvm_start_info.h diff --git a/experimental/uefi/baremetal/src/hvm_start_info.rs b/experimental/oak_baremetal_app_qemu/src/hvm_start_info.rs similarity index 95% rename from experimental/uefi/baremetal/src/hvm_start_info.rs rename to experimental/oak_baremetal_app_qemu/src/hvm_start_info.rs index 8df05abd617..0850cafe157 100644 --- a/experimental/uefi/baremetal/src/hvm_start_info.rs +++ b/experimental/oak_baremetal_app_qemu/src/hvm_start_info.rs @@ -14,7 +14,7 @@ // limitations under the License. // -use kernel::boot::{BootInfo, E820Entry, E820EntryType}; +use oak_baremetal_kernel::boot::{BootInfo, E820Entry, E820EntryType}; include!(concat!(env!("OUT_DIR"), "/start_info.rs")); diff --git a/experimental/uefi/baremetal/src/main.rs b/experimental/oak_baremetal_app_qemu/src/main.rs similarity index 90% rename from experimental/uefi/baremetal/src/main.rs rename to experimental/oak_baremetal_app_qemu/src/main.rs index 641fa5d7fc0..6116d88b407 100644 --- a/experimental/uefi/baremetal/src/main.rs +++ b/experimental/oak_baremetal_app_qemu/src/main.rs @@ -35,7 +35,7 @@ mod multiboot; #[cfg(test)] pub extern "C" fn rust64_start(_rdi: &hvm_start_info::hvm_start_info) -> ! { test_main(); - kernel::i8042::shutdown(); + oak_baremetal_kernel::i8042::shutdown(); } #[no_mangle] @@ -47,15 +47,15 @@ pub extern "C" fn rust64_start(start_info: &multiboot::multiboot_info, magic: u6 // As at this stage we don't even have logging set up, so if the magic does not match, // let's just shut down the machine. if magic != 0x2BADB002 { - kernel::i8042::shutdown(); + oak_baremetal_kernel::i8042::shutdown(); } - kernel::start_kernel(start_info); + oak_baremetal_kernel::start_kernel(start_info); } #[no_mangle] #[cfg(all(not(test), not(feature = "multiboot")))] pub extern "C" fn rust64_start(start_info: &hvm_start_info::hvm_start_info) -> ! { - kernel::start_kernel(start_info); + oak_baremetal_kernel::start_kernel(start_info); } #[alloc_error_handler] @@ -65,7 +65,7 @@ fn out_of_memory(layout: ::core::alloc::Layout) -> ! { #[panic_handler] fn panic(info: &PanicInfo) -> ! { - kernel::panic(info); + oak_baremetal_kernel::panic(info); } #[lang = "eh_personality"] diff --git a/experimental/uefi/baremetal/src/multiboot.h b/experimental/oak_baremetal_app_qemu/src/multiboot.h similarity index 100% rename from experimental/uefi/baremetal/src/multiboot.h rename to experimental/oak_baremetal_app_qemu/src/multiboot.h diff --git a/experimental/uefi/baremetal/src/multiboot.rs b/experimental/oak_baremetal_app_qemu/src/multiboot.rs similarity index 98% rename from experimental/uefi/baremetal/src/multiboot.rs rename to experimental/oak_baremetal_app_qemu/src/multiboot.rs index 78c6676e74d..37b0e3771a6 100644 --- a/experimental/uefi/baremetal/src/multiboot.rs +++ b/experimental/oak_baremetal_app_qemu/src/multiboot.rs @@ -18,7 +18,7 @@ #![allow(non_camel_case_types)] use bitflags::bitflags; -use kernel::boot::{BootInfo, E820Entry, E820EntryType}; +use oak_baremetal_kernel::boot::{BootInfo, E820Entry, E820EntryType}; include!(concat!(env!("OUT_DIR"), "/multiboot.rs")); diff --git a/experimental/uefi/baremetal/target.json b/experimental/oak_baremetal_app_qemu/target.json similarity index 100% rename from experimental/uefi/baremetal/target.json rename to experimental/oak_baremetal_app_qemu/target.json diff --git a/experimental/uefi/channel/Cargo.toml b/experimental/oak_baremetal_channel/Cargo.toml similarity index 64% rename from experimental/uefi/channel/Cargo.toml rename to experimental/oak_baremetal_channel/Cargo.toml index f7cbae76e20..9a235bf22ab 100644 --- a/experimental/uefi/channel/Cargo.toml +++ b/experimental/oak_baremetal_channel/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "channel" +name = "oak_baremetal_communication_channel" version = "0.1.0" authors = ["Juliette Pretot "] edition = "2021" @@ -8,10 +8,10 @@ license = "Apache-2.0" [dependencies] anyhow = { version = "*", default-features = false } ciborium-io = { version = "*", default-features = false } -oak_idl = { path = "../../../oak_idl" } +oak_idl = { path = "../../oak_idl" } flatbuffers = { version = "*", features = ["no_std"], default-features = false } static_assertions = "*" [build-dependencies] -oak_idl_gen_services = { path = "../../../oak_idl_gen_services" } -oak_idl_gen_structs = { path = "../../../oak_idl_gen_structs" } +oak_idl_gen_services = { path = "../../oak_idl_gen_services" } +oak_idl_gen_structs = { path = "../../oak_idl_gen_structs" } diff --git a/experimental/uefi/channel/build.rs b/experimental/oak_baremetal_channel/build.rs similarity index 100% rename from experimental/uefi/channel/build.rs rename to experimental/oak_baremetal_channel/build.rs diff --git a/experimental/uefi/channel/schema.fbs b/experimental/oak_baremetal_channel/schema.fbs similarity index 100% rename from experimental/uefi/channel/schema.fbs rename to experimental/oak_baremetal_channel/schema.fbs diff --git a/experimental/uefi/channel/src/lib.rs b/experimental/oak_baremetal_channel/src/lib.rs similarity index 100% rename from experimental/uefi/channel/src/lib.rs rename to experimental/oak_baremetal_channel/src/lib.rs diff --git a/experimental/uefi/client/Cargo.toml b/experimental/oak_baremetal_client/Cargo.toml similarity index 59% rename from experimental/uefi/client/Cargo.toml rename to experimental/oak_baremetal_client/Cargo.toml index 0bd47c6b3aa..e20a45fa587 100644 --- a/experimental/uefi/client/Cargo.toml +++ b/experimental/oak_baremetal_client/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "uefi-client" +name = "oak_baremetal_client" version = "0.1.0" authors = ["Andri Saar "] edition = "2021" @@ -10,9 +10,9 @@ clap = { version = "*", features = ["derive"] } prost = "*" tokio = { version = "*", features = ["macros", "rt-multi-thread"] } tonic = "*" -grpc_unary_attestation = { path = "../../../grpc_unary_attestation/" } -oak_remote_attestation = { path = "../../../remote_attestation/rust/" } +grpc_unary_attestation = { path = "../../grpc_unary_attestation/" } +oak_remote_attestation = { path = "../../remote_attestation/rust/" } anyhow = "*" [build-dependencies] -oak_utils = { path = "../../../oak_utils" } +oak_utils = { path = "../../oak_utils" } diff --git a/experimental/oak_baremetal_client/README.MD b/experimental/oak_baremetal_client/README.MD new file mode 100644 index 00000000000..f4dc41fcc10 --- /dev/null +++ b/experimental/oak_baremetal_client/README.MD @@ -0,0 +1,15 @@ +# Oak Baremetal Client + +A trivial gRPC client for communicating with the trusted runtime via the gRPC +endpoint exposed by the untrusted companion app. + +## Starting the client + +Running the client may be started vua + +```shell +cargo run experimental/oak_baremetal_client +``` + +The client will read lines from stdin and sends a gRPC request to the loader for +each line. Responses are printed to stdout. diff --git a/experimental/uefi/client/src/main.rs b/experimental/oak_baremetal_client/src/main.rs similarity index 100% rename from experimental/uefi/client/src/main.rs rename to experimental/oak_baremetal_client/src/main.rs diff --git a/experimental/uefi/kernel/Cargo.toml b/experimental/oak_baremetal_kernel/Cargo.toml similarity index 57% rename from experimental/uefi/kernel/Cargo.toml rename to experimental/oak_baremetal_kernel/Cargo.toml index e93d4d7e6e2..8320610ac8e 100644 --- a/experimental/uefi/kernel/Cargo.toml +++ b/experimental/oak_baremetal_kernel/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "kernel" +name = "oak_baremetal_kernel" version = "0.1.0" authors = ["Andri Saar "] edition = "2021" @@ -18,15 +18,15 @@ lazy_static = { version = "*", features = ["spin_no_std"] } linked_list_allocator = { version = "*" } log = "*" libm = "*" -oak_remote_attestation = { path = "../../../remote_attestation/rust", default-features = false, features = [ +oak_remote_attestation = { path = "../../remote_attestation/rust", default-features = false, features = [ "rust-crypto" ] } -runtime = { path = "../runtime", default-features = false, features = [ +oak_baremetal_runtime = { path = "../../experimental/oak_baremetal_runtime", default-features = false, features = [ "rust-crypto" ] } -rust-hypervisor-firmware-boot = { path = "../../../third_party/rust-hypervisor-firmware-boot" } -rust-hypervisor-firmware-virtio = { path = "../../../third_party/rust-hypervisor-firmware-virtio" } +rust-hypervisor-firmware-boot = { path = "../../third_party/rust-hypervisor-firmware-boot" } +rust-hypervisor-firmware-virtio = { path = "../../third_party/rust-hypervisor-firmware-virtio" } strum = { version = "*", default-features = false, features = ["derive"] } uart_16550 = "*" -virtio = { path = "../../virtio" } +virtio = { path = "../virtio" } x86_64 = "*" diff --git a/experimental/uefi/kernel/src/avx.rs b/experimental/oak_baremetal_kernel/src/avx.rs similarity index 100% rename from experimental/uefi/kernel/src/avx.rs rename to experimental/oak_baremetal_kernel/src/avx.rs diff --git a/experimental/uefi/kernel/src/boot.rs b/experimental/oak_baremetal_kernel/src/boot.rs similarity index 100% rename from experimental/uefi/kernel/src/boot.rs rename to experimental/oak_baremetal_kernel/src/boot.rs diff --git a/experimental/uefi/kernel/src/i8042.rs b/experimental/oak_baremetal_kernel/src/i8042.rs similarity index 100% rename from experimental/uefi/kernel/src/i8042.rs rename to experimental/oak_baremetal_kernel/src/i8042.rs diff --git a/experimental/uefi/kernel/src/interrupts.rs b/experimental/oak_baremetal_kernel/src/interrupts.rs similarity index 100% rename from experimental/uefi/kernel/src/interrupts.rs rename to experimental/oak_baremetal_kernel/src/interrupts.rs diff --git a/experimental/uefi/kernel/src/lib.rs b/experimental/oak_baremetal_kernel/src/lib.rs similarity index 94% rename from experimental/uefi/kernel/src/lib.rs rename to experimental/oak_baremetal_kernel/src/lib.rs index 09e9b57f3ca..3515aced5a8 100644 --- a/experimental/uefi/kernel/src/lib.rs +++ b/experimental/oak_baremetal_kernel/src/lib.rs @@ -17,7 +17,7 @@ //! Main 'kernel' for bare-metal Oak Functions. //! //! This code takes care of initializing the x86-64 machine properly and -//! handing the reins over to the runtime. It is in a separate crate so that we +//! handing the reins over to the oak_baremetal_runtime. It is in a separate crate so that we //! could support different boot protocols (eg Linux boot protocol or PVH) that //! require different targets, linker scripts and/or provide machine //! information in different data structures. @@ -66,7 +66,7 @@ fn main>(info: &B) -> ! { info!("In main! Boot protocol: {}", info.protocol()); let attestation_behavior = AttestationBehavior::create(EmptyAttestationGenerator, EmptyAttestationVerifier); - runtime::framing::handle_frames(get_channel(), attestation_behavior).unwrap(); + oak_baremetal_runtime::framing::handle_frames(get_channel(), attestation_behavior).unwrap(); } // Use a virtio console device for the communications channel if we don't support virtio vsock. diff --git a/experimental/uefi/kernel/src/libm.rs b/experimental/oak_baremetal_kernel/src/libm.rs similarity index 100% rename from experimental/uefi/kernel/src/libm.rs rename to experimental/oak_baremetal_kernel/src/libm.rs diff --git a/experimental/uefi/kernel/src/logging.rs b/experimental/oak_baremetal_kernel/src/logging.rs similarity index 100% rename from experimental/uefi/kernel/src/logging.rs rename to experimental/oak_baremetal_kernel/src/logging.rs diff --git a/experimental/uefi/kernel/src/memory.rs b/experimental/oak_baremetal_kernel/src/memory.rs similarity index 100% rename from experimental/uefi/kernel/src/memory.rs rename to experimental/oak_baremetal_kernel/src/memory.rs diff --git a/experimental/uefi/loader/Cargo.toml b/experimental/oak_baremetal_loader/Cargo.toml similarity index 65% rename from experimental/uefi/loader/Cargo.toml rename to experimental/oak_baremetal_loader/Cargo.toml index a022ad27001..4602b2534d3 100644 --- a/experimental/uefi/loader/Cargo.toml +++ b/experimental/oak_baremetal_loader/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "uefi-loader" +name = "oak_baremetal_loader" version = "0.1.0" authors = ["Andri Saar "] edition = "2021" @@ -26,10 +26,10 @@ tokio = { version = "*", features = [ ] } tonic = "*" vsock = "*" -oak_remote_attestation_sessions = { path = "../../../remote_attestation_sessions" } -oak_idl = { path = "../../../oak_idl" } -channel = { path = "../../../experimental/uefi/channel" } +oak_remote_attestation_sessions = { path = "../../remote_attestation_sessions" } +oak_idl = { path = "../../oak_idl" } +oak_baremetal_communication_channel = { path = "../../experimental/oak_baremetal_channel" } ciborium-io = "*" [build-dependencies] -oak_utils = { path = "../../../oak_utils" } +oak_utils = { path = "../../oak_utils" } diff --git a/experimental/oak_baremetal_loader/README.MD b/experimental/oak_baremetal_loader/README.MD new file mode 100644 index 00000000000..5af2cd5eeaa --- /dev/null +++ b/experimental/oak_baremetal_loader/README.MD @@ -0,0 +1,21 @@ +# Oak Baremetal Loader + +Untrusted companion app that loads the trusted runtime in either qemu or crosvm, +and exposes gRPC server for communicating with the runtime. Communicates with +the runtime via the `oak_baremetal_channel`. + +## Starting the baremetal app + +The baremetal app may be loaded in qemu via + +```shell +(cd experimental/oak_baremetal_app_qemu && cargo build) \ +&& RUST_LOG=debug cargo run --package oak_baremetal_loader -- --mode bios experimental/oak_baremetal_app_qemu/target/target/debug/oak_baremetal_app_qemu +``` + +The baremetal app may be loaded in crosvm via + +```shell +(cd experimental/oak_baremetal_app_crosvm && cargo build) \ +&& RUST_LOG=debug cargo run --package oak_baremetal_loader -- --mode crosvm experimental/oak_baremetal_app_crosvm/target/target/debug/oak_baremetal_app_crosvm +``` diff --git a/experimental/uefi/loader/build.rs b/experimental/oak_baremetal_loader/build.rs similarity index 97% rename from experimental/uefi/loader/build.rs rename to experimental/oak_baremetal_loader/build.rs index f644c111bfb..d3797170c70 100644 --- a/experimental/uefi/loader/build.rs +++ b/experimental/oak_baremetal_loader/build.rs @@ -18,7 +18,7 @@ use oak_utils::{generate_grpc_code, CodegenOptions}; fn main() -> Result<(), Box> { generate_grpc_code( - "../../../", + "../../", &["grpc_unary_attestation/proto/unary_server.proto"], CodegenOptions { build_client: false, diff --git a/experimental/uefi/loader/src/crosvm.rs b/experimental/oak_baremetal_loader/src/crosvm.rs similarity index 100% rename from experimental/uefi/loader/src/crosvm.rs rename to experimental/oak_baremetal_loader/src/crosvm.rs diff --git a/experimental/uefi/loader/src/main.rs b/experimental/oak_baremetal_loader/src/main.rs similarity index 99% rename from experimental/uefi/loader/src/main.rs rename to experimental/oak_baremetal_loader/src/main.rs index 13b645bd466..3361255d163 100644 --- a/experimental/uefi/loader/src/main.rs +++ b/experimental/oak_baremetal_loader/src/main.rs @@ -16,9 +16,9 @@ #![feature(io_safety)] -use channel::{schema, Framed}; use clap::Parser; use crosvm::Crosvm; +use oak_baremetal_communication_channel::{schema, Framed}; use qemu::Qemu; use std::{ fs, diff --git a/experimental/uefi/loader/src/qemu.rs b/experimental/oak_baremetal_loader/src/qemu.rs similarity index 100% rename from experimental/uefi/loader/src/qemu.rs rename to experimental/oak_baremetal_loader/src/qemu.rs diff --git a/experimental/uefi/loader/src/server.rs b/experimental/oak_baremetal_loader/src/server.rs similarity index 98% rename from experimental/uefi/loader/src/server.rs rename to experimental/oak_baremetal_loader/src/server.rs index 74f59b9768a..f26d5e6c755 100644 --- a/experimental/uefi/loader/src/server.rs +++ b/experimental/oak_baremetal_loader/src/server.rs @@ -15,8 +15,8 @@ // use bmrng::unbounded::UnboundedRequestSender; -use channel::schema; use futures::Future; +use oak_baremetal_communication_channel::schema; use oak_remote_attestation_sessions::{SessionId, SESSION_ID_LENGTH}; use std::net::SocketAddr; use tonic::{transport::Server, Request, Response, Status}; diff --git a/experimental/uefi/loader/src/vmm.rs b/experimental/oak_baremetal_loader/src/vmm.rs similarity index 100% rename from experimental/uefi/loader/src/vmm.rs rename to experimental/oak_baremetal_loader/src/vmm.rs diff --git a/experimental/oak_baremetal_runtime/Cargo.toml b/experimental/oak_baremetal_runtime/Cargo.toml new file mode 100644 index 00000000000..3866fe0a9e7 --- /dev/null +++ b/experimental/oak_baremetal_runtime/Cargo.toml @@ -0,0 +1,25 @@ +[package] +name = "oak_baremetal_runtime" +version = "0.1.0" +authors = ["Andri Saar "] +edition = "2021" +license = "Apache-2.0" + +[features] +default = ["ring-crypto", "wasm"] +ring-crypto = ["oak_remote_attestation_sessions/ring-crypto"] +rust-crypto = ["oak_remote_attestation_sessions/rust-crypto"] +wasm = [] + +[dependencies] +anyhow = { version = "*", default-features = false } +log = "*" +oak_baremetal_communication_channel = { path = "../../experimental/oak_baremetal_channel" } +oak_idl = { path = "../../oak_idl" } +flatbuffers = { version = "*", features = ["no_std"], default-features = false } +oak_functions_wasm = { path = "../../oak_functions/wasm" } +oak_functions_workload_logging = { path = "../../oak_functions/workload_logging" } +oak_remote_attestation = { path = "../../remote_attestation/rust", default-features = false } +oak_remote_attestation_sessions = { path = "../../remote_attestation_sessions", default-features = false } +oak_logger = { path = "../../oak_functions/logger" } +ciborium-io = { version = "*", default-features = false } diff --git a/experimental/oak_baremetal_runtime/README.MD b/experimental/oak_baremetal_runtime/README.MD new file mode 100644 index 00000000000..39d6e89c2eb --- /dev/null +++ b/experimental/oak_baremetal_runtime/README.MD @@ -0,0 +1,3 @@ +# Oak Baremetal Runtime + +Common business logic that should run in a VM. diff --git a/experimental/uefi/runtime/src/framing.rs b/experimental/oak_baremetal_runtime/src/framing.rs similarity index 97% rename from experimental/uefi/runtime/src/framing.rs rename to experimental/oak_baremetal_runtime/src/framing.rs index 4d4aa7fe1f7..23fa2a2425e 100644 --- a/experimental/uefi/runtime/src/framing.rs +++ b/experimental/oak_baremetal_runtime/src/framing.rs @@ -17,8 +17,8 @@ use crate::remote_attestation::AttestationHandler; use alloc::vec::Vec; use anyhow::Context; -use channel::{schema, schema::TrustedRuntime, Framed}; use ciborium_io::{Read, Write}; +use oak_baremetal_communication_channel::{schema, schema::TrustedRuntime, Framed}; use oak_idl::Handler; use oak_remote_attestation::handshaker::{ AttestationBehavior, AttestationGenerator, AttestationVerifier, diff --git a/experimental/uefi/runtime/src/lib.rs b/experimental/oak_baremetal_runtime/src/lib.rs similarity index 100% rename from experimental/uefi/runtime/src/lib.rs rename to experimental/oak_baremetal_runtime/src/lib.rs diff --git a/experimental/uefi/runtime/src/logger.rs b/experimental/oak_baremetal_runtime/src/logger.rs similarity index 100% rename from experimental/uefi/runtime/src/logger.rs rename to experimental/oak_baremetal_runtime/src/logger.rs diff --git a/experimental/uefi/runtime/src/remote_attestation.rs b/experimental/oak_baremetal_runtime/src/remote_attestation.rs similarity index 100% rename from experimental/uefi/runtime/src/remote_attestation.rs rename to experimental/oak_baremetal_runtime/src/remote_attestation.rs diff --git a/experimental/uefi/runtime/src/wasm/echo.wasm b/experimental/oak_baremetal_runtime/src/wasm/echo.wasm similarity index 100% rename from experimental/uefi/runtime/src/wasm/echo.wasm rename to experimental/oak_baremetal_runtime/src/wasm/echo.wasm diff --git a/experimental/uefi/runtime/src/wasm/mod.rs b/experimental/oak_baremetal_runtime/src/wasm/mod.rs similarity index 100% rename from experimental/uefi/runtime/src/wasm/mod.rs rename to experimental/oak_baremetal_runtime/src/wasm/mod.rs diff --git a/experimental/uefi/README.md b/experimental/uefi/README.md deleted file mode 100644 index 6fb5359200e..00000000000 --- a/experimental/uefi/README.md +++ /dev/null @@ -1,44 +0,0 @@ -# Experimental UEFI app and untrusted loader - -This directory contains the following: - -- `runtime`: common business logic that should run in a VM -- `baremetal`: a minimal kernel that wraps `runtime` for execution on bare metal -- `loader`: wrapper around `qemu` that loads one of the two above and exposes a - gRPC server for communicating with the runtime -- `client`: a trivial gRPC client for communicating with the loader/runtime. - -## Loader - -To run the loader, build the loader and one of either `app` or `baremetal` and -run: - -```shell -RUST_LOG=debug target/debug/uefi-loader experimental/uefi/app/target/x86_64-unknown-uefi/debug/uefi-simple.efi -``` - -or - -```shell -RUST_LOG=debug target/debug/uefi-loader --mode bios experimental/uefi/baremetal/target/target/debug/baremetal -``` - -This will start listening for connections on `127.0.0.1:8000` by default. - -## Client - -Running the client requires no specific arguments: - -```shell -target/debug/uefi-client -``` - -The client will read lines from stdin and sends a gRPC request to the loader for -each line. Responses are printed to stdout. - -## Communication between VM code and the outside world - -We assume there's two serial ports on the system: - -- the first one will be used for console stdio and any logs produced by the app -- the second serial port is used by the app. diff --git a/experimental/uefi/baremetal-crosvm/Cargo.lock b/experimental/uefi/baremetal-crosvm/Cargo.lock deleted file mode 100644 index e03161a42a7..00000000000 --- a/experimental/uefi/baremetal-crosvm/Cargo.lock +++ /dev/null @@ -1,1277 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -version = 3 - -[[package]] -name = "aead" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b613b8e1e3cf911a086f53f03bf286f52fd7a7258e4fa606f0ef220d39d8877" -dependencies = [ - "generic-array", -] - -[[package]] -name = "aes" -version = "0.7.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e8b47f52ea9bae42228d07ec09eb676433d7c4ed1ebdf0f1d1c29ed446f1ab8" -dependencies = [ - "cfg-if", - "cipher", - "cpufeatures", - "opaque-debug", -] - -[[package]] -name = "aes-gcm" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df5f85a83a7d8b0442b6aa7b504b8212c1733da07b98aae43d4bc21b2cb3cdf6" -dependencies = [ - "aead", - "aes", - "cipher", - "ctr", - "ghash", - "subtle", -] - -[[package]] -name = "ahash" -version = "0.7.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" -dependencies = [ - "getrandom", - "once_cell", - "version_check", -] - -[[package]] -name = "anyhow" -version = "1.0.57" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08f9b8508dccb7687a1d6c4ce66b2b0ecef467c94667de27d8d7fe1f8d2a9cdc" - -[[package]] -name = "atomic_refcell" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73b5e5f48b927f04e952dedc932f31995a65a0bf65ec971c74436e51bf6e970d" - -[[package]] -name = "autocfg" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" - -[[package]] -name = "baremetal-crosvm" -version = "0.1.0" -dependencies = [ - "kernel", -] - -[[package]] -name = "base16ct" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "349a06037c7bf932dd7e7d1f653678b2038b9ad46a74102f1fc7bd7872678cce" - -[[package]] -name = "bit_field" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcb6dd1c2376d2e096796e234a70e17e94cc2d5d54ff8ce42b28cef1d0d359a4" - -[[package]] -name = "bitflags" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" - -[[package]] -name = "block-buffer" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" -dependencies = [ - "generic-array", -] - -[[package]] -name = "block-buffer" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bf7fe51849ea569fd452f37822f606a5cabb684dc918707a0193fd4664ff324" -dependencies = [ - "generic-array", -] - -[[package]] -name = "byteorder" -version = "1.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" - -[[package]] -name = "bytes" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4872d67bab6358e59559027aa3b9157c53d9358c51423c17554809a8858e0f8" - -[[package]] -name = "cc" -version = "1.0.73" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fff2a6927b3bb87f9595d67196a70493f627687a71d87a0d692242c33f58c11" - -[[package]] -name = "cfg-if" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" - -[[package]] -name = "channel" -version = "0.1.0" -dependencies = [ - "anyhow", - "ciborium-io", - "flatbuffers", - "oak_idl", - "oak_idl_gen_services", - "oak_idl_gen_structs", - "static_assertions", -] - -[[package]] -name = "ciborium-io" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "346de753af073cc87b52b2083a506b38ac176a44cfb05497b622e27be899b369" - -[[package]] -name = "cipher" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ee52072ec15386f770805afd189a01c8841be8696bed250fa2f13c4c0d6dfb7" -dependencies = [ - "generic-array", -] - -[[package]] -name = "cmake" -version = "0.1.48" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8ad8cef104ac57b68b89df3208164d228503abbdce70f6880ffa3d970e7443a" -dependencies = [ - "cc", -] - -[[package]] -name = "const-oid" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4c78c047431fee22c1a7bb92e00ad095a02a983affe4d8a72e2a2c62c1b94f3" - -[[package]] -name = "convert_case" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb4a24b1aaf0fd0ce8b45161144d6f42cd91677fd5940fd431183eb023b3a2b8" - -[[package]] -name = "core2" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b49ba7ef1ad6107f8824dbe97de947cbaac53c44e7f9756a1fba0d37c1eec505" -dependencies = [ - "memchr", -] - -[[package]] -name = "cpufeatures" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59a6001667ab124aebae2a495118e11d30984c3a653e99d86d58971708cf5e4b" -dependencies = [ - "libc", -] - -[[package]] -name = "crypto-bigint" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03c6a1d5fa1de37e071642dfa44ec552ca5b299adb128fab16138e24b548fd21" -dependencies = [ - "generic-array", - "rand_core", - "subtle", - "zeroize", -] - -[[package]] -name = "crypto-common" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57952ca27b5e3606ff4dd79b0020231aaf9d6aa76dc05fd30137538c50bd3ce8" -dependencies = [ - "generic-array", - "typenum", -] - -[[package]] -name = "crypto-mac" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1d1a86f49236c215f271d40892d5fc950490551400b02ef360692c29815c714" -dependencies = [ - "generic-array", - "subtle", -] - -[[package]] -name = "ctr" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "049bb91fb4aaf0e3c7efa6cd5ef877dbbbd15b39dad06d9948de4ec8a75761ea" -dependencies = [ - "cipher", -] - -[[package]] -name = "curve25519-dalek" -version = "3.2.1" -dependencies = [ - "byteorder", - "digest 0.9.0", - "rand_core", - "subtle", - "zeroize", -] - -[[package]] -name = "der" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6919815d73839e7ad218de758883aae3a257ba6759ce7a9992501efbb53d705c" -dependencies = [ - "const-oid", -] - -[[package]] -name = "digest" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" -dependencies = [ - "generic-array", -] - -[[package]] -name = "digest" -version = "0.10.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2fb860ca6fafa5552fb6d0e816a69c8e49f0908bf524e30a90d97c85892d506" -dependencies = [ - "block-buffer 0.10.2", - "crypto-common", - "subtle", -] - -[[package]] -name = "downcast-rs" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ea835d29036a4087793836fa931b08837ad5e957da9e23886b29586fb9b6650" - -[[package]] -name = "ecdsa" -version = "0.13.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0d69ae62e0ce582d56380743515fefaf1a8c70cec685d9677636d7e30ae9dc9" -dependencies = [ - "der", - "elliptic-curve", - "rfc6979", - "signature", -] - -[[package]] -name = "either" -version = "1.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457" - -[[package]] -name = "elliptic-curve" -version = "0.11.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25b477563c2bfed38a3b7a60964c49e058b2510ad3f12ba3483fd8f62c2306d6" -dependencies = [ - "base16ct", - "crypto-bigint", - "der", - "ff", - "generic-array", - "group", - "rand_core", - "sec1", - "subtle", - "zeroize", -] - -[[package]] -name = "fastrand" -version = "1.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3fcf0cee53519c866c09b5de1f6c56ff9d647101f81c1964fa632e148896cdf" -dependencies = [ - "instant", -] - -[[package]] -name = "ff" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "131655483be284720a17d74ff97592b8e76576dc25563148601df2d7c9080924" -dependencies = [ - "rand_core", - "subtle", -] - -[[package]] -name = "fixedbitset" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "279fb028e20b3c4c320317955b77c5e0c9701f05a1d309905d6fc702cdc5053e" - -[[package]] -name = "flatbuffers" -version = "2.1.2" -source = "git+https://github.com/jul-sh/flatbuffers.git?rev=a07ddee936737da89aeb5a496f9742a805537188#a07ddee936737da89aeb5a496f9742a805537188" -dependencies = [ - "bitflags", - "core2", - "smallvec", - "thiserror_core2", -] - -[[package]] -name = "generic-array" -version = "0.14.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd48d33ec7f05fbfa152300fdad764757cbded343c1aa1cff2fbaf4134851803" -dependencies = [ - "typenum", - "version_check", -] - -[[package]] -name = "getrandom" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9be70c98951c83b8d2f8f60d7065fa6d5146873094452a1008da8c2f1e4205ad" -dependencies = [ - "cfg-if", - "libc", - "wasi", -] - -[[package]] -name = "ghash" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1583cc1656d7839fd3732b80cf4f38850336cdb9b8ded1cd399ca62958de3c99" -dependencies = [ - "opaque-debug", - "polyval", -] - -[[package]] -name = "group" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc5ac374b108929de78460075f3dc439fa66df9d8fc77e8f12caa5165fcf0c89" -dependencies = [ - "ff", - "rand_core", - "subtle", -] - -[[package]] -name = "hashbrown" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" -dependencies = [ - "ahash", -] - -[[package]] -name = "hashbrown" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db0d4cf898abf0081f964436dc980e96670a0f36863e4b83aaacdb65c9d7ccc3" -dependencies = [ - "ahash", -] - -[[package]] -name = "heck" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2540771e65fc8cb83cd6e8a237f70c319bd5c29f78ed1084ba5d50eeac86f7f9" - -[[package]] -name = "hkdf" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "791a029f6b9fc27657f6f188ec6e5e43f6911f6f878e0dc5501396e09809d437" -dependencies = [ - "hmac 0.12.1", -] - -[[package]] -name = "hmac" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a2a2320eb7ec0ebe8da8f744d7812d9fc4cb4d09344ac01898dbcb6a20ae69b" -dependencies = [ - "crypto-mac", - "digest 0.9.0", -] - -[[package]] -name = "hmac" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" -dependencies = [ - "digest 0.10.3", -] - -[[package]] -name = "indexmap" -version = "1.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f647032dfaa1f8b6dc29bd3edb7bbef4861b8b8007ebb118d6db284fd59f6ee" -dependencies = [ - "autocfg", - "hashbrown 0.11.2", -] - -[[package]] -name = "instant" -version = "0.1.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "itertools" -version = "0.10.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9a9d19fa1e79b6215ff29b9d6880b706147f16e9b1dbb1e4e5947b5b02bc5e3" -dependencies = [ - "either", -] - -[[package]] -name = "kernel" -version = "0.1.0" -dependencies = [ - "anyhow", - "atomic_refcell", - "ciborium-io", - "getrandom", - "lazy_static", - "libm", - "linked_list_allocator", - "log", - "oak_remote_attestation", - "runtime", - "rust-hypervisor-firmware-boot", - "rust-hypervisor-firmware-virtio", - "strum", - "uart_16550", - "virtio", - "x86_64", -] - -[[package]] -name = "lazy_static" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" -dependencies = [ - "spin", -] - -[[package]] -name = "libc" -version = "0.2.126" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "349d5a591cd28b49e1d1037471617a32ddcda5731b99419008085f72d5a53836" - -[[package]] -name = "libm" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33a33a362ce288760ec6a508b94caaec573ae7d3bbbd91b87aa0bad4456839db" - -[[package]] -name = "linked_list_allocator" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "549ce1740e46b291953c4340adcd74c59bcf4308f4cac050fd33ba91b7168f4a" -dependencies = [ - "spinning_top", -] - -[[package]] -name = "lock_api" -version = "0.4.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "327fa5b6a6940e4699ec49a9beae1ea4845c6bab9314e4f84ac68742139d8c53" -dependencies = [ - "autocfg", - "scopeguard", -] - -[[package]] -name = "log" -version = "0.4.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "lru" -version = "0.7.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32613e41de4c47ab04970c348ca7ae7382cf116625755af070b008a15516a889" -dependencies = [ - "hashbrown 0.11.2", -] - -[[package]] -name = "memchr" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" - -[[package]] -name = "memory_units" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71d96e3f3c0b6325d8ccd83c33b28acb183edcb6c67938ba104ec546854b0882" - -[[package]] -name = "multimap" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5ce46fe64a9d73be07dcbe690a38ce1b293be448fd8ce1e6c1b8062c9f72c6a" - -[[package]] -name = "num-integer" -version = "0.1.45" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" -dependencies = [ - "autocfg", - "num-traits", -] - -[[package]] -name = "num-rational" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c000134b5dbf44adc5cb772486d335293351644b801551abe8f75c84cfa4aef" -dependencies = [ - "autocfg", - "num-integer", - "num-traits", -] - -[[package]] -name = "num-traits" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" -dependencies = [ - "autocfg", -] - -[[package]] -name = "oak_functions_abi" -version = "0.1.0" -dependencies = [ - "prost", - "prost-build", - "serde", -] - -[[package]] -name = "oak_functions_extension" -version = "0.1.0" -dependencies = [ - "anyhow", - "oak_functions_abi", - "oak_logger", -] - -[[package]] -name = "oak_functions_wasm" -version = "0.1.0" -dependencies = [ - "anyhow", - "byteorder", - "hashbrown 0.12.1", - "log", - "oak_functions_abi", - "oak_functions_extension", - "oak_logger", - "wasmi", -] - -[[package]] -name = "oak_functions_workload_logging" -version = "0.1.0" -dependencies = [ - "anyhow", - "log", - "oak_functions_abi", - "oak_functions_extension", - "oak_logger", -] - -[[package]] -name = "oak_idl" -version = "0.1.0" -dependencies = [ - "flatbuffers", -] - -[[package]] -name = "oak_idl_gen_services" -version = "0.1.0" -dependencies = [ - "anyhow", - "convert_case", - "flatbuffers", - "oak_idl_gen_structs", -] - -[[package]] -name = "oak_idl_gen_structs" -version = "0.1.0" - -[[package]] -name = "oak_logger" -version = "0.1.0" -dependencies = [ - "log", -] - -[[package]] -name = "oak_remote_attestation" -version = "0.1.0" -dependencies = [ - "aes-gcm", - "anyhow", - "bytes", - "getrandom", - "hkdf", - "p256", - "rand_core", - "sha2 0.10.2", - "signature", - "x25519-dalek", -] - -[[package]] -name = "oak_remote_attestation_sessions" -version = "0.1.0" -dependencies = [ - "anyhow", - "lru", - "oak_remote_attestation", -] - -[[package]] -name = "once_cell" -version = "1.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b10983b38c53aebdf33f542c6275b0f58a238129d00c4ae0e6fb59738d783ca" - -[[package]] -name = "opaque-debug" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" - -[[package]] -name = "p256" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19736d80675fbe9fe33426268150b951a3fb8f5cfca2a23a17c85ef3adb24e3b" -dependencies = [ - "ecdsa", - "elliptic-curve", - "sec1", - "sha2 0.9.9", -] - -[[package]] -name = "parity-wasm" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be5e13c266502aadf83426d87d81a0f5d1ef45b8027f5a471c360abfe4bfae92" - -[[package]] -name = "petgraph" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a13a2fa9d0b63e5f22328828741e523766fff0ee9e779316902290dff3f824f" -dependencies = [ - "fixedbitset", - "indexmap", -] - -[[package]] -name = "polyval" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8419d2b623c7c0896ff2d5d96e2cb4ede590fed28fcc34934f4c33c036e620a1" -dependencies = [ - "cfg-if", - "cpufeatures", - "opaque-debug", - "universal-hash", -] - -[[package]] -name = "proc-macro2" -version = "1.0.39" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c54b25569025b7fc9651de43004ae593a75ad88543b17178aa5e1b9c4f15f56f" -dependencies = [ - "unicode-ident", -] - -[[package]] -name = "prost" -version = "0.10.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc03e116981ff7d8da8e5c220e374587b98d294af7ba7dd7fda761158f00086f" -dependencies = [ - "bytes", - "prost-derive", -] - -[[package]] -name = "prost-build" -version = "0.10.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65a1118354442de7feb8a2a76f3d80ef01426bd45542c8c1fdffca41a758f846" -dependencies = [ - "bytes", - "cfg-if", - "cmake", - "heck", - "itertools", - "lazy_static", - "log", - "multimap", - "petgraph", - "prost", - "prost-types", - "regex", - "tempfile", - "which", -] - -[[package]] -name = "prost-derive" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b670f45da57fb8542ebdbb6105a925fe571b67f9e7ed9f47a06a84e72b4e7cc" -dependencies = [ - "anyhow", - "itertools", - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "prost-types" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d0a014229361011dc8e69c8a1ec6c2e8d0f2af7c91e3ea3f5b2170298461e68" -dependencies = [ - "bytes", - "prost", -] - -[[package]] -name = "quote" -version = "1.0.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1feb54ed693b93a84e14094943b84b7c4eae204c512b7ccb95ab0c66d278ad1" -dependencies = [ - "proc-macro2", -] - -[[package]] -name = "rand_core" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d34f1408f55294453790c48b2f1ebbb1c5b4b7563eb1f418bcfcfdbb06ebb4e7" -dependencies = [ - "getrandom", -] - -[[package]] -name = "redox_syscall" -version = "0.2.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62f25bc4c7e55e0b0b7a1d43fb893f4fa1361d0abe38b9ce4f323c2adfe6ef42" -dependencies = [ - "bitflags", -] - -[[package]] -name = "regex" -version = "1.5.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a11647b6b25ff05a515cb92c365cec08801e83423a235b51e231e1808747286" -dependencies = [ - "regex-syntax", -] - -[[package]] -name = "regex-syntax" -version = "0.6.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f497285884f3fcff424ffc933e56d7cbca511def0c9831a7f9b5f6153e3cc89b" - -[[package]] -name = "remove_dir_all" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7" -dependencies = [ - "winapi", -] - -[[package]] -name = "rfc6979" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96ef608575f6392792f9ecf7890c00086591d29a83910939d430753f7c050525" -dependencies = [ - "crypto-bigint", - "hmac 0.11.0", - "zeroize", -] - -[[package]] -name = "runtime" -version = "0.1.0" -dependencies = [ - "anyhow", - "channel", - "ciborium-io", - "flatbuffers", - "log", - "oak_functions_wasm", - "oak_functions_workload_logging", - "oak_idl", - "oak_logger", - "oak_remote_attestation", - "oak_remote_attestation_sessions", -] - -[[package]] -name = "rust-hypervisor-firmware-boot" -version = "0.1.0" -dependencies = [ - "bitflags", - "log", - "x86_64", -] - -[[package]] -name = "rust-hypervisor-firmware-virtio" -version = "0.1.0" -dependencies = [ - "atomic_refcell", - "bitflags", - "log", - "x86_64", -] - -[[package]] -name = "rustversion" -version = "1.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2cc38e8fa666e2de3c4aba7edeb5ffc5246c1c2ed0e3d17e560aeeba736b23f" - -[[package]] -name = "scopeguard" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" - -[[package]] -name = "sec1" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08da66b8b0965a5555b6bd6639e68ccba85e1e2506f5fbb089e93f8a04e1a2d1" -dependencies = [ - "der", - "generic-array", - "subtle", - "zeroize", -] - -[[package]] -name = "serde" -version = "1.0.137" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61ea8d54c77f8315140a05f4c7237403bf38b72704d031543aa1d16abbf517d1" -dependencies = [ - "serde_derive", -] - -[[package]] -name = "serde_derive" -version = "1.0.137" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f26faba0c3959972377d3b2d306ee9f71faee9714294e41bb777f83f88578be" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "sha2" -version = "0.9.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" -dependencies = [ - "block-buffer 0.9.0", - "cfg-if", - "cpufeatures", - "digest 0.9.0", - "opaque-debug", -] - -[[package]] -name = "sha2" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55deaec60f81eefe3cce0dc50bda92d6d8e88f2a27df7c5033b42afeb1ed2676" -dependencies = [ - "cfg-if", - "cpufeatures", - "digest 0.10.3", -] - -[[package]] -name = "signature" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02658e48d89f2bec991f9a78e69cfa4c316f8d6a6c4ec12fae1aeb263d486788" -dependencies = [ - "digest 0.9.0", - "rand_core", -] - -[[package]] -name = "smallvec" -version = "1.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2dd574626839106c320a323308629dcb1acfc96e32a8cba364ddc61ac23ee83" - -[[package]] -name = "spin" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" - -[[package]] -name = "spinning_top" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75adad84ee84b521fb2cca2d4fd0f1dab1d8d026bda3c5bea4ca63b5f9f9293c" -dependencies = [ - "lock_api", -] - -[[package]] -name = "static_assertions" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" - -[[package]] -name = "strum" -version = "0.24.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e96acfc1b70604b8b2f1ffa4c57e59176c7dbb05d556c71ecd2f5498a1dee7f8" -dependencies = [ - "strum_macros", -] - -[[package]] -name = "strum_macros" -version = "0.24.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6878079b17446e4d3eba6192bb0a2950d5b14f0ed8424b852310e5a94345d0ef" -dependencies = [ - "heck", - "proc-macro2", - "quote", - "rustversion", - "syn", -] - -[[package]] -name = "subtle" -version = "2.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" - -[[package]] -name = "syn" -version = "1.0.95" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbaf6116ab8924f39d52792136fb74fd60a80194cf1b1c6ffa6453eef1c3f942" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "synstructure" -version = "0.12.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f" -dependencies = [ - "proc-macro2", - "quote", - "syn", - "unicode-xid", -] - -[[package]] -name = "tempfile" -version = "3.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cdb1ef4eaeeaddc8fbd371e5017057064af0911902ef36b39801f67cc6d79e4" -dependencies = [ - "cfg-if", - "fastrand", - "libc", - "redox_syscall", - "remove_dir_all", - "winapi", -] - -[[package]] -name = "thiserror_core2" -version = "2.0.0" -source = "git+https://github.com/jul-sh/thiserror-core2.git?rev=b99e1a0106623cbbd12cbb5562d01df7a3fdc22e#b99e1a0106623cbbd12cbb5562d01df7a3fdc22e" -dependencies = [ - "core2", - "thiserror_core2-impl", -] - -[[package]] -name = "thiserror_core2-impl" -version = "2.0.0" -source = "git+https://github.com/jul-sh/thiserror-core2.git?rev=b99e1a0106623cbbd12cbb5562d01df7a3fdc22e#b99e1a0106623cbbd12cbb5562d01df7a3fdc22e" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "typenum" -version = "1.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcf81ac59edc17cc8697ff311e8f5ef2d99fcbd9817b34cec66f90b6c3dfd987" - -[[package]] -name = "uart_16550" -version = "0.2.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b074eb9300ad949edd74c529c0e8d451625af71bb948e6b65fe69f72dc1363d9" -dependencies = [ - "bitflags", - "rustversion", - "x86_64", -] - -[[package]] -name = "unicode-ident" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d22af068fba1eb5edcb4aea19d382b2a3deb4c8f9d475c589b6ada9e0fd493ee" - -[[package]] -name = "unicode-xid" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "957e51f3646910546462e67d5f7599b9e4fb8acdd304b087a6494730f9eebf04" - -[[package]] -name = "universal-hash" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f214e8f697e925001e66ec2c6e37a4ef93f0f78c2eed7814394e10c62025b05" -dependencies = [ - "generic-array", - "subtle", -] - -[[package]] -name = "version_check" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" - -[[package]] -name = "virtio" -version = "0.1.0" -dependencies = [ - "anyhow", - "bitflags", - "ciborium-io", - "log", - "rust-hypervisor-firmware-virtio", - "strum", -] - -[[package]] -name = "volatile" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3ca98349dda8a60ae74e04fd90c7fb4d6a4fbe01e6d3be095478aa0b76f6c0c" - -[[package]] -name = "wasi" -version = "0.10.2+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6" - -[[package]] -name = "wasmi" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca00c5147c319a8ec91ec1a0edbec31e566ce2c9cc93b3f9bb86a9efd0eb795d" -dependencies = [ - "downcast-rs", - "libm", - "memory_units", - "num-rational", - "num-traits", - "parity-wasm", - "wasmi-validation", -] - -[[package]] -name = "wasmi-validation" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "165343ecd6c018fc09ebcae280752702c9a2ef3e6f8d02f1cfcbdb53ef6d7937" -dependencies = [ - "parity-wasm", -] - -[[package]] -name = "which" -version = "4.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c4fb54e6113b6a8772ee41c3404fb0301ac79604489467e0a9ce1f3e97c24ae" -dependencies = [ - "either", - "lazy_static", - "libc", -] - -[[package]] -name = "winapi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" -dependencies = [ - "winapi-i686-pc-windows-gnu", - "winapi-x86_64-pc-windows-gnu", -] - -[[package]] -name = "winapi-i686-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" - -[[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" - -[[package]] -name = "x25519-dalek" -version = "1.2.0" -dependencies = [ - "curve25519-dalek", - "rand_core", - "zeroize", -] - -[[package]] -name = "x86_64" -version = "0.14.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "958cd5cb28e720db2f59ee9dc4235b5f82a183d079fb0e6caf43ad074cfdc66a" -dependencies = [ - "bit_field", - "bitflags", - "rustversion", - "volatile", -] - -[[package]] -name = "zeroize" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4756f7db3f7b5574938c3eb1c117038b8e07f95ee6718c0efad4ac21508f1efd" -dependencies = [ - "zeroize_derive", -] - -[[package]] -name = "zeroize_derive" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f8f187641dad4f680d25c4bfc4225b418165984179f26ca76ec4fb6441d3a17" -dependencies = [ - "proc-macro2", - "quote", - "syn", - "synstructure", -] diff --git a/experimental/uefi/baremetal/Cargo.toml b/experimental/uefi/baremetal/Cargo.toml deleted file mode 100644 index 7a70f6aa644..00000000000 --- a/experimental/uefi/baremetal/Cargo.toml +++ /dev/null @@ -1,25 +0,0 @@ -[package] -name = "baremetal" -version = "0.1.0" -authors = ["Andri Saar "] -edition = "2021" -license = "Apache-2.0" - -[features] -default = ["pvh"] -pvh = ["rust-hypervisor-firmware-boot/pvh"] -multiboot = [] - -[dependencies] -bitflags = "*" -kernel = { path = "../kernel" } -rust-hypervisor-firmware-boot = { path = "../../../third_party/rust-hypervisor-firmware-boot", default-features = false } - -[build-dependencies] -bindgen = "*" - -[patch.crates-io] -# Ensure no_std compatibility. TODO(#2920): remove once https://github.com/google/flatbuffers/pull/7338 is merged. -flatbuffers = { git = "https://github.com/jul-sh/flatbuffers.git", rev = "a07ddee936737da89aeb5a496f9742a805537188" } -# Ensure no_std compatibility. Dependency of flatbuffers. TODO(#2920): remove once https://github.com/bbqsrc/thiserror-core2/pull/3 is merged. -thiserror_core2 = { git = "https://github.com/jul-sh/thiserror-core2.git", rev = "b99e1a0106623cbbd12cbb5562d01df7a3fdc22e" } diff --git a/experimental/uefi/runtime/Cargo.toml b/experimental/uefi/runtime/Cargo.toml deleted file mode 100644 index eb1feadf674..00000000000 --- a/experimental/uefi/runtime/Cargo.toml +++ /dev/null @@ -1,25 +0,0 @@ -[package] -name = "runtime" -version = "0.1.0" -authors = ["Andri Saar "] -edition = "2021" -license = "Apache-2.0" - -[features] -default = ["ring-crypto", "wasm"] -ring-crypto = ["oak_remote_attestation_sessions/ring-crypto"] -rust-crypto = ["oak_remote_attestation_sessions/rust-crypto"] -wasm = [] - -[dependencies] -anyhow = { version = "*", default-features = false } -log = "*" -channel = { path = "../../../experimental/uefi/channel" } -oak_idl = { path = "../../../oak_idl" } -flatbuffers = { version = "*", features = ["no_std"], default-features = false } -oak_functions_wasm = { path = "../../../oak_functions/wasm" } -oak_functions_workload_logging = { path = "../../../oak_functions/workload_logging" } -oak_remote_attestation = { path = "../../../remote_attestation/rust", default-features = false } -oak_remote_attestation_sessions = { path = "../../../remote_attestation_sessions", default-features = false } -oak_logger = { path = "../../../oak_functions/logger" } -ciborium-io = { version = "*", default-features = false } diff --git a/xtask/src/vm.rs b/xtask/src/vm.rs index a184022acd5..cb037b3fdbb 100644 --- a/xtask/src/vm.rs +++ b/xtask/src/vm.rs @@ -30,8 +30,8 @@ enum Variant { impl Variant { pub fn payload_crate_path(&self) -> &'static str { match self { - Variant::Baremetal => "./experimental/uefi/baremetal", - Variant::Crosvm => "./experimental/uefi/baremetal-crosvm", + Variant::Baremetal => "./experimental/oak_baremetal_app_qemu", + Variant::Crosvm => "./experimental/oak_baremetal_app_crosvm", } } @@ -44,9 +44,11 @@ impl Variant { pub fn binary_path(&self) -> &'static str { match self { - Variant::Baremetal => "./experimental/uefi/baremetal/target/target/debug/baremetal", + Variant::Baremetal => { + "./experimental/oak_baremetal_app_qemu/target/target/debug/oak_baremetal_app_qemu" + } Variant::Crosvm => { - "./experimental/uefi/baremetal-crosvm/target/target/debug/baremetal-crosvm" + "./experimental/oak_baremetal_app_crosvm/target/target/debug/oak_baremetal_app_crosvm" } } } @@ -63,7 +65,7 @@ fn run_variant(variant: Variant) -> Step { Step::Multiple { name: format!("run {} variant", variant), steps: vec![ - build_binary("build loader binary", "./experimental/uefi/loader"), + build_binary("build loader binary", "./experimental/oak_baremetal_loader"), build_binary("build payload", variant.payload_crate_path()), Step::WithBackground { name: "background loader".to_string(), @@ -83,7 +85,7 @@ fn build_binary(name: &str, directory: &str) -> Step { fn run_loader(variant: Variant) -> Box { Cmd::new( - "./target/debug/uefi-loader", + "./target/debug/oak_baremetal_loader", vec![ format!("--mode={}", variant.loader_mode()), variant.binary_path().to_string(), @@ -95,11 +97,11 @@ fn run_client(message: &str, iterations: usize) -> Step { Step::Multiple { name: "build and run client".to_string(), steps: vec![ - build_binary("build client binary", "./experimental/uefi/client"), + build_binary("build client binary", "./experimental/oak_baremetal_client"), Step::Single { name: "run client".to_string(), command: Cmd::new( - "./target/debug/uefi-client", + "./target/debug/oak_baremetal_client", vec![ format!("--request={}", message), format!("--expected-response={}", message),