Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update deps/td-shim #188

Merged
merged 1 commit into from
Apr 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
194 changes: 104 additions & 90 deletions Cargo.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion deps/td-shim
Submodule td-shim updated 83 files
+4 −4 .github/workflows/devtools.yml
+4 −4 .github/workflows/format.yml
+2 −2 .github/workflows/fuzz.yml
+5 −10 .github/workflows/integration-tdx.yml
+2 −2 .github/workflows/integration.yml
+4 −4 .github/workflows/library.yml
+3 −3 .github/workflows/main.yml
+35 −0 .github/workflows/oss-fuzz.yml
+2 −2 .github/workflows/release.yaml
+281 −240 Cargo.lock
+1 −0 Cargo.toml
+3 −3 Makefile
+2 −2 README.md
+2 −2 devtools/dev_container/Dockerfile
+1 −1 devtools/td-layout-config/config_image.json
+1 −2 devtools/test-runner-server/Cargo.toml
+92 −3 devtools/test-runner-server/src/main.rs
+1 −1 rust-toolchain
+22 −1 sh_script/fuzzing.sh
+1 −1 sh_script/rudra.sh
+26 −0 sh_script/update_toolchain.sh
+1 −1 td-layout/Cargo.toml
+1 −1 td-payload/Cargo.toml
+1 −1 td-payload/src/acpi.rs
+2 −2 td-payload/src/bin/example/main.rs
+1 −1 td-payload/src/hob.rs
+1 −1 td-payload/src/mm/mod.rs
+27 −2 td-payload/src/mm/shared.rs
+18 −0 td-shim-interface/Cargo.toml
+35 −0 td-shim-interface/README.md
+2 −2 td-shim-interface/fuzz/Cargo.toml
+0 −0 td-shim-interface/fuzz/fuzz_targets/afl_cfv_parser.rs
+0 −0 td-shim-interface/fuzz/fuzz_targets/afl_hob_parser.rs
+0 −0 td-shim-interface/fuzz/fuzz_targets/afl_payload_parser.rs
+0 −0 td-shim-interface/fuzz/fuzz_targets/cfv_parser.rs
+1 −1 td-shim-interface/fuzz/fuzz_targets/fuzzlib.rs
+0 −0 td-shim-interface/fuzz/fuzz_targets/hob_parser.rs
+0 −0 td-shim-interface/fuzz/fuzz_targets/payload_parser.rs
+ td-shim-interface/fuzz/seeds/cfv_parser/cfv
+ td-shim-interface/fuzz/seeds/hob_parser/hob_buffer
+ td-shim-interface/fuzz/seeds/payload_parser/fv_buffer
+0 −0 td-shim-interface/src/acpi.rs
+135 −0 td-shim-interface/src/lib.rs
+23 −67 td-shim-interface/src/loader.rs
+1 −1 td-shim-interface/src/metadata.rs
+5 −5 td-shim-interface/src/td_uefi_pi/fv.rs
+3 −3 td-shim-interface/src/td_uefi_pi/hob.rs
+0 −1 td-shim-interface/src/td_uefi_pi/mod.rs
+0 −0 td-shim-interface/src/td_uefi_pi/pi/boot_mode.rs
+0 −0 td-shim-interface/src/td_uefi_pi/pi/fv.rs
+0 −0 td-shim-interface/src/td_uefi_pi/pi/guid.rs
+0 −0 td-shim-interface/src/td_uefi_pi/pi/hob.rs
+0 −0 td-shim-interface/src/td_uefi_pi/pi/mod.rs
+2 −2 td-shim-tools/Cargo.toml
+15 −2 td-shim-tools/src/bin/td-payload-reference-calculator/README.md
+134 −2 td-shim-tools/src/bin/td-payload-reference-calculator/main.rs
+6 −3 td-shim-tools/src/bin/td-shim-checker/main.rs
+1 −1 td-shim-tools/src/bin/td-shim-enroll/main.rs
+2 −2 td-shim-tools/src/enroller.rs
+1 −1 td-shim-tools/src/lib.rs
+2 −2 td-shim-tools/src/linker.rs
+3 −3 td-shim-tools/src/metadata.rs
+56 −0 td-shim-tools/src/read_file.rs
+13 −7 td-shim-tools/src/tee_info_hash.rs
+2 −2 td-shim/Cargo.toml
+1 −1 td-shim/src/bin/td-shim/acpi.rs
+2 −2 td-shim/src/bin/td-shim/main.rs
+4 −4 td-shim/src/bin/td-shim/memory.rs
+1 −1 td-shim/src/bin/td-shim/mp.rs
+2 −2 td-shim/src/bin/td-shim/payload_hob.rs
+4 −4 td-shim/src/bin/td-shim/shim_info.rs
+1 −1 td-shim/src/fv.rs
+1 −3 td-shim/src/lib.rs
+3 −1 td-shim/src/reset_vector.rs
+1 −1 td-shim/src/secure_boot.rs
+0 −13 td-uefi-pi/Cargo.toml
+1 −0 tdx-tdcall/src/lib.rs
+19 −0 tdx-tdcall/src/tdx.rs
+1 −1 tests/test-td-payload/Cargo.toml
+1 −1 tests/test-td-payload/src/main.rs
+2 −2 tests/test-td-payload/src/testacpi.rs
+1 −1 tests/test-td-payload/src/testmemmap.rs
+2 −2 tests/test-td-payload/src/testtrustedboot.rs
1 change: 1 addition & 0 deletions src/eventlog/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@ edition = "2021"
[dependencies]
cc-measurement = { path = "../../deps/td-shim/cc-measurement"}
td-shim = { path = "../../deps/td-shim/td-shim", default-featuers = false }
td-shim-interface = { path = "../../deps/td-shim/td-shim-interface" }
td-payload = { path = "../../deps/td-shim/td-payload", features = ["tdx"] }
zerocopy = { version = "0.7.31", features = ["derive"] }
2 changes: 1 addition & 1 deletion src/eventlog/src/eventlog.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use cc_measurement::CcEventHeader;
use cc_measurement::TcgPcrEventHeader;
use core::mem::size_of;
use td_payload::acpi::get_acpi_tables;
use td_shim::acpi::Ccel;
use td_shim_interface::acpi::Ccel;
use zerocopy::{AsBytes, FromBytes, FromZeroes};

pub fn event_log_size(event_log: &[u8]) -> Option<usize> {
Expand Down
2 changes: 1 addition & 1 deletion src/protocol/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ edition = "2021"
byteorder = { version = "1.0", default-features = false }
global = { path = "../global" }
log = "0.4.13"
td-uefi-pi = { path = "../../deps/td-shim/td-uefi-pi" }
td-shim-interface = { path = "../../deps/td-shim/td-shim-interface" }
2 changes: 1 addition & 1 deletion src/protocol/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ pub mod report_status;
pub mod service;
pub mod wait_for_request;

use td_uefi_pi::pi::guid::Guid;
use td_shim_interface::td_uefi_pi::pi::guid::Guid;

/// Section 5.2: vTPM TD VMCALL<Service.VTPMTD>
/// {0xc3c87a08, 0x3b4a, 0x41ad, 0xa5, 0x2d, 0x96, 0xf1, 0x3c, 0xf8, 0x9a, 0x66}
Expand Down
2 changes: 1 addition & 1 deletion src/protocol/src/report_status/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use super::{COMMAND_REPORT_STATUS, DEFAULT_VERSION};
///
use byteorder::{ByteOrder, LittleEndian};
use global::{VtpmError, VtpmResult};
use td_uefi_pi::pi::guid::Guid;
use td_shim_interface::td_uefi_pi::pi::guid::Guid;

/// TODO: FIXME: comment reference error!
/// Table 5-15: vTPM TD WaitForCommunication Command
Expand Down
2 changes: 1 addition & 1 deletion src/protocol/src/report_status/response.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use core::convert::TryInto;
/// This file follow *TDX Guest Host Communication Interface(GHCI)* v1.5
use byteorder::{ByteOrder, LittleEndian};
use global::{VtpmError, VtpmResult};
use td_uefi_pi::pi::guid::Guid;
use td_shim_interface::td_uefi_pi::pi::guid::Guid;

use super::{COMMAND_REPORT_STATUS, DEFAULT_VERSION};

Expand Down
2 changes: 1 addition & 1 deletion src/protocol/src/service/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
/// This file follow *TDX Guest Host Communication Interface(GHCI)* v1.5
use byteorder::{ByteOrder, LittleEndian};
use global::{VtpmError, VtpmResult};
use td_uefi_pi::pi::guid::Guid;
use td_shim_interface::td_uefi_pi::pi::guid::Guid;

/// Table 3-40: TDG.VP.VMCALL< Service >-command buffer layout
pub(crate) mod field {
Expand Down
2 changes: 1 addition & 1 deletion src/protocol/src/service/response.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use core::convert::TryInto;
/// This file follow *TDX Guest Host Communication Interface(GHCI)* v1.5
use byteorder::{ByteOrder, LittleEndian};
use global::{VtpmError, VtpmResult};
use td_uefi_pi::pi::guid::Guid;
use td_shim_interface::td_uefi_pi::pi::guid::Guid;

/// Common Status Code for response.
pub const STATUS_COMMAND_SENT_RESPONSE_RETURNED: u32 = 0x0;
Expand Down
2 changes: 1 addition & 1 deletion src/protocol/src/wait_for_request/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use super::{COMMAND_WAIT_FOR_REQUEST, DEFAULT_VERSION};
///
use byteorder::{ByteOrder, LittleEndian};
use global::{VtpmError, VtpmResult};
use td_uefi_pi::pi::guid::Guid;
use td_shim_interface::td_uefi_pi::pi::guid::Guid;

/// Table 5-15: vTPM TD WaitForCommunication Command
pub(crate) mod field {
Expand Down
2 changes: 1 addition & 1 deletion src/protocol/src/wait_for_request/response.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use core::convert::{TryFrom, TryInto};
/// This file follow *TDX Guest Host Communication Interface(GHCI)* v1.5
use byteorder::{ByteOrder, LittleEndian};
use global::{VtpmError, VtpmResult};
use td_uefi_pi::pi::guid::Guid;
use td_shim_interface::td_uefi_pi::pi::guid::Guid;

use super::{COMMAND_WAIT_FOR_REQUEST, DEFAULT_VERSION};

Expand Down
2 changes: 1 addition & 1 deletion src/vtpmtd/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ der = {version = "0.5.1", features = ["oid", "alloc", "derive"]}
eventlog = { path = "../eventlog" }
linked_list_allocator = "0.10.2"
log = "0.4.13"
td-uefi-pi = { path = "../../deps/td-shim/td-uefi-pi" }
td-shim-interface = { path = "../../deps/td-shim/td-shim-interface" }
tdx-tdcall = { path = "../../deps/td-shim/tdx-tdcall" }
td-logger = { path = "../../deps/td-shim/td-logger" }
td-exception = { path = "../../deps/td-shim/td-exception", features = ["tdx"]}
Expand Down
4 changes: 3 additions & 1 deletion src/vtpmtd/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ use core::ffi::c_void;
use core::panic::PanicInfo;
use linked_list_allocator::LockedHeap;
use td_layout::runtime::*;
use td_uefi_pi::hob::{check_hob_integrity, dump_hob, get_system_memory_size_below_4gb};
use td_shim_interface::td_uefi_pi::hob::{
check_hob_integrity, dump_hob, get_system_memory_size_below_4gb,
};

#[cfg(not(test))]
#[no_mangle]
Expand Down
Loading