diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a0ac86c6c..c37d5f008 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -252,44 +252,6 @@ jobs: name: nitro path: workspaces/**/Cargo.lock - icecap: - runs-on: ubuntu-latest - needs: [check] - outputs: - output: ${{ steps.check-diff.outputs.cargo-lock }} - container: - image: ghcr.io/veracruz-project/veracruz/ci@sha256:dd434df33153bd8915859eb0f280270d2cdf07d6100ef4332bcd18c5e8525068 - volumes: - - ${{ github.workspace }}:/work/veracruz - steps: - - name: Check out the Veracruz repository - uses: actions/checkout@v3 - with: - submodules: recursive - - name: add the GITHUB_WORKSPACE into git config - run: | - git config --global --add safe.directory "$GITHUB_WORKSPACE" - - name: Running IceCap test script - id: icecap-build - run: | - VERACRUZ_TEST_TIMEOUT=2400 make -C /work/veracruz/workspaces icecap-tests PROFILE=release - - name: Check modification to Cargo.lock - id: check-diff - run: | - file_changed=$(git diff --diff-filter=ACMUXTRD --name-only -- '**Cargo.lock' | tr '\n' ' ' | xargs) - echo "cargo-lock=$file_changed" >> $GITHUB_OUTPUT - if [ -n "$file_changed" ] ; then - echo "::warning::Cargo.lock files modified"; - echo "::warning::Cargo.lock change list: ${{ steps.check-diff.outputs.cargo-lock }}"; - fi - - name: Upload Cargo.lock files - id: upload-changed-cargo-lock - if: steps.check-diff.outputs.cargo-lock != '' - uses: actions/upload-artifact@v3 - with: - name: icecap - path: workspaces/**/Cargo.lock - # tests that the CLI_QUICKSTART.markdown is still up to date quickstart: runs-on: ubuntu-latest @@ -344,7 +306,7 @@ jobs: path: workspaces/**/Cargo.lock cargo-lock-check: - needs: [linux, nitro, icecap, quickstart] + needs: [linux, nitro, quickstart] runs-on: ubuntu-latest steps: - name: linux @@ -357,11 +319,6 @@ jobs: run: | echo "::warning:: nitro Cargo.lock change list: ${{ needs.nitro.outputs.output }}" exit 1 - - name: icecap - if: needs.icecap.outputs.output != '' - run: | - echo "::warning:: icecap Cargo.lock change list: ${{ needs.icecap.outputs.output }}" - exit 1 - name: quickstart if: needs.quickstart.outputs.output != '' run: | diff --git a/.gitmodules b/.gitmodules index 03b961fbc..b9a8ea5a2 100644 --- a/.gitmodules +++ b/.gitmodules @@ -8,13 +8,6 @@ [submodule "veracruz-mcu-client/nanopb"] path = veracruz-mcu-client/nanopb url = https://github.com/nanopb/nanopb -[submodule "icecap/icecap"] - path = icecap/icecap - url = https://gitlab.com/icecap-project/icecap.git - branch = realmos -[submodule "icecap/sysroot/rust"] - path = icecap/sysroot/rust - url = https://gitlab.com/icecap-project/rust.git [submodule "third-party/nitro-enclave-attestation-document"] path = third-party/nitro-enclave-attestation-document url = https://github.com/veracruz-project/nitro-enclave-attestation-document.git @@ -27,21 +20,6 @@ path = third-party/wasmi url = https://github.com/veracruz-project/wasmi.git branch = veracruz -[submodule "workspaces/icecap-runtime/deps/seL4"] - path = workspaces/icecap-runtime/deps/seL4 - url = https://gitlab.com/icecap-project/seL4.git - branch = realmos -[submodule "workspaces/icecap-runtime/deps/seL4_tools"] - path = workspaces/icecap-runtime/deps/seL4_tools - url = https://gitlab.com/icecap-project/seL4_tools.git - branch = realmos -[submodule "workspaces/icecap-runtime/deps/capdl"] - path = workspaces/icecap-runtime/deps/capdl - url = https://gitlab.com/icecap-project/capdl.git -[submodule "icecap/sysroot/libc"] - path = icecap/sysroot/libc - url = https://gitlab.com/icecap-project/rust-libc.git - branch = icecap [submodule "third-party/rust-mbedtls"] path = third-party/rust-mbedtls url = https://github.com/veracruz-project/rust-mbedtls.git diff --git a/NETWORK.markdown b/NETWORK.markdown index 61a3b0a06..34ee22ba9 100644 --- a/NETWORK.markdown +++ b/NETWORK.markdown @@ -23,7 +23,7 @@ Veracruz Client Veracruz Server Runtime Man +------------+ +------------+ +------------------+ +----------------------------+ | TCP | | TCP (3011) | | TCP (Linux) | | TCP (6000) (Linux) | +------------+ +------------+ | Unix socket | | Unix socket (5005) (Nitro) | - | (Icecap & Nitro) | | VirtIO console (IceCap) | + | (Nitro) | | | +------------------+ +----------------------------+ ``` diff --git a/docker/Makefile b/docker/Makefile index 4698c2528..2e1ab63b8 100644 --- a/docker/Makefile +++ b/docker/Makefile @@ -54,7 +54,7 @@ base: base/Dockerfile -t $(IMAGE)/$*/$(USER):$(VERSION) -f $< . .PHONY: all-base -all-base: base linux-base nitro-base icecap-base +all-base: base linux-base nitro-base echo 'All base docker images re-built from scratch' # Make sure the cargo registry directory exists to avoid permission issues @@ -111,23 +111,6 @@ localci-base: ci/Dockerfile.local ci-base all-ci: ci-image localci-base echo 'All CI docker images re-built from scratch' -##################################################################### -# IceCap-related targets - -.PHONY: -icecap-run: | $(HOME)/.cargo/registry - docker run --init --privileged --rm -d $(DOCKER_RUN_PARAMS) \ - --name $(CONTAINER)-icecap-$(USER)-$(VERSION) \ - $(IMAGE)/icecap/$(USER):$(VERSION) sleep inf - -.PHONY: -icecap-exec: - docker exec -i -t $(CONTAINER)-icecap-$(USER)-$(VERSION) /bin/bash || true - -.PHONY: icecap-base -icecap-base: icecap/Dockerfile base - $(DOCKER_BUILD_CMD) $(BUILD_ARGS) -t $(IMAGE)/icecap/$(USER):$(VERSION) -f $< . - ##################################################################### # Linux-related targets diff --git a/docker/ci/Dockerfile.base b/docker/ci/Dockerfile.base index f6b97c1ac..345598222 100644 --- a/docker/ci/Dockerfile.base +++ b/docker/ci/Dockerfile.base @@ -1,5 +1,5 @@ # docker image for local CI. -# It currently uses nitro image (which is a superset of linux image) and adds icecap +# It currently uses nitro image (which is a superset of linux image) # # AUTHORS # @@ -17,50 +17,6 @@ ARG VERSION="latest" FROM veracruz/nitro:${VERSION} as final -# Install repo -RUN \ - export REPO=$(mktemp /tmp/repo.XXXXXXXXX) ; \ - curl -o ${REPO} https://storage.googleapis.com/git-repo-downloads/repo && \ - gpg --keyserver hkps://keyserver.ubuntu.com:443 --recv-key 8BB9AD793E8E6153AF0F9A4416530D5E920F5C65 && \ - curl -s https://storage.googleapis.com/git-repo-downloads/repo.asc | gpg --verify - ${REPO} && \ - install -m 755 ${REPO} /usr/bin/repo && \ - rm ${REPO} - -# Install sel4-deps & other IceCap python package dependencies -RUN \ - python3 -m pip install --no-cache-dir \ - aenum \ - concurrencytest \ - hypothesis \ - nose \ - orderedset \ - pyelftools \ - sel4-deps \ - six \ - sortedcontainers - -RUN set -eux; \ - dpkgArch="$(dpkg --print-architecture)"; \ - case "${dpkgArch##*-}" in \ - amd64) arch='x86_64'; fileSha256='0581cebe880b8ed47556ee73d8bbb9d602b5b82e38f89f6aa53acaec37e7760d' ;; \ - arm64) arch='aarch64'; fileSha256='741cf6552adcd41ca0c38c4f03b1e8f244873d988f70ef5ed4b502c0df28ea5a' ;; \ - *) echo >&2 "unsupported architecture: ${dpkgArch}"; exit 1 ;; \ - esac; \ - curl -L -o stack.tar.gz "https://github.com/commercialhaskell/stack/releases/download/v2.9.1/stack-2.9.1-linux-${arch}.tar.gz" && \ - echo "${fileSha256} *stack.tar.gz" | sha256sum -c - ; \ - tar zxf stack.tar.gz && \ - cp stack-2.9.1-linux-${arch}/stack /usr/bin && \ - chmod a+x /usr/bin/stack && \ - rm -rf stack* && \ - git clone https://gitlab.com/arm-research/security/icecap/capdl.git && \ - cd capdl/capDL-tool && \ - stack --version && \ - make && \ - cp parse-capDL /usr/local/bin && \ - cd ../.. && \ - rm -rf capdl && \ - rm -rf $HOME/.stack - RUN \ if [ -d /work/aarch64-linux-musl-native ] ; then \ ln -s /work/aarch64-linux-musl-native /work/aarch64-linux-musl-cross ; \ diff --git a/docker/ci/Dockerfile.cache b/docker/ci/Dockerfile.cache index d5faa38f1..5ad1b386a 100644 --- a/docker/ci/Dockerfile.cache +++ b/docker/ci/Dockerfile.cache @@ -18,11 +18,8 @@ ARG VERSION="latest" FROM veracruz/ci-base:${VERSION} as final ARG ARCH=x86_64 -ARG ICECAP_RUST_VERSION=1.60.0 RUN rustup target add ${ARCH}-unknown-linux-musl wasm32-wasi && \ - rustup toolchain install ${ICECAP_RUST_VERSION} --target aarch64-unknown-linux-gnu && \ - rustup component add --toolchain ${ICECAP_RUST_VERSION} rustfmt && \ cargo install empty-library || true # Load crates.io index WORKDIR /work diff --git a/docker/ci/Dockerfile.local b/docker/ci/Dockerfile.local index 882eb04eb..723d0d500 100644 --- a/docker/ci/Dockerfile.local +++ b/docker/ci/Dockerfile.local @@ -17,11 +17,8 @@ ARG VERSION="latest" FROM veracruz/ci-base:${VERSION} as final ARG ARCH=x86_64 -ARG ICECAP_RUST_VERSION=1.60.0 RUN rustup target add ${ARCH}-unknown-linux-musl wasm32-wasi && \ - rustup toolchain install ${ICECAP_RUST_VERSION} --target aarch64-unknown-linux-gnu && \ - rustup component add rustfmt && \ - rustup component add --toolchain ${ICECAP_RUST_VERSION} rustfmt + rustup component add rustfmt WORKDIR /work diff --git a/docker/icecap/Dockerfile b/docker/icecap/Dockerfile deleted file mode 100644 index 70e77a157..000000000 --- a/docker/icecap/Dockerfile +++ /dev/null @@ -1,65 +0,0 @@ -# docker image for developing and testing Veracruz on IceCap -# -# AUTHORS -# -# The Veracruz Development Team. -# -# COPYRIGHT -# -# See the `LICENSE.markdown` file in the Veracruz root directory for licensing -# and copyright information. -# -# NOTE: We try to follow the guide in https://docs.docker.com/develop/develop-images/dockerfile_best-practices/ -# Each RUN contains a bundle of steps, which reduces the cache. - -ARG VERSION="latest" - -FROM veracruz/base:${VERSION} as final - -ARG ARCH=x86_64 -ARG USER=root -ARG UID=0 - -# Install repo -RUN \ - export REPO=$(mktemp /tmp/repo.XXXXXXXXX) ; \ - curl -o ${REPO} https://storage.googleapis.com/git-repo-downloads/repo && \ - gpg --recv-key 8BB9AD793E8E6153AF0F9A4416530D5E920F5C65 && \ - curl -s https://storage.googleapis.com/git-repo-downloads/repo.asc | gpg --verify - ${REPO} && \ - install -m 755 ${REPO} /usr/bin/repo && \ - rm ${REPO} - -# Install sel4-deps & other IceCap python package dependencies -RUN \ - python3 -m pip install --no-cache-dir \ - aenum \ - concurrencytest \ - hypothesis \ - nose \ - orderedset \ - pyelftools \ - sel4-deps \ - six \ - sortedcontainers - -RUN set -eux; \ - dpkgArch="$(dpkg --print-architecture)"; \ - case "${dpkgArch##*-}" in \ - amd64) arch='x86_64'; fileSha256='0581cebe880b8ed47556ee73d8bbb9d602b5b82e38f89f6aa53acaec37e7760d' ;; \ - arm64) arch='aarch64'; fileSha256='741cf6552adcd41ca0c38c4f03b1e8f244873d988f70ef5ed4b502c0df28ea5a' ;; \ - *) echo >&2 "unsupported architecture: ${dpkgArch}"; exit 1 ;; \ - esac; \ - curl -L -o stack.tar.gz "https://github.com/commercialhaskell/stack/releases/download/v2.9.1/stack-2.9.1-linux-${arch}.tar.gz" && \ - echo "${fileSha256} *stack.tar.gz" | sha256sum -c - ; \ - tar zxf stack.tar.gz && \ - cp stack-2.9.1-linux-${arch}/stack /usr/bin && \ - chmod a+x /usr/bin/stack && \ - rm -rf stack* && \ - git clone https://gitlab.com/arm-research/security/icecap/capdl.git && \ - cd capdl/capDL-tool && \ - stack --version && \ - make && \ - cp parse-capDL /usr/local/bin && \ - cd ../.. && \ - rm -rf capdl && \ - rm -rf $HOME/.stack diff --git a/execution-engine/Cargo.toml b/execution-engine/Cargo.toml index 7f252a9fe..0992199e8 100644 --- a/execution-engine/Cargo.toml +++ b/execution-engine/Cargo.toml @@ -7,11 +7,6 @@ version = "0.3.0" [features] default = [] -icecap = [ - "mbedtls/icecap", - "platform-services/icecap", - "policy-utils/icecap", -] nitro = [ "mbedtls/monitor_getrandom", "platform-services/nitro", @@ -30,9 +25,6 @@ log = "0.4.13" anyhow = "1" byteorder = "1.4.3" cfg-if = "1" -# ctor is not used by this crate, but we must prevent other crates from -# picking up a newer version of this crate which does not work with IceCap: -ctor = "=0.1.16" err-derive = "0.2" lazy_static = { version = "1.4.0", features = ["spin_no_std"] } mbedtls = { path = "../third-party/rust-mbedtls/mbedtls", default-features = false, features = ["std", "aesni", "padlock", "tls13"] } diff --git a/execution-engine/src/fs.rs b/execution-engine/src/fs.rs index 28a603e5a..a0900eba1 100644 --- a/execution-engine/src/fs.rs +++ b/execution-engine/src/fs.rs @@ -32,10 +32,7 @@ use std::{ sync::{Arc, Mutex, MutexGuard}, vec::Vec, }; -// TODO: wait for icecap to support direct conversion between bytes and os_str, bypassing -// potential utf-8 encoding check use log::error; -#[cfg(not(feature = "icecap"))] use std::{ ffi::OsString, os::unix::ffi::{OsStrExt, OsStringExt}, @@ -363,11 +360,6 @@ impl InodeImpl { }; let mut rst = Vec::new(); for (index, (path, inode)) in dir.iter().enumerate() { - // TODO: wait for icecap support direct conversion from os_str to bytes, bypassing - // potential utf-8 encoding check when calling to_str - #[cfg(feature = "icecap")] - let path_byte = path.as_os_str().to_str().unwrap().as_bytes().to_vec(); - #[cfg(not(feature = "icecap"))] let path_byte = path.as_os_str().as_bytes().to_vec(); let dir_ent = DirEnt { next: (u64::try_from_or_errno(index)? + 1u64).into(), @@ -1926,12 +1918,6 @@ impl FileSystem { inode_table.get(&inode)?.read_dir(&inode_table)? }; for (_, sub_relative_path) in all_dir.iter() { - // TODO: wait for icecap support direct conversion from bytes to os_str, bypassing - // potential utf-8 encoding check - #[cfg(feature = "icecap")] - let sub_relative_path = - PathBuf::from(String::from_utf8(sub_relative_path.to_vec()).unwrap()); - #[cfg(not(feature = "icecap"))] let sub_relative_path = PathBuf::from(OsString::from_vec(sub_relative_path.to_vec())); // Ignore the path for current and parent directories. @@ -2000,12 +1986,6 @@ impl FileSystem { rst.push((path.to_path_buf(), None)); } else { for (_, sub_relative_path) in all_dir.iter() { - // TODO: wait for icecap support direct conversion from bytes to os_str, bypassing - // potential utf-8 encoding check - #[cfg(feature = "icecap")] - let sub_relative_path = - PathBuf::from(String::from_utf8(sub_relative_path.to_vec()).unwrap()); - #[cfg(not(feature = "icecap"))] let sub_relative_path = PathBuf::from(OsString::from_vec(sub_relative_path.to_vec())); // Ignore the path for current and parent directories. diff --git a/icecap-runtime-manager/.gitignore b/icecap-runtime-manager/.gitignore deleted file mode 100644 index 2f8437f64..000000000 --- a/icecap-runtime-manager/.gitignore +++ /dev/null @@ -1 +0,0 @@ -NOW diff --git a/icecap-runtime-manager/Cargo.toml b/icecap-runtime-manager/Cargo.toml deleted file mode 100644 index 721d90bfa..000000000 --- a/icecap-runtime-manager/Cargo.toml +++ /dev/null @@ -1,22 +0,0 @@ -[package] -name = "icecap-runtime-manager" -version = "0.3.0" -edition = "2018" - -[features] -icecap-qemu = [] - -[dependencies] -anyhow = "1" -bincode = { version = "1.2.1", default-features = false } -icecap-core = { path = "../icecap/crates/framework/base/icecap-core" } -icecap-rpc = { path = "../icecap/crates/framework/base/icecap-rpc" } -icecap-ring-buffer = { path = "../icecap/crates/framework/base/icecap-ring-buffer" } -icecap-start-generic = { path = "../icecap/crates/framework/base/icecap-start/generic" } -icecap-std-external = { path = "../icecap/crates/framework/std-support/icecap-std-external" } -libm = { version = "0.2" } -psa-attestation = { path = "../psa-attestation" } -runtime-manager = { path = "../runtime-manager", features = ["icecap"] } -serde = { version = "1.0", default-features = false, features = ["alloc", "derive"] } -serde_json = "1.0" -veracruz-utils = { path = "../veracruz-utils", features = ["icecap"] } diff --git a/icecap-runtime-manager/src/icecap_runtime.rs b/icecap-runtime-manager/src/icecap_runtime.rs deleted file mode 100644 index fe5f486b9..000000000 --- a/icecap-runtime-manager/src/icecap_runtime.rs +++ /dev/null @@ -1,100 +0,0 @@ -//! The Icecap-specific runtime struct -//! -//! ## Authors -//! -//! The Veracruz Development Team. -//! -//! ## Licensing and copyright notice -//! -//! See the `LICENSE_MIT.markdown` file in the Veracruz root directory for -//! information on licensing and copyright. - -use anyhow::Result; -use runtime_manager::{ - managers::session_manager::{generate_csr, init_session_manager}, - platform_runtime::PlatformRuntime, -}; -use veracruz_utils::{runtime_manager_message::RuntimeManagerResponse, sha256::sha256}; - -const EXAMPLE_PUBLIC_KEY: [u8; 65] = [ - 0x4, 0x5f, 0x5, 0x5d, 0x39, 0xd9, 0xad, 0x60, 0x89, 0xf1, 0x33, 0x7e, 0x6c, 0xf9, 0x57, 0xe, - 0x6f, 0x84, 0x25, 0x5f, 0x16, 0xf8, 0xcd, 0x9c, 0xe4, 0xa0, 0xa2, 0x8d, 0x7a, 0x4f, 0xb7, 0xe4, - 0xd3, 0x60, 0x37, 0x2a, 0x81, 0x4f, 0x7, 0xc2, 0x5a, 0x24, 0x85, 0xbf, 0x47, 0xbc, 0x84, 0x47, - 0x40, 0xc5, 0x9b, 0xff, 0xff, 0xd2, 0x76, 0x32, 0x82, 0x4d, 0x76, 0x4d, 0xb4, 0x50, 0xee, 0x9f, - 0x22, -]; - -const EXAMPLE_PRIVATE_KEY: [u8; 32] = [ - 0xe6, 0xbf, 0x1e, 0x3d, 0xb4, 0x45, 0x42, 0xbe, 0xf5, 0x35, 0xe7, 0xac, 0xbc, 0x2d, 0x54, 0xd0, - 0xba, 0x94, 0xbf, 0xb5, 0x47, 0x67, 0x2c, 0x31, 0xc1, 0xd4, 0xee, 0x1c, 0x05, 0x76, 0xa1, 0x44, -]; - -const EXAMPLE_HASH: [u8; 32] = [ - 0xde, 0xad, 0xbe, 0xef, 0xde, 0xad, 0xbe, 0xef, 0xde, 0xad, 0xbe, 0xef, 0xde, 0xad, 0xbe, 0xef, - 0xf0, 0x0d, 0xca, 0xfe, 0xf0, 0x0d, 0xca, 0xfe, 0xf0, 0x0d, 0xca, 0xfe, 0xf0, 0x0d, 0xca, 0xfe, -]; - -const ROOT_PRIVATE_KEY: &[u8] = &EXAMPLE_PRIVATE_KEY; - -const RUNTIME_MANAGER_HASH: &[u8] = &EXAMPLE_HASH; - -pub struct IcecapRuntime {} - -impl PlatformRuntime for IcecapRuntime { - /// Performs a dummy implementation of native attestation using the insecure - /// root private keys and computing the runtime manager hash. If successful, - /// produces a PSA attestation token binding the CSR hash, runtime manager hash, - /// and challenge. - fn attestation(&self, challenge: &Vec) -> Result { - init_session_manager()?; - let csr = generate_csr()?; - let root_private_key = &ROOT_PRIVATE_KEY; - let enclave_hash = &RUNTIME_MANAGER_HASH; - let csr_hash = sha256(&csr); - - let mut root_key_handle: u32 = 0; - assert_eq!(0, unsafe { - psa_attestation::psa_initial_attest_load_key( - root_private_key.as_ptr(), - root_private_key.len() as u64, - &mut root_key_handle, - ) - }); - - // Section 3.2.1 of https://www.ietf.org/archive/id/draft-tschofenig-rats-psa-token-09.txt - // EAT UEID of type RAND. - // Length must be 33 bytes - // first byte MUST be 0x01 (RAND) - // next 32 bytes must be the hash of the key (Is this the public or private key? It's unclear, presume the public key because a hash of the private key could theoretically bleed info - // about the private key) - let public_key_hash = sha256(&EXAMPLE_PUBLIC_KEY); - let mut enclave_name: Vec = Vec::new(); - enclave_name.push(0x01); - enclave_name.extend_from_slice(&public_key_hash); - - let mut token: Vec = Vec::with_capacity(2048); - let mut token_len: u64 = 0; - assert_eq!(0, unsafe { - psa_attestation::psa_initial_attest_get_token( - enclave_hash.as_ptr() as *const u8, - enclave_hash.len() as u64, - csr_hash.as_ptr() as *const u8, - csr_hash.len() as u64, - enclave_name.as_ptr() as *const u8, - enclave_name.len() as u64, - challenge.as_ptr() as *const u8, - challenge.len() as u64, - token.as_mut_ptr() as *mut u8, - token.capacity() as u64, - &mut token_len as *mut u64, - ) - }); - unsafe { token.set_len(token_len as usize) }; - - assert_eq!(0, unsafe { - psa_attestation::psa_initial_attest_remove_key(root_key_handle) - }); - - return Ok(RuntimeManagerResponse::AttestationData(token, csr)); - } -} diff --git a/icecap-runtime-manager/src/main.rs b/icecap-runtime-manager/src/main.rs deleted file mode 100644 index d1942d783..000000000 --- a/icecap-runtime-manager/src/main.rs +++ /dev/null @@ -1,200 +0,0 @@ -//! IceCap-specific material for the Runtime Manager enclave -//! -//! ## Authors -//! -//! The Veracruz Development Team. -//! -//! ## Licensing and copyright notice -//! -//! See the `LICENSE_MIT.markdown` file in the Veracruz root directory for -//! information on licensing and copyright. - -#![feature(rustc_private)] -#![no_main] -#![feature(format_args_nl)] -extern crate alloc; - -use bincode; -use core::{convert::TryFrom, mem::size_of}; -use icecap_core::{ - config::*, - logger::{DisplayMode, Level, Logger}, - prelude::*, - ring_buffer::*, -}; -use icecap_start_generic::declare_generic_main; -use icecap_std_external; -use runtime_manager::common_runtime::CommonRuntime; -use serde::{Deserialize, Serialize}; - -mod icecap_runtime; - -declare_generic_main!(main); - -#[derive(Debug, Clone, Serialize, Deserialize)] -struct Config { - event_nfn: Notification, - virtio_console_server_ring_buffer: UnmanagedRingBufferConfig, - badges: Badges, -} - -#[derive(Debug, Clone, Serialize, Deserialize)] -struct Badges { - virtio_console_server_ring_buffer: Badge, -} - -fn main(config: Config) -> Fallible<()> { - // TODO why do we need this? - icecap_runtime_init(); - - debug_println!("icecap-realmos: initializing..."); - - // enable ring buffer to serial-server - let virtio_console_client = - RingBuffer::unmanaged_from_config(&config.virtio_console_server_ring_buffer); - virtio_console_client.enable_notify_read(); - virtio_console_client.enable_notify_write(); - debug_println!("icecap-realmos: enabled ring buffer"); - - debug_println!("icecap-realmos: running..."); - RuntimeManager::new( - virtio_console_client, - config.event_nfn, - config.badges.virtio_console_server_ring_buffer, - ) - .run() -} - -struct RuntimeManager { - channel: RingBuffer, - event: Notification, - virtio_console_server_ring_buffer_badge: Badge, - active: bool, -} - -impl RuntimeManager { - fn new( - channel: RingBuffer, - event: Notification, - virtio_console_server_ring_buffer_badge: Badge, - ) -> Self { - Self { - channel: channel, - event: event, - virtio_console_server_ring_buffer_badge: virtio_console_server_ring_buffer_badge, - active: true, - } - } - - fn run(&mut self) -> Fallible<()> { - let icecap_runtime = icecap_runtime::IcecapRuntime {}; - - debug_println!("icecap_runtime_manager::run looping"); - let mut runtime = CommonRuntime::new(&icecap_runtime); - loop { - let badge = self.event.wait(); - if badge & self.virtio_console_server_ring_buffer_badge != 0 { - self.process(&mut runtime)?; - self.channel.enable_notify_read(); - self.channel.enable_notify_write(); - - if !self.active { - return Ok(()); - } - } - } - } - - fn process(&mut self, runtime: &mut CommonRuntime) -> Fallible<()> { - // recv request if we have a full request in our ring buffer - if self.channel.poll_read() < size_of::() { - return Ok(()); - } - let mut raw_header = [0; size_of::()]; - self.channel.peek(&mut raw_header); - let header = bincode::deserialize::(&raw_header) - .map_err(|e| format_err!("Failed to deserialize request: {}", e))?; - let size = usize::try_from(header) - .map_err(|e| format_err!("Failed to deserialize request: {}", e))?; - - if self.channel.poll_read() < size_of::() + size { - return Ok(()); - } - let mut raw_request = vec![0; usize::try_from(header).unwrap()]; - self.channel.skip(size_of::()); - self.channel.read(&mut raw_request); - // let request = bincode::deserialize::(&raw_request) - // .map_err(|e| format_err!("Failed to deserialize request: {}", e))?; - - // process requests - //let response = self.handle(request)?; - let response_buffer = runtime - .decode_dispatch(&raw_request) - .map_err(|err| format_err!("runtime.decode_dispatch failed: {}", err))?; - - // send response - // let raw_response = bincode::serialize(&response_buffer) - // .map_err(|e| format_err!("Failed to serialize response: {}", e))?; - let raw_header = bincode::serialize(&u32::try_from(response_buffer.len()).unwrap()) - .map_err(|e| format_err!("Failed to serialize response: {}", e))?; - - self.channel.write(&raw_header); - self.channel.write(&response_buffer); - - self.channel.notify_read(); - self.channel.notify_write(); - - Ok(()) - } -} - -const LOG_LEVEL: Level = Level::Error; - -// HACK -// System time is provided at build time. The same time is provided to the test Linux userland. -// These must align with each other and with the time the test policies were generated. -const NOW: u64 = include!("../NOW"); - -fn icecap_runtime_init() { - icecap_std_external::early_init(); - icecap_std_external::set_now(std::time::Duration::from_secs(NOW)); - let mut logger = Logger::default(); - logger.level = LOG_LEVEL; - logger.display_mode = DisplayMode::Line; - logger.write = |s| debug_println!("{}", s); - logger.init().unwrap(); -} - -// Dependencies depend on these C symbols. We define them here in Rust. -mod c_hack { - - use super::alloc::boxed::Box; - - #[no_mangle] - extern "C" fn fmod(x: f64, y: f64) -> f64 { - libm::fmod(x, y) - } - - #[no_mangle] - extern "C" fn fmodf(x: f32, y: f32) -> f32 { - libm::fmodf(x, y) - } - - #[no_mangle] - extern "C" fn calloc(nelem: usize, elsize: usize) -> *mut core::ffi::c_void { - let bytes = nelem * elsize; - // TODO use Box::<[u8]>::new_zeroed_slice(bytes) instead after bumping rustc - let ret: *mut [u8] = Box::into_raw(vec![0; bytes].into_boxed_slice()); - ret as *mut core::ffi::c_void - } - - #[no_mangle] - extern "C" fn free(ptr: *mut core::ffi::c_void) { - if !ptr.is_null() { - unsafe { - // TODO is this sound? - Box::::from_raw(ptr as *mut u8); - } - } - } -} diff --git a/icecap-veracruz-server/.cargo/config.toml b/icecap-veracruz-server/.cargo/config.toml deleted file mode 100644 index 665a6944d..000000000 --- a/icecap-veracruz-server/.cargo/config.toml +++ /dev/null @@ -1,4 +0,0 @@ -[env] -CC_x86_64_unknown_linux_gnu = "gcc" -CC_aarch64_unknown_linux_gnu = "gcc" -VERACRUZ_ICECAP_QEMU_IMAGE = { value = "../icecap-runtime/build/qemu/disposable/cmake/elfloader/build/elfloader", relative = true } diff --git a/icecap-veracruz-server/Cargo.toml b/icecap-veracruz-server/Cargo.toml deleted file mode 100644 index 53ff3382d..000000000 --- a/icecap-veracruz-server/Cargo.toml +++ /dev/null @@ -1,19 +0,0 @@ -[package] -name = "icecap-veracruz-server" -version = "0.3.0" -edition = "2018" - -[dependencies] -anyhow = "1" -bincode = { version = "1.2.1", default-features = false } -env_logger = { version = "0.9.0" } -err-derive = "0.2" -lazy_static = "1.4" -log = "0.4.13" -policy-utils = { path = "../policy-utils" } -proxy-attestation-client = { git = "https://github.com/veracruz-project/proxy-attestation-client", tag = "v0.2" } -signal-hook = { version = "0.3.13" } -structopt = { version = "0.3", features = ["wrap_help"] } -tempfile = { version = "3.2.0" } -veracruz-server = { path = "../veracruz-server", features = ["icecap"] } -veracruz-utils = { path = "../veracruz-utils", features = ["icecap"] } diff --git a/icecap-veracruz-server/src/lib.rs b/icecap-veracruz-server/src/lib.rs deleted file mode 100644 index ed0a35824..000000000 --- a/icecap-veracruz-server/src/lib.rs +++ /dev/null @@ -1,13 +0,0 @@ -//! Lib target for Icecap Veracruz Server. -//! It's used for unit testing -//! -//! ## Authors -//! -//! The Veracruz Development Team. -//! -//! ## Licensing and copyright notice -//! -//! See the `LICENSE_MIT.markdown` file in the Veracruz root directory for -//! information on licensing and copyright. - -pub mod server; diff --git a/icecap-veracruz-server/src/main.rs b/icecap-veracruz-server/src/main.rs deleted file mode 100644 index c8b0a7c95..000000000 --- a/icecap-veracruz-server/src/main.rs +++ /dev/null @@ -1,66 +0,0 @@ -//! icecap-specific material for the Veracruz server -//! -//! ## Authors -//! -//! The Veracruz Development Team. -//! -//! ## Licensing and copyright notice -//! -//! See the `LICENSE_MIT.markdown` file in the Veracruz root directory for -//! information on licensing and copyright. - -mod server; - -use crate::server::VeracruzServerIceCap; -use anyhow::anyhow; -use env_logger; -use log::info; -use policy_utils::policy::Policy; -use std::{fs, path, process}; -use structopt::StructOpt; -use veracruz_server; -use veracruz_server::VeracruzServer; - -#[derive(Debug, StructOpt)] -#[structopt(rename_all = "kebab")] -struct Opt { - /// Path to policy file - #[structopt(parse(from_os_str))] - policy_path: path::PathBuf, -} - -/// Entry point -fn main() { - // parse args - let opt = Opt::from_args(); - - // setup logger - env_logger::init(); - - // load policy - info!("Loading policy {:?}", opt.policy_path); - let policy_result = fs::read_to_string(&opt.policy_path) - .map_err(|err| anyhow!(err)) - .and_then(|policy_json| Ok((Policy::from_json(&policy_json)?, policy_json))); - let (policy, policy_json) = match policy_result { - Ok((policy, policy_json)) => (policy, policy_json), - Err(err) => { - eprintln!("{}", err); - process::exit(1); - } - }; - info!("Loaded policy {}", policy.policy_hash().unwrap_or("???")); - - // create Veracruz Server instance - let server = VeracruzServerIceCap::new(&policy_json).unwrap(); - - veracruz_server::server::server(&policy_json, server).unwrap(); - println!( - "Veracruz Server running on {}", - policy.veracruz_server_url() - ); - - loop { - std::thread::sleep(std::time::Duration::MAX); - } -} diff --git a/icecap-veracruz-server/src/server.rs b/icecap-veracruz-server/src/server.rs deleted file mode 100644 index 149381ed9..000000000 --- a/icecap-veracruz-server/src/server.rs +++ /dev/null @@ -1,362 +0,0 @@ -//! IceCap-specific material for the Veracruz server -//! -//! ## Authors -//! -//! The Veracruz Development Team. -//! -//! ## Licensing and copyright notice -//! -//! See the `LICENSE_MIT.markdown` file in the Veracruz root directory for -//! information on licensing and copyright. - -use anyhow::anyhow; -use err_derive::Error; -use lazy_static::lazy_static; -use log::info; -use policy_utils::policy::Policy; -use proxy_attestation_client; -use signal_hook::{ - consts::SIGINT, - iterator::{Handle, Signals}, -}; -use std::{ - convert::TryFrom, - env, - error::Error, - io::{self, Read, Write}, - mem::size_of, - os::unix::net::UnixStream, - process::{Child, Command, Stdio}, - string::ToString, - sync::{Arc, Mutex}, - thread::{self, JoinHandle}, - time::Duration, -}; -use tempfile::{self, TempDir}; -use veracruz_server::common::{VeracruzServer, VeracruzServerError}; -use veracruz_utils::runtime_manager_message::{ - RuntimeManagerRequest, RuntimeManagerResponse, Status, -}; - -const VERACRUZ_ICECAP_QEMU_BIN_DEFAULT: &[&str] = &["qemu-system-aarch64"]; -const VERACRUZ_ICECAP_QEMU_FLAGS_DEFAULT: &[&str] = &[ - "-machine", - "virt,virtualization=on,gic-version=2", - "-cpu", - "cortex-a57", - "-smp", - "4", - "-m", - "3072", - "-semihosting-config", - "enable=on,target=native", - "-netdev", - "user,id=netdev0", - "-serial", - "mon:stdio", - "-nographic", -]; -const VERACRUZ_ICECAP_QEMU_CONSOLE_FLAGS_DEFAULT: &[&str] = &[ - "-chardev", - "socket,path={console0_path},server=on,wait=off,id=charconsole0", - //"-chardev", "socket,server=on,host=localhost,port=1234,id=charconsole0", - "-device", - "virtio-serial-device", - "-device", - "virtconsole,chardev=charconsole0,id=console0", -]; -const VERACRUZ_ICECAP_QEMU_IMAGE_FLAGS_DEFAULT: &[&str] = &["-kernel", "{image_path}"]; - -lazy_static! { - /// The Runtime Manager path - static ref VERACRUZ_ICECAP_QEMU_PATH: String = { - match env::var("VERACRUZ_ICECAP_QEMU_PATH") { - Ok(val) => val, - Err(_) => "/work/veracruz/workspaces/icecap-runtime/build/qemu/disposable/cmake/elfloader/build/elfloader".to_string() - } - }; -} -/// Class of IceCap-specific errors. -#[derive(Debug, Error)] -pub enum IceCapError { - #[error(display = "IceCap: Invalid environment variable value: {}", variable)] - InvalidEnvironmentVariableValue { variable: String }, - #[error(display = "IceCap: Channel error: {}", _0)] - ChannelError(io::Error), - #[error(display = "IceCap: Serialization error: {}", _0)] - SerializationError(#[error(source)] bincode::Error), - #[error(display = "IceCap: Unexpected response from runtime manager: {:?}", _0)] - UnexpectedRuntimeManagerResponse(RuntimeManagerResponse), -} - -/// IceCap implementation of 'VeracruzServer' -struct IceCapRealm { - // NOTE the order of these fields matter due to drop ordering - child: Arc>, - channel: UnixStream, - #[allow(dead_code)] - stdout_handler: JoinHandle<()>, - #[allow(dead_code)] - stderr_handler: JoinHandle<()>, - signal_handle: Handle, - #[allow(dead_code)] - signal_handler: JoinHandle<()>, - #[allow(dead_code)] - tempdir: TempDir, -} - -impl IceCapRealm { - fn spawn() -> Result { - fn env_flags(var: &str, default: &[&str]) -> Result, IceCapError> { - match env::var(var) { - Ok(var) => Ok(var.split_whitespace().map(|s| s.to_owned()).collect()), - Err(env::VarError::NotPresent) => { - Ok(default.iter().map(|s| (*s).to_owned()).collect()) - } - Err(_) => Err(IceCapError::InvalidEnvironmentVariableValue { - variable: var.to_owned(), - } - .into()), - } - } - - // Allow overriding these from environment variables - let qemu_bin = env_flags("VERACRUZ_ICECAP_QEMU_BIN", VERACRUZ_ICECAP_QEMU_BIN_DEFAULT) - .map_err(|e| anyhow!(e))?; - let qemu_flags = env_flags( - "VERACRUZ_ICECAP_QEMU_FLAGS", - VERACRUZ_ICECAP_QEMU_FLAGS_DEFAULT, - ) - .map_err(|e| anyhow!(e))?; - let qemu_console_flags = env_flags( - "VERACRUZ_ICECAP_QEMU_CONSOLE_FLAGS", - VERACRUZ_ICECAP_QEMU_CONSOLE_FLAGS_DEFAULT, - ) - .map_err(|e| anyhow!(e))?; - let qemu_image_flags = env_flags( - "VERACRUZ_ICECAP_QEMU_IMAGE_FLAGS", - VERACRUZ_ICECAP_QEMU_IMAGE_FLAGS_DEFAULT, - ) - .map_err(|e| anyhow!(e))?; - - // temporary directory for things - let tempdir = tempfile::tempdir()?; - - info!("vc-server: using image: {:?}", &*VERACRUZ_ICECAP_QEMU_PATH); - - // create a temporary socket for communication - let channel_path = tempdir.path().join("console0"); - info!("vc-server: using unix socket: {:?}", channel_path); - - // startup qemu - let child = Arc::new(Mutex::new( - Command::new(&qemu_bin[0]) - .args(&qemu_bin[1..]) - .args(&qemu_flags) - .args( - qemu_console_flags - .iter() - .map(|s| s.replace("{console0_path}", channel_path.to_str().unwrap())), - ) - .args( - qemu_image_flags - .iter() - .map(|s| s.replace("{image_path}", &*VERACRUZ_ICECAP_QEMU_PATH.as_str())), - ) - .stdin(Stdio::null()) - .stdout(Stdio::piped()) - .stderr(Stdio::piped()) - .spawn() - .map_err(|e| anyhow!(e))?, - )); - - // forward stderr/stdin via threads, this is necessary to avoid stdio - // issues under Cargo test - let stdout_handler = thread::spawn({ - let mut child_stdout = child.lock().unwrap().stdout.take().unwrap(); - move || { - let err = io::copy(&mut child_stdout, &mut io::stdout()); - eprintln!("vc-server: qemu: stdout closed: {:?}", err); - } - }); - - let stderr_handler = thread::spawn({ - let mut child_stderr = child.lock().unwrap().stderr.take().unwrap(); - move || { - let err = io::copy(&mut child_stderr, &mut io::stderr()); - eprintln!("vc-server: qemu: stderr closed: {:?}", err); - } - }); - - // hookup signal handler so SIGINT will teardown the child process - let mut signals = Signals::new(&[SIGINT])?; - let signal_handle = signals.handle(); - let signal_handler = thread::spawn({ - let child = child.clone(); - move || { - for sig in signals.forever() { - eprintln!("vc-server: qemu: Killed by signal: {:?}", sig); - child.lock().unwrap().kill().unwrap(); - signal_hook::low_level::emulate_default_handler(SIGINT).unwrap(); - } - } - }); - - // connect via socket - let channel = loop { - match UnixStream::connect(&channel_path) { - Ok(channel) => { - break channel; - } - Err(err) if err.kind() == io::ErrorKind::NotFound => { - thread::sleep(Duration::from_millis(100)); - continue; - } - // NOTE I don't know why this one happens - Err(err) if err.kind() == io::ErrorKind::ConnectionRefused => { - thread::sleep(Duration::from_millis(100)); - continue; - } - Err(err) => { - return Err(VeracruzServerError::Anyhow(anyhow!( - IceCapError::ChannelError(err) - ))); - } - }; - }; - - Ok(IceCapRealm { - child, - stdout_handler, - stderr_handler, - signal_handle, - signal_handler, - channel, - tempdir, - }) - } - - // NOTE close can report errors, but drop can still happen in weird cases - fn shutdown(self) -> Result<(), IceCapError> { - info!("vc-server: shutting down"); - self.signal_handle.close(); - self.child - .lock() - .unwrap() - .kill() - .map_err(|e| IceCapError::ChannelError(e))?; - Ok(()) - } -} - -pub struct VeracruzServerIceCap(Option); - -impl VeracruzServerIceCap { - fn shutdown_isolate(&mut self) -> Result<(), Box> { - match self.0.take() { - Some(realm) => { - realm.shutdown()?; - Ok(()) - } - None => Ok(()), - } - } -} - -impl VeracruzServer for VeracruzServerIceCap { - fn new(policy_json: &str) -> Result { - let policy: Policy = Policy::from_json(policy_json)?; - - // create the realm - let mut self_ = Self(Some(IceCapRealm::spawn()?)); - - let (device_id, challenge) = proxy_attestation_client::start_proxy_attestation( - policy.proxy_attestation_server_url(), - )?; - - let (token, csr) = { - let attestation = RuntimeManagerRequest::Attestation(challenge, device_id); - self_.send_buffer(&bincode::serialize(&attestation)?)?; - let response_buffer = self_.receive_buffer()?; - let response = bincode::deserialize(&response_buffer[..])?; - match response { - RuntimeManagerResponse::AttestationData(token, csr) => (token, csr), - resp => { - return Err(VeracruzServerError::Anyhow(anyhow!( - IceCapError::UnexpectedRuntimeManagerResponse(resp) - ))) - } - } - }; - - let cert_chain = { - let cert_chain = proxy_attestation_client::complete_proxy_attestation_linux( - policy.proxy_attestation_server_url(), - &token, - &csr, - device_id, - ) - .map_err(|err| err)?; - cert_chain - }; - - let initialize = RuntimeManagerRequest::Initialize(policy_json.to_string(), cert_chain); - self_.send_buffer(&bincode::serialize(&initialize)?)?; - let response_buffer = self_.receive_buffer()?; - let response = bincode::deserialize(&response_buffer[..])?; - match response { - RuntimeManagerResponse::Status(Status::Success) => (), - resp => { - return Err(VeracruzServerError::Anyhow(anyhow!( - IceCapError::UnexpectedRuntimeManagerResponse(resp) - ))) - } - } - - Ok(self_) - } - - fn send_buffer(&mut self, buffer: &[u8]) -> Result<(), VeracruzServerError> { - let header = bincode::serialize(&u32::try_from(buffer.len()).unwrap())?; - self.0 - .as_mut() - .ok_or(VeracruzServerError::UninitializedEnclaveError)? - .channel - .write_all(&header) - .map_err(|e| anyhow!(e))?; - self.0 - .as_mut() - .ok_or(VeracruzServerError::UninitializedEnclaveError)? - .channel - .write_all(&buffer) - .map_err(|e| anyhow!(e))?; - return Ok(()); - } - - fn receive_buffer(&mut self) -> Result, VeracruzServerError> { - let mut raw_header = [0; size_of::()]; - self.0 - .as_mut() - .ok_or(VeracruzServerError::UninitializedEnclaveError)? - .channel - .read_exact(&mut raw_header) - .map_err(|e| anyhow!(e))?; - let header = bincode::deserialize::(&raw_header)?; - let mut buffer = vec![0; usize::try_from(header).unwrap()]; - self.0 - .as_mut() - .ok_or(VeracruzServerError::UninitializedEnclaveError)? - .channel - .read_exact(&mut buffer) - .map_err(|e| anyhow!(e))?; - return Ok(buffer); - } -} - -impl Drop for VeracruzServerIceCap { - fn drop(&mut self) { - if let Err(err) = self.shutdown_isolate() { - panic!("Realm failed to shutdown: {}", err) - } - } -} diff --git a/icecap/.gitignore b/icecap/.gitignore deleted file mode 100644 index 6ac9ce6dd..000000000 --- a/icecap/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -/build - -result -result-* diff --git a/icecap/README.md b/icecap/README.md deleted file mode 100644 index d9743de2f..000000000 --- a/icecap/README.md +++ /dev/null @@ -1,152 +0,0 @@ -# Veracruz on IceCap - -## Directory structure - -These are the parts of the Veracruz source tree that are important for IceCap, -with some indications of how they depend on each other. - -### `icecap/crates -> icecap/src/rust/crates` - -* `runtime-manager/Cargo.toml` and `virtio-console-server/Cargo.toml` - access `icecap/icecap/src/rust/crates` through this symbolic link. - -### `icecap/icecap/` - -* MODULE from https://gitlab.com/icecap-project/icecap.git -* IceCap code, mostly by Nick Spinale. -* The parts used by Veracruz are: - * `src/c` - * `src/python` - * `src/rust/crates` - * `src/rust/support` - -### `icecap/src/` - -* `c/libc-supplement/` has `getrandom` (**it's bogus!**), `printf`, ... - It is built and linked in by `workspaces/icecap-runtime/Makefile`. - -### `icecap/sysroot/libc/` - -* MODULE from https://gitlab.com/icecap-project/rust-libc.git, - forked from https://github.com/rust-lang/libc.git -* The only changes are in `src/icecap.rs` and `src/lib.rs`. -* It is referenced from: - * `icecap/sysroot/workspace/Cargo.toml` - * `workspaces/icecap-runtime/Cargo.toml` - -### `icecap/sysroot/rust/` - -* MODULE from https://gitlab.com/icecap-project/rust.git, - forked from https://github.com/rust-lang/rust.git -* The Rust source code! -* The changes for IceCap are in `library/std/`, - plus the removal of 13 submodules to save disc space. - The remaining submodules are unchanged from upstream. -* Only the contents of `library/` are used by Veracruz - (and the following subdirectorires of `library/` are not used: - `panic_unwind`, `proc_macro`, `profiler_builtins`, - `rtstartup`, `rustc-std-workspace-std`, `test`). - -### `icecap/sysroot/workspace/` - -* Despite the directory name, this is not a workspace. It is a crate - with an empty `src/lib.rs` and with `[dependencies]` and - `[patch.crates-io]` sections that make the IceCap sysroot get built - as a side-effect of building this crate. - -* Relative paths in the `Cargo.toml` refer to these crates in the source tree: - * `icecap/icecap/src/rust/crates/framework/std-support/icecap-std-impl` - * `icecap/sysroot/libc` - * `icecap/sysroot/rust/library/rustc-std-workspace-alloc` - * `icecap/sysroot/rust/library/rustc-std-workspace-core` - * `icecap/sysroot/rust/library/std` - -### `workspaces/icecap-runtime/` - -* `Cargo.toml` defines a workspace with members: - * `crates/runtime-manager` - * `src/virtio-console-server` - -* `Makefile` builds: seL4, IceCap libraries, sysroot, Veracruz crates - (runtime-manager and virtio-console-server), IceCap CDL, CapDL - Loader, ELF Loader. - -* `cdl/` contains Python code. - -* `crates -> ../..`: Symbolic link used by `Cargo.toml` and `Makefile`. - -* `icecap -> ../../icecap/icecap`: Symbolic link used by `Makefile`. - -* `icecap.mk`: Included by `Makefile`. - -* `mk/`: Files included by `Makefile`. - -* `src/cmake-config/`: Used for seL4 and ELF Loader. - -* `src/icecap-runtime-root-config.h`: Used for CapDL Loader. - -* `src/virtio-console-server`: Rust crate, member of workspace. - -### `workspaces/icecap-runtime/deps/capdl/` - -* MODULE from https://gitlab.com/icecap-project/capdl.git, - forked from https://github.com/seL4/capdl.git - -### `workspaces/icecap-runtime/deps/seL4/` - -* MODULE from https://gitlab.com/icecap-project/seL4.git, - forked from https://github.com/seL4/seL4.git - -### `workspaces/icecap-runtime/deps/seL4_tools/` - -* MODULE from https://gitlab.com/icecap-project/seL4_tools.git, - forked from https://github.com/seL4/seL4_tools.git - -## How Veracruz IceCap binaries start - -There are two Veracruz IceCap binaries: `runtime-manager-enclave.elf` -and `virtio-console-server.elf`. - -Execution starts at the `_start` defined in -`icecap/icecap/src/c/icecap-runtime/src/start.S`, which is compiled -into `libicecap-runtime.a`, which `icecap-runtime/build.rs` links with -the crate `icecap-runtime`, which is depended on by `icecap-core`, -which is depended on by the IceCap binaries. (The `-l -static-icecap-runtime` in `workspaces/icecap-runtime/Makefile` is -apparently unnecessary.) - -* The entry point is `_start`, defined in - `icecap/icecap/src/c/icecap-runtime/src/start.S`. This just branches - to `__icecap_runtime_start`. - -* `__icecap_runtime_start`, defined in - `icecap/icecap/src/c/icecap-runtime/src/runtime.c`, computes a - couple of values and then branches to `__icecap_runtime_reserve_tls` - (the function is not intended to return). - -* `__icecap_runtime_reserve_tls`, defined in - `icecap/icecap/src/c/icecap-runtime/src/tls.S`, has 5 instructions - then a branch to `__icecap_runtime_continue`. - -* `__icecap_runtime_continue`, defined in - `icecap/icecap/src/c/icecap-runtime/src/runtime.c`, is about 30 - lines of C and calls `icecap_main`. - -* `icecap_main` is defined by `declare_generic_main`, a macro that is - defined in - `icecap/icecap/src/rust/crates/framework/base/icecap-start/generic/src/lib.rs` - and invoked in `icecap-runtime-manager/src/main.rs` or - `workspaces/icecap-runtime/src/virtio-console-server/src/main.rs`: - `icecap_main` calls `run_generic_main` with `main` as an argument, - but both of those functions are only used in one place and therefore - likely to be inlined by the Rust compiler. - -In the source for either binary, instead of using the attribute -`#![no_main]`, we can instead remove that attribute, rename `main` to -something else in both places, and provide a `main` function, which is -then never invoked: and everything still works. - -It is not obvious how IceCap's `_start` takes precedence over one -provided by the C library but this probably has to do with the linker -specified in `workspaces/icecap-runtime/Makefile`: see the uses of -`LD` in that file. diff --git a/icecap/crates b/icecap/crates deleted file mode 120000 index 9440b6d13..000000000 --- a/icecap/crates +++ /dev/null @@ -1 +0,0 @@ -icecap/src/rust/crates \ No newline at end of file diff --git a/icecap/icecap b/icecap/icecap deleted file mode 160000 index 734d73218..000000000 --- a/icecap/icecap +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 734d73218cfb6ea0444765cc847deb7667a5e3cd diff --git a/icecap/src/c/libc-supplement/icecap.mk b/icecap/src/c/libc-supplement/icecap.mk deleted file mode 100644 index a5c1b895e..000000000 --- a/icecap/src/c/libc-supplement/icecap.mk +++ /dev/null @@ -1,10 +0,0 @@ -# AUTHORS -# -# The Veracruz Development Team. -# -# COPYRIGHT -# -# See the `LICENSE_MIT.markdown` file in the Veracruz root directory for licensing -# and copyright information. - -$(eval $(call lame-leaf,c-supplement)) diff --git a/icecap/src/c/libc-supplement/include/stdio.h b/icecap/src/c/libc-supplement/include/stdio.h deleted file mode 100644 index 7bed2f9ed..000000000 --- a/icecap/src/c/libc-supplement/include/stdio.h +++ /dev/null @@ -1,22 +0,0 @@ -/* - * AUTHORS - * - * The Veracruz Development Team. - * - * COPYRIGHT - * - * See the `LICENSE_MIT.markdown` file in the Veracruz root directory for licensing - * and copyright information. - * - */ - -#pragma once - -#include - -typedef struct { void *x; } FILE; - -int printf(const char *format, ...); -int puts(const char *s); -int snprintf(char *str, size_t size, const char *format, ...); -int vsnprintf(char *str, size_t size, const char *format, __builtin_va_list ap); diff --git a/icecap/src/c/libc-supplement/include/stdlib.h b/icecap/src/c/libc-supplement/include/stdlib.h deleted file mode 100644 index 4a0db3ac2..000000000 --- a/icecap/src/c/libc-supplement/include/stdlib.h +++ /dev/null @@ -1,20 +0,0 @@ -/* - * AUTHORS - * - * The Veracruz Development Team. - * - * COPYRIGHT - * - * See the `LICENSE_MIT.markdown` file in the Veracruz root directory for licensing - * and copyright information. - * - */ - -#pragma once - -#include - -void *calloc(size_t nelem, size_t elsize); -void exit(int status); -void free(void *ptr); -int rand(void); diff --git a/icecap/src/c/libc-supplement/include/sys/random.h b/icecap/src/c/libc-supplement/include/sys/random.h deleted file mode 100644 index 0bce11cb2..000000000 --- a/icecap/src/c/libc-supplement/include/sys/random.h +++ /dev/null @@ -1,18 +0,0 @@ -/* - * AUTHORS - * - * The Veracruz Development Team. - * - * COPYRIGHT - * - * See the `LICENSE_MIT.markdown` file in the Veracruz root directory - * for licensing and copyright information. - * - */ - -#pragma once - -#include -#include - -ssize_t getrandom(void *buf, size_t buflen, unsigned int flags); diff --git a/icecap/src/c/libc-supplement/include/sys/types.h b/icecap/src/c/libc-supplement/include/sys/types.h deleted file mode 100644 index 9b10203f1..000000000 --- a/icecap/src/c/libc-supplement/include/sys/types.h +++ /dev/null @@ -1,15 +0,0 @@ -/* - * AUTHORS - * - * The Veracruz Development Team. - * - * COPYRIGHT - * - * See the `LICENSE_MIT.markdown` file in the Veracruz root directory - * for licensing and copyright information. - * - */ - -#pragma once - -typedef long int ssize_t; diff --git a/icecap/src/c/libc-supplement/include/time.h b/icecap/src/c/libc-supplement/include/time.h deleted file mode 100644 index 2c71c9d5f..000000000 --- a/icecap/src/c/libc-supplement/include/time.h +++ /dev/null @@ -1,19 +0,0 @@ -/* - * AUTHORS - * - * The Veracruz Development Team. - * - * COPYRIGHT - * - * See the `LICENSE_MIT.markdown` file in the Veracruz root directory - * for licensing and copyright information. - * - */ - -#pragma once - -#ifndef NULL -#define NULL 0 -#endif - -typedef long int time_t; diff --git a/icecap/src/c/libc-supplement/src/getrandom.c b/icecap/src/c/libc-supplement/src/getrandom.c deleted file mode 100644 index 1b325b71c..000000000 --- a/icecap/src/c/libc-supplement/src/getrandom.c +++ /dev/null @@ -1,21 +0,0 @@ -/* - * AUTHORS - * - * The Veracruz Development Team. - * - * COPYRIGHT - * - * See the `LICENSE_MIT.markdown` file in the Veracruz root directory - * for licensing and copyright information. - * - */ - -#include -#include - -// FIXME: Bogus and potentially dangerous implementation of getrandom. -ssize_t getrandom(void *buf, size_t buflen, unsigned int flags) -{ - memset(buf, 0, buflen); - return buflen; -} diff --git a/icecap/src/c/libc-supplement/src/printf.c b/icecap/src/c/libc-supplement/src/printf.c deleted file mode 100644 index 73eac500c..000000000 --- a/icecap/src/c/libc-supplement/src/printf.c +++ /dev/null @@ -1,19 +0,0 @@ -/* - * AUTHORS - * - * The Veracruz Development Team. - * - * COPYRIGHT - * - * See the `LICENSE_MIT.markdown` file in the Veracruz root directory - * for licensing and copyright information. - * - */ - -#include - -int printf(const char *format, ...) -{ - // HACK: do nothing, and assume return value is not checked - return 0; -} diff --git a/icecap/src/c/libc-supplement/src/puts.c b/icecap/src/c/libc-supplement/src/puts.c deleted file mode 100644 index dc997608c..000000000 --- a/icecap/src/c/libc-supplement/src/puts.c +++ /dev/null @@ -1,19 +0,0 @@ -/* - * AUTHORS - * - * The Veracruz Development Team. - * - * COPYRIGHT - * - * See the `LICENSE_MIT.markdown` file in the Veracruz root directory - * for licensing and copyright information. - * - */ - -#include - -int puts(const char *s) -{ - // HACK: do nothing - return 0; -} diff --git a/icecap/src/c/libc-supplement/src/snprintf.c b/icecap/src/c/libc-supplement/src/snprintf.c deleted file mode 100644 index 5cbc87276..000000000 --- a/icecap/src/c/libc-supplement/src/snprintf.c +++ /dev/null @@ -1,25 +0,0 @@ -/* - * AUTHORS - * - * The Veracruz Development Team. - * - * COPYRIGHT - * - * See the `LICENSE_MIT.markdown` file in the Veracruz root directory for licensing - * and copyright information. - * - */ - -#include -#include - -int snprintf(char *str, size_t size, const char *format, ...) -{ - // HACK instead of implementing snprintf, just: - // - copy the format string directly - size_t i; - for (i = 0; i < size - 1 && format[i] != '\0'; i++) - str[i] = format[i]; - str[i] = '\0'; - return strlen(format); -} diff --git a/icecap/src/c/libc-supplement/src/vsnprintf.c b/icecap/src/c/libc-supplement/src/vsnprintf.c deleted file mode 100644 index 0e79a1c57..000000000 --- a/icecap/src/c/libc-supplement/src/vsnprintf.c +++ /dev/null @@ -1,25 +0,0 @@ -/* - * AUTHORS - * - * The Veracruz Development Team. - * - * COPYRIGHT - * - * See the `LICENSE_MIT.markdown` file in the Veracruz root directory for licensing - * and copyright information. - * - */ - -#include -#include - -int vsnprintf(char *str, size_t size, const char *format, __builtin_va_list ap) -{ - // HACK instead of implementing vsnprintf, just: - // - copy the format string directly - size_t i; - for (i = 0; i < size - 1 && format[i] != '\0'; i++) - str[i] = format[i]; - str[i] = '\0'; - return strlen(format); -} diff --git a/icecap/sysroot/libc b/icecap/sysroot/libc deleted file mode 160000 index 77669e6a1..000000000 --- a/icecap/sysroot/libc +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 77669e6a1ffb10d47d1ea89e632155979ed790f8 diff --git a/icecap/sysroot/rust b/icecap/sysroot/rust deleted file mode 160000 index 5dd034d90..000000000 --- a/icecap/sysroot/rust +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 5dd034d9034af17f64a5263adcab93c45b258ced diff --git a/icecap/sysroot/workspace/Cargo.lock b/icecap/sysroot/workspace/Cargo.lock deleted file mode 100644 index 7235aa25d..000000000 --- a/icecap/sysroot/workspace/Cargo.lock +++ /dev/null @@ -1,601 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -version = 3 - -[[package]] -name = "absurdity" -version = "0.1.0" - -[[package]] -name = "aho-corasick" -version = "0.7.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e37cfd5e7657ada45f742d6e99ca5788580b5c529dc78faf11ece6dc702656f" -dependencies = [ - "memchr", -] - -[[package]] -name = "alloc" -version = "0.0.0" -dependencies = [ - "compiler_builtins", - "core", -] - -[[package]] -name = "ansi_term" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2" -dependencies = [ - "winapi", -] - -[[package]] -name = "atty" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" -dependencies = [ - "hermit-abi", - "libc", - "winapi", -] - -[[package]] -name = "bindgen" -version = "0.59.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bd2a9a458e8f4304c52c43ebb0cfbd520289f8379a52e329a38afda99bf8eb8" -dependencies = [ - "bitflags", - "cexpr", - "clang-sys", - "clap", - "env_logger", - "lazy_static", - "lazycell", - "log", - "peeking_take_while", - "proc-macro2", - "quote", - "regex", - "rustc-hash", - "shlex", - "which", -] - -[[package]] -name = "bitflags" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" - -[[package]] -name = "cc" -version = "1.0.72" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22a9137b95ea06864e018375b72adfb7db6e6f68cfc8df5a04d00288050485ee" - -[[package]] -name = "cexpr" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" -dependencies = [ - "nom", -] - -[[package]] -name = "cfg-if" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" -dependencies = [ - "compiler_builtins", - "rustc-std-workspace-core", -] - -[[package]] -name = "cfg-if" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" - -[[package]] -name = "clang-sys" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa66045b9cb23c2e9c1520732030608b02ee07e5cfaa5a521ec15ded7fa24c90" -dependencies = [ - "glob", - "libc", - "libloading", -] - -[[package]] -name = "clap" -version = "2.34.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0610544180c38b88101fecf2dd634b174a62eef6946f84dfc6a7127512b381c" -dependencies = [ - "ansi_term", - "atty", - "bitflags", - "strsim", - "textwrap", - "unicode-width", - "vec_map", -] - -[[package]] -name = "compiler_builtins" -version = "0.1.69" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac0d1d6b2307c15fd27af2bb41234b4ebddeae69f33714bfbdb44b3b5a6e3efe" -dependencies = [ - "rustc-std-workspace-core", -] - -[[package]] -name = "core" -version = "0.0.0" - -[[package]] -name = "dlmalloc" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6fe28e0bf9357092740362502f5cc7955d8dc125ebda71dec72336c2e15c62e" -dependencies = [ - "compiler_builtins", - "libc", - "rustc-std-workspace-core", -] - -[[package]] -name = "either" -version = "1.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457" - -[[package]] -name = "env_logger" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b2cf0344971ee6c64c31be0d530793fba457d322dfec2810c453d0ef228f9c3" -dependencies = [ - "atty", - "humantime", - "log", - "regex", - "termcolor", -] - -[[package]] -name = "fortanix-sgx-abi" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c56c422ef86062869b2d57ae87270608dc5929969dd130a6e248979cf4fb6ca6" -dependencies = [ - "compiler_builtins", - "rustc-std-workspace-core", -] - -[[package]] -name = "glob" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574" - -[[package]] -name = "hashbrown" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" -dependencies = [ - "compiler_builtins", - "rustc-std-workspace-alloc", - "rustc-std-workspace-core", -] - -[[package]] -name = "hermit-abi" -version = "0.1.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" -dependencies = [ - "compiler_builtins", - "libc", - "rustc-std-workspace-core", -] - -[[package]] -name = "humantime" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" - -[[package]] -name = "icecap-dlmalloc" -version = "0.1.0" -dependencies = [ - "compiler_builtins", - "dlmalloc", - "icecap-sync", - "rustc-std-workspace-alloc", - "rustc-std-workspace-core", -] - -[[package]] -name = "icecap-runtime" -version = "0.1.0" -dependencies = [ - "compiler_builtins", - "icecap-sel4", - "rustc-std-workspace-alloc", - "rustc-std-workspace-core", -] - -[[package]] -name = "icecap-sel4" -version = "0.1.0" -dependencies = [ - "compiler_builtins", - "icecap-sel4-derive", - "icecap-sel4-sys", - "rustc-std-workspace-alloc", - "rustc-std-workspace-core", -] - -[[package]] -name = "icecap-sel4-derive" -version = "0.1.0" -dependencies = [ - "quote", - "syn", -] - -[[package]] -name = "icecap-sel4-sys" -version = "0.1.0" -dependencies = [ - "absurdity", - "bindgen", - "compiler_builtins", - "rustc-std-workspace-core", -] - -[[package]] -name = "icecap-std-impl" -version = "0.1.0" -dependencies = [ - "compiler_builtins", - "icecap-dlmalloc", - "icecap-runtime", - "icecap-sel4", - "icecap-sync", - "rustc-std-workspace-alloc", - "rustc-std-workspace-core", -] - -[[package]] -name = "icecap-sync" -version = "0.1.0" -dependencies = [ - "compiler_builtins", - "icecap-sel4", - "rustc-std-workspace-alloc", - "rustc-std-workspace-core", -] - -[[package]] -name = "lazy_static" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" - -[[package]] -name = "lazycell" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" - -[[package]] -name = "libc" -version = "0.2.144" -dependencies = [ - "rustc-std-workspace-core", -] - -[[package]] -name = "libloading" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "efbc0f03f9a775e9f6aed295c6a1ba2253c5757a9e03d55c6caa46a681abcddd" -dependencies = [ - "cfg-if 1.0.0", - "winapi", -] - -[[package]] -name = "log" -version = "0.4.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51b9bbe6c47d51fc3e1a9b945965946b4c44142ab8792c50835a980d362c2710" -dependencies = [ - "cfg-if 1.0.0", -] - -[[package]] -name = "memchr" -version = "2.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "308cc39be01b73d0d18f82a0e7b2a3df85245f84af96fdddc5d202d27e47b86a" - -[[package]] -name = "minimal-lexical" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" - -[[package]] -name = "nom" -version = "7.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b1d11e1ef389c76fe5b81bcaf2ea32cf88b62bc494e19f493d0b30e7a930109" -dependencies = [ - "memchr", - "minimal-lexical", - "version_check", -] - -[[package]] -name = "panic_abort" -version = "0.0.0" -dependencies = [ - "alloc", - "cfg-if 0.1.10", - "compiler_builtins", - "core", - "libc", -] - -[[package]] -name = "peeking_take_while" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099" - -[[package]] -name = "proc-macro2" -version = "1.0.36" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7342d5883fbccae1cc37a2353b09c87c9b0f3afd73f5fb9bba687a1f733b029" -dependencies = [ - "unicode-xid", -] - -[[package]] -name = "quote" -version = "1.0.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "864d3e96a899863136fc6e99f3d7cae289dafe43bf2c5ac19b70df7210c0a145" -dependencies = [ - "proc-macro2", -] - -[[package]] -name = "regex" -version = "1.5.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a11647b6b25ff05a515cb92c365cec08801e83423a235b51e231e1808747286" -dependencies = [ - "aho-corasick", - "memchr", - "regex-syntax", -] - -[[package]] -name = "regex-syntax" -version = "0.6.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f497285884f3fcff424ffc933e56d7cbca511def0c9831a7f9b5f6153e3cc89b" - -[[package]] -name = "rustc-demangle" -version = "0.1.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ef03e0a2b150c7a90d01faf6254c9c48a41e95fb2a8c2ac1c6f0d2b9aefc342" -dependencies = [ - "compiler_builtins", - "rustc-std-workspace-core", -] - -[[package]] -name = "rustc-hash" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" - -[[package]] -name = "rustc-std-workspace-alloc" -version = "1.99.0" -dependencies = [ - "alloc", -] - -[[package]] -name = "rustc-std-workspace-core" -version = "1.99.0" -dependencies = [ - "core", -] - -[[package]] -name = "shlex" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43b2853a4d09f215c24cc5489c992ce46052d359b5109343cbafbf26bc62f8a3" - -[[package]] -name = "std" -version = "0.0.0" -dependencies = [ - "alloc", - "cfg-if 0.1.10", - "compiler_builtins", - "core", - "dlmalloc", - "fortanix-sgx-abi", - "hashbrown", - "hermit-abi", - "icecap-std-impl", - "libc", - "panic_abort", - "rustc-demangle", - "std_detect", - "unwind", - "wasi", -] - -[[package]] -name = "std_detect" -version = "0.1.5" -dependencies = [ - "cfg-if 0.1.10", - "compiler_builtins", - "rustc-std-workspace-alloc", - "rustc-std-workspace-core", -] - -[[package]] -name = "strsim" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" - -[[package]] -name = "syn" -version = "1.0.86" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a65b3f4ffa0092e9887669db0eae07941f023991ab58ea44da8fe8e2d511c6b" -dependencies = [ - "proc-macro2", - "quote", - "unicode-xid", -] - -[[package]] -name = "sysroot" -version = "0.3.0" -dependencies = [ - "libc", - "std", -] - -[[package]] -name = "termcolor" -version = "1.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dfed899f0eb03f32ee8c6a0aabdb8a7949659e3466561fc0adf54e26d88c5f4" -dependencies = [ - "winapi-util", -] - -[[package]] -name = "textwrap" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" -dependencies = [ - "unicode-width", -] - -[[package]] -name = "unicode-width" -version = "0.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ed742d4ea2bd1176e236172c8429aaf54486e7ac098db29ffe6529e0ce50973" - -[[package]] -name = "unicode-xid" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3" - -[[package]] -name = "unwind" -version = "0.0.0" -dependencies = [ - "cc", - "cfg-if 0.1.10", - "compiler_builtins", - "core", - "libc", -] - -[[package]] -name = "vec_map" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" - -[[package]] -name = "version_check" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" - -[[package]] -name = "wasi" -version = "0.11.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" -dependencies = [ - "compiler_builtins", - "rustc-std-workspace-alloc", - "rustc-std-workspace-core", -] - -[[package]] -name = "which" -version = "4.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a5a7e487e921cf220206864a94a89b6c6905bfc19f1057fa26a4cb360e5c1d2" -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-util" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" -dependencies = [ - "winapi", -] - -[[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" diff --git a/icecap/sysroot/workspace/Cargo.toml b/icecap/sysroot/workspace/Cargo.toml deleted file mode 100644 index a48f5aa59..000000000 --- a/icecap/sysroot/workspace/Cargo.toml +++ /dev/null @@ -1,36 +0,0 @@ -[package] -name = "sysroot" -version = "0.3.0" -edition = "2018" -authors = ["The Veracruz Development Team"] -description = "Crate that depends on Rust libraries for Icecap" - -[dependencies] -std = { path = "../rust/library/std" } - -# Hacks to get std to depend on our patches. -libc = "=0.2.144" -# compiler_builtins = "=0.1.69" - -[lib] -crate-type = ["rlib"] - -[profile.release] -codegen-units = 1 -lto = true -opt-level = 3 -debug = 0 -debug-assertions = true - -[patch.crates-io] - -rustc-std-workspace-core = { path = "../rust/library/rustc-std-workspace-core" } -rustc-std-workspace-alloc = { path = "../rust/library/rustc-std-workspace-alloc" } -# rustc-std-workspace-std = { path = "../rust/library/rustc-std-workspace-std" } - -libc = { path = "../libc" } - -icecap-std-impl = { path = "../../icecap/src/rust/crates/framework/std-support/icecap-std-impl" } - -[workspace] -resolver = "2" diff --git a/icecap/sysroot/workspace/src/lib.rs b/icecap/sysroot/workspace/src/lib.rs deleted file mode 100644 index 8b1378917..000000000 --- a/icecap/sysroot/workspace/src/lib.rs +++ /dev/null @@ -1 +0,0 @@ - diff --git a/io-utils/Cargo.toml b/io-utils/Cargo.toml index 963e9835d..f6d278578 100644 --- a/io-utils/Cargo.toml +++ b/io-utils/Cargo.toml @@ -6,7 +6,6 @@ name = "io-utils" version = "0.3.0" [features] -icecap = ["serde/derive", "base64/std"] linux = ["bincode", "byteorder", "base64/std"] nitro = ["serde_json/std", "base64/std", "nix", "byteorder"] diff --git a/platform-services/Cargo.toml b/platform-services/Cargo.toml index 98677d087..57b3371fc 100644 --- a/platform-services/Cargo.toml +++ b/platform-services/Cargo.toml @@ -7,7 +7,6 @@ version = "0.3.0" [features] default = [] -icecap = [] nitro = ["nix", "nsm_api"] std = ["getrandom", "nix"] diff --git a/platform-services/src/icecap_platform_services.rs b/platform-services/src/icecap_platform_services.rs deleted file mode 100644 index 7d08ffa84..000000000 --- a/platform-services/src/icecap_platform_services.rs +++ /dev/null @@ -1,37 +0,0 @@ -//! IceCap-specific platform services -//! -//! ## Authors -//! -//! The Veracruz Development Team. -//! -//! ## Licensing and copyright notice -//! -//! See the `LICENSE_MIT.markdown` file in the Veracruz root directory for -//! information on licensing and copyright. - -use crate::Result; -use core::sync::atomic::{AtomicU64, Ordering}; - -static RNG_STATE: AtomicU64 = AtomicU64::new(0); - -/// Fill `buffer` with random bytes. -/// -/// Until IceCap provides randomness for realms, this is just a placeholder -// generator with a fixed seed and a period of 2**61. -pub fn platform_getrandom(buffer: &mut [u8]) -> Result<()> { - for b in buffer { - let state = RNG_STATE.fetch_add(1, Ordering::SeqCst); - *b = state.to_ne_bytes()[(state & 0b111) as usize]; - } - Result::Success(()) -} - -/// Returns the clock resolution in nanoseconds. -pub fn platform_getclockres(_clock_id: u8) -> Result { - Result::Unavailable -} - -/// Returns the clock time in nanoseconds. -pub fn platform_getclocktime(_clock_id: u8) -> Result { - Result::Unavailable -} diff --git a/platform-services/src/lib.rs b/platform-services/src/lib.rs index 768f4c233..21ff81923 100644 --- a/platform-services/src/lib.rs +++ b/platform-services/src/lib.rs @@ -25,10 +25,6 @@ use crate::result::Result; pub mod result; -#[cfg(all(feature = "icecap", not(feature = "std")))] -#[path = "icecap_platform_services.rs"] -mod imp; - #[cfg(all(feature = "nitro", not(feature = "std")))] #[path = "nitro_platform_services.rs"] mod imp; @@ -37,8 +33,8 @@ mod imp; #[path = "std_platform_services.rs"] mod imp; -#[cfg(not(any(feature = "icecap", feature = "nitro", feature = "std")))] -compile_error!("Unrecognised feature: platforms supported are Icecap, Nitro and std."); +#[cfg(not(any(feature = "nitro", feature = "std")))] +compile_error!("Unrecognised feature: platforms supported are Nitro and std."); //////////////////////////////////////////////////////////////////////////////// // Platform services diff --git a/policy-utils/Cargo.toml b/policy-utils/Cargo.toml index c8259d400..c2203ec74 100644 --- a/policy-utils/Cargo.toml +++ b/policy-utils/Cargo.toml @@ -6,10 +6,6 @@ name = "policy-utils" version = "0.3.0" [features] -icecap = [ - "mbedtls/icecap", - "veracruz-utils/icecap", -] nitro = [ "mbedtls/monitor_getrandom", "veracruz-utils/nitro", diff --git a/policy-utils/src/lib.rs b/policy-utils/src/lib.rs index 01d1a285b..34d43fed3 100644 --- a/policy-utils/src/lib.rs +++ b/policy-utils/src/lib.rs @@ -70,8 +70,6 @@ pub enum Platform { Linux, /// The enclave is running under AWS Nitro enclaves. Nitro, - /// The enclave is running under IceCap. - IceCap, /// The mock platform for unit testing (client unit tests, at the moment). Mock, } @@ -82,7 +80,6 @@ impl FromStr for Platform { fn from_str(s: &str) -> Result { match s { "nitro" => Ok(Platform::Nitro), - "icecap" => Ok(Platform::IceCap), "linux" => Ok(Platform::Linux), _ => Err(PlatformError::InvalidPlatform(String::from(s))), } @@ -95,7 +92,6 @@ impl fmt::Display for Platform { match self { Platform::Linux => write!(f, "linux"), Platform::Nitro => write!(f, "nitro"), - Platform::IceCap => write!(f, "icecap"), Platform::Mock => write!(f, "mock"), } } diff --git a/policy-utils/src/policy.rs b/policy-utils/src/policy.rs index de1a337d0..dc9e5385b 100644 --- a/policy-utils/src/policy.rs +++ b/policy-utils/src/policy.rs @@ -88,8 +88,6 @@ pub struct Policy { runtime_manager_hash_linux: Option, /// The hash of the Veracruz trusted runtime for AWS Nitro Enclaves. runtime_manager_hash_nitro: Option, - /// The hash of the Veracruz trusted runtime for IceCap. - runtime_manager_hash_icecap: Option, /// The URL of the proxy attestation service. proxy_attestation_server_url: String, /// The PEM encoded certificate for the proxy service that matches the chosen @@ -127,7 +125,6 @@ impl Policy { ciphersuite: String, runtime_manager_hash_linux: Option, runtime_manager_hash_nitro: Option, - runtime_manager_hash_icecap: Option, proxy_attestation_server_url: String, proxy_service_cert: String, debug: bool, @@ -151,7 +148,6 @@ impl Policy { ciphersuite, runtime_manager_hash_linux, runtime_manager_hash_nitro, - runtime_manager_hash_icecap, proxy_attestation_server_url, debug, execution_strategy, @@ -235,10 +231,6 @@ impl Policy { .runtime_manager_hash_nitro .as_ref() .ok_or(anyhow!(PolicyError::InvalidPlatform))?, - Platform::IceCap => self - .runtime_manager_hash_icecap - .as_ref() - .ok_or(anyhow!(PolicyError::InvalidPlatform))?, Platform::Mock => self .runtime_manager_hash_nitro .as_ref() diff --git a/psa-attestation/Cargo.toml b/psa-attestation/Cargo.toml index c219e5d9a..b0d6a9d16 100644 --- a/psa-attestation/Cargo.toml +++ b/psa-attestation/Cargo.toml @@ -12,7 +12,6 @@ crate-type = ["rlib"] [features] # build.rs depends on features -icecap = ["mbedtls-sys-auto/icecap"] linux = [] nitro = [ "mbedtls-sys-auto/monitor_getrandom", diff --git a/runtime-manager/Cargo.toml b/runtime-manager/Cargo.toml index cec0c1cc8..12703ae32 100644 --- a/runtime-manager/Cargo.toml +++ b/runtime-manager/Cargo.toml @@ -8,18 +8,6 @@ resolver = "2" [features] default = [] -icecap = [ - "bincode", - "execution-engine/icecap", - "policy-utils/icecap", - "psa-attestation/icecap", - "serde", - "session-manager/icecap", - "transport-protocol/icecap", - "veracruz-utils/icecap", -] -icecap-lkvm = [] -icecap-qemu = [] linux = [ "bincode", "execution-engine/std", diff --git a/scripts/icecap-git-reset.sh b/scripts/icecap-git-reset.sh deleted file mode 100755 index 85b52d8f6..000000000 --- a/scripts/icecap-git-reset.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/bash -# -# Development script to update IceCap/seL4 git submodules. -# -## Authors -# -# The Veracruz Development Team. -# -## Licensing and copyright notice -# -# See the `LICENSE_MIT.markdown` file in the Veracruz root directory for -# information on licensing and copyright. - -set -e - -cd $(dirname $(dirname $(realpath $0))) - -git submodule update --init --recursive - -(cd icecap/icecap ; git stash ; git fetch ; git checkout realmos ; git branch -M backup-$(date +%Y-%m-%d-%H%M%S) ; git checkout -B realmos origin/realmos) -(cd workspaces/icecap-runtime/deps/seL4 ; git stash ; git fetch ; git checkout realmos ; git branch -M backup-$(date +%Y-%m-%d-%H%M%S) ; git checkout -B realmos origin/realmos) -(cd workspaces/icecap-runtime/deps/seL4_tools ; git stash ; git fetch ; git checkout realmos ; git branch -M backup-$(date +%Y-%m-%d-%H%M%S) ; git checkout -B realmos origin/realmos) diff --git a/sdk/generate-policy/src/main.rs b/sdk/generate-policy/src/main.rs index 8bda0f638..8414f154a 100644 --- a/sdk/generate-policy/src/main.rs +++ b/sdk/generate-policy/src/main.rs @@ -508,7 +508,6 @@ impl Arguments { POLICY_CIPHERSUITE.to_string(), self.compute_linux_enclave_hash()?, self.compute_nitro_enclave_hash()?, - self.compute_icecap_enclave_hash()?, format!("{}", self.proxy_attestation_server_ip), self.serialize_proxy_service_certificate()?, self.enclave_debug_mode, @@ -714,14 +713,6 @@ impl Arguments { Ok(Some(content)) } - // HACK attestation not yet implemented for IceCap - #[inline] - fn compute_icecap_enclave_hash(&self) -> Result> { - Ok(Some( - "deadbeefdeadbeefdeadbeefdeadbeeff00dcafef00dcafef00dcafef00dcafe".to_string(), - )) - } - /// Serializes the proxy attestation service certificate (basically reads the /// string from the file and returns that fn serialize_proxy_service_certificate(&self) -> Result { diff --git a/session-manager/Cargo.toml b/session-manager/Cargo.toml index 23c3a760a..542c101b6 100644 --- a/session-manager/Cargo.toml +++ b/session-manager/Cargo.toml @@ -6,11 +6,6 @@ name = "session-manager" version = "0.3.0" [features] -icecap = [ - "mbedtls/icecap", - "policy-utils/icecap", - "veracruz-utils/icecap", -] nitro = [ "mbedtls/monitor_getrandom", "policy-utils/std", diff --git a/tests/Cargo.toml b/tests/Cargo.toml index ed7a9797d..7c21ae8af 100644 --- a/tests/Cargo.toml +++ b/tests/Cargo.toml @@ -15,20 +15,6 @@ path = "./src/lib.rs" # cannot connect) default = [] debug = ["veracruz-server/debug"] -icecap = [ - "icecap-veracruz-server", - "mbedtls/icecap", - "policy-utils/icecap", - "veracruz-server/icecap", - "veracruz-utils/icecap", -] -icecap-lkvm = [ - "veracruz-server/icecap-lkvm" -] -icecap-qemu = [ - "veracruz-server/icecap-qemu", - "icecap-veracruz-server" -] linux = [ "linux-veracruz-server", "policy-utils/std", @@ -49,7 +35,6 @@ anyhow = "1" either = "1.6.1" env_logger = "0.9.0" hex = "0.4.2" -icecap-veracruz-server = { path = "../icecap-veracruz-server", optional = true } lazy_static = "1.4.0" linux-veracruz-server = { path = "../linux-veracruz-server", optional = true } log = "0.4.13" diff --git a/tests/tests/integration_test.rs b/tests/tests/integration_test.rs index e71048078..264d4995a 100644 --- a/tests/tests/integration_test.rs +++ b/tests/tests/integration_test.rs @@ -281,9 +281,6 @@ fn server_tls_loop(policy_json: String) { #[cfg(feature = "linux")] let platform_veracruz_server = linux_veracruz_server::server::VeracruzServerLinux::new(&policy_json).unwrap(); - #[cfg(feature = "icecap")] - let platform_veracruz_server = - icecap_veracruz_server::server::VeracruzServerIceCap::new(&policy_json).unwrap(); #[cfg(feature = "nitro")] let platform_veracruz_server = nitro_veracruz_server::server::VeracruzServerNitro::new(&policy_json).unwrap(); diff --git a/tests/tests/server_test.rs b/tests/tests/server_test.rs index ded5d326f..cdd954ff6 100644 --- a/tests/tests/server_test.rs +++ b/tests/tests/server_test.rs @@ -19,8 +19,6 @@ use common::event::TestEvent; use common::proxy_attestation_server::*; use common::util::*; use env_logger; -#[cfg(any(feature = "icecap-qemu", feature = "icecap"))] -use icecap_veracruz_server::server::VeracruzServerIceCap as VeracruzServerEnclave; #[cfg(feature = "linux")] use linux_veracruz_server::server::VeracruzServerLinux as VeracruzServerEnclave; use log::{error, info}; @@ -935,8 +933,6 @@ impl TestExecutor { Platform::Linux } else if cfg!(feature = "nitro") { Platform::Nitro - } else if cfg!(feature = "icecap") { - Platform::IceCap } else { panic!("Unknown platform."); }; diff --git a/third-party/rust-mbedtls b/third-party/rust-mbedtls index 843291002..7deda7121 160000 --- a/third-party/rust-mbedtls +++ b/third-party/rust-mbedtls @@ -1 +1 @@ -Subproject commit 843291002b226a38821acda887bc05548dec2f2f +Subproject commit 7deda7121d54e97693c1e800bb717add116b80ef diff --git a/transport-protocol/Cargo.toml b/transport-protocol/Cargo.toml index 5534a6e8c..6db98fc1f 100644 --- a/transport-protocol/Cargo.toml +++ b/transport-protocol/Cargo.toml @@ -6,9 +6,6 @@ edition = "2018" name = "transport-protocol" version = "0.3.0" -[features] -icecap = [] - [dependencies] anyhow = "1" err-derive = "0.2" diff --git a/veracruz-client/Cargo.toml b/veracruz-client/Cargo.toml index b2069f9ea..47bd15c24 100644 --- a/veracruz-client/Cargo.toml +++ b/veracruz-client/Cargo.toml @@ -14,7 +14,6 @@ required-features = ["cli"] # a feature to enable CLI-only dependencies # https://stackoverflow.com/questions/35711044/how-can-i-specify-binary-only-dependencies cli = ["structopt", "env_logger"] -icecap = [] linux = [] nitro = [ "mbedtls/monitor_getrandom", diff --git a/veracruz-client/src/veracruz_client.rs b/veracruz-client/src/veracruz_client.rs index 51967796e..483e050eb 100644 --- a/veracruz-client/src/veracruz_client.rs +++ b/veracruz-client/src/veracruz_client.rs @@ -275,7 +275,7 @@ impl VeracruzClient { /// Check if the hash `received` matches those in the policy. fn compare_runtime_hash(&self, received: &[u8]) -> Result<()> { - let platforms = vec![Platform::Linux, Platform::Nitro, Platform::IceCap]; + let platforms = vec![Platform::Linux, Platform::Nitro]; for platform in platforms { let expected = match self.policy.runtime_manager_hash(&platform) { Err(_) => continue, // no hash found for this platform diff --git a/veracruz-server/Cargo.toml b/veracruz-server/Cargo.toml index 5b4232a9b..69a1e8608 100644 --- a/veracruz-server/Cargo.toml +++ b/veracruz-server/Cargo.toml @@ -18,16 +18,6 @@ cli = [ "structopt", ] debug = [] -icecap = [ - "io-utils/icecap", - "policy-utils/icecap", - "psa-attestation", - "signal-hook", - "tempfile", - "veracruz-utils/icecap", -] -icecap-lkvm = [] -icecap-qemu = [] linux = [ "data-encoding", "io-utils/linux", diff --git a/veracruz-server/src/common.rs b/veracruz-server/src/common.rs index 5c480a7bd..f88194bdd 100644 --- a/veracruz-server/src/common.rs +++ b/veracruz-server/src/common.rs @@ -49,9 +49,6 @@ pub enum VeracruzServerError { #[cfg(feature = "nitro")] #[error(display = "VeracruzServer: Nitro Error:{:?}", _0)] NitroError(#[error(source)] NitroError), - #[cfg(feature = "icecap")] - #[error(display = "VeracruzServer: TransportProtocolError: {:?}.", _0)] - TransportProtocolError(#[error(source)] transport_protocol::TransportProtocolError), #[error(display = "VeracruzServer: Join Error: {:?}.", _0)] JoinError(std::boxed::Box), #[error(display = "VeracruzServer: Uninitialized enclave.")] diff --git a/veracruz-utils/Cargo.toml b/veracruz-utils/Cargo.toml index 8de0d3398..c543b81ab 100644 --- a/veracruz-utils/Cargo.toml +++ b/veracruz-utils/Cargo.toml @@ -6,11 +6,6 @@ name = "veracruz-utils" version = "0.3.0" [features] -icecap = [ - "mbedtls/icecap", - "platform-services/icecap", - "serde/derive", -] linux = [ "platform-services/std", "serde/derive", diff --git a/workspaces/Makefile b/workspaces/Makefile index 53e2e3bc1..e912c743e 100644 --- a/workspaces/Makefile +++ b/workspaces/Makefile @@ -13,12 +13,12 @@ default: include common.mk -.PHONY: all clean icecap icecap-clippy icecap-clean linux linux-install linux-clippy \ +.PHONY: all clean linux linux-install linux-clippy \ linux-clean nitro nitro-clippy nitro-clean shared shared-install shared-clean -all: shared linux nitro icecap +all: shared linux nitro -clean: shared-clean linux-clean nitro-clean icecap-clean +clean: shared-clean linux-clean nitro-clean linux: shared $(MAKE) -C linux-runtime @@ -31,13 +31,6 @@ nitro: shared $(MAKE) -C nitro-host $(MAKE) -C nitro-runtime -icecap: shared - $(MAKE) -C icecap-runtime build - $(MAKE) -C icecap-host - -icecap-tests: - $(MAKE) -C icecap-host tests - shared: $(MAKE) -C applications $(MAKE) -C host @@ -57,9 +50,6 @@ nitro-clippy: make -C nitro-runtime clippy make -C nitro-host clippy -icecap-clippy: - make -C icecap-host clippy - linux-clean: $(MAKE) -C linux-host clean $(MAKE) -C linux-runtime clean @@ -68,10 +58,6 @@ nitro-clean: $(MAKE) -C nitro-host clean $(MAKE) -C nitro-runtime clean -icecap-clean: - $(MAKE) -C icecap-host clean - $(MAKE) -C icecap-runtime clean - shared-clean: $(MAKE) -C applications clean $(MAKE) -C host clean diff --git a/workspaces/host/Cargo.lock b/workspaces/host/Cargo.lock index a4e0a2982..47407c96e 100644 --- a/workspaces/host/Cargo.lock +++ b/workspaces/host/Cargo.lock @@ -643,7 +643,6 @@ dependencies = [ "anyhow", "byteorder", "cfg-if", - "ctor", "err-derive", "lazy_static", "log", diff --git a/workspaces/icecap-host/.cargo/config.toml b/workspaces/icecap-host/.cargo/config.toml deleted file mode 100644 index 5cb26c495..000000000 --- a/workspaces/icecap-host/.cargo/config.toml +++ /dev/null @@ -1,4 +0,0 @@ -[env] -CC_x86_64_unknown_linux_gnu = "gcc" -CC_aarch64_unknown_linux_gnu = "gcc" -VERACRUZ_ICECAP_QEMU_IMAGE = { value = "../icecap-runtime/build/qemu/disposable/cmake/elfloader/build/elfloader", relative = true } \ No newline at end of file diff --git a/workspaces/icecap-host/.gitignore b/workspaces/icecap-host/.gitignore deleted file mode 100644 index 948599c80..000000000 --- a/workspaces/icecap-host/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -build/* -test-collateral/* -css-icecap.bin diff --git a/workspaces/icecap-host/Cargo.lock b/workspaces/icecap-host/Cargo.lock deleted file mode 100644 index 86226f002..000000000 --- a/workspaces/icecap-host/Cargo.lock +++ /dev/null @@ -1,2487 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -version = 3 - -[[package]] -name = "actix-macros" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "465a6172cf69b960917811022d8f29bc0b7fa1398bc4f78b3c466673db1213b6" -dependencies = [ - "quote", - "syn 1.0.109", -] - -[[package]] -name = "actix-rt" -version = "2.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15265b6b8e2347670eb363c47fc8c75208b4a4994b27192f345fcbe707804f3e" -dependencies = [ - "actix-macros", - "futures-core", - "tokio", -] - -[[package]] -name = "aho-corasick" -version = "0.7.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc936419f96fa211c1b9166887b38e5e40b19958e5b895be7c1f93adec7071ac" -dependencies = [ - "memchr", -] - -[[package]] -name = "annotate-snippets" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3b9d411ecbaf79885c6df4d75fff75858d5995ff25385657a28af47e82f9c36" -dependencies = [ - "unicode-width", - "yansi-term", -] - -[[package]] -name = "ansi_term" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2" -dependencies = [ - "winapi", -] - -[[package]] -name = "anyhow" -version = "1.0.58" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb07d2053ccdbe10e2af2995a2f116c1330396493dc1269f6a91d0ae82e19704" - -[[package]] -name = "ascii-canvas" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8824ecca2e851cec16968d54a01dd372ef8f95b244fb84b84e70128be347c3c6" -dependencies = [ - "term", -] - -[[package]] -name = "atomic-polyfill" -version = "0.1.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3ff7eb3f316534d83a8a2c3d1674ace8a5a71198eba31e2e2b597833f699b28" -dependencies = [ - "critical-section", -] - -[[package]] -name = "atty" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" -dependencies = [ - "hermit-abi 0.1.19", - "libc", - "winapi", -] - -[[package]] -name = "autocfg" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" - -[[package]] -name = "aws-nitro-enclaves-nsm-api" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17e83ef53714474149215e48438d2cf8f96fb76ae5a00f21f16051fab79c0627" -dependencies = [ - "libc", - "log", - "nix", - "serde", - "serde_bytes", - "serde_cbor", -] - -[[package]] -name = "base64" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd" - -[[package]] -name = "bincode" -version = "1.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" -dependencies = [ - "serde", -] - -[[package]] -name = "bindgen" -version = "0.59.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bd2a9a458e8f4304c52c43ebb0cfbd520289f8379a52e329a38afda99bf8eb8" -dependencies = [ - "bitflags", - "cexpr", - "clang-sys", - "clap", - "env_logger", - "lazy_static", - "lazycell", - "log", - "peeking_take_while", - "proc-macro2", - "quote", - "regex", - "rustc-hash", - "shlex", - "which", -] - -[[package]] -name = "bindgen" -version = "0.65.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfdf7b466f9a4903edc73f95d6d2bcd5baf8ae620638762244d3f60143643cc5" -dependencies = [ - "annotate-snippets", - "bitflags", - "cexpr", - "clang-sys", - "lazy_static", - "lazycell", - "log", - "peeking_take_while", - "prettyplease", - "proc-macro2", - "quote", - "regex", - "rustc-hash", - "shlex", - "syn 2.0.22", - "which", -] - -[[package]] -name = "bit-set" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1" -dependencies = [ - "bit-vec", -] - -[[package]] -name = "bit-vec" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" - -[[package]] -name = "bitflags" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" - -[[package]] -name = "bumpalo" -version = "3.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "572f695136211188308f16ad2ca5c851a712c464060ae6974944458eb83880ba" - -[[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 = "cexpr" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" -dependencies = [ - "nom", -] - -[[package]] -name = "cfg-if" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" - -[[package]] -name = "chrono" -version = "0.4.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "670ad68c9088c2a963aaa298cb369688cf3f9465ce5e2d4ca10e6e0098a1ce73" -dependencies = [ - "libc", - "num-integer", - "num-traits", - "winapi", -] - -[[package]] -name = "clang-sys" -version = "1.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c688fc74432808e3eb684cae8830a86be1d66a2bd58e1f248ed0960a590baf6f" -dependencies = [ - "glob", - "libc", - "libloading", -] - -[[package]] -name = "clap" -version = "2.34.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0610544180c38b88101fecf2dd634b174a62eef6946f84dfc6a7127512b381c" -dependencies = [ - "ansi_term", - "atty", - "bitflags", - "strsim", - "term_size", - "textwrap", - "unicode-width", - "vec_map", -] - -[[package]] -name = "cmake" -version = "0.1.50" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a31c789563b815f77f4250caee12365734369f942439b7defd71e18a48197130" -dependencies = [ - "cc", -] - -[[package]] -name = "cobs" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67ba02a97a2bd10f4b59b25c7973101c79642302776489e030cd13cdab09ed15" - -[[package]] -name = "critical-section" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6548a0ad5d2549e111e1f6a11a6c2e2d00ce6a3dafe22948d67c2b443f775e52" - -[[package]] -name = "crunchy" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" - -[[package]] -name = "data-encoding" -version = "2.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ee2393c4a91429dffb4bedf19f4d6abf27d8a732c8ce4980305d782e5426d57" - -[[package]] -name = "diff" -version = "0.1.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56254986775e3233ffa9c4d7d3faaf6d36a2c09d30b20687e9f88bc8bafc16c8" - -[[package]] -name = "dirs-next" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b98cf8ebf19c3d1b223e151f99a4f9f0690dca41414773390fc824184ac833e1" -dependencies = [ - "cfg-if", - "dirs-sys-next", -] - -[[package]] -name = "dirs-sys-next" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d" -dependencies = [ - "libc", - "redox_users", - "winapi", -] - -[[package]] -name = "either" -version = "1.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457" - -[[package]] -name = "ena" -version = "0.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7402b94a93c24e742487327a7cd839dc9d36fec9de9fb25b09f2dae459f36c3" -dependencies = [ - "log", -] - -[[package]] -name = "encoding_rs" -version = "0.8.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7896dc8abb250ffdda33912550faa54c88ec8b998dec0b2c55ab224921ce11df" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "env_logger" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a12e6657c4c97ebab115a42dcee77225f7f482cdd841cf7088c657a42e9e00e7" -dependencies = [ - "atty", - "humantime", - "log", - "regex", - "termcolor", -] - -[[package]] -name = "err-derive" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22deed3a8124cff5fa835713fa105621e43bbdc46690c3a6b68328a012d350d4" -dependencies = [ - "proc-macro-error", - "proc-macro2", - "quote", - "rustversion", - "syn 1.0.109", - "synstructure", -] - -[[package]] -name = "errno" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bcfec3a70f97c962c307b2d2c56e358cf1d00b558d74262b5f929ee8cc7e73a" -dependencies = [ - "errno-dragonfly", - "libc", - "windows-sys", -] - -[[package]] -name = "errno-dragonfly" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf" -dependencies = [ - "cc", - "libc", -] - -[[package]] -name = "fastrand" -version = "1.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3fcf0cee53519c866c09b5de1f6c56ff9d647101f81c1964fa632e148896cdf" -dependencies = [ - "instant", -] - -[[package]] -name = "fixedbitset" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" - -[[package]] -name = "fnv" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" - -[[package]] -name = "form_urlencoded" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fc25a87fa4fd2094bffb06925852034d90a17f0d1e05197d4956d3555752191" -dependencies = [ - "matches", - "percent-encoding", -] - -[[package]] -name = "futures-channel" -version = "0.3.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3083ce4b914124575708913bca19bfe887522d6e2e6d0952943f5eac4a74010" -dependencies = [ - "futures-core", -] - -[[package]] -name = "futures-core" -version = "0.3.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c09fd04b7e4073ac7156a9539b57a484a8ea920f79c7c675d05d289ab6110d3" - -[[package]] -name = "futures-io" -version = "0.3.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc4045962a5a5e935ee2fdedaa4e08284547402885ab326734432bed5d12966b" - -[[package]] -name = "futures-sink" -version = "0.3.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21163e139fa306126e6eedaf49ecdb4588f939600f0b1e770f4205ee4b7fa868" - -[[package]] -name = "futures-task" -version = "0.3.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57c66a976bf5909d801bbef33416c41372779507e7a6b3a5e25e4749c58f776a" - -[[package]] -name = "futures-util" -version = "0.3.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8b7abd5d659d9b90c8cba917f6ec750a74e2dc23902ef9cd4cc8c8b22e6036a" -dependencies = [ - "futures-core", - "futures-io", - "futures-task", - "memchr", - "pin-project-lite", - "pin-utils", - "slab", -] - -[[package]] -name = "getrandom" -version = "0.2.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c05aeb6a22b8f62540c194aac980f2115af067bfe15a0734d7277a768d396b31" -dependencies = [ - "cfg-if", - "libc", - "wasi", -] - -[[package]] -name = "glob" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574" - -[[package]] -name = "h2" -version = "0.3.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d357c7ae988e7d2182f7d7871d0b963962420b0678b0997ce7de72001aeab782" -dependencies = [ - "bytes", - "fnv", - "futures-core", - "futures-sink", - "futures-util", - "http", - "indexmap", - "slab", - "tokio", - "tokio-util", - "tracing", -] - -[[package]] -name = "half" -version = "1.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eabb4a44450da02c90444cf74558da904edde8fb4e9035a9a6a4e15445af0bd7" - -[[package]] -name = "hash32" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0c35f58762feb77d74ebe43bdbc3210f09be9fe6742234d573bacc26ed92b67" -dependencies = [ - "byteorder", -] - -[[package]] -name = "hashbrown" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" - -[[package]] -name = "heapless" -version = "0.7.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d076121838e03f862871315477528debffdb7462fb229216ecef91b1a3eb31eb" -dependencies = [ - "atomic-polyfill", - "hash32", - "serde", - "spin 0.9.8", - "stable_deref_trait", -] - -[[package]] -name = "heck" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d621efb26863f0e9924c6ac577e8275e5e6b77455db64ffa6c65c904e9e132c" -dependencies = [ - "unicode-segmentation", -] - -[[package]] -name = "hermit-abi" -version = "0.1.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" -dependencies = [ - "libc", -] - -[[package]] -name = "hermit-abi" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fed44880c466736ef9a5c5b5facefb5ed0785676d0c02d612db14e54f0d84286" - -[[package]] -name = "hex" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" - -[[package]] -name = "http" -version = "0.2.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff8670570af52249509a86f5e3e18a08c60b177071826898fde8997cf5f6bfbb" -dependencies = [ - "bytes", - "fnv", - "itoa", -] - -[[package]] -name = "http-body" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ff4f84919677303da5f147645dbea6b1881f368d03ac84e1dc09031ebd7b2c6" -dependencies = [ - "bytes", - "http", - "pin-project-lite", -] - -[[package]] -name = "httparse" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9100414882e15fb7feccb4897e5f0ff0ff1ca7d1a86a23208ada4d7a18e6c6c4" - -[[package]] -name = "httpdate" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" - -[[package]] -name = "humantime" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" - -[[package]] -name = "hyper" -version = "0.14.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b26ae0a80afebe130861d90abf98e3814a4f28a4c6ffeb5ab8ebb2be311e0ef2" -dependencies = [ - "bytes", - "futures-channel", - "futures-core", - "futures-util", - "h2", - "http", - "http-body", - "httparse", - "httpdate", - "itoa", - "pin-project-lite", - "socket2", - "tokio", - "tower-service", - "tracing", - "want", -] - -[[package]] -name = "hyper-rustls" -version = "0.23.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1788965e61b367cd03a62950836d5cd41560c3577d90e40e0819373194d1661c" -dependencies = [ - "http", - "hyper", - "rustls", - "tokio", - "tokio-rustls", -] - -[[package]] -name = "icecap-veracruz-server" -version = "0.3.0" -dependencies = [ - "anyhow", - "bincode", - "env_logger", - "err-derive", - "lazy_static", - "log", - "policy-utils", - "proxy-attestation-client", - "signal-hook", - "structopt", - "tempfile", - "veracruz-server", - "veracruz-utils", -] - -[[package]] -name = "idna" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "418a0a6fab821475f634efe3ccc45c013f742efe03d853e8d3355d5cb850ecf8" -dependencies = [ - "matches", - "unicode-bidi", - "unicode-normalization", -] - -[[package]] -name = "indexmap" -version = "1.9.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1885e79c1fc4b10f0e172c475f458b7f7b93061064d98c3293e98c5ba0c8b399" -dependencies = [ - "autocfg", - "hashbrown", -] - -[[package]] -name = "instant" -version = "0.1.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "io-lifetimes" -version = "1.0.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" -dependencies = [ - "hermit-abi 0.3.1", - "libc", - "windows-sys", -] - -[[package]] -name = "io-utils" -version = "0.3.0" -dependencies = [ - "anyhow", - "base64", - "bincode", - "byteorder", - "err-derive", - "log", - "nix", - "serde", - "serde_json", - "stringreader", - "transport-protocol", - "uuid", -] - -[[package]] -name = "ipnet" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "879d54834c8c76457ef4293a689b2a8c59b076067ad77b15efafbb05f92a592b" - -[[package]] -name = "itertools" -version = "0.10.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" -dependencies = [ - "either", -] - -[[package]] -name = "itoa" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1aab8fc367588b89dcee83ab0fd66b72b50b72fa1904d7095045ace2b0c81c35" - -[[package]] -name = "js-sys" -version = "0.3.56" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a38fc24e30fd564ce974c02bf1d337caddff65be6cc4735a1f7eab22a7440f04" -dependencies = [ - "wasm-bindgen", -] - -[[package]] -name = "lalrpop" -version = "0.19.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b30455341b0e18f276fa64540aff54deafb54c589de6aca68659c63dd2d5d823" -dependencies = [ - "ascii-canvas", - "atty", - "bit-set", - "diff", - "ena", - "itertools", - "lalrpop-util", - "petgraph", - "pico-args", - "regex", - "regex-syntax", - "string_cache", - "term", - "tiny-keccak", - "unicode-xid", -] - -[[package]] -name = "lalrpop-util" -version = "0.19.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcf796c978e9b4d983414f4caedc9273aa33ee214c5b887bd55fde84c85d2dc4" -dependencies = [ - "regex", -] - -[[package]] -name = "lazy_static" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" -dependencies = [ - "spin 0.5.2", -] - -[[package]] -name = "lazycell" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" - -[[package]] -name = "lexical-core" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92912c4af2e7d9075be3e5e3122c4d7263855fa6cce34fbece4dd08e5884624d" -dependencies = [ - "lexical-util", -] - -[[package]] -name = "lexical-util" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c72a9d52c5c4e62fa2cdc2cb6c694a39ae1382d9c2a17a466f18e272a0930eb1" -dependencies = [ - "static_assertions", -] - -[[package]] -name = "libc" -version = "0.2.144" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b00cc1c228a6782d0f076e7b232802e0c5689d41bb5df366f2a6b6621cfdfe1" - -[[package]] -name = "libloading" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "efbc0f03f9a775e9f6aed295c6a1ba2253c5757a9e03d55c6caa46a681abcddd" -dependencies = [ - "cfg-if", - "winapi", -] - -[[package]] -name = "linux-host" -version = "0.3.0" -dependencies = [ - "policy-utils", - "tests", - "veracruz-client", - "veracruz-server", -] - -[[package]] -name = "linux-raw-sys" -version = "0.3.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" - -[[package]] -name = "linux-veracruz-server" -version = "0.3.0" -dependencies = [ - "anyhow", - "data-encoding", - "env_logger", - "io-utils", - "lazy_static", - "log", - "nix", - "policy-utils", - "proxy-attestation-client", - "rand", - "structopt", - "tempfile", - "veracruz-server", - "veracruz-utils", -] - -[[package]] -name = "lock_api" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88943dd7ef4a2e5a4bfa2753aaab3013e34ce2533d1996fb18ef591e315e2b3b" -dependencies = [ - "scopeguard", -] - -[[package]] -name = "log" -version = "0.4.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51b9bbe6c47d51fc3e1a9b945965946b4c44142ab8792c50835a980d362c2710" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "matches" -version = "0.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3e378b66a060d48947b590737b30a1be76706c8dd7b8ba0f2fe3989c68a853f" - -[[package]] -name = "mbedtls" -version = "0.10.0" -dependencies = [ - "bitflags", - "byteorder", - "cc", - "cfg-if", - "mbedtls-platform-support", - "mbedtls-sys-auto", - "rs-libc", - "serde", - "serde_derive", - "yasna", -] - -[[package]] -name = "mbedtls-platform-support" -version = "0.2.0" -dependencies = [ - "cc", - "cfg-if", - "chrono", - "mbedtls-sys-auto", - "once_cell", - "zeroize", -] - -[[package]] -name = "mbedtls-sys-auto" -version = "3.4.0" -dependencies = [ - "bindgen 0.65.1", - "cc", - "cfg-if", - "cmake", - "lazy_static", - "libc", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "memchr" -version = "2.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "308cc39be01b73d0d18f82a0e7b2a3df85245f84af96fdddc5d202d27e47b86a" - -[[package]] -name = "memoffset" -version = "0.6.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce" -dependencies = [ - "autocfg", -] - -[[package]] -name = "mime" -version = "0.3.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d" - -[[package]] -name = "mime_guess" -version = "2.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4192263c238a5f0d0c6bfd21f336a313a4ce1c450542449ca191bb657b4642ef" -dependencies = [ - "mime", - "unicase", -] - -[[package]] -name = "minimal-lexical" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" - -[[package]] -name = "mio" -version = "0.8.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "927a765cd3fc26206e66b296465fa9d3e5ab003e651c1b3c060e7956d96b19d2" -dependencies = [ - "libc", - "wasi", - "windows-sys", -] - -[[package]] -name = "new_debug_unreachable" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4a24736216ec316047a1fc4252e27dabb04218aa4a3f37c6e7ddbf1f9782b54" - -[[package]] -name = "nitro-enclave" -version = "0.1.0" -source = "git+https://github.com/veracruz-project/nitro-enclave?tag=v0.1#f9313e5ea14d4fde269062dc4ed3a85731350299" -dependencies = [ - "anyhow", - "err-derive", - "nix", - "raw-fd", - "serde_json", -] - -[[package]] -name = "nitro-veracruz-server" -version = "0.3.0" -dependencies = [ - "anyhow", - "bincode", - "env_logger", - "log", - "nitro-enclave", - "policy-utils", - "proxy-attestation-client", - "structopt", - "veracruz-server", - "veracruz-utils", -] - -[[package]] -name = "nix" -version = "0.20.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5e06129fb611568ef4e868c14b326274959aa70ff7776e9d55323531c374945" -dependencies = [ - "bitflags", - "cc", - "cfg-if", - "libc", - "memoffset", -] - -[[package]] -name = "nom" -version = "7.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b1d11e1ef389c76fe5b81bcaf2ea32cf88b62bc494e19f493d0b30e7a930109" -dependencies = [ - "memchr", - "minimal-lexical", - "version_check", -] - -[[package]] -name = "num" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43db66d1170d347f9a065114077f7dccb00c1b9478c89384490a3425279a4606" -dependencies = [ - "num-bigint", - "num-complex", - "num-integer", - "num-iter", - "num-rational", - "num-traits", -] - -[[package]] -name = "num-bigint" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f93ab6289c7b344a8a9f60f88d80aa20032336fe78da341afc91c8a2341fc75f" -dependencies = [ - "autocfg", - "num-integer", - "num-traits", -] - -[[package]] -name = "num-complex" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26873667bbbb7c5182d4a37c1add32cdf09f841af72da53318fdb81543c15085" -dependencies = [ - "num-traits", -] - -[[package]] -name = "num-derive" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "876a53fff98e03a936a674b29568b0e605f06b29372c2489ff4de23f1949743d" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "num-integer" -version = "0.1.44" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2cc698a63b549a70bc047073d2949cce27cd1c7b0a4a862d08a8031bc2801db" -dependencies = [ - "autocfg", - "num-traits", -] - -[[package]] -name = "num-iter" -version = "0.1.42" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2021c8337a54d21aca0d59a92577a029af9431cb59b909b03252b9c164fad59" -dependencies = [ - "autocfg", - "num-integer", - "num-traits", -] - -[[package]] -name = "num-rational" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d41702bd167c2df5520b384281bc111a4b5efcf7fbc4c9c222c815b07e0a6a6a" -dependencies = [ - "autocfg", - "num-bigint", - "num-integer", - "num-traits", -] - -[[package]] -name = "num-traits" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a64b1ec5cda2586e284722486d802acf1f7dbdc623e2bfc57e65ca1cd099290" -dependencies = [ - "autocfg", -] - -[[package]] -name = "num_cpus" -version = "1.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6058e64324c71e02bc2b150e4f3bc8286db6c83092132ffa3f6b1eab0f9def5" -dependencies = [ - "hermit-abi 0.1.19", - "libc", -] - -[[package]] -name = "once_cell" -version = "1.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" - -[[package]] -name = "parking_lot" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" -dependencies = [ - "lock_api", - "parking_lot_core", -] - -[[package]] -name = "parking_lot_core" -version = "0.9.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93f00c865fe7cabf650081affecd3871070f26767e7b2070a3ffae14c654b447" -dependencies = [ - "cfg-if", - "libc", - "redox_syscall 0.3.5", - "smallvec", - "windows-targets", -] - -[[package]] -name = "peeking_take_while" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099" - -[[package]] -name = "percent-encoding" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" - -[[package]] -name = "petgraph" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6d5014253a1331579ce62aa67443b4a658c5e7dd03d4bc6d302b94474888143" -dependencies = [ - "fixedbitset", - "indexmap", -] - -[[package]] -name = "phf_shared" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c00cf8b9eafe68dde5e9eaa2cef8ee84a9336a47d566ec55ca16589633b65af7" -dependencies = [ - "siphasher", -] - -[[package]] -name = "pico-args" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db8bcd96cb740d03149cbad5518db9fd87126a10ab519c011893b1754134c468" - -[[package]] -name = "pin-project-lite" -version = "0.2.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e280fbe77cc62c91527259e9442153f4688736748d24660126286329742b4c6c" - -[[package]] -name = "pin-utils" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" - -[[package]] -name = "platform-services" -version = "0.3.0" -dependencies = [ - "aws-nitro-enclaves-nsm-api", - "getrandom", - "nix", -] - -[[package]] -name = "policy-utils" -version = "0.3.0" -dependencies = [ - "anyhow", - "err-derive", - "hex", - "lalrpop", - "lalrpop-util", - "lexical-core", - "mbedtls", - "regex", - "serde", - "serde_json", - "veracruz-utils", - "wasi-types", -] - -[[package]] -name = "postcard" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfa512cd0d087cc9f99ad30a1bf64795b67871edbead083ffc3a4dfafa59aa00" -dependencies = [ - "cobs", - "heapless", - "serde", -] - -[[package]] -name = "ppv-lite86" -version = "0.2.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb9f9e6e233e5c4a35559a617bf40a4ec447db2e84c20b55a6f83167b7e57872" - -[[package]] -name = "precomputed-hash" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" - -[[package]] -name = "prettyplease" -version = "0.2.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9825a04601d60621feed79c4e6b56d65db77cdca55cef43b46b0de1096d1c282" -dependencies = [ - "proc-macro2", - "syn 2.0.22", -] - -[[package]] -name = "proc-macro-error" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" -dependencies = [ - "proc-macro-error-attr", - "proc-macro2", - "quote", - "syn 1.0.109", - "version_check", -] - -[[package]] -name = "proc-macro-error-attr" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" -dependencies = [ - "proc-macro2", - "quote", - "version_check", -] - -[[package]] -name = "proc-macro2" -version = "1.0.63" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b368fba921b0dce7e60f5e04ec15e565b3303972b42bcfde1d0713b881959eb" -dependencies = [ - "unicode-ident", -] - -[[package]] -name = "protobuf" -version = "3.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b55bad9126f378a853655831eb7363b7b01b81d19f8cb1218861086ca4a1a61e" -dependencies = [ - "once_cell", - "protobuf-support", - "thiserror", -] - -[[package]] -name = "protobuf-codegen" -version = "3.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0dd418ac3c91caa4032d37cb80ff0d44e2ebe637b2fb243b6234bf89cdac4901" -dependencies = [ - "anyhow", - "once_cell", - "protobuf", - "protobuf-parse", - "regex", - "tempfile", - "thiserror", -] - -[[package]] -name = "protobuf-parse" -version = "3.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d39b14605eaa1f6a340aec7f320b34064feb26c93aec35d6a9a2272a8ddfa49" -dependencies = [ - "anyhow", - "indexmap", - "log", - "protobuf", - "protobuf-support", - "tempfile", - "thiserror", - "which", -] - -[[package]] -name = "protobuf-support" -version = "3.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5d4d7b8601c814cfb36bcebb79f0e61e45e1e93640cf778837833bbed05c372" -dependencies = [ - "thiserror", -] - -[[package]] -name = "proxy-attestation-client" -version = "0.1.0" -source = "git+https://github.com/veracruz-project/proxy-attestation-client?tag=v0.2#a20043511cffc094f7bb03aacdd8a7e642c9a2e8" -dependencies = [ - "anyhow", - "base64", - "err-derive", - "log", - "reqwest", - "uuid", -] - -[[package]] -name = "psa-attestation" -version = "0.3.0" -dependencies = [ - "bindgen 0.59.2", - "cfg-if", - "libc", - "mbedtls-sys-auto", -] - -[[package]] -name = "quote" -version = "1.0.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b9ab9c7eadfd8df19006f1cf1a4aed13540ed5cbc047010ece5826e10825488" -dependencies = [ - "proc-macro2", -] - -[[package]] -name = "rand" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" -dependencies = [ - "libc", - "rand_chacha", - "rand_core", -] - -[[package]] -name = "rand_chacha" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" -dependencies = [ - "ppv-lite86", - "rand_core", -] - -[[package]] -name = "rand_core" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d34f1408f55294453790c48b2f1ebbb1c5b4b7563eb1f418bcfcfdbb06ebb4e7" -dependencies = [ - "getrandom", -] - -[[package]] -name = "raw-fd" -version = "0.1.0" -source = "git+https://github.com/veracruz-project/nitro-enclave?tag=v0.1#f9313e5ea14d4fde269062dc4ed3a85731350299" -dependencies = [ - "anyhow", - "byteorder", - "nix", -] - -[[package]] -name = "redox_syscall" -version = "0.2.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8380fe0152551244f0747b1bf41737e0f8a74f97a14ccefd1148187271634f3c" -dependencies = [ - "bitflags", -] - -[[package]] -name = "redox_syscall" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" -dependencies = [ - "bitflags", -] - -[[package]] -name = "redox_users" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" -dependencies = [ - "getrandom", - "redox_syscall 0.2.11", - "thiserror", -] - -[[package]] -name = "regex" -version = "1.5.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a11647b6b25ff05a515cb92c365cec08801e83423a235b51e231e1808747286" -dependencies = [ - "aho-corasick", - "memchr", - "regex-syntax", -] - -[[package]] -name = "regex-syntax" -version = "0.6.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f497285884f3fcff424ffc933e56d7cbca511def0c9831a7f9b5f6153e3cc89b" - -[[package]] -name = "reqwest" -version = "0.11.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "431949c384f4e2ae07605ccaa56d1d9d2ecdb5cadd4f9577ccfab29f2e5149fc" -dependencies = [ - "base64", - "bytes", - "encoding_rs", - "futures-core", - "futures-util", - "h2", - "http", - "http-body", - "hyper", - "hyper-rustls", - "ipnet", - "js-sys", - "log", - "mime", - "mime_guess", - "once_cell", - "percent-encoding", - "pin-project-lite", - "rustls", - "rustls-pemfile", - "serde", - "serde_json", - "serde_urlencoded", - "tokio", - "tokio-rustls", - "tower-service", - "url", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", - "webpki-roots", - "winreg", -] - -[[package]] -name = "ring" -version = "0.16.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc" -dependencies = [ - "cc", - "libc", - "once_cell", - "spin 0.5.2", - "untrusted", - "web-sys", - "winapi", -] - -[[package]] -name = "rs-libc" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "683e8c8e8aac6ffa4b2287bac3c69575d5346accac4f218ae1e084303bb174ca" -dependencies = [ - "cc", - "zeroize", -] - -[[package]] -name = "rustc-hash" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" - -[[package]] -name = "rustix" -version = "0.37.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f79bef90eb6d984c72722595b5b1348ab39275a5e5123faca6863bf07d75a4e0" -dependencies = [ - "bitflags", - "errno", - "io-lifetimes", - "libc", - "linux-raw-sys", - "windows-sys", -] - -[[package]] -name = "rustls" -version = "0.20.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fff78fc74d175294f4e83b28343315ffcfb114b156f0185e9741cb5570f50e2f" -dependencies = [ - "log", - "ring", - "sct", - "webpki", -] - -[[package]] -name = "rustls-pemfile" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0864aeff53f8c05aa08d86e5ef839d3dfcf07aeba2db32f12db0ef716e87bd55" -dependencies = [ - "base64", -] - -[[package]] -name = "rustversion" -version = "1.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2cc38e8fa666e2de3c4aba7edeb5ffc5246c1c2ed0e3d17e560aeeba736b23f" - -[[package]] -name = "ryu" -version = "1.0.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73b4b750c782965c211b42f022f59af1fbceabdd026623714f104152f1ec149f" - -[[package]] -name = "scopeguard" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" - -[[package]] -name = "sct" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d53dcdb7c9f8158937a7981b48accfd39a43af418591a5d008c7b22b5e1b7ca4" -dependencies = [ - "ring", - "untrusted", -] - -[[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_bytes" -version = "0.11.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16ae07dd2f88a366f15bd0632ba725227018c69a1c8550a927324f8eb8368bb9" -dependencies = [ - "serde", -] - -[[package]] -name = "serde_cbor" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bef2ebfde456fb76bbcf9f59315333decc4fda0b2b44b420243c11e0f5ec1f5" -dependencies = [ - "half", - "serde", -] - -[[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 1.0.109", -] - -[[package]] -name = "serde_json" -version = "1.0.80" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f972498cf015f7c0746cac89ebe1d6ef10c293b94175a243a2d9442c163d9944" -dependencies = [ - "itoa", - "ryu", - "serde", -] - -[[package]] -name = "serde_urlencoded" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" -dependencies = [ - "form_urlencoded", - "itoa", - "ryu", - "serde", -] - -[[package]] -name = "shlex" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43b2853a4d09f215c24cc5489c992ce46052d359b5109343cbafbf26bc62f8a3" - -[[package]] -name = "signal-hook" -version = "0.3.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "647c97df271007dcea485bb74ffdb57f2e683f1306c854f468a0c244badabf2d" -dependencies = [ - "libc", - "signal-hook-registry", -] - -[[package]] -name = "signal-hook-registry" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e51e73328dc4ac0c7ccbda3a494dfa03df1de2f46018127f60c693f2648455b0" -dependencies = [ - "libc", -] - -[[package]] -name = "siphasher" -version = "0.3.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7bd3e3206899af3f8b12af284fafc038cc1dc2b41d1b89dd17297221c5d225de" - -[[package]] -name = "slab" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9def91fd1e018fe007022791f865d0ccc9b3a0d5001e01aabb8b40e46000afb5" - -[[package]] -name = "smallvec" -version = "1.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2dd574626839106c320a323308629dcb1acfc96e32a8cba364ddc61ac23ee83" - -[[package]] -name = "socket2" -version = "0.4.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64a4a911eed85daf18834cfaa86a79b7d266ff93ff5ba14005426219480ed662" -dependencies = [ - "libc", - "winapi", -] - -[[package]] -name = "spin" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" - -[[package]] -name = "spin" -version = "0.9.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" -dependencies = [ - "lock_api", -] - -[[package]] -name = "stable_deref_trait" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" - -[[package]] -name = "static_assertions" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" - -[[package]] -name = "string_cache" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ddb1139b5353f96e429e1a5e19fbaf663bddedaa06d1dbd49f82e352601209a" -dependencies = [ - "lazy_static", - "new_debug_unreachable", - "phf_shared", - "precomputed-hash", -] - -[[package]] -name = "stringreader" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "913e7b03d63752f6cdd2df77da36749d82669904798fe8944b9ec3d23f159905" - -[[package]] -name = "strsim" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" - -[[package]] -name = "structopt" -version = "0.3.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c6b5c64445ba8094a6ab0c3cd2ad323e07171012d9c98b0b15651daf1787a10" -dependencies = [ - "clap", - "lazy_static", - "structopt-derive", -] - -[[package]] -name = "structopt-derive" -version = "0.4.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcb5ae327f9cc13b68763b5749770cb9e048a99bd9dfdfa58d0cf05d5f64afe0" -dependencies = [ - "heck", - "proc-macro-error", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "syn" -version = "1.0.109" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "syn" -version = "2.0.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2efbeae7acf4eabd6bcdcbd11c92f45231ddda7539edc7806bd1a04a03b24616" -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 1.0.109", - "unicode-xid", -] - -[[package]] -name = "tempfile" -version = "3.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31c0432476357e58790aaa47a8efb0c5138f137343f3b5f23bd36a27e3b0a6d6" -dependencies = [ - "autocfg", - "cfg-if", - "fastrand", - "redox_syscall 0.3.5", - "rustix", - "windows-sys", -] - -[[package]] -name = "term" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c59df8ac95d96ff9bede18eb7300b0fda5e5d8d90960e76f8e14ae765eedbf1f" -dependencies = [ - "dirs-next", - "rustversion", - "winapi", -] - -[[package]] -name = "term_size" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e4129646ca0ed8f45d09b929036bafad5377103edd06e50bf574b353d2b08d9" -dependencies = [ - "libc", - "winapi", -] - -[[package]] -name = "termcolor" -version = "1.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bab24d30b911b2376f3a13cc2cd443142f0c81dda04c118693e35b3835757755" -dependencies = [ - "winapi-util", -] - -[[package]] -name = "tests" -version = "0.3.0" -dependencies = [ - "actix-rt", - "anyhow", - "either", - "env_logger", - "hex", - "icecap-veracruz-server", - "lazy_static", - "linux-veracruz-server", - "log", - "mbedtls", - "nitro-veracruz-server", - "nix", - "policy-utils", - "postcard", - "reqwest", - "transport-protocol", - "veracruz-client", - "veracruz-server", - "veracruz-utils", -] - -[[package]] -name = "textwrap" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" -dependencies = [ - "term_size", - "unicode-width", -] - -[[package]] -name = "thiserror" -version = "1.0.38" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a9cd18aa97d5c45c6603caea1da6628790b37f7a34b6ca89522331c5180fed0" -dependencies = [ - "thiserror-impl", -] - -[[package]] -name = "thiserror-impl" -version = "1.0.38" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fb327af4685e4d03fa8cbcf1716380da910eeb2bb8be417e7f9fd3fb164f36f" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "tiny-keccak" -version = "2.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c9d3793400a45f954c52e73d068316d76b6f4e36977e3fcebb13a2721e80237" -dependencies = [ - "crunchy", -] - -[[package]] -name = "tinyvec" -version = "1.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c1c1d5a42b6245520c249549ec267180beaffcc0615401ac8e31853d4b6d8d2" -dependencies = [ - "tinyvec_macros", -] - -[[package]] -name = "tinyvec_macros" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" - -[[package]] -name = "tokio" -version = "1.28.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94d7b1cfd2aa4011f2de74c2c4c63665e27a71006b0a192dcd2710272e73dfa2" -dependencies = [ - "autocfg", - "bytes", - "libc", - "mio", - "num_cpus", - "parking_lot", - "pin-project-lite", - "signal-hook-registry", - "socket2", - "windows-sys", -] - -[[package]] -name = "tokio-rustls" -version = "0.23.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c43ee83903113e03984cb9e5cebe6c04a5116269e900e3ddba8f068a62adda59" -dependencies = [ - "rustls", - "tokio", - "webpki", -] - -[[package]] -name = "tokio-util" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0edfdeb067411dba2044da6d1cb2df793dd35add7888d73c16e3381ded401764" -dependencies = [ - "bytes", - "futures-core", - "futures-sink", - "pin-project-lite", - "tokio", - "tracing", -] - -[[package]] -name = "tower-service" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "360dfd1d6d30e05fda32ace2c8c70e9c0a9da713275777f5a4dbb8a1893930c6" - -[[package]] -name = "tracing" -version = "0.1.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a1bdf54a7c28a2bbf701e1d2233f6c77f473486b94bee4f9678da5a148dca7f" -dependencies = [ - "cfg-if", - "pin-project-lite", - "tracing-attributes", - "tracing-core", -] - -[[package]] -name = "tracing-attributes" -version = "0.1.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc6b8ad3567499f98a1db7a752b07a7c8c7c7c34c332ec00effb2b0027974b7c" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "tracing-core" -version = "0.1.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa31669fa42c09c34d94d8165dd2012e8ff3c66aca50f3bb226b68f216f2706c" -dependencies = [ - "lazy_static", -] - -[[package]] -name = "transport-protocol" -version = "0.3.0" -dependencies = [ - "anyhow", - "err-derive", - "lazy_static", - "protobuf", - "protobuf-codegen", -] - -[[package]] -name = "try-lock" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" - -[[package]] -name = "unicase" -version = "2.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50f37be617794602aabbeee0be4f259dc1778fabe05e2d67ee8f79326d5cb4f6" -dependencies = [ - "version_check", -] - -[[package]] -name = "unicode-bidi" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a01404663e3db436ed2746d9fefef640d868edae3cceb81c3b8d5732fda678f" - -[[package]] -name = "unicode-ident" -version = "1.0.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b15811caf2415fb889178633e7724bad2509101cde276048e013b9def5e51fa0" - -[[package]] -name = "unicode-normalization" -version = "0.1.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d54590932941a9e9266f0832deed84ebe1bf2e4c9e4a3554d393d18f5e854bf9" -dependencies = [ - "tinyvec", -] - -[[package]] -name = "unicode-segmentation" -version = "1.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e8820f5d777f6224dc4be3632222971ac30164d4a258d595640799554ebfd99" - -[[package]] -name = "unicode-width" -version = "0.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ed742d4ea2bd1176e236172c8429aaf54486e7ac098db29ffe6529e0ce50973" - -[[package]] -name = "unicode-xid" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3" - -[[package]] -name = "untrusted" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" - -[[package]] -name = "url" -version = "2.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a507c383b2d33b5fc35d1861e77e6b383d158b2da5e14fe51b83dfedf6fd578c" -dependencies = [ - "form_urlencoded", - "idna", - "matches", - "percent-encoding", -] - -[[package]] -name = "uuid" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "feb41e78f93363bb2df8b0e86a2ca30eed7806ea16ea0c790d757cf93f79be83" -dependencies = [ - "serde", -] - -[[package]] -name = "vec_map" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" - -[[package]] -name = "veracruz-client" -version = "0.3.0" -dependencies = [ - "anyhow", - "bincode", - "env_logger", - "err-derive", - "hex", - "log", - "mbedtls", - "policy-utils", - "rand", - "serde_json", - "structopt", - "transport-protocol", - "veracruz-utils", -] - -[[package]] -name = "veracruz-server" -version = "0.3.0" -dependencies = [ - "anyhow", - "base64", - "bincode", - "data-encoding", - "env_logger", - "err-derive", - "hex", - "io-utils", - "lazy_static", - "log", - "nitro-enclave", - "nix", - "policy-utils", - "postcard", - "proxy-attestation-client", - "psa-attestation", - "rand", - "reqwest", - "serde", - "serde_json", - "signal-hook", - "structopt", - "tempfile", - "transport-protocol", - "uuid", - "veracruz-utils", -] - -[[package]] -name = "veracruz-utils" -version = "0.3.0" -dependencies = [ - "anyhow", - "bincode", - "chrono", - "err-derive", - "mbedtls", - "platform-services", - "serde", - "serde_json", - "uuid", -] - -[[package]] -name = "version_check" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" - -[[package]] -name = "want" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0" -dependencies = [ - "log", - "try-lock", -] - -[[package]] -name = "wasi" -version = "0.11.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" - -[[package]] -name = "wasi-types" -version = "0.1.6" -dependencies = [ - "bitflags", - "err-derive", - "num", - "num-derive", - "num-traits", - "serde", -] - -[[package]] -name = "wasm-bindgen" -version = "0.2.79" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25f1af7423d8588a3d840681122e72e6a24ddbcb3f0ec385cac0d12d24256c06" -dependencies = [ - "cfg-if", - "wasm-bindgen-macro", -] - -[[package]] -name = "wasm-bindgen-backend" -version = "0.2.79" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b21c0df030f5a177f3cba22e9bc4322695ec43e7257d865302900290bcdedca" -dependencies = [ - "bumpalo", - "lazy_static", - "log", - "proc-macro2", - "quote", - "syn 1.0.109", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-futures" -version = "0.4.29" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2eb6ec270a31b1d3c7e266b999739109abce8b6c87e4b31fcfcd788b65267395" -dependencies = [ - "cfg-if", - "js-sys", - "wasm-bindgen", - "web-sys", -] - -[[package]] -name = "wasm-bindgen-macro" -version = "0.2.79" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f4203d69e40a52ee523b2529a773d5ffc1dc0071801c87b3d270b471b80ed01" -dependencies = [ - "quote", - "wasm-bindgen-macro-support", -] - -[[package]] -name = "wasm-bindgen-macro-support" -version = "0.2.79" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa8a30d46208db204854cadbb5d4baf5fcf8071ba5bf48190c3e59937962ebc" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", - "wasm-bindgen-backend", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-shared" -version = "0.2.79" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d958d035c4438e28c70e4321a2911302f10135ce78a9c7834c0cab4123d06a2" - -[[package]] -name = "web-sys" -version = "0.3.56" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c060b319f29dd25724f09a2ba1418f142f539b2be99fbf4d2d5a8f7330afb8eb" -dependencies = [ - "js-sys", - "wasm-bindgen", -] - -[[package]] -name = "webpki" -version = "0.22.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f095d78192e208183081cc07bc5515ef55216397af48b873e5edcd72637fa1bd" -dependencies = [ - "ring", - "untrusted", -] - -[[package]] -name = "webpki-roots" -version = "0.22.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6c71e40d7d2c34a5106301fb632274ca37242cd0c9d3e64dbece371a40a2d87" -dependencies = [ - "webpki", -] - -[[package]] -name = "which" -version = "4.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c831fbbee9e129a8cf93e7747a82da9d95ba8e16621cae60ec2cdc849bacb7b" -dependencies = [ - "either", - "libc", - "once_cell", -] - -[[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-util" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" -dependencies = [ - "winapi", -] - -[[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 = "windows-sys" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" -dependencies = [ - "windows-targets", -] - -[[package]] -name = "windows-targets" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b1eb6f0cd7c80c79759c929114ef071b87354ce476d9d94271031c0497adfd5" -dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", -] - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" - -[[package]] -name = "windows_i686_gnu" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" - -[[package]] -name = "windows_i686_msvc" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" - -[[package]] -name = "winreg" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80d0f4e272c85def139476380b12f9ac60926689dd2e01d4923222f40580869d" -dependencies = [ - "winapi", -] - -[[package]] -name = "yansi-term" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe5c30ade05e61656247b2e334a031dfd0cc466fadef865bdcdea8d537951bf1" -dependencies = [ - "winapi", -] - -[[package]] -name = "yasna" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e17bb3549cc1321ae1296b9cdc2698e2b6cb1992adfa19a8c72e5b7a738f44cd" -dependencies = [ - "bit-vec", - "num-bigint", -] - -[[package]] -name = "zeroize" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a0956f1ba7c7909bfb66c2e9e4124ab6f6482560f6628b5aaeba39207c9aad9" diff --git a/workspaces/icecap-host/Cargo.toml b/workspaces/icecap-host/Cargo.toml deleted file mode 100644 index 890952b10..000000000 --- a/workspaces/icecap-host/Cargo.toml +++ /dev/null @@ -1,33 +0,0 @@ -# workspaces/icecap-host/Cargo.toml: -# Workspace for untrusted IceCap services and tests -# -# AUTHORS -# -# The Veracruz Development Team. -# -# COPYRIGHT -# -# See the `LICENSE_MIT.markdown` file in the Veracruz root director for licensing -# and copyright information. - -cargo-features = ["resolver"] - -[workspace] -exclude = [ - "crates/linux-veracruz-server", - "crates/nitro-veracruz-server", - "crates/third-party/rust-mbedtls", - "crates/third-party/wasmi", -] -members = [ - "crates/tests", - "crates/veracruz-client", - "crates/veracruz-server", - "src/icecap-host", -] -resolver = "2" - -[profile.release] -codegen-units = 1 -lto = true -opt-level = 3 diff --git a/workspaces/icecap-host/Makefile b/workspaces/icecap-host/Makefile deleted file mode 100644 index ecd1704bd..000000000 --- a/workspaces/icecap-host/Makefile +++ /dev/null @@ -1,119 +0,0 @@ -# Makefile -# -# AUTHORS -# -# The Veracruz Development Team. -# -# COPYRIGHT AND LICENSING -# -# See the `LICENSING.markdown` file in the Veracruz root directory for -# licensing and copyright information. - -.PHONY: all build build-tests build-veracruz-server-test clean \ - clean-cargo-lock clippy default doc fmt icecap-runtime \ - test-client test-dependencies test-server tests veracruz-test - -default: build - -tests: test-server test-client veracruz-test - -icecap_plat ?= qemu - -WORKSPACE_DIR = $(abspath ..) -OUT_DIR ?= $(abspath test-collateral) -MEASUREMENT_FILE = $(abspath ../icecap-runtime/css-icecap.bin) -MEASUREMENT_PARAMETER = --css-file $(MEASUREMENT_FILE) - -include $(WORKSPACE_DIR)/common.mk -include $(WORKSPACE_DIR)/shared.mk - -# NOTE this file must define: -# variables: -# - host_feature_flags -# rules: -# - rustup-plat -include mk/$(icecap_plat).mk - -VERACRUZ_ICECAP_QEMU_IMAGE = $(WORKSPACE_DIR)/icecap-runtime/build/$(icecap_plat)/disposable/cmake/elfloader/build/elfloader - -BUILD_PARAMETERS = VERACRUZ_ICECAP_QEMU_IMAGE=$(VERACRUZ_ICECAP_QEMU_IMAGE) -TEST_PARAMETERS = VERACRUZ_ICECAP_QEMU_IMAGE=$(VERACRUZ_ICECAP_QEMU_IMAGE) \ - VERACRUZ_POLICY_DIR=$(OUT_DIR) \ - VERACRUZ_TRUST_DIR=$(OUT_DIR) \ - VERACRUZ_PROGRAM_DIR=$(OUT_DIR) \ - VERACRUZ_DATA_DIR=$(OUT_DIR) - -CLIPPY_OPTIONS = --no-deps -A clippy::type_complexity -A clippy::module_inception -D warnings - -all: build test-collateral - -build: rustup-plat icecap-runtime - $(COMPILERS) $(BUILD_PARAMETERS) \ - cargo build $(PROFILE_FLAG) $(host_feature_flags) $(V_FLAG) - -build-veracruz-server-test: rustup-plat icecap-runtime - $(COMPILERS) $(BUILD_PARAMETERS) \ - cargo test --no-run $(PROFILE_FLAG) \ - $(host_feature_flags) \ - $(V_FLAG) - cp $$( \ - $(COMPILERS) $(BUILD_PARAMETERS) \ - cargo test --no-run $(PROFILE_FLAG) \ - $(host_feature_flags) \ - $(V_FLAG) \ - --message-format=json | jq -r '.executable | select(.)' \ - ) target/release/veracruz-server-test - -measurement-file: icecap-runtime - -icecap-runtime: - $(MAKE) -C ../icecap-runtime elfloader css-icecap.bin ICECAP_PLAT=$(icecap_plat) - -test-dependencies: test-collateral icecap-runtime - -CARGO_TEST = $(COMPILERS) $(TEST_PARAMETERS) cargo test $(PROFILE_FLAG) - -build-tests: - $(CARGO_TEST) --no-run - -test-server: test-dependencies build-tests - $(CARGO_TEST) --test server_test -- --test-threads=1 --nocapture - -test-client: test-dependencies - $(CARGO_TEST) -p veracruz-client --lib -- --test-threads=1 - -veracruz-test: test-dependencies build-tests - $(CARGO_TEST) --test integration_test -- --test-threads=1 - -doc: - cargo doc - -fmt: - cargo fmt - -clippy: rustup-plat icecap-runtime - # workspace members and relevant dependencies - $(BUILD_PARAMETERS) $(COMPILERS) \ - cargo clippy $(PROFILE_FLAG) \ - -p veracruz-client \ - -p veracruz-server -p io-utils -p transport-protocol \ - -p psa-attestation -p veracruz-utils \ - --features veracruz-client/icecap \ - --features veracruz-server/icecap \ - --features transport-protocol/icecap \ - --features io-utils/icecap \ - --features psa-attestation/icecap \ - --features veracruz-utils/icecap \ - -- $(CLIPPY_OPTIONS) - # workspace testing crates - $(COMPILERS) $(TEST_PARAMETERS) cargo clippy --tests \ - $(PROFILE_FLAG) -p tests \ - --features tests/icecap \ - -- $(CLIPPY_OPTIONS) - -clean: - cargo clean - rm -rf $(OUT_DIR) - -clean-cargo-lock: - rm -f Cargo.lock diff --git a/workspaces/icecap-host/crates b/workspaces/icecap-host/crates deleted file mode 120000 index c25bddb6d..000000000 --- a/workspaces/icecap-host/crates +++ /dev/null @@ -1 +0,0 @@ -../.. \ No newline at end of file diff --git a/workspaces/icecap-host/icecap b/workspaces/icecap-host/icecap deleted file mode 120000 index 952a0defd..000000000 --- a/workspaces/icecap-host/icecap +++ /dev/null @@ -1 +0,0 @@ -../../icecap/icecap \ No newline at end of file diff --git a/workspaces/icecap-host/mk/lkvm.mk b/workspaces/icecap-host/mk/lkvm.mk deleted file mode 100644 index e0110b765..000000000 --- a/workspaces/icecap-host/mk/lkvm.mk +++ /dev/null @@ -1,18 +0,0 @@ -# AUTHORS -# -# The Veracruz Development Team. -# -# COPYRIGHT -# -# See the `LICENSE.markdown` file in the Veracruz root directory for licensing -# and copyright information. - - -host_feature_flags := --features icecap-lkvm --target aarch64-unknown-linux-gnu - -COMPILERS = CC_aarch64_unknown_linux_gnu=aarch64-linux-gnu-gcc \ - RUSTFLAGS="-C linker=aarch64-linux-gnu-gcc -C target-feature=+crt-static" - -.PHONY: rustup-plat -rustup-plat: - rustup target add aarch64-unknown-linux-gnu diff --git a/workspaces/icecap-host/mk/qemu.mk b/workspaces/icecap-host/mk/qemu.mk deleted file mode 100644 index 9f7d5ab55..000000000 --- a/workspaces/icecap-host/mk/qemu.mk +++ /dev/null @@ -1,14 +0,0 @@ -# AUTHORS -# -# The Veracruz Development Team. -# -# COPYRIGHT -# -# See the `LICENSE.markdown` file in the Veracruz root directory for licensing -# and copyright information. - -host_feature_flags := --features icecap-qemu - -.PHONY: rustup-plat - -rustup-plat: diff --git a/workspaces/icecap-host/src/icecap-host/Cargo.toml b/workspaces/icecap-host/src/icecap-host/Cargo.toml deleted file mode 100644 index 9a38c7c36..000000000 --- a/workspaces/icecap-host/src/icecap-host/Cargo.toml +++ /dev/null @@ -1,12 +0,0 @@ -[package] -authors = ["The Veracruz Development Team"] -description = "A dummy package" -edition = "2018" -name = "linux-host" -version = "0.3.0" - -[dependencies] -policy-utils = { path = "../../crates/policy-utils", features = [ "icecap" ] } -tests = { path = "../../crates/tests", features = [ "icecap" ] } -veracruz-client = { path = "../../crates/veracruz-client", features = [ "icecap", "cli" ] } -veracruz-server = { path = "../../crates/veracruz-server", features = [ "icecap", "cli" ] } diff --git a/workspaces/icecap-host/src/icecap-host/src/lib.rs b/workspaces/icecap-host/src/icecap-host/src/lib.rs deleted file mode 100644 index 588528900..000000000 --- a/workspaces/icecap-host/src/icecap-host/src/lib.rs +++ /dev/null @@ -1 +0,0 @@ -// Intentionally empty diff --git a/workspaces/icecap-host/test.mk b/workspaces/icecap-host/test.mk deleted file mode 100644 index d15a16d73..000000000 --- a/workspaces/icecap-host/test.mk +++ /dev/null @@ -1,16 +0,0 @@ -OUT_DIR ?= $(abspath test-collateral) -WORKSPACE_DIR = $(abspath ..) -MEASUREMENT_FILE = $(abspath css-icecap.bin) -MEASUREMENT_PARAMETER = --css-file $(MEASUREMENT_FILE) - -include $(WORKSPACE_DIR)/common.mk -include $(WORKSPACE_DIR)/shared.mk - -.PHONY: clean - -$(MEASUREMENT_FILE): - touch $@ - -clean: - rm -rf $(OUT_DIR) - rm -f css-icecap.bin diff --git a/workspaces/icecap-runtime/.gitignore b/workspaces/icecap-runtime/.gitignore deleted file mode 100644 index 250fc5254..000000000 --- a/workspaces/icecap-runtime/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -/cdl/__pycache__ -build/* -firmware_start -t/* diff --git a/workspaces/icecap-runtime/Cargo.lock b/workspaces/icecap-runtime/Cargo.lock deleted file mode 100644 index 0ea1c8195..000000000 --- a/workspaces/icecap-runtime/Cargo.lock +++ /dev/null @@ -1,2011 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -version = 3 - -[[package]] -name = "absurdity" -version = "0.1.0" - -[[package]] -name = "aho-corasick" -version = "0.7.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc936419f96fa211c1b9166887b38e5e40b19958e5b895be7c1f93adec7071ac" -dependencies = [ - "memchr", -] - -[[package]] -name = "annotate-snippets" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3b9d411ecbaf79885c6df4d75fff75858d5995ff25385657a28af47e82f9c36" -dependencies = [ - "unicode-width", - "yansi-term", -] - -[[package]] -name = "ansi_term" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2" -dependencies = [ - "winapi", -] - -[[package]] -name = "anyhow" -version = "1.0.58" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb07d2053ccdbe10e2af2995a2f116c1330396493dc1269f6a91d0ae82e19704" - -[[package]] -name = "ascii-canvas" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8824ecca2e851cec16968d54a01dd372ef8f95b244fb84b84e70128be347c3c6" -dependencies = [ - "term", -] - -[[package]] -name = "atomic-polyfill" -version = "0.1.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3ff7eb3f316534d83a8a2c3d1674ace8a5a71198eba31e2e2b597833f699b28" -dependencies = [ - "critical-section", -] - -[[package]] -name = "atty" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" -dependencies = [ - "hermit-abi 0.1.19", - "libc", - "winapi", -] - -[[package]] -name = "autocfg" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" - -[[package]] -name = "aws-nitro-enclaves-nsm-api" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17e83ef53714474149215e48438d2cf8f96fb76ae5a00f21f16051fab79c0627" -dependencies = [ - "libc", - "log", - "nix", - "serde", - "serde_bytes", - "serde_cbor", -] - -[[package]] -name = "bincode" -version = "1.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" -dependencies = [ - "serde", -] - -[[package]] -name = "bindgen" -version = "0.59.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bd2a9a458e8f4304c52c43ebb0cfbd520289f8379a52e329a38afda99bf8eb8" -dependencies = [ - "bitflags", - "cexpr", - "clang-sys", - "clap", - "env_logger", - "lazy_static", - "lazycell", - "log", - "peeking_take_while", - "proc-macro2", - "quote", - "regex", - "rustc-hash", - "shlex", - "which", -] - -[[package]] -name = "bindgen" -version = "0.65.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfdf7b466f9a4903edc73f95d6d2bcd5baf8ae620638762244d3f60143643cc5" -dependencies = [ - "annotate-snippets", - "bitflags", - "cexpr", - "clang-sys", - "lazy_static", - "lazycell", - "log", - "peeking_take_while", - "prettyplease", - "proc-macro2", - "quote", - "regex", - "rustc-hash", - "shlex", - "syn 2.0.18", - "which", -] - -[[package]] -name = "bit-set" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1" -dependencies = [ - "bit-vec", -] - -[[package]] -name = "bit-vec" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" - -[[package]] -name = "bitflags" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" - -[[package]] -name = "byteorder" -version = "1.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" - -[[package]] -name = "cc" -version = "1.0.73" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fff2a6927b3bb87f9595d67196a70493f627687a71d87a0d692242c33f58c11" - -[[package]] -name = "cexpr" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" -dependencies = [ - "nom", -] - -[[package]] -name = "cfg-if" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" - -[[package]] -name = "chrono" -version = "0.4.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "670ad68c9088c2a963aaa298cb369688cf3f9465ce5e2d4ca10e6e0098a1ce73" -dependencies = [ - "libc", - "num-integer", - "num-traits", - "winapi", -] - -[[package]] -name = "clang-sys" -version = "1.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c688fc74432808e3eb684cae8830a86be1d66a2bd58e1f248ed0960a590baf6f" -dependencies = [ - "glob", - "libc", - "libloading", -] - -[[package]] -name = "clap" -version = "2.34.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0610544180c38b88101fecf2dd634b174a62eef6946f84dfc6a7127512b381c" -dependencies = [ - "ansi_term", - "atty", - "bitflags", - "strsim", - "textwrap", - "unicode-width", - "vec_map", -] - -[[package]] -name = "cmake" -version = "0.1.50" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a31c789563b815f77f4250caee12365734369f942439b7defd71e18a48197130" -dependencies = [ - "cc", -] - -[[package]] -name = "cobs" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67ba02a97a2bd10f4b59b25c7973101c79642302776489e030cd13cdab09ed15" - -[[package]] -name = "compiler_builtins" -version = "0.1.70" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80873f979f0a344a4ade87c2f70d9ccf5720b83b10c97ec7cd745895d021e85a" -dependencies = [ - "rustc-std-workspace-core", -] - -[[package]] -name = "critical-section" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6548a0ad5d2549e111e1f6a11a6c2e2d00ce6a3dafe22948d67c2b443f775e52" - -[[package]] -name = "crunchy" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" - -[[package]] -name = "ctor" -version = "0.1.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fbaabec2c953050352311293be5c6aba8e141ba19d6811862b232d6fd020484" -dependencies = [ - "quote", - "syn 1.0.104", -] - -[[package]] -name = "diff" -version = "0.1.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56254986775e3233ffa9c4d7d3faaf6d36a2c09d30b20687e9f88bc8bafc16c8" - -[[package]] -name = "dirs-next" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b98cf8ebf19c3d1b223e151f99a4f9f0690dca41414773390fc824184ac833e1" -dependencies = [ - "cfg-if", - "dirs-sys-next", -] - -[[package]] -name = "dirs-sys-next" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d" -dependencies = [ - "libc", - "redox_users", - "winapi", -] - -[[package]] -name = "downcast-rs" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ea835d29036a4087793836fa931b08837ad5e957da9e23886b29586fb9b6650" - -[[package]] -name = "either" -version = "1.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457" - -[[package]] -name = "ena" -version = "0.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7402b94a93c24e742487327a7cd839dc9d36fec9de9fb25b09f2dae459f36c3" -dependencies = [ - "log", -] - -[[package]] -name = "env_logger" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a12e6657c4c97ebab115a42dcee77225f7f482cdd841cf7088c657a42e9e00e7" -dependencies = [ - "atty", - "humantime", - "log", - "regex", - "termcolor", -] - -[[package]] -name = "erased-serde" -version = "0.3.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56047058e1ab118075ca22f9ecd737bcc961aa3566a3019cb71388afa280bd8a" -dependencies = [ - "serde", -] - -[[package]] -name = "err-derive" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22deed3a8124cff5fa835713fa105621e43bbdc46690c3a6b68328a012d350d4" -dependencies = [ - "proc-macro-error", - "proc-macro2", - "quote", - "rustversion", - "syn 1.0.104", - "synstructure", -] - -[[package]] -name = "errno" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bcfec3a70f97c962c307b2d2c56e358cf1d00b558d74262b5f929ee8cc7e73a" -dependencies = [ - "errno-dragonfly", - "libc", - "windows-sys", -] - -[[package]] -name = "errno-dragonfly" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf" -dependencies = [ - "cc", - "libc", -] - -[[package]] -name = "execution-engine" -version = "0.3.0" -dependencies = [ - "anyhow", - "byteorder", - "cfg-if", - "ctor", - "err-derive", - "lazy_static", - "log", - "mbedtls", - "num", - "num-derive", - "num-traits", - "platform-services", - "policy-utils", - "postcard", - "serde", - "serde_json", - "strum", - "strum_macros", - "typetag", - "wasi-types", - "wasmi", -] - -[[package]] -name = "fastrand" -version = "1.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3fcf0cee53519c866c09b5de1f6c56ff9d647101f81c1964fa632e148896cdf" -dependencies = [ - "instant", -] - -[[package]] -name = "fixedbitset" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" - -[[package]] -name = "getrandom" -version = "0.2.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c05aeb6a22b8f62540c194aac980f2115af067bfe15a0734d7277a768d396b31" -dependencies = [ - "cfg-if", - "libc", - "wasi", -] - -[[package]] -name = "ghost" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41973d4c45f7a35af8753ba3457cc99d406d863941fd7f52663cff54a5ab99b3" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.104", -] - -[[package]] -name = "gimli" -version = "0.26.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78cc372d058dcf6d5ecd98510e7fbc9e5aec4d21de70f65fea8fecebcd881bd4" - -[[package]] -name = "glob" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574" - -[[package]] -name = "half" -version = "1.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62aca2aba2d62b4a7f5b33f3712cb1b0692779a56fb510499d5c0aa594daeaf3" - -[[package]] -name = "hash32" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0c35f58762feb77d74ebe43bdbc3210f09be9fe6742234d573bacc26ed92b67" -dependencies = [ - "byteorder", -] - -[[package]] -name = "hashbrown" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" - -[[package]] -name = "heapless" -version = "0.7.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d076121838e03f862871315477528debffdb7462fb229216ecef91b1a3eb31eb" -dependencies = [ - "atomic-polyfill", - "hash32", - "serde", - "spin 0.9.8", - "stable_deref_trait", -] - -[[package]] -name = "heck" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2540771e65fc8cb83cd6e8a237f70c319bd5c29f78ed1084ba5d50eeac86f7f9" - -[[package]] -name = "hermit-abi" -version = "0.1.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" -dependencies = [ - "libc", -] - -[[package]] -name = "hermit-abi" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fed44880c466736ef9a5c5b5facefb5ed0785676d0c02d612db14e54f0d84286" - -[[package]] -name = "hex" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" - -[[package]] -name = "humantime" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" - -[[package]] -name = "icecap-backtrace" -version = "0.1.0" -dependencies = [ - "icecap-backtrace-collect", - "icecap-backtrace-types", - "icecap-runtime", -] - -[[package]] -name = "icecap-backtrace-collect" -version = "0.1.0" -dependencies = [ - "cfg-if", - "icecap-backtrace-types", - "icecap-sel4", - "log", - "unwinding", -] - -[[package]] -name = "icecap-backtrace-types" -version = "0.1.0" -dependencies = [ - "hex", - "postcard", - "serde", -] - -[[package]] -name = "icecap-config" -version = "0.1.0" -dependencies = [ - "icecap-config-sys", - "serde", -] - -[[package]] -name = "icecap-config-sys" -version = "0.1.0" -dependencies = [ - "icecap-runtime", - "icecap-sel4", - "serde", -] - -[[package]] -name = "icecap-core" -version = "0.1.0" -dependencies = [ - "icecap-backtrace", - "icecap-config", - "icecap-failure", - "icecap-logger", - "icecap-ring-buffer", - "icecap-rpc", - "icecap-runtime", - "icecap-sel4", - "icecap-start", - "icecap-sync", -] - -[[package]] -name = "icecap-driver-interfaces" -version = "0.1.0" -dependencies = [ - "icecap-core", -] - -[[package]] -name = "icecap-failure" -version = "0.1.0" -dependencies = [ - "cfg-if", - "icecap-backtrace", - "icecap-failure-derive", - "icecap-sel4", - "log", -] - -[[package]] -name = "icecap-failure-derive" -version = "0.1.0" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.104", - "synstructure", -] - -[[package]] -name = "icecap-logger" -version = "0.1.0" -dependencies = [ - "log", -] - -[[package]] -name = "icecap-pl011-driver" -version = "0.1.0" -dependencies = [ - "icecap-core", - "icecap-driver-interfaces", - "tock-registers", -] - -[[package]] -name = "icecap-ring-buffer" -version = "0.1.0" -dependencies = [ - "icecap-config", - "icecap-sel4", - "log", - "tock-registers", -] - -[[package]] -name = "icecap-rpc" -version = "0.1.0" -dependencies = [ - "icecap-rpc-types", - "icecap-sel4", -] - -[[package]] -name = "icecap-rpc-types" -version = "0.1.0" -dependencies = [ - "postcard", - "serde", -] - -[[package]] -name = "icecap-runtime" -version = "0.1.0" -dependencies = [ - "compiler_builtins", - "icecap-sel4", - "rustc-std-workspace-alloc", - "rustc-std-workspace-core", - "serde", -] - -[[package]] -name = "icecap-runtime-manager" -version = "0.3.0" -dependencies = [ - "anyhow", - "bincode", - "icecap-core", - "icecap-ring-buffer", - "icecap-rpc", - "icecap-start-generic", - "icecap-std-external", - "libm", - "psa-attestation", - "runtime-manager", - "serde", - "serde_json", - "veracruz-utils", -] - -[[package]] -name = "icecap-sel4" -version = "0.1.0" -dependencies = [ - "compiler_builtins", - "icecap-sel4-derive", - "icecap-sel4-sys", - "rustc-std-workspace-alloc", - "rustc-std-workspace-core", - "serde", -] - -[[package]] -name = "icecap-sel4-derive" -version = "0.1.0" -dependencies = [ - "quote", - "syn 2.0.18", -] - -[[package]] -name = "icecap-sel4-sys" -version = "0.1.0" -dependencies = [ - "absurdity", - "bindgen 0.59.2", - "compiler_builtins", - "rustc-std-workspace-core", -] - -[[package]] -name = "icecap-start" -version = "0.1.0" -dependencies = [ - "icecap-failure", - "icecap-runtime", - "icecap-sel4", - "postcard", - "serde", -] - -[[package]] -name = "icecap-start-generic" -version = "0.1.0" -dependencies = [ - "icecap-failure", - "icecap-runtime", - "icecap-sel4", - "icecap-start", - "log", - "postcard", - "serde", - "serde_json", -] - -[[package]] -name = "icecap-std-external" -version = "0.1.0" -dependencies = [ - "icecap-core", - "log", -] - -[[package]] -name = "icecap-sync" -version = "0.1.0" -dependencies = [ - "compiler_builtins", - "icecap-sel4", - "rustc-std-workspace-alloc", - "rustc-std-workspace-core", -] - -[[package]] -name = "indexmap" -version = "1.9.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1885e79c1fc4b10f0e172c475f458b7f7b93061064d98c3293e98c5ba0c8b399" -dependencies = [ - "autocfg", - "hashbrown", -] - -[[package]] -name = "instant" -version = "0.1.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "inventory" -version = "0.1.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0eb5160c60ba1e809707918ee329adb99d222888155835c6feedba19f6c3fd4" -dependencies = [ - "ctor", - "ghost", - "inventory-impl", -] - -[[package]] -name = "inventory-impl" -version = "0.1.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e41b53715c6f0c4be49510bb82dee2c1e51c8586d885abe65396e82ed518548" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.104", -] - -[[package]] -name = "io-lifetimes" -version = "1.0.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" -dependencies = [ - "hermit-abi 0.3.1", - "libc", - "windows-sys", -] - -[[package]] -name = "itertools" -version = "0.10.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9a9d19fa1e79b6215ff29b9d6880b706147f16e9b1dbb1e4e5947b5b02bc5e3" -dependencies = [ - "either", -] - -[[package]] -name = "itoa" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1aab8fc367588b89dcee83ab0fd66b72b50b72fa1904d7095045ace2b0c81c35" - -[[package]] -name = "lalrpop" -version = "0.19.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b30455341b0e18f276fa64540aff54deafb54c589de6aca68659c63dd2d5d823" -dependencies = [ - "ascii-canvas", - "atty", - "bit-set", - "diff", - "ena", - "itertools", - "lalrpop-util", - "petgraph", - "pico-args", - "regex", - "regex-syntax", - "string_cache", - "term", - "tiny-keccak", - "unicode-xid", -] - -[[package]] -name = "lalrpop-util" -version = "0.19.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcf796c978e9b4d983414f4caedc9273aa33ee214c5b887bd55fde84c85d2dc4" -dependencies = [ - "regex", -] - -[[package]] -name = "lazy_static" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" -dependencies = [ - "spin 0.5.2", -] - -[[package]] -name = "lazycell" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" - -[[package]] -name = "lexical-core" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92912c4af2e7d9075be3e5e3122c4d7263855fa6cce34fbece4dd08e5884624d" -dependencies = [ - "lexical-util", -] - -[[package]] -name = "lexical-util" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c72a9d52c5c4e62fa2cdc2cb6c694a39ae1382d9c2a17a466f18e272a0930eb1" -dependencies = [ - "static_assertions", -] - -[[package]] -name = "libc" -version = "0.2.144" - -[[package]] -name = "libloading" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "efbc0f03f9a775e9f6aed295c6a1ba2253c5757a9e03d55c6caa46a681abcddd" -dependencies = [ - "cfg-if", - "winapi", -] - -[[package]] -name = "libm" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33a33a362ce288760ec6a508b94caaec573ae7d3bbbd91b87aa0bad4456839db" - -[[package]] -name = "linux-raw-sys" -version = "0.3.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" - -[[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 = "mbedtls" -version = "0.10.0" -dependencies = [ - "bitflags", - "byteorder", - "cc", - "cfg-if", - "mbedtls-platform-support", - "mbedtls-sys-auto", - "rs-libc", - "serde", - "serde_derive", - "yasna", -] - -[[package]] -name = "mbedtls-platform-support" -version = "0.2.0" -dependencies = [ - "cc", - "cfg-if", - "chrono", - "mbedtls-sys-auto", - "once_cell", - "zeroize", -] - -[[package]] -name = "mbedtls-sys-auto" -version = "3.4.0" -dependencies = [ - "bindgen 0.65.1", - "cc", - "cfg-if", - "cmake", - "lazy_static", - "libc", - "quote", - "syn 1.0.104", -] - -[[package]] -name = "memchr" -version = "2.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "308cc39be01b73d0d18f82a0e7b2a3df85245f84af96fdddc5d202d27e47b86a" - -[[package]] -name = "memoffset" -version = "0.6.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce" -dependencies = [ - "autocfg", -] - -[[package]] -name = "memory_units" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8452105ba047068f40ff7093dd1d9da90898e63dd61736462e9cdda6a90ad3c3" - -[[package]] -name = "minimal-lexical" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" - -[[package]] -name = "new_debug_unreachable" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4a24736216ec316047a1fc4252e27dabb04218aa4a3f37c6e7ddbf1f9782b54" - -[[package]] -name = "nix" -version = "0.20.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5e06129fb611568ef4e868c14b326274959aa70ff7776e9d55323531c374945" -dependencies = [ - "bitflags", - "cc", - "cfg-if", - "libc", - "memoffset", -] - -[[package]] -name = "nom" -version = "7.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b1d11e1ef389c76fe5b81bcaf2ea32cf88b62bc494e19f493d0b30e7a930109" -dependencies = [ - "memchr", - "minimal-lexical", - "version_check", -] - -[[package]] -name = "num" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43db66d1170d347f9a065114077f7dccb00c1b9478c89384490a3425279a4606" -dependencies = [ - "num-bigint", - "num-complex", - "num-integer", - "num-iter", - "num-rational", - "num-traits", -] - -[[package]] -name = "num-bigint" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f93ab6289c7b344a8a9f60f88d80aa20032336fe78da341afc91c8a2341fc75f" -dependencies = [ - "autocfg", - "num-integer", - "num-traits", -] - -[[package]] -name = "num-complex" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26873667bbbb7c5182d4a37c1add32cdf09f841af72da53318fdb81543c15085" -dependencies = [ - "num-traits", -] - -[[package]] -name = "num-derive" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "876a53fff98e03a936a674b29568b0e605f06b29372c2489ff4de23f1949743d" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.104", -] - -[[package]] -name = "num-integer" -version = "0.1.44" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2cc698a63b549a70bc047073d2949cce27cd1c7b0a4a862d08a8031bc2801db" -dependencies = [ - "autocfg", - "num-traits", -] - -[[package]] -name = "num-iter" -version = "0.1.42" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2021c8337a54d21aca0d59a92577a029af9431cb59b909b03252b9c164fad59" -dependencies = [ - "autocfg", - "num-integer", - "num-traits", -] - -[[package]] -name = "num-rational" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d41702bd167c2df5520b384281bc111a4b5efcf7fbc4c9c222c815b07e0a6a6a" -dependencies = [ - "autocfg", - "num-bigint", - "num-integer", - "num-traits", -] - -[[package]] -name = "num-traits" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a64b1ec5cda2586e284722486d802acf1f7dbdc623e2bfc57e65ca1cd099290" -dependencies = [ - "autocfg", -] - -[[package]] -name = "once_cell" -version = "1.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" - -[[package]] -name = "parity-wasm" -version = "0.45.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1ad0aff30c1da14b1254fcb2af73e1fa9a28670e584a626f53a369d0e157304" - -[[package]] -name = "peeking_take_while" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099" - -[[package]] -name = "petgraph" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6d5014253a1331579ce62aa67443b4a658c5e7dd03d4bc6d302b94474888143" -dependencies = [ - "fixedbitset", - "indexmap", -] - -[[package]] -name = "phf_shared" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c00cf8b9eafe68dde5e9eaa2cef8ee84a9336a47d566ec55ca16589633b65af7" -dependencies = [ - "siphasher", -] - -[[package]] -name = "pico-args" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db8bcd96cb740d03149cbad5518db9fd87126a10ab519c011893b1754134c468" - -[[package]] -name = "platform-services" -version = "0.3.0" -dependencies = [ - "aws-nitro-enclaves-nsm-api", - "getrandom", - "nix", -] - -[[package]] -name = "policy-utils" -version = "0.3.0" -dependencies = [ - "anyhow", - "err-derive", - "hex", - "lalrpop", - "lalrpop-util", - "lexical-core", - "mbedtls", - "regex", - "serde", - "serde_json", - "veracruz-utils", - "wasi-types", -] - -[[package]] -name = "postcard" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfa512cd0d087cc9f99ad30a1bf64795b67871edbead083ffc3a4dfafa59aa00" -dependencies = [ - "cobs", - "heapless", - "serde", -] - -[[package]] -name = "precomputed-hash" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" - -[[package]] -name = "prettyplease" -version = "0.2.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9825a04601d60621feed79c4e6b56d65db77cdca55cef43b46b0de1096d1c282" -dependencies = [ - "proc-macro2", - "syn 2.0.18", -] - -[[package]] -name = "proc-macro-error" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" -dependencies = [ - "proc-macro-error-attr", - "proc-macro2", - "quote", - "syn 1.0.104", - "version_check", -] - -[[package]] -name = "proc-macro-error-attr" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" -dependencies = [ - "proc-macro2", - "quote", - "version_check", -] - -[[package]] -name = "proc-macro2" -version = "1.0.60" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dec2b086b7a862cf4de201096214fa870344cf922b2b30c167badb3af3195406" -dependencies = [ - "unicode-ident", -] - -[[package]] -name = "protobuf" -version = "3.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b55bad9126f378a853655831eb7363b7b01b81d19f8cb1218861086ca4a1a61e" -dependencies = [ - "once_cell", - "protobuf-support", - "thiserror", -] - -[[package]] -name = "protobuf-codegen" -version = "3.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0dd418ac3c91caa4032d37cb80ff0d44e2ebe637b2fb243b6234bf89cdac4901" -dependencies = [ - "anyhow", - "once_cell", - "protobuf", - "protobuf-parse", - "regex", - "tempfile", - "thiserror", -] - -[[package]] -name = "protobuf-parse" -version = "3.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d39b14605eaa1f6a340aec7f320b34064feb26c93aec35d6a9a2272a8ddfa49" -dependencies = [ - "anyhow", - "indexmap", - "log", - "protobuf", - "protobuf-support", - "tempfile", - "thiserror", - "which", -] - -[[package]] -name = "protobuf-support" -version = "3.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5d4d7b8601c814cfb36bcebb79f0e61e45e1e93640cf778837833bbed05c372" -dependencies = [ - "thiserror", -] - -[[package]] -name = "psa-attestation" -version = "0.3.0" -dependencies = [ - "bindgen 0.59.2", - "cfg-if", - "libc", - "mbedtls-sys-auto", -] - -[[package]] -name = "quote" -version = "1.0.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b9ab9c7eadfd8df19006f1cf1a4aed13540ed5cbc047010ece5826e10825488" -dependencies = [ - "proc-macro2", -] - -[[package]] -name = "redox_syscall" -version = "0.2.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8380fe0152551244f0747b1bf41737e0f8a74f97a14ccefd1148187271634f3c" -dependencies = [ - "bitflags", -] - -[[package]] -name = "redox_syscall" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" -dependencies = [ - "bitflags", -] - -[[package]] -name = "redox_users" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "528532f3d801c87aec9def2add9ca802fe569e44a544afe633765267840abe64" -dependencies = [ - "getrandom", - "redox_syscall 0.2.11", -] - -[[package]] -name = "regex" -version = "1.5.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a11647b6b25ff05a515cb92c365cec08801e83423a235b51e231e1808747286" -dependencies = [ - "aho-corasick", - "memchr", - "regex-syntax", -] - -[[package]] -name = "regex-syntax" -version = "0.6.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f497285884f3fcff424ffc933e56d7cbca511def0c9831a7f9b5f6153e3cc89b" - -[[package]] -name = "rs-libc" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "683e8c8e8aac6ffa4b2287bac3c69575d5346accac4f218ae1e084303bb174ca" -dependencies = [ - "cc", - "zeroize", -] - -[[package]] -name = "runtime-manager" -version = "0.3.0" -dependencies = [ - "anyhow", - "bincode", - "err-derive", - "execution-engine", - "hex", - "lazy_static", - "log", - "policy-utils", - "protobuf", - "psa-attestation", - "serde", - "serde_json", - "session-manager", - "transport-protocol", - "uuid", - "veracruz-utils", - "wasi-types", -] - -[[package]] -name = "rustc-hash" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" - -[[package]] -name = "rustc-std-workspace-alloc" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff66d57013a5686e1917ed6a025d54dd591fcda71a41fe07edf4d16726aefa86" - -[[package]] -name = "rustc-std-workspace-core" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1956f5517128a2b6f23ab2dadf1a976f4f5b27962e7724c2bf3d45e539ec098c" - -[[package]] -name = "rustix" -version = "0.37.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f79bef90eb6d984c72722595b5b1348ab39275a5e5123faca6863bf07d75a4e0" -dependencies = [ - "bitflags", - "errno", - "io-lifetimes", - "libc", - "linux-raw-sys", - "windows-sys", -] - -[[package]] -name = "rustversion" -version = "1.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2cc38e8fa666e2de3c4aba7edeb5ffc5246c1c2ed0e3d17e560aeeba736b23f" - -[[package]] -name = "ryu" -version = "1.0.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73b4b750c782965c211b42f022f59af1fbceabdd026623714f104152f1ec149f" - -[[package]] -name = "scopeguard" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" - -[[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_bytes" -version = "0.11.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "416bda436f9aab92e02c8e10d49a15ddd339cea90b6e340fe51ed97abb548294" -dependencies = [ - "serde", -] - -[[package]] -name = "serde_cbor" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bef2ebfde456fb76bbcf9f59315333decc4fda0b2b44b420243c11e0f5ec1f5" -dependencies = [ - "half", - "serde", -] - -[[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 1.0.104", -] - -[[package]] -name = "serde_json" -version = "1.0.80" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f972498cf015f7c0746cac89ebe1d6ef10c293b94175a243a2d9442c163d9944" -dependencies = [ - "itoa", - "ryu", - "serde", -] - -[[package]] -name = "session-manager" -version = "0.3.0" -dependencies = [ - "anyhow", - "err-derive", - "mbedtls", - "platform-services", - "policy-utils", - "veracruz-utils", -] - -[[package]] -name = "shlex" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43b2853a4d09f215c24cc5489c992ce46052d359b5109343cbafbf26bc62f8a3" - -[[package]] -name = "siphasher" -version = "0.3.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7bd3e3206899af3f8b12af284fafc038cc1dc2b41d1b89dd17297221c5d225de" - -[[package]] -name = "spin" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" - -[[package]] -name = "spin" -version = "0.9.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" -dependencies = [ - "lock_api", -] - -[[package]] -name = "stable_deref_trait" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" - -[[package]] -name = "static_assertions" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" - -[[package]] -name = "string_cache" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ddb1139b5353f96e429e1a5e19fbaf663bddedaa06d1dbd49f82e352601209a" -dependencies = [ - "lazy_static", - "new_debug_unreachable", - "phf_shared", - "precomputed-hash", -] - -[[package]] -name = "strsim" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" - -[[package]] -name = "strum" -version = "0.24.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e96acfc1b70604b8b2f1ffa4c57e59176c7dbb05d556c71ecd2f5498a1dee7f8" - -[[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 1.0.104", -] - -[[package]] -name = "syn" -version = "1.0.104" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ae548ec36cf198c0ef7710d3c230987c2d6d7bd98ad6edc0274462724c585ce" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "syn" -version = "2.0.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32d41677bcbe24c20c52e7c70b0d8db04134c5d1066bf98662e2871ad200ea3e" -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 1.0.104", - "unicode-xid", -] - -[[package]] -name = "tempfile" -version = "3.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31c0432476357e58790aaa47a8efb0c5138f137343f3b5f23bd36a27e3b0a6d6" -dependencies = [ - "autocfg", - "cfg-if", - "fastrand", - "redox_syscall 0.3.5", - "rustix", - "windows-sys", -] - -[[package]] -name = "term" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c59df8ac95d96ff9bede18eb7300b0fda5e5d8d90960e76f8e14ae765eedbf1f" -dependencies = [ - "dirs-next", - "rustversion", - "winapi", -] - -[[package]] -name = "termcolor" -version = "1.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bab24d30b911b2376f3a13cc2cd443142f0c81dda04c118693e35b3835757755" -dependencies = [ - "winapi-util", -] - -[[package]] -name = "textwrap" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" -dependencies = [ - "unicode-width", -] - -[[package]] -name = "thiserror" -version = "1.0.40" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "978c9a314bd8dc99be594bc3c175faaa9794be04a5a5e153caba6915336cebac" -dependencies = [ - "thiserror-impl", -] - -[[package]] -name = "thiserror-impl" -version = "1.0.40" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.18", -] - -[[package]] -name = "tiny-keccak" -version = "2.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c9d3793400a45f954c52e73d068316d76b6f4e36977e3fcebb13a2721e80237" -dependencies = [ - "crunchy", -] - -[[package]] -name = "tock-registers" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ee8fba06c1f4d0b396ef61a54530bb6b28f0dc61c38bc8bc5a5a48161e6282e" - -[[package]] -name = "transport-protocol" -version = "0.3.0" -dependencies = [ - "anyhow", - "err-derive", - "lazy_static", - "protobuf", - "protobuf-codegen", -] - -[[package]] -name = "typetag" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83b97b107d25d29de6879ac4f676ac5bfea92bdd01f206e995794493f1fc2e32" -dependencies = [ - "erased-serde", - "inventory", - "lazy_static", - "serde", - "typetag-impl", -] - -[[package]] -name = "typetag-impl" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f2466fc87b07b800a5060f89ba579d6882f7a03ac21363e4737764aaf9f99f9" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.104", -] - -[[package]] -name = "unicode-ident" -version = "1.0.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b15811caf2415fb889178633e7724bad2509101cde276048e013b9def5e51fa0" - -[[package]] -name = "unicode-width" -version = "0.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ed742d4ea2bd1176e236172c8429aaf54486e7ac098db29ffe6529e0ce50973" - -[[package]] -name = "unicode-xid" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3" - -[[package]] -name = "unwinding" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76b094d871608c32cdc2cc06ade39d8dc8c99ce95cbc528c1dcf7434319a1faf" -dependencies = [ - "gimli", -] - -[[package]] -name = "uuid" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "feb41e78f93363bb2df8b0e86a2ca30eed7806ea16ea0c790d757cf93f79be83" -dependencies = [ - "serde", -] - -[[package]] -name = "vec_map" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" - -[[package]] -name = "veracruz-utils" -version = "0.3.0" -dependencies = [ - "anyhow", - "bincode", - "chrono", - "err-derive", - "mbedtls", - "platform-services", - "serde", - "serde_json", - "uuid", -] - -[[package]] -name = "version_check" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" - -[[package]] -name = "virtio-console-server" -version = "0.2.0" -dependencies = [ - "icecap-core", - "icecap-driver-interfaces", - "icecap-pl011-driver", - "icecap-start-generic", - "libc", - "serde", - "virtio-drivers", -] - -[[package]] -name = "virtio-drivers" -version = "0.1.0" -dependencies = [ - "bitflags", - "icecap-failure", - "log", - "volatile", -] - -[[package]] -name = "volatile" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8e76fae08f03f96e166d2dfda232190638c10e0383841252416f9cfe2ae60e6" - -[[package]] -name = "wasi" -version = "0.11.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" - -[[package]] -name = "wasi-types" -version = "0.1.6" -dependencies = [ - "bitflags", - "err-derive", - "num", - "num-derive", - "num-traits", - "serde", -] - -[[package]] -name = "wasmi" -version = "0.13.2" -dependencies = [ - "parity-wasm", - "serde", - "typetag", - "wasmi-validation", - "wasmi_core", -] - -[[package]] -name = "wasmi-validation" -version = "0.5.0" -dependencies = [ - "parity-wasm", -] - -[[package]] -name = "wasmi_core" -version = "0.2.1" -dependencies = [ - "downcast-rs", - "libm", - "memory_units", - "num-rational", - "num-traits", - "serde", - "typetag", -] - -[[package]] -name = "which" -version = "4.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c831fbbee9e129a8cf93e7747a82da9d95ba8e16621cae60ec2cdc849bacb7b" -dependencies = [ - "either", - "libc", - "once_cell", -] - -[[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-util" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" -dependencies = [ - "winapi", -] - -[[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 = "windows-sys" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" -dependencies = [ - "windows-targets", -] - -[[package]] -name = "windows-targets" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b1eb6f0cd7c80c79759c929114ef071b87354ce476d9d94271031c0497adfd5" -dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", -] - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" - -[[package]] -name = "windows_i686_gnu" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" - -[[package]] -name = "windows_i686_msvc" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" - -[[package]] -name = "yansi-term" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe5c30ade05e61656247b2e334a031dfd0cc466fadef865bdcdea8d537951bf1" -dependencies = [ - "winapi", -] - -[[package]] -name = "yasna" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e17bb3549cc1321ae1296b9cdc2698e2b6cb1992adfa19a8c72e5b7a738f44cd" -dependencies = [ - "bit-vec", - "num-bigint", -] - -[[package]] -name = "zeroize" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a0956f1ba7c7909bfb66c2e9e4124ab6f6482560f6628b5aaeba39207c9aad9" diff --git a/workspaces/icecap-runtime/Cargo.toml b/workspaces/icecap-runtime/Cargo.toml deleted file mode 100644 index 71b20f6ec..000000000 --- a/workspaces/icecap-runtime/Cargo.toml +++ /dev/null @@ -1,34 +0,0 @@ -# workspaces/icecap-runtime/Cargo.toml: -# Workspace for trusted IceCap services -# -# AUTHORS -# -# The Veracruz Development Team. -# -# COPYRIGHT -# -# See the `LICENSE_MIT.markdown` file in the Veracruz root director for licensing -# and copyright information. - -cargo-features = ["resolver"] - -[workspace] -exclude = [ - "crates/icecap/sysroot/libc", - "crates/third-party/rust-mbedtls", - "crates/third-party/wasmi", - "crates/runtime-manager", -] -members = [ - "crates/icecap-runtime-manager", - "src/virtio-console-server", -] -resolver = "2" - -[profile.release] -codegen-units = 1 -lto = true -opt-level = 3 - -[patch.crates-io] -libc = { path = "crates/icecap/sysroot/libc" } diff --git a/workspaces/icecap-runtime/Makefile b/workspaces/icecap-runtime/Makefile deleted file mode 100644 index a57828ae6..000000000 --- a/workspaces/icecap-runtime/Makefile +++ /dev/null @@ -1,415 +0,0 @@ -# AUTHORS -# -# The Veracruz Development Team. -# -# COPYRIGHT -# -# See the `LICENSE.markdown` file in the Veracruz root directory for licensing -# and copyright information. - -include ../common.mk - -icecap_plat ?= qemu - -WORKSPACE_DIR = $(abspath ..) -PROJECT = . -HOST_CC ?= gcc -LD = $(abspath $(shell RUSTC_BOOTSTRAP=1 cargo -Z unstable-options rustc --print target-libdir 2>/dev/null)/../bin/rust-lld) -CC = aarch64-linux-gnu-gcc -CXX = aarch64-linux-gnu-g++ - -deps := deps -src := src - -icecap_src := icecap/src -python_src := $(icecap_src)/python -c_src := $(icecap_src)/c -rust_src := $(icecap_src)/rust - -build_dir := build -target_dir := $(build_dir)/target -bin_dir := $(build_dir)/bin -sysroot_target_dir := $(build_dir)/sysroot-target -sysroot_dir := $(build_dir)/sysroot - -kebab_to_caml = $(subst -,_,$(1)) -capitalize = $(shell echo $(1) | tr '[:lower:]' '[:upper:]') -cargo_target_config_prefix = CARGO_TARGET_$(call capitalize,$(call kebab_to_caml,$(1)))_ - -sticky_dir := $(build_dir)/$(icecap_plat)/sticky -disposable_dir := $(build_dir)/$(icecap_plat)/disposable -rust_build_dir := $(sticky_dir)/target -c_build_dir := $(disposable_dir)/c -icedl_build_dir := $(disposable_dir)/icedl -misc_build_dir := $(disposable_dir)/misc -now := crates/icecap-runtime-manager/NOW - -rust_icecap_bins := $(target_dir)/aarch64-icecap/$(PROFILE_PATH) -rust_dev_bins := $(rust_build_dir)/$(PROFILE_PATH) -rust_target := aarch64-icecap -rust_target_build = $(shell uname -m)-unknown-linux-gnu - -sel4_src := $(deps)/seL4 -sel4_tools_src := $(deps)/seL4_tools -sel4_build_dir := $(disposable_dir)/cmake/sel4 -sel4_include_dir := $(sel4_build_dir)/install/libsel4/include -sel4_lib_dir := $(sel4_build_dir)/install/libsel4/lib - -platform_info_h := $(misc_build_dir)/platform_info.h -object_sizes_yaml := $(misc_build_dir)/object_sizes.yaml - -icedl_component_dir := $(icedl_build_dir)/components -icedl_firmware_dir := $(icedl_build_dir)/firmware -icedl_firmware_cdl := $(icedl_firmware_dir)/cdl/icecap.cdl -capdl_src := $(deps)/capdl -ifeq (,$(wildcard /usr/local/bin/parse-capDL)) -capdl_tool := $(capdl_src)/capDL-tool/parse-capDL -else -capdl_tool := /usr/local/bin/parse-capDL -endif -capdl_loader := $(c_build_dir)/capdl-loader/install/bin/capdl-loader.elf -app_elf := $(misc_build_dir)/app.elf - -elfloader_build_dir := $(disposable_dir)/cmake/elfloader -elfloader := $(elfloader_build_dir)/build/elfloader -elfloader_src := $(sel4_tools_src)/elfloader-tool - -# FIXME -buildInputs = $(sel4_build_dir)/install/libsel4 \ - $(c_build_dir)/for-userspace/install - -icecap_c_include_flags := $(foreach x,$(buildInputs),-I$(abspath $(x)/include)) -icecap_c_lib_flags := $(foreach x,$(buildInputs),-L$(abspath $(x)/lib)) - -compiler_some_libc_include := $(wildcard /usr/lib/gcc*/aarch64-linux-gnu/*/include/) - -.PHONY: none -none: - -# NOTE this file must define: -# variables: -# - sel4_kernel_platform -# - sel4_dts_path -# rules: -# - clean-plat -include mk/$(icecap_plat).mk - -# NOTE this file must define: -# variables: -# - manifest_path -# - cdl_script_path -# - icedl_components -# - project_feature_flags -include $(PROJECT)/icecap.mk - -mk_dirs := $(sel4_build_dir) $(elfloader_build_dir) $(misc_build_dir) - -$(mk_dirs) &: - mkdir -p $@ - -# HACK -# Certificate expiry matters require the time in the host and realm to align -# roughly with the time that test cases are generated. The content of this file -# is embedded into both the host initramfs and the Runtime Manager to be used -# for setting the time at startup. -$(now): - mkdir -p $(build_dir) - date +%s | tr -d '\n' > $@ - -########################################################################### -# seL4 -########################################################################### - -t/sel4: $(sel4_dts_path) | $(sel4_build_dir) - cmake -G Ninja \ - -DCMAKE_TOOLCHAIN_FILE=$(abspath $(sel4_src)/gcc.cmake) \ - -DCROSS_COMPILER_PREFIX=aarch64-linux-gnu- \ - -DCMAKE_INSTALL_PREFIX=$(abspath $(sel4_build_dir)/install) \ - -DHACK_SEL4_SRC=$(abspath $(sel4_src)) \ - -DHACK_SEL4_KERNEL_PLATFORM=$(sel4_kernel_platform) \ - -C $(abspath $(src)/cmake-config/seL4.cmake) \ - -S $(abspath $(sel4_src)) \ - -B $(abspath $(sel4_build_dir)/build) - ninja -C $(abspath $(sel4_build_dir)/build) all kernel.elf sel4 - ninja -C $(abspath $(sel4_build_dir)/build) install - install -D -T $(sel4_build_dir)/build/libsel4/libsel4.a \ - $(sel4_build_dir)/install/libsel4/lib/libsel4.a - mkdir -p t && touch $@ - -########################################################################### -# IceCap user space -########################################################################### - -t/userspace_c: t/sel4 - $(MAKE) -f $(c_src)/Makefile CROSS_COMPILE=aarch64-linux-gnu- \ - BUILD=$(c_build_dir)/for-userspace/build OUT=$(c_build_dir)/for-userspace/install \ - CFLAGS="-I$(sel4_include_dir) -I$(compiler_some_libc_include)" \ - ICECAP_RUNTIME_CONFIG_IN=/dev/null \ - ROOTS=$(c_src)/icecap-runtime/icecap.mk \ - ROOTS=" \ - $(c_src)/../../../src/c/libc-supplement/icecap.mk \ - $(c_src)/icecap-runtime/icecap.mk \ - $(c_src)/icecap-some-libc/icecap.mk \ - $(c_src)/icecap-utils/icecap.mk \ - " \ - install - mkdir -p t && touch $@ - -########################################################################### -# IceCap sysroot -########################################################################### - -t/sysroot-install: t/sysroot - : # "tidy_dest $src $dst" removes files from $dst/ that are not - : # found in $src/. It does not matter if the glob fails to match. - tidy_dest() { \ - for x in "$$2"/* ; do \ - if ! [ -f "$$1"/"$${x##*/}" ] ; then \ - rm -f "$$x" ; \ - fi \ - done \ - } ; \ - src=$(sysroot_target_dir)/aarch64-icecap/release/deps ; \ - dst=$(sysroot_dir)/lib/rustlib/aarch64-icecap/lib ; \ - mkdir -p $$dst ; \ - cp -u $$src/lib*.rlib $$dst/ ; \ - tidy_dest $$src $$dst ; \ - src=$(sysroot_target_dir)/release/deps ; \ - dst=$(sysroot_dir)/lib/rustlib/$(shell uname -m)-unknown-linux-gnu/lib/ ; \ - mkdir -p $$dst ; \ - cp -u $$src/*.so $$dst/ ; \ - tidy_dest $$src $$dst - mkdir -p t && touch $@ - -sysroot_rustflags := \ - --cfg=icecap_plat=\"$(icecap_plat)\" \ - $(icecap_c_lib_flags) \ - -C force-unwind-tables=yes -C embed-bitcode=yes \ - -Z force-unstable-if-unmarked \ - --sysroot /dev/null - -t/sysroot: t/userspace_c t/sel4 - RUSTC_BOOTSTRAP=1 \ - RUST_TARGET_PATH=$(abspath icecap/src/rust/support/targets) \ - $(call cargo_target_config_prefix,$(rust_target))RUSTFLAGS="$(sysroot_rustflags)" \ - $(call cargo_target_config_prefix,$(rust_target))LINKER="$(LD)" \ - BINDGEN_EXTRA_CLANG_ARGS="$(icecap_c_include_flags)" \ - __CARGO_DEFAULT_LIB_METADATA="icecap-sysroot" \ - cargo build \ - -Z unstable-options \ - -Z binary-dep-depinfo \ - --release $(V_FLAG) \ - --manifest-path sysroot/workspace/Cargo.toml \ - --target $(rust_target) \ - -j$$(nproc) \ - --target-dir $(sysroot_target_dir) - mkdir -p t && touch $@ - -########################################################################### -# Veracruz part -########################################################################### - -icecap_rustflags := \ - --cfg=icecap_plat=\"$(icecap_plat)\" \ - -l static=c-supplement \ - -l static=icecap-runtime \ - -l static=icecap-some-libc \ - -l static=icecap-utils \ - $(icecap_c_lib_flags) \ - --sysroot=$(abspath $(sysroot_dir)) - -t/rust-project: $(now) t/sysroot-install t/userspace_c t/sel4 - RUST_TARGET_PATH=$(abspath icecap/src/rust/support/targets) \ - cargo tree \ - --manifest-path $(manifest_path) --target $(rust_target) \ - -v --charset ascii -f "{p} {f}" \ - $(foreach x,$(icedl_components),-p $(x)) \ - $(project_feature_flags) > $(build_dir)/tree.txt ; \ - RUSTC_BOOTSTRAP=1 \ - RUST_TARGET_PATH=$(abspath icecap/src/rust/support/targets) \ - $(call cargo_target_config_prefix,$(rust_target))RUSTFLAGS="$(icecap_rustflags)" \ - $(call cargo_target_config_prefix,$(rust_target))LINKER="$(LD)" \ - CC_$(call kebab_to_caml,$(rust_target))="$(CC)" \ - CXX_$(call kebab_to_caml,$(rust_target))="$(CXX)" \ - BINDGEN_EXTRA_CLANG_ARGS="$(icecap_c_include_flags) -I$(compiler_some_libc_include) -I/usr/aarch64-linux-gnu/include" \ - cargo build \ - -Z unstable-options \ - --manifest-path $(manifest_path) \ - --target $(rust_target) \ - $(project_feature_flags) \ - $(foreach x,$(icedl_components),-p $(x)) \ - $(PROFILE_FLAG) $(V_FLAG) \ - -j$$(nproc) \ - --target-dir $(target_dir) \ - --out-dir $(bin_dir) - mkdir -p t && touch $@ - -########################################################################### -# IceCap CDL -########################################################################### - -$(object_sizes_yaml): t/sel4 | $(misc_build_dir) - aarch64-linux-gnu-gcc -E -P - -I$(sel4_include_dir) < $(capdl_src)/object_sizes/object_sizes.yaml > $@ - -${rust_dev_bins}/icecap-serialize-runtime-config: - RUSTC_BOOTSTRAP=1 \ - cargo build --manifest-path icecap/src/rust/crates/framework/base/icecap-runtime/config/cli/icecap-serialize-runtime-config/Cargo.toml \ - $(PROFILE_FLAG) --target-dir ${rust_build_dir} - -icedl_components_prepared := \ - $(foreach x, \ - min full, \ - $(foreach y,$(icedl_components),$(icedl_component_dir)/$(y).$(x).elf) \ - ) - -$(foreach x,$(icedl_components), \ - $(patsubst %,$(rust_icecap_bins)/%.elf,$(x))): t/rust-project - -$(icedl_component_dir)/%.full.elf: $(rust_icecap_bins)/%.elf - install -D -T $< $@ - -$(icedl_component_dir)/%.min.elf: $(icedl_component_dir)/%.full.elf - aarch64-linux-gnu-strip -s $< -o $@ - -$(icedl_firmware_cdl): \ - $(object_sizes_yaml) \ - $(icedl_components_prepared) \ - ${rust_dev_bins}/icecap-serialize-runtime-config - $(MAKE) $(icedl_components_prepared) - PATH=$(rust_dev_bins):$$PATH \ - PYTHONPATH=$(python_src):$(capdl_src)/python-capdl-tool:$$PYTHONPATH \ - python3 $(cdl_script_path) \ - -p $(icecap_plat) \ - -c $(icedl_component_dir) \ - -s $(object_sizes_yaml) \ - -o $(abspath $(dir $@)) - -########################################################################### -# CapDL Loader -########################################################################### - -$(capdl_tool): - $(MAKE) -C $(capdl_src)/capDL-tool - -$(icedl_firmware_dir)/src/capdl_spec.c: $(icedl_firmware_cdl) $(object_sizes_yaml) $(capdl_tool) - mkdir -p $(dir $@) - $(capdl_tool) --code-dynamic-alloc --object-sizes=$(object_sizes_yaml) --code=$@ $< - -$(icedl_firmware_dir)/capdl.cpio: $(icedl_firmware_cdl) - rm -rf $@.links - cp -rL $(icedl_firmware_dir)/cdl/links $@.links - (cd $@.links && find . -not -type d | cpio -o --reproducible -H newc > $(abspath $@)) - -$(icedl_firmware_dir)/capdl.o: $(icedl_firmware_dir)/capdl.cpio - aarch64-linux-gnu-gcc -c $(c_src)/support/embedded-file.S -o $@ \ - -DSYMBOL=_capdl_archive -DFILE=$< -DSECTION=_archive_cpio - -$(platform_info_h): t/sel4 | $(misc_build_dir) - python3 $(sel4_tools_src)/cmake-tool/helpers/platform_sift.py --emit-c-syntax \ - $(sel4_build_dir)/build/gen_headers/plat/machine/platform_gen.yaml > $@ - -$(capdl_loader): $(icedl_firmware_dir)/src/capdl_spec.c $(icedl_firmware_dir)/capdl.o $(platform_info_h) - $(MAKE) -f $(c_src)/Makefile CROSS_COMPILE=aarch64-linux-gnu- \ - BUILD=$(c_build_dir)/capdl-loader/build OUT=$(c_build_dir)/capdl-loader/install \ - CFLAGS="-I$(sel4_include_dir) -I$(c_build_dir)/capdl-loader/build/include -I$(compiler_some_libc_include)" \ - LDFLAGS="-T $(abspath $(c_src)/support/root-task-tls.lds") \ - ICECAP_RUNTIME_CONFIG_IN=$(src)/icecap-runtime-root-config.h \ - CAPDL_LOADER_EXTERNAL_SOURCE=$(capdl_src)/capdl-loader-app \ - CAPDL_LOADER_CONFIG_IN_H=/dev/null \ - CAPDL_LOADER_PLATFORM_INFO_H=$(platform_info_h) \ - CAPDL_LOADER_SPEC_SRC=$(icedl_firmware_dir)/src \ - CAPDL_LOADER_CPIO_O=$(icedl_firmware_dir)/capdl.o \ - ROOTS=" \ - $(c_src)/icecap-runtime/icecap.mk \ - $(c_src)/icecap-utils/icecap.mk \ - $(c_src)/icecap-some-libc/icecap.mk \ - $(c_src)/boot/cpio/icecap.mk \ - $(c_src)/boot/capdl-loader-shim/icecap.mk \ - $(c_src)/boot/capdl-loader-core/icecap.mk \ - $(c_src)/boot/capdl-loader/icecap.mk \ - " \ - install - -########################################################################### -# ELF Loader -########################################################################### - -$(app_elf): $(capdl_loader) - install -D -T $< $@ - -sel4_cmake_config_prefixes := Kernel LibSel4 HardwareDebugAPI - -$(misc_build_dir)/kernel-config.txt: t/sel4 | $(misc_build_dir) - sed -n 's,^\([A-Za-z0-9][^:]*\):\([^=]*\)=\(.*\)$$,\1:\2=\3,p' $(sel4_build_dir)/build/CMakeCache.txt \ - | grep -e '$$.^' $(addprefix -e ^,$(sel4_cmake_config_prefixes)) \ - | sort \ - > $@ - -$(misc_build_dir)/kernel-config.cmake: $(misc_build_dir)/kernel-config.txt - sed 's/^\([^:]*\):\([^=]*\)=\(.*\)$$/set(\1 "\3" CACHE \2 "")/' $< \ - > $@ - -$(misc_build_dir)/boot.cpio: t/sel4 $(app_elf) - mkdir -p $@.links - cp -rL $(sel4_build_dir)/install/bin/kernel.elf $(sel4_build_dir)/build/kernel.dtb $(app_elf) $@.links - printf "kernel.elf\nkernel.dtb\napp.elf\n" | cpio -o -D $@.links --reproducible -H newc > $(abspath $@) - -$(misc_build_dir)/boot.o: $(misc_build_dir)/boot.cpio - aarch64-linux-gnu-gcc -c -x assembler-with-cpp $(c_src)/support/embedded-file.S -o $@ \ - -DSYMBOL=_archive_start -DFILE=$< -DSECTION=_archive_cpio - -t/elfloader_c: - $(MAKE) -f $(c_src)/Makefile CROSS_COMPILE=aarch64-linux-gnu- \ - BUILD=$(c_build_dir)/for-elfloader/build OUT=$(c_build_dir)/for-elfloader/install \ - ROOTS=$(c_src)/boot/cpio/icecap.mk \ - install - mkdir -p t && touch $@ - -elfloader_extra_cpp_flags := \ - -I$(abspath $(sel4_include_dir)) \ - -I$(abspath $(c_build_dir)/for-elfloader/install/include) - -elfloader_extra_c_flags_link := \ - -L$(abspath $(sel4_lib_dir)) \ - -L$(abspath $(c_build_dir)/for-elfloader/install/lib) - -t/elfloader-configure: $(misc_build_dir)/boot.o $(misc_build_dir)/kernel-config.cmake t/elfloader_c | $(elfloader_build_dir) - cmake -G Ninja \ - -DCMAKE_TOOLCHAIN_FILE=$(abspath $(sel4_src)/gcc.cmake) \ - -DCROSS_COMPILER_PREFIX=aarch64-linux-gnu- \ - -DHACK_SEL4_SRC=$(abspath $(sel4_src)) \ - -DHACK_KERNEL_CONFIG=$(abspath $(misc_build_dir)/kernel-config.cmake) \ - -C $(abspath $(src)/cmake-config/elfloader.cmake) \ - -S $(abspath $(elfloader_src)) \ - -B $(abspath $(elfloader_build_dir)/build) \ - -DPYTHON3=python3 \ - -DICECAP_HACK_EXTRA_CPP_FLAGS="$(elfloader_extra_cpp_flags)" \ - -DICECAP_HACK_EXTRA_C_FLAGS_LINK="$(elfloader_extra_c_flags_link)" \ - -DICECAP_HACK_CMAKE_HELPERS=$(abspath $(sel4_src)/tools/helpers.cmake) \ - -DICECAP_HACK_CMAKE_INTERNAL=$(abspath $(sel4_src)/tools/internal.cmake) \ - -DICECAP_HACK_CMAKE_TOOL_HELPERS_DIR=$(abspath $(sel4_tools_src)/cmake-tool/helpers) \ - -DICECAP_HACK_KERNEL_TOOLS=$(abspath $(sel4_src)/tools) \ - -DICECAP_HACK_KERNEL_DTB=$(abspath $(sel4_build_dir)/build/kernel.dtb) \ - -DICECAP_HACK_ARCHIVE_O=$(abspath $(misc_build_dir)/boot.o) \ - -Dplatform_yaml=$(abspath $(sel4_build_dir)/build/gen_headers/plat/machine/platform_gen.yaml) - mkdir -p t && touch $@ - -t/elfloader-build: t/elfloader-configure - ninja -C $(abspath $(elfloader_build_dir)/build) elfloader - mkdir -p t && touch $@ - -$(elfloader_build_dir)/build/elfloader: t/elfloader-build - -.PHONY: elfloader -elfloader: $(elfloader_build_dir)/build/elfloader css-icecap.bin - -css-icecap.bin: $(elfloader_build_dir)/build/elfloader - cp $< $@ - -.PHONY: build -build: elfloader - -.PHONY: clean -clean: - rm -rf css-icecap.bin $(build_dir) t - cargo clean diff --git a/workspaces/icecap-runtime/cdl/composition.py b/workspaces/icecap-runtime/cdl/composition.py deleted file mode 100644 index 2edc20ee5..000000000 --- a/workspaces/icecap-runtime/cdl/composition.py +++ /dev/null @@ -1,47 +0,0 @@ -from argparse import ArgumentParser -from pathlib import Path -import os - -from icecap_framework import BaseComposition -from runtime_manager import RuntimeManager -from virtio_console_server import VirtioConsoleServer - -class Composition(BaseComposition): - def compose(self): - self.virtio_console_server = self.component(VirtioConsoleServer, 'virtio_console_server') - self.component(RuntimeManager, 'runtime_manager') - -parser = ArgumentParser() -parser.add_argument('-c', '--components', metavar='COMPONENTS', type=Path) -parser.add_argument('-o', '--out-dir', metavar='OUT_DIR', type=Path) -parser.add_argument('-p', '--plat', metavar='PLAT', type=str) -parser.add_argument('-s', '--object-sizes', metavar='OBJECT_SIZES', type=Path) -args = parser.parse_args() - -components_path = os.path.abspath(args.components) - -config = { - "plat": args.plat, - "num_cores": 4, - "num_realms": 2, - "default_affinity": 1, - "hack_realm_affinity": 1, - "object_sizes": args.object_sizes, - "components": { - "runtime_manager": { - "image": { - "full": os.path.join(components_path, "icecap-runtime-manager.full.elf"), - "min": os.path.join(components_path, "icecap-runtime-manager.min.elf"), - } - }, - "virtio_console_server": { - "image": { - "full": os.path.join(components_path, "virtio-console-server.full.elf"), - "min": os.path.join(components_path, "virtio-console-server.min.elf"), - } - - }, - } -} - -Composition(args.out_dir, config).run() diff --git a/workspaces/icecap-runtime/cdl/runtime_manager.py b/workspaces/icecap-runtime/cdl/runtime_manager.py deleted file mode 100644 index 267666897..000000000 --- a/workspaces/icecap-runtime/cdl/runtime_manager.py +++ /dev/null @@ -1,45 +0,0 @@ -# CapDL specification creation script for the Veracruz IceCap realm. -# -# AUTHORS -# -# The Veracruz Development Team. -# -# COPYRIGHT -# -# See the `LICENSE_MIT.markdown` file in the Veracruz root directory for licensing -# and copyright information. - -from capdl import ObjectType -from icecap_framework.components.generic import GenericElfComponent -from icecap_framework.utils import PAGE_SIZE_BITS, BLOCK_SIZE - -BADGE_VIRTIO_CONSOLE_SERVER_RING_BUFFER = 1 << 2 - -class RuntimeManager(GenericElfComponent): - - def __init__(self, *args, **kwargs): - super().__init__(*args, **kwargs) - - event_nfn = self.alloc(ObjectType.seL4_NotificationObject, name='event_nfn') - - virtio_console_server_rb_objs, virtio_console_server_kick_nfn_cap = self.composition.virtio_console_server.register_client(self, event_nfn, BADGE_VIRTIO_CONSOLE_SERVER_RING_BUFFER) - - self._arg = { - 'event_nfn': self.cspace().alloc(event_nfn, read=True), - 'virtio_console_server_ring_buffer': { - 'ring_buffer': self.map_ring_buffer(virtio_console_server_rb_objs), - 'kicks': { - 'read': virtio_console_server_kick_nfn_cap, - 'write': virtio_console_server_kick_nfn_cap, - }, - }, - 'badges': { - 'virtio_console_server_ring_buffer': BADGE_VIRTIO_CONSOLE_SERVER_RING_BUFFER, - }, - } - - def static_heap_size(self): - return 128 * BLOCK_SIZE # 256 MiB - - def arg_json(self): - return self._arg diff --git a/workspaces/icecap-runtime/cdl/virtio_console_server.py b/workspaces/icecap-runtime/cdl/virtio_console_server.py deleted file mode 100644 index 81324dcae..000000000 --- a/workspaces/icecap-runtime/cdl/virtio_console_server.py +++ /dev/null @@ -1,119 +0,0 @@ -from capdl import ObjectType, Cap, ARMIRQMode -from icecap_framework import GenericElfComponent -from icecap_framework.utils import align_up, align_down, PAGE_SIZE, PAGE_SIZE_BITS, BLOCK_SIZE_BITS -import itertools as it - -BADGE_IRQ = 1 << 0 -BADGE_CLIENT = 1 << 1 - -MMIO_BLOCK_SIZE = 512 -VIRTIO_PARAMS = { - "qemu": { - "paddr": 0xa000000, - "irq": 0x20 + 0x10, - "count": 32, - "poolsize": 32 * 4096, - }, - "lkvm": { - "paddr": 0x10000, - "irq": 0x20 + 0x4, - "count": 1, - "poolsize": 32 * 4096, - } -} - -class VirtioConsoleServer(GenericElfComponent): - - def __init__(self, *args, **kwargs): - super().__init__(*args, **kwargs) - - plat = args[0].plat - if plat in VIRTIO_PARAMS: - virtio = VIRTIO_PARAMS[plat] - else: - raise Exception("Unsupported platform '%s'" % (plat)) - - virtio_region_start = align_down(virtio["paddr"], PAGE_SIZE) - virtio_region_end = align_up(virtio["paddr"] + virtio["count"] * MMIO_BLOCK_SIZE, PAGE_SIZE) - - # first allocate vaddrs for the virtio region - self.align(PAGE_SIZE) - self.skip(PAGE_SIZE) - virtio_vaddr = self.cur_vaddr - virtio_size = virtio_region_end - virtio_region_start - self.skip(virtio_size) - - # add some padding to catch out-of-bounds access - self.skip(PAGE_SIZE) - - # allocate vaddrs for the virtio pool, these pages must be - # shared with the host - virtio_pool_vaddr = self.cur_vaddr - self.skip(align_up(virtio["poolsize"], PAGE_SIZE)) - - # more padding - self.skip(PAGE_SIZE) - - # map in the virtio-mmio region - # TODO do we need to do this a page at a time? - for (vaddr, paddr) in zip( - it.count(virtio_vaddr, PAGE_SIZE), - range(virtio_region_start, virtio_region_end, PAGE_SIZE)): - self.map_with_size( - vaddr=vaddr, paddr=paddr, size=PAGE_SIZE, - read=True, write=True) - - # allocate some pages to put at a fixed address for communication over virtio - virtio_pool_pages = [] - for vaddr in range( - virtio_pool_vaddr, - align_up(virtio_pool_vaddr + virtio["poolsize"], PAGE_SIZE), - PAGE_SIZE): - page = self.alloc(ObjectType.seL4_FrameObject, - name='virtio_page_{:#x}'.format(vaddr), size=4096) - cap = self.cspace().alloc(page, read=True, write=True, cached=False) - virtio_pool_pages.append(cap) - self.addr_space().add_hack_page(vaddr, PAGE_SIZE, - Cap(page, read=True, write=True, cached=False)) - - # create irq handler objects to catch all virtio IRQs - self.event_nfn = self.alloc(ObjectType.seL4_NotificationObject, name='event_nfn') - virtio_irq_handlers = [] - for irq in range(virtio["irq"], virtio["irq"] + virtio["count"]): - irq_handler = self.alloc(ObjectType.seL4_IRQHandler, - name='irq_{}_handler'.format(irq), - number=irq, trigger=ARMIRQMode.seL4_ARM_IRQ_LEVEL, - notification=Cap(self.event_nfn, badge=BADGE_IRQ)) - cap = self.cspace().alloc(irq_handler) - virtio_irq_handlers.append(cap) - - self._arg = { - 'virtio_region': (virtio_vaddr, virtio_vaddr + virtio_size), - 'virtio_irq_handlers': virtio_irq_handlers, - 'virtio_pool_region': (virtio_pool_vaddr, - align_up(virtio_pool_vaddr + virtio["poolsize"], PAGE_SIZE)), - 'virtio_pool_pages': virtio_pool_pages, - 'event_nfn': self.cspace().alloc(self.event_nfn, read=True), - 'badges': { - 'irq': BADGE_IRQ, - 'client': BADGE_CLIENT, - }, - } - - def register_client(self, client, kick_nfn, kick_nfn_badge): - server_rb_objs, client_rb_objs = self.composition.alloc_ring_buffer( - a_name=self.name, a_size_bits=BLOCK_SIZE_BITS, - b_name=client.name, b_size_bits=BLOCK_SIZE_BITS, - ) - kick_cap = self.cspace().alloc(kick_nfn, badge=kick_nfn_badge, write=True) - self._arg['client_ring_buffer'] = { - 'ring_buffer': self.map_ring_buffer(server_rb_objs), - 'kicks': { - 'read': kick_cap, - 'write': kick_cap, - }, - } - return client_rb_objs, client.cspace().alloc(self.event_nfn, badge=BADGE_CLIENT, write=True) - - def arg_json(self): - return self._arg diff --git a/workspaces/icecap-runtime/crates b/workspaces/icecap-runtime/crates deleted file mode 120000 index c25bddb6d..000000000 --- a/workspaces/icecap-runtime/crates +++ /dev/null @@ -1 +0,0 @@ -../.. \ No newline at end of file diff --git a/workspaces/icecap-runtime/deps/capdl b/workspaces/icecap-runtime/deps/capdl deleted file mode 160000 index 2f78d9991..000000000 --- a/workspaces/icecap-runtime/deps/capdl +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 2f78d999185e71d50cac9cb7033b738bb2510f47 diff --git a/workspaces/icecap-runtime/deps/seL4 b/workspaces/icecap-runtime/deps/seL4 deleted file mode 160000 index b7b3e57fd..000000000 --- a/workspaces/icecap-runtime/deps/seL4 +++ /dev/null @@ -1 +0,0 @@ -Subproject commit b7b3e57fd392877110ded55ffa7796fef82d2a9c diff --git a/workspaces/icecap-runtime/deps/seL4_tools b/workspaces/icecap-runtime/deps/seL4_tools deleted file mode 160000 index 4f99af58b..000000000 --- a/workspaces/icecap-runtime/deps/seL4_tools +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 4f99af58bd3c52add2192b8d7b2ca884c3f4c702 diff --git a/workspaces/icecap-runtime/icecap b/workspaces/icecap-runtime/icecap deleted file mode 120000 index 952a0defd..000000000 --- a/workspaces/icecap-runtime/icecap +++ /dev/null @@ -1 +0,0 @@ -../../icecap/icecap \ No newline at end of file diff --git a/workspaces/icecap-runtime/icecap.mk b/workspaces/icecap-runtime/icecap.mk deleted file mode 100644 index 127bc776d..000000000 --- a/workspaces/icecap-runtime/icecap.mk +++ /dev/null @@ -1,9 +0,0 @@ -manifest_path = $(abspath $(PROJECT)/Cargo.toml) - -cdl_script_path = $(abspath $(PROJECT)/cdl/composition.py) - -icedl_components := \ - icecap-runtime-manager \ - virtio-console-server - -project_feature_flags := --features icecap-$(icecap_plat) diff --git a/workspaces/icecap-runtime/mk/lkvm.mk b/workspaces/icecap-runtime/mk/lkvm.mk deleted file mode 100644 index 5c329bae3..000000000 --- a/workspaces/icecap-runtime/mk/lkvm.mk +++ /dev/null @@ -1,21 +0,0 @@ -# AUTHORS -# -# The Veracruz Development Team. -# -# COPYRIGHT -# -# See the `LICENSE.markdown` file in the Veracruz root directory for licensing -# and copyright information. - -sel4_kernel_platform := lkvm - -sel4_dts_path := $(sel4_src)/tools/dts/lkvm.dts - -.PHONY: clean-plat -clean-plat: - -.PHONY: run -run: - -.PHONY: debug -debug: diff --git a/workspaces/icecap-runtime/mk/qemu.mk b/workspaces/icecap-runtime/mk/qemu.mk deleted file mode 100644 index dbaddbee4..000000000 --- a/workspaces/icecap-runtime/mk/qemu.mk +++ /dev/null @@ -1,48 +0,0 @@ -# AUTHORS -# -# The Veracruz Development Team. -# -# COPYRIGHT -# -# See the `LICENSE.markdown` file in the Veracruz root directory for licensing -# and copyright information. - -sel4_kernel_platform := qemu-arm-virt - -system := $(disposable_dir)/system - -sel4_dts_path := $(sel4_src)/tools/dts/virt.dts - -.PHONY: clean-plat -clean-plat: - rm -f $(sel4_dts_path) - -QEMU_BIN = qemu-system-aarch64 -QEMU_BASE_FLAGS = -machine virt,virtualization=on,gic-version=2 \ - -cpu cortex-a57 -smp 4 -m 3072 \ - -semihosting-config enable=on,target=native \ - -device virtio-serial-device \ - -device virtconsole,chardev=charconsole0,id=console0 \ - -device virtio-net-device,netdev=netdev0 \ - -netdev user,id=netdev0 -QEMU_RUN_FLAGS = \ - -chardev socket,server=on,host=localhost,port=1234,id=charconsole0 \ - -serial mon:stdio -nographic - -.PHONY: run -run: - $(QEMU_BIN) $(QEMU_BASE_FLAGS) $(QEMU_RUN_FLAGS) \ - -kernel $(elfloader) - -.PHONY: debug -debug: - $(QEMU_BIN) $(QEMU_BASE_FLAGS) $(QEMU_RUN_FLAGS) \ - -kernel $(elfloader) - -$(sel4_dts_path): $(misc_build_dir)/$(sel4_kernel_platform).dtb - dtc -I dtb -O dts -o $@ $< - -$(misc_build_dir)/$(sel4_kernel_platform).dtb: | $(misc_build_dir) - $(QEMU_BIN) $(QEMU_BASE_FLAGS) \ - -chardev socket,server=on,host=localhost,port=1234,id=charconsole0,wait=off \ - -machine dumpdtb=$@ diff --git a/workspaces/icecap-runtime/rust-toolchain.toml b/workspaces/icecap-runtime/rust-toolchain.toml deleted file mode 100644 index c1e4f00a7..000000000 --- a/workspaces/icecap-runtime/rust-toolchain.toml +++ /dev/null @@ -1,4 +0,0 @@ -[toolchain] -channel = "1.60.0" -components = [ "rustfmt" ] -targets = [ "aarch64-unknown-linux-gnu" ] diff --git a/workspaces/icecap-runtime/src/cmake-config/elfloader.cmake b/workspaces/icecap-runtime/src/cmake-config/elfloader.cmake deleted file mode 100644 index ad4223402..000000000 --- a/workspaces/icecap-runtime/src/cmake-config/elfloader.cmake +++ /dev/null @@ -1,3 +0,0 @@ -# HACK -include(${HACK_KERNEL_CONFIG}) -include(${HACK_SEL4_SRC}/configs/seL4Config.cmake) diff --git a/workspaces/icecap-runtime/src/cmake-config/seL4.cmake b/workspaces/icecap-runtime/src/cmake-config/seL4.cmake deleted file mode 100644 index e78e21bf8..000000000 --- a/workspaces/icecap-runtime/src/cmake-config/seL4.cmake +++ /dev/null @@ -1,15 +0,0 @@ -set(KernelArch arm CACHE STRING "") -set(KernelArmDisableWFIWFETraps ON CACHE BOOL "") -set(KernelArmExportVCNTUser ON CACHE BOOL "") -set(KernelArmHypervisorSupport ON CACHE BOOL "") -set(KernelArmVtimerUpdateVOffset OFF CACHE BOOL "") -set(KernelDebugBuild ON CACHE BOOL "") -set(KernelMaxNumNodes 4 CACHE STRING "") -set(KernelOptimisation -O2 CACHE STRING "") -set(KernelPlatform ${HACK_SEL4_KERNEL_PLATFORM} CACHE STRING "") -set(KernelRootCNodeSizeBits 18 CACHE STRING "") -set(KernelSel4Arch aarch64 CACHE STRING "") -set(KernelVerificationBuild OFF CACHE BOOL "") -set(LibSel4FunctionAttributes public CACHE STRING "") - -include(${HACK_SEL4_SRC}/configs/seL4Config.cmake) diff --git a/workspaces/icecap-runtime/src/icecap-runtime-root-config.h b/workspaces/icecap-runtime/src/icecap-runtime-root-config.h deleted file mode 100644 index 9950e4980..000000000 --- a/workspaces/icecap-runtime/src/icecap-runtime-root-config.h +++ /dev/null @@ -1,2 +0,0 @@ -#pragma once -#define ICECAP_RUNTIME_ROOT diff --git a/workspaces/icecap-runtime/src/virtio-console-server/Cargo.toml b/workspaces/icecap-runtime/src/virtio-console-server/Cargo.toml deleted file mode 100644 index 7aa9a240a..000000000 --- a/workspaces/icecap-runtime/src/virtio-console-server/Cargo.toml +++ /dev/null @@ -1,13 +0,0 @@ -[package] -name = "virtio-console-server" -version = "0.2.0" -edition = "2018" - -[dependencies] -icecap-core = { path = "../../crates/icecap/crates/framework/base/icecap-core" } -icecap-driver-interfaces = { path = "../../crates/icecap/crates/framework/drivers/icecap-driver-interfaces" } -icecap-pl011-driver = { path = "../../crates/icecap/crates/framework/drivers/devices/pl011" } -icecap-start-generic = { path = "../../crates/icecap/crates/framework/base/icecap-start/generic" } -libc = { path = "../../crates/icecap/sysroot/libc", optional = true } -serde = { version = "*", default-features = false, features = [ "alloc", "derive", "std" ] } -virtio-drivers = { path = "../../crates/icecap/crates/framework/drivers/devices/virtio-drivers" } diff --git a/workspaces/icecap-runtime/src/virtio-console-server/src/main.rs b/workspaces/icecap-runtime/src/virtio-console-server/src/main.rs deleted file mode 100644 index 0ecc7cef7..000000000 --- a/workspaces/icecap-runtime/src/virtio-console-server/src/main.rs +++ /dev/null @@ -1,247 +0,0 @@ -#![no_std] -#![no_main] - -use core::ops::Range; - -use serde::{Deserialize, Serialize}; - -use icecap_core::config::*; -use icecap_core::prelude::vec::Vec; -use icecap_core::prelude::*; -use icecap_core::ring_buffer::{BufferedRingBuffer, RingBuffer}; -use icecap_start_generic::declare_generic_main; - -use virtio_drivers::DeviceType; -use virtio_drivers::VirtIOConsole; -use virtio_drivers::VirtIOHeader; - -declare_generic_main!(main); - -#[derive(Debug, Clone, Serialize, Deserialize)] -struct Config { - virtio_region: Range, - virtio_irq_handlers: Vec, - virtio_pool_region: Range, - virtio_pool_pages: Vec, - - event_nfn: Notification, - client_ring_buffer: UnmanagedRingBufferConfig, - badges: Badges, -} - -#[derive(Debug, Clone, Serialize, Deserialize)] -struct Badges { - irq: Badge, - client: Badge, -} - -// Pool to manage pages which are accessible by both the guest and the host -struct VirtioPool { - pool: &'static mut [u8], - paddr: usize, - mark: usize, -} - -impl VirtioPool { - fn new(vaddr: usize, paddr: usize, len: usize) -> VirtioPool { - VirtioPool { - pool: unsafe { core::slice::from_raw_parts_mut(vaddr as *mut u8, len) }, - paddr: paddr, - mark: 0, - } - } - - fn alloc<'a>(&'a mut self, size: usize) -> Fallible<&'a mut [u8]> { - let count = (size + virtio_drivers::PAGE_SIZE - 1) / virtio_drivers::PAGE_SIZE; - let ppages = unsafe { virtio_dma_alloc(count) }; - if ppages == 0 { - bail!("virtio_pool: out of pages"); - } - - Ok(unsafe { - core::slice::from_raw_parts_mut( - virtio_phys_to_virt(ppages) as *mut u8, - count * virtio_drivers::PAGE_SIZE, - ) - }) - } - - #[allow(unused)] - fn dealloc(&mut self, pages: &mut [u8]) { - unsafe { - virtio_dma_dealloc( - virtio_virt_to_phys(pages.as_ptr() as usize), - pages.len() / virtio_drivers::PAGE_SIZE, - ) - }; - } -} - -static mut VIRTIO_POOL: Option = None; - -// virtio pool page mappings for virtio-drivers -#[no_mangle] -pub unsafe extern "C" fn virtio_dma_alloc(pages: usize) -> usize { - debug_println!( - "virtio_pool: allocating {}x{} pages", - pages, - virtio_drivers::PAGE_SIZE - ); - let pool = VIRTIO_POOL.as_mut().unwrap(); - if pool.mark + pages * virtio_drivers::PAGE_SIZE > pool.pool.len() { - debug_println!( - "virtio_pool: out of pages ({}/{})!", - pool.pool.len() / virtio_drivers::PAGE_SIZE, - pool.pool.len() / virtio_drivers::PAGE_SIZE - ); - return 0; - } - - let old_mark = pool.mark; - pool.mark += pages * virtio_drivers::PAGE_SIZE; - let p = &mut pool.pool[old_mark] as *mut _ as usize; - debug_println!( - "virtio_pool: allocating {}x{} pages -> {:012x}", - pages, - virtio_drivers::PAGE_SIZE, - virtio_virt_to_phys(p as usize) - ); - virtio_virt_to_phys(p as usize) -} - -#[no_mangle] -pub unsafe extern "C" fn virtio_dma_dealloc(paddr: usize, _pages: usize) -> i32 { - debug_println!("virtio_pool: deallocating {:012x}", paddr); - let pool = VIRTIO_POOL.as_mut().unwrap(); - debug_assert!(pool - .pool - .as_ptr_range() - .contains(&(virtio_phys_to_virt(paddr) as *const u8))); - 0 -} - -#[no_mangle] -pub unsafe extern "C" fn virtio_phys_to_virt(paddr: usize) -> usize { - let pool = VIRTIO_POOL.as_mut().unwrap(); - debug_assert!( - paddr >= pool.paddr && paddr < pool.paddr + pool.pool.len(), - "virtio_pool: invalid paddr {:012x}", - paddr - ); - paddr - pool.paddr + (pool.pool.as_ptr() as usize) -} - -#[no_mangle] -pub unsafe extern "C" fn virtio_virt_to_phys(vaddr: usize) -> usize { - let pool = VIRTIO_POOL.as_mut().unwrap(); - debug_assert!( - vaddr >= pool.pool.as_ptr() as usize - && vaddr < pool.pool.as_ptr() as usize + pool.pool.len(), - "virtio_pool: invalid vaddr {:012x}", - vaddr - ); - vaddr - (pool.pool.as_ptr() as usize) + pool.paddr -} - -// entry point -fn main(config: Config) -> Fallible<()> { - // FIXME: Yield 10 times to let the runtime start before the console server - for _i in 1..10 { - icecap_core::sel4::yield_(); - } - - // setup the virtio pool - unsafe { - VIRTIO_POOL = Some(VirtioPool::new( - config.virtio_pool_region.start, - config.virtio_pool_pages[0].paddr()?, - config.virtio_pool_region.end - config.virtio_pool_region.start, - )); - } - - // find a virtio driver that reports as a console device - let (virtio_i, virtio_mmio, virtio_irq_handler) = match config - .virtio_region - .clone() - .step_by(512) - .zip(&config.virtio_irq_handlers) - .enumerate() - .find(|(_, (mmio, _))| { - let id = unsafe { core::ptr::read_volatile((mmio + 8) as *const u32) }; - id == DeviceType::Console as u32 - }) { - Some((i, (mmio, irq_handler))) => (i, mmio, irq_handler), - None => { - bail!("virtio-console-server: could not find a virtio-console"); - } - }; - - debug_println!( - "found virtio-console at virtio{}@{:012x}", - virtio_i, - virtio_mmio - ); - let header = unsafe { &mut *(virtio_mmio as *mut VirtIOHeader) }; - let mut console = VirtIOConsole::new(header)?; - - // we start off with all irqs registered, but we only need to listen to one, - // disable the others - for irq_handler in config.virtio_irq_handlers.iter() { - if irq_handler.raw() != virtio_irq_handler.raw() { - irq_handler.clear()?; - } - } - - // begin processing requests - let mut rb = BufferedRingBuffer::new(RingBuffer::unmanaged_from_config( - &config.client_ring_buffer, - )); - let send_page = unsafe { VIRTIO_POOL.as_mut() } - .unwrap() - .alloc(virtio_drivers::PAGE_SIZE)?; - - // we may have already received data to send, but lost the notification - // during initialization, so there may already be data in our ring buffer - // we need to write out - rb.rx_callback(); - rb.tx_callback(); - if let Some(chars) = rb.rx() { - for chunk in chars.chunks(virtio_drivers::PAGE_SIZE) { - send_page[..chunk.len()].copy_from_slice(chunk); - console.send_slice(&send_page[..chunk.len()])?; - } - } - rb.ring_buffer().enable_notify_read(); - rb.ring_buffer().enable_notify_write(); - - loop { - let badge = config.event_nfn.wait(); - - if badge & config.badges.irq != 0 { - loop { - console.ack_interrupt()?; - let mut buffer = [0; 512]; - let recved = console.recv_slice(&mut buffer)?; - if recved == 0 { - break; - } - rb.tx(&buffer[..recved]); - } - - virtio_irq_handler.ack()?; - } - - if badge & config.badges.client != 0 { - rb.rx_callback(); - rb.tx_callback(); - if let Some(chars) = rb.rx() { - for chunk in chars.chunks(virtio_drivers::PAGE_SIZE) { - send_page[..chunk.len()].copy_from_slice(chunk); - console.send_slice(&send_page[..chunk.len()])?; - } - } - rb.ring_buffer().enable_notify_read(); - rb.ring_buffer().enable_notify_write(); - } - } -} diff --git a/workspaces/icecap-runtime/sysroot b/workspaces/icecap-runtime/sysroot deleted file mode 120000 index 0cbd7a992..000000000 --- a/workspaces/icecap-runtime/sysroot +++ /dev/null @@ -1 +0,0 @@ -../../icecap/sysroot \ No newline at end of file diff --git a/workspaces/linux-host/Cargo.lock b/workspaces/linux-host/Cargo.lock index 6eeed418e..970de0daa 100644 --- a/workspaces/linux-host/Cargo.lock +++ b/workspaces/linux-host/Cargo.lock @@ -655,25 +655,6 @@ dependencies = [ "tokio-rustls", ] -[[package]] -name = "icecap-veracruz-server" -version = "0.3.0" -dependencies = [ - "anyhow", - "bincode", - "env_logger", - "err-derive", - "lazy_static", - "log", - "policy-utils", - "proxy-attestation-client", - "signal-hook", - "structopt", - "tempfile", - "veracruz-server", - "veracruz-utils", -] - [[package]] name = "idna" version = "0.2.3" @@ -1899,7 +1880,6 @@ dependencies = [ "either", "env_logger", "hex", - "icecap-veracruz-server", "lazy_static", "linux-veracruz-server", "log", diff --git a/workspaces/linux-host/Cargo.toml b/workspaces/linux-host/Cargo.toml index a6148c580..ade2a7818 100644 --- a/workspaces/linux-host/Cargo.toml +++ b/workspaces/linux-host/Cargo.toml @@ -14,7 +14,6 @@ cargo-features = ["resolver"] [workspace] exclude = [ - "crates/icecap-veracruz-server", "crates/nitro-veracruz-server", "crates/third-party/rust-mbedtls", ] diff --git a/workspaces/linux-runtime/Cargo.lock b/workspaces/linux-runtime/Cargo.lock index 96e26ed91..ccc936409 100644 --- a/workspaces/linux-runtime/Cargo.lock +++ b/workspaces/linux-runtime/Cargo.lock @@ -666,7 +666,6 @@ dependencies = [ "anyhow", "byteorder", "cfg-if", - "ctor", "err-derive", "lazy_static", "log", diff --git a/workspaces/nitro-host/Cargo.lock b/workspaces/nitro-host/Cargo.lock index 267014c1a..fe17f9ba5 100644 --- a/workspaces/nitro-host/Cargo.lock +++ b/workspaces/nitro-host/Cargo.lock @@ -655,25 +655,6 @@ dependencies = [ "tokio-rustls", ] -[[package]] -name = "icecap-veracruz-server" -version = "0.3.0" -dependencies = [ - "anyhow", - "bincode", - "env_logger", - "err-derive", - "lazy_static", - "log", - "policy-utils", - "proxy-attestation-client", - "signal-hook", - "structopt", - "tempfile", - "veracruz-server", - "veracruz-utils", -] - [[package]] name = "idna" version = "0.2.3" @@ -1899,7 +1880,6 @@ dependencies = [ "either", "env_logger", "hex", - "icecap-veracruz-server", "lazy_static", "linux-veracruz-server", "log", diff --git a/workspaces/nitro-host/Cargo.toml b/workspaces/nitro-host/Cargo.toml index 4c9259dac..cd2ae42cf 100644 --- a/workspaces/nitro-host/Cargo.toml +++ b/workspaces/nitro-host/Cargo.toml @@ -14,7 +14,6 @@ cargo-features = ["resolver"] [workspace] exclude = [ - "crates/icecap-veracruz-server", "crates/linux-veracruz-server", "crates/third-party/rust-mbedtls", "crates/third-party/wasmi", diff --git a/workspaces/nitro-runtime/Cargo.lock b/workspaces/nitro-runtime/Cargo.lock index eb947e5c1..b8c0db7cd 100644 --- a/workspaces/nitro-runtime/Cargo.lock +++ b/workspaces/nitro-runtime/Cargo.lock @@ -619,7 +619,6 @@ dependencies = [ "anyhow", "byteorder", "cfg-if", - "ctor", "err-derive", "lazy_static", "log",