diff --git a/optee/Cargo.lock b/optee/Cargo.lock index ed81402..826c887 100644 --- a/optee/Cargo.lock +++ b/optee/Cargo.lock @@ -94,9 +94,9 @@ version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ff32365de1b6743cb203b710788263c44a03de03802daf96092f2da4fe6ba4d7" dependencies = [ - "proc-macro2 1.0.103", - "quote 1.0.42", - "syn 2.0.111", + "proc-macro2", + "quote", + "syn", ] [[package]] @@ -107,51 +107,48 @@ checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" [[package]] name = "optee-utee" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2067c2491e464ce6b50d38620359028575700b7c876d02eba024167cb274e39d" +version = "0.8.0" +source = "git+https://github.com/apache/teaclave-trustzone-sdk?tag=v0.8.0-rc.1#06069b2ebfeaac087d47ab0564d60a86ddab4b00" dependencies = [ "bitflags", "hex", "libc_alloc", "optee-utee-macros", "optee-utee-sys", + "rustc_version", "strum_macros", "uuid 0.8.2", ] [[package]] name = "optee-utee-build" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ced16179abfdfc9828089d7c1a61a34d4a5f8cc5dfad530e0fcf58804cd4e84b" +version = "0.8.0" +source = "git+https://github.com/apache/teaclave-trustzone-sdk?tag=v0.8.0-rc.1#06069b2ebfeaac087d47ab0564d60a86ddab4b00" dependencies = [ "litemap", "prettyplease", - "proc-macro2 1.0.103", - "quote 1.0.42", - "syn 2.0.111", + "proc-macro2", + "quote", + "syn", "uuid 1.19.0", "zerofrom", ] [[package]] name = "optee-utee-macros" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fc8fc7f7e1fd927c994267c4c58a368490dbb7d65297c32b6489936e2a1ce48" +version = "0.8.0" +source = "git+https://github.com/apache/teaclave-trustzone-sdk?tag=v0.8.0-rc.1#06069b2ebfeaac087d47ab0564d60a86ddab4b00" dependencies = [ "litemap", - "quote 0.6.13", - "syn 0.15.44", + "quote", + "syn", "zerofrom", ] [[package]] name = "optee-utee-sys" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f5a08fcdf35ab9e4c1cf639cc6848f56517508583f0c503082cc381696b69b7" +version = "0.8.0" +source = "git+https://github.com/apache/teaclave-trustzone-sdk?tag=v0.8.0-rc.1#06069b2ebfeaac087d47ab0564d60a86ddab4b00" dependencies = [ "libc", ] @@ -186,17 +183,8 @@ version = "0.2.37" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "479ca8adacdd7ce8f1fb39ce9ecccbfe93a3f1344b3d0d97f20bc0196208f62b" dependencies = [ - "proc-macro2 1.0.103", - "syn 2.0.111", -] - -[[package]] -name = "proc-macro2" -version = "0.4.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf3d2011ab5c909338f7887f4fc896d35932e29146c12c8d01da6b22a80ba759" -dependencies = [ - "unicode-xid", + "proc-macro2", + "syn", ] [[package]] @@ -210,20 +198,20 @@ dependencies = [ [[package]] name = "quote" -version = "0.6.13" +version = "1.0.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ce23b6b870e8f94f81fb0a363d65d86675884b34a09043c81e5562f11c1f8e1" +checksum = "a338cc41d27e6cc6dce6cefc13a0729dfbb81c262b1f519331575dd80ef3067f" dependencies = [ - "proc-macro2 0.4.30", + "proc-macro2", ] [[package]] -name = "quote" -version = "1.0.42" +name = "rustc_version" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a338cc41d27e6cc6dce6cefc13a0729dfbb81c262b1f519331575dd80ef3067f" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" dependencies = [ - "proc-macro2 1.0.103", + "semver", ] [[package]] @@ -238,6 +226,12 @@ version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f" +[[package]] +name = "semver" +version = "1.0.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d767eb0aabc880b29956c35734170f26ed551a859dbd361d140cdbeca61ab1e2" + [[package]] name = "serde" version = "1.0.228" @@ -263,9 +257,9 @@ version = "1.0.228" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" dependencies = [ - "proc-macro2 1.0.103", - "quote 1.0.42", - "syn 2.0.111", + "proc-macro2", + "quote", + "syn", ] [[package]] @@ -294,21 +288,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4c6bee85a5a24955dc440386795aa378cd9cf82acd5f764469152d2270e581be" dependencies = [ "heck", - "proc-macro2 1.0.103", - "quote 1.0.42", + "proc-macro2", + "quote", "rustversion", - "syn 2.0.111", -] - -[[package]] -name = "syn" -version = "0.15.44" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ca4b3b69a77cbe1ffc9e198781b7acb0c7365a883670e8f1c1bc66fba79a5c5" -dependencies = [ - "proc-macro2 0.4.30", - "quote 0.6.13", - "unicode-xid", + "syn", ] [[package]] @@ -317,8 +300,8 @@ version = "2.0.111" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "390cc9a294ab71bdb1aa2e99d13be9c753cd2d7bd6560c77118597410c4d2e87" dependencies = [ - "proc-macro2 1.0.103", - "quote 1.0.42", + "proc-macro2", + "quote", "unicode-ident", ] @@ -337,9 +320,9 @@ version = "2.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3ff15c8ecd7de3849db632e14d18d2571fa09dfc5ed93479bc4485c7a517c913" dependencies = [ - "proc-macro2 1.0.103", - "quote 1.0.42", - "syn 2.0.111", + "proc-macro2", + "quote", + "syn", ] [[package]] @@ -348,12 +331,6 @@ version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9312f7c4f6ff9069b165498234ce8be658059c6728633667c526e27dc2cf1df5" -[[package]] -name = "unicode-xid" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" - [[package]] name = "uuid" version = "0.8.2" @@ -390,7 +367,7 @@ version = "0.2.106" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "48cb0d2638f8baedbc542ed444afc0644a29166f1595371af4fecf8ce1e7eeb3" dependencies = [ - "quote 1.0.42", + "quote", "wasm-bindgen-macro-support", ] @@ -401,9 +378,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cefb59d5cd5f92d9dcf80e4683949f15ca4b511f4ac0a6e14d4e1ac60c6ecd40" dependencies = [ "bumpalo", - "proc-macro2 1.0.103", - "quote 1.0.42", - "syn 2.0.111", + "proc-macro2", + "quote", + "syn", "wasm-bindgen-shared", ] diff --git a/optee/Cargo.toml b/optee/Cargo.toml index 3a9a4ee..df9afb1 100644 --- a/optee/Cargo.toml +++ b/optee/Cargo.toml @@ -11,14 +11,23 @@ rust-version = "1.91.1" # See rust-toolchain.toml [workspace.dependencies] anyhow = { version = "1.0.100", default-features = false } -optee-utee = "0.7.0" -optee-utee-build = "0.7.0" -optee-utee-sys = "0.7.0" serde = { version = "1.0.228", default-features = false } serde_json = { version = "1.0.145", default-features = false } thiserror = { version = "2.0.17", default-features = false } uuid = { version = "1.19.0", default-features = false } +[workspace.dependencies.optee-utee] +git = "https://github.com/apache/teaclave-trustzone-sdk" +tag = "v0.8.0-rc.1" + +[workspace.dependencies.optee-utee-build] +git = "https://github.com/apache/teaclave-trustzone-sdk" +tag = "v0.8.0-rc.1" + +[workspace.dependencies.optee-utee-sys] +git = "https://github.com/apache/teaclave-trustzone-sdk" +tag = "v0.8.0-rc.1" + # What we use when producing artifacts to distribute [profile.artifact] debug = false diff --git a/optee/secure-storage/ta/Cargo.toml b/optee/secure-storage/ta/Cargo.toml index bec3dd2..63dd45a 100644 --- a/optee/secure-storage/ta/Cargo.toml +++ b/optee/secure-storage/ta/Cargo.toml @@ -20,7 +20,7 @@ thiserror = { workspace = true, default-features = false } uuid = { workspace = true, features = ["v5"] } [build-dependencies] -optee-utee-build = "0.7.0" +optee-utee-build.workspace = true orb-secure-storage-proto.path = "../proto" [package.metadata.orb-optee] diff --git a/optee/secure-storage/ta/src/main.rs b/optee/secure-storage/ta/src/main.rs index 5171cf6..9f35a46 100644 --- a/optee/secure-storage/ta/src/main.rs +++ b/optee/secure-storage/ta/src/main.rs @@ -157,7 +157,7 @@ fn response_to_params( #[ta_create] fn create() -> TeeResult<()> { let ta_version = optee_utee::property::TaVersion.get().expect("infallible"); - info!("TA version {}", ta_version); + msg!("TA version {}", ta_version); Ok(()) } diff --git a/optee/secure-storage/ta/src/trace.rs b/optee/secure-storage/ta/src/trace.rs index 431eb61..48e11e2 100644 --- a/optee/secure-storage/ta/src/trace.rs +++ b/optee/secure-storage/ta/src/trace.rs @@ -2,6 +2,7 @@ #[repr(u8)] pub enum TraceLevel { + Msg = 0, Error = 1, Info = 2, Debug = 3, @@ -20,6 +21,14 @@ impl TraceExt for optee_utee::trace::Trace { } } +#[macro_export] +macro_rules! msg { + ($($arg:tt)*) => {{ + ::set_level($crate::trace::TraceLevel::Msg); + optee_utee::trace_println!($($arg)*) + }}; +} + #[macro_export] macro_rules! error { ($($arg:tt)*) => {{