From 1f66dcae0e1dfd9e840b94172142ed9c6831a33e Mon Sep 17 00:00:00 2001 From: Tomasz Andrzejak Date: Thu, 14 Nov 2024 14:55:01 +0100 Subject: [PATCH] Run spell checks on the repo (#58) * Run spell checks on the repo Signed-off-by: Tomasz Andrzejak * Fix typo in `GuestPanicContext` Signed-off-by: Tomasz Andrzejak --------- Signed-off-by: Tomasz Andrzejak --- .github/workflows/ValidatePullRequest.yml | 7 +++++++ Justfile | 2 +- NOTICE.txt | 2 +- .../src/flatbuffer_wrappers/guest_log_level.rs | 2 +- src/hyperlight_host/benches/benchmarks.rs | 2 +- src/hyperlight_host/src/error.rs | 2 +- src/hyperlight_host/src/func/call_ctx.rs | 6 +++--- .../src/hypervisor/hypervisor_handler.rs | 2 +- src/hyperlight_host/src/hypervisor/kvm.rs | 4 ++-- src/hyperlight_host/src/hypervisor/metrics.rs | 4 ++-- .../src/hypervisor/surrogate_process_manager.rs | 6 +++--- src/hyperlight_host/src/mem/exe.rs | 2 +- src/hyperlight_host/src/mem/layout.rs | 6 +++--- src/hyperlight_host/src/mem/loaded_lib.rs | 2 +- src/hyperlight_host/src/mem/mgr.rs | 4 ++-- src/hyperlight_host/src/mem/mod.rs | 2 +- src/hyperlight_host/src/mem/pe/mod.rs | 2 +- src/hyperlight_host/src/mem/shared_mem.rs | 4 ++-- src/hyperlight_host/src/metrics/mod.rs | 10 +++++----- .../src/sandbox/initialized_multi_use.rs | 4 ++-- .../src/sandbox/initialized_single_use.rs | 2 +- src/hyperlight_host/src/sandbox/metrics.rs | 8 ++++---- src/hyperlight_host/src/sandbox/mod.rs | 2 +- src/hyperlight_host/src/sandbox/outb.rs | 2 +- src/hyperlight_host/src/sandbox/uninitialized.rs | 2 +- src/hyperlight_host/src/sandbox_state/mod.rs | 2 +- src/hyperlight_host/src/sandbox_state/sandbox.rs | 2 +- src/hyperlight_host/src/testing/log_values.rs | 2 +- src/hyperlight_host/tests/common/mod.rs | 2 +- src/schema/function_call.fbs | 2 +- src/schema/function_types.fbs | 2 +- typos.toml | 5 +++++ 32 files changed, 60 insertions(+), 48 deletions(-) create mode 100644 typos.toml diff --git a/.github/workflows/ValidatePullRequest.yml b/.github/workflows/ValidatePullRequest.yml index 539f3617..ce352a46 100644 --- a/.github/workflows/ValidatePullRequest.yml +++ b/.github/workflows/ValidatePullRequest.yml @@ -50,6 +50,13 @@ jobs: max_total_time: 300 # 5 minutes in seconds docs_only: ${{needs.docs-pr.outputs.docs-only}} secrets: inherit + spelling: + name: spell check with typos + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Spell Check Repo + uses: crate-ci/typos@master ##### # start build-on-windows diff --git a/Justfile b/Justfile index 0a93cc54..15544bdf 100644 --- a/Justfile +++ b/Justfile @@ -154,7 +154,7 @@ run-rust-examples target=default-target: (build-rust target) cargo run --profile={{ if target == "debug" { "dev" } else { target } }} --example metrics --features "function_call_metrics" {{ set-trace-env-vars }} cargo run --profile={{ if target == "debug" { "dev" } else { target } }} --example logging -# The two tracing eamples are flaky on windows so we run them on linux only for now, need to figure out why as they run fine locally on windows +# The two tracing examples are flaky on windows so we run them on linux only for now, need to figure out why as they run fine locally on windows run-rust-examples-linux target=default-target: (build-rust target) (run-rust-examples target) {{ set-trace-env-vars }} cargo run --profile={{ if target == "debug" { "dev" } else { target } }} --example tracing {{ set-trace-env-vars }} cargo run --profile={{ if target == "debug" { "dev" } else { target } }} --example tracing --features "function_call_metrics" diff --git a/NOTICE.txt b/NOTICE.txt index 2fb55a14..3f2d09d4 100644 --- a/NOTICE.txt +++ b/NOTICE.txt @@ -197,7 +197,7 @@ under the standard MIT terms. All other files which have no copyright comments are original works produced specifically for use as part of this library, written either by Rich Felker, the main author of the library, or by one or more -contibutors listed above. Details on authorship of individual files +contributors listed above. Details on authorship of individual files can be found in the git version control history of the project. The omission of copyright and license comments in each file is in the interest of source tree size. diff --git a/src/hyperlight_common/src/flatbuffer_wrappers/guest_log_level.rs b/src/hyperlight_common/src/flatbuffer_wrappers/guest_log_level.rs index 705a48d9..0add85f6 100644 --- a/src/hyperlight_common/src/flatbuffer_wrappers/guest_log_level.rs +++ b/src/hyperlight_common/src/flatbuffer_wrappers/guest_log_level.rs @@ -85,7 +85,7 @@ impl From<&LogLevel> for FbLogLevel { impl From<&LogLevel> for Level { // There is a test (sandbox::outb::tests::test_log_outb_log) which emits trace record as logs - // which causes a panic when this function is instrumeneted as the logger is contained in refcell and + // which causes a panic when this function is instrumented as the logger is contained in refcell and // instrumentation ends up causing a double mutborrow. So this is not instrumented. //TODO: instrument this once we fix the test fn from(val: &LogLevel) -> Level { diff --git a/src/hyperlight_host/benches/benchmarks.rs b/src/hyperlight_host/benches/benchmarks.rs index 6be6c213..6fcd6859 100644 --- a/src/hyperlight_host/benches/benchmarks.rs +++ b/src/hyperlight_host/benches/benchmarks.rs @@ -106,7 +106,7 @@ fn sandbox_benchmark(c: &mut Criterion) { // Benchmarks the time to create a new uninintialized sandbox. // Does **not** include the time to drop the sandbox. - group.bench_function("create_uninitalized_sandbox", |b| { + group.bench_function("create_uninitialized_sandbox", |b| { b.iter_with_large_drop(create_uninit_sandbox); }); diff --git a/src/hyperlight_host/src/error.rs b/src/hyperlight_host/src/error.rs index 702593d8..3c0a84d5 100644 --- a/src/hyperlight_host/src/error.rs +++ b/src/hyperlight_host/src/error.rs @@ -227,7 +227,7 @@ pub enum HyperlightError { #[error("Failed To Convert Parameter Value {0:?} to {1:?}")] ParameterValueConversionFailure(ParameterValue, &'static str), - /// a failure occured processing a PE file + /// a failure occurred processing a PE file #[error("Failure processing PE File {0:?}")] PEFileProcessingFailure(#[from] goblin::error::Error), diff --git a/src/hyperlight_host/src/func/call_ctx.rs b/src/hyperlight_host/src/func/call_ctx.rs index 6370f7b7..dc1253c3 100644 --- a/src/hyperlight_host/src/func/call_ctx.rs +++ b/src/hyperlight_host/src/func/call_ctx.rs @@ -56,7 +56,7 @@ impl MultiUseGuestCallContext { /// /// Every call to a guest function through this method will be made with the same "context" /// meaning that the guest state resulting from any previous call will be present/osbservable - /// by the guest funcation called. + /// by the guest function called. /// /// If you want to reset state, call `finish()` on this `MultiUseGuestCallContext` /// and get a new one from the resulting `MultiUseSandbox` @@ -89,9 +89,9 @@ impl MultiUseGuestCallContext { /// Note that this method is pub(crate) and does not reset the state of the /// sandbox. /// - /// It is intended to be used when evolving a MutliUseSandbox to a new state + /// It is intended to be used when evolving a MultiUseSandbox to a new state /// and is not intended to be called publicly. It allows the state of the guest to be altered - /// during the eveolution of one sandbox state to another, enabling the new state created + /// during the evolution of one sandbox state to another, enabling the new state created /// to be captured and stored in the Sandboxes state stack. /// pub(crate) fn finish_no_reset(self) -> MultiUseSandbox { diff --git a/src/hyperlight_host/src/hypervisor/hypervisor_handler.rs b/src/hyperlight_host/src/hypervisor/hypervisor_handler.rs index e880cef7..bfb55fa2 100644 --- a/src/hyperlight_host/src/hypervisor/hypervisor_handler.rs +++ b/src/hyperlight_host/src/hypervisor/hypervisor_handler.rs @@ -837,7 +837,7 @@ fn set_up_hypervisor_partition( // debug build without in-process feature log_then_return!("In-process mode requires `inprocess` cargo feature"); } else { - log_then_return!("In-process mode requires `inprocess` cargo feature and is only avaiable on debug-builds"); + log_then_return!("In-process mode requires `inprocess` cargo feature and is only available on debug-builds"); } } } else { diff --git a/src/hyperlight_host/src/hypervisor/kvm.rs b/src/hyperlight_host/src/hypervisor/kvm.rs index 338d97b1..5caf8241 100644 --- a/src/hyperlight_host/src/hypervisor/kvm.rs +++ b/src/hyperlight_host/src/hypervisor/kvm.rs @@ -103,7 +103,7 @@ impl KVMDriver { })?; let mut vcpu_fd = vm_fd.create_vcpu(0)?; - Self::setup_inital_sregs(&mut vcpu_fd, pml4_addr)?; + Self::setup_initial_sregs(&mut vcpu_fd, pml4_addr)?; let rsp_gp = GuestPtr::try_from(RawPtr::from(rsp))?; Ok(Self { @@ -117,7 +117,7 @@ impl KVMDriver { } #[instrument(err(Debug), skip_all, parent = Span::current(), level = "Trace")] - fn setup_inital_sregs(vcpu_fd: &mut VcpuFd, pml4_addr: u64) -> Result<()> { + fn setup_initial_sregs(vcpu_fd: &mut VcpuFd, pml4_addr: u64) -> Result<()> { // setup paging and IA-32e (64-bit) mode let mut sregs = vcpu_fd.get_sregs()?; sregs.cr3 = pml4_addr; diff --git a/src/hyperlight_host/src/hypervisor/metrics.rs b/src/hyperlight_host/src/hypervisor/metrics.rs index 0a98d658..499f3516 100644 --- a/src/hyperlight_host/src/hypervisor/metrics.rs +++ b/src/hyperlight_host/src/hypervisor/metrics.rs @@ -109,7 +109,7 @@ mod tests { /// Marking this test as ignored means that running `cargo test` will not /// run it. This will allow a developer who runs that command /// from their workstation to be successful without needing to know about - /// test interdependencies. This test will, however, be run explcitly as a + /// test interdependencies. This test will, however, be run explicitly as a /// part of the CI pipeline. fn test_metrics() { let iter: HypervisorMetricIter = HypervisorMetric::iter(); @@ -151,7 +151,7 @@ mod tests { /// Marking this test as ignored means that running `cargo test` will not /// run it. This will allow a developer who runs that command /// from their workstation to be successful without needing to know about - /// test interdependencies. This test will, however, be run explcitly as a + /// test interdependencies. This test will, however, be run explicitly as a /// part of the CI pipeline. fn test_gather_metrics() { lazy_static! { diff --git a/src/hyperlight_host/src/hypervisor/surrogate_process_manager.rs b/src/hyperlight_host/src/hypervisor/surrogate_process_manager.rs index 5e4287fe..ece7cc23 100644 --- a/src/hyperlight_host/src/hypervisor/surrogate_process_manager.rs +++ b/src/hyperlight_host/src/hypervisor/surrogate_process_manager.rs @@ -307,13 +307,13 @@ fn ensure_surrogate_process_exe() -> Result<()> { if p.exists() { // check to see if sha's match and if not delete the file so we'll extract // the embedded file below. - let embeded_file_sha = sha256::digest(exe.data.as_ref()); + let embedded_file_sha = sha256::digest(exe.data.as_ref()); let file_on_disk_sha = sha256::try_digest(&p)?; - if embeded_file_sha != file_on_disk_sha { + if embedded_file_sha != file_on_disk_sha { println!( "sha of embedded surrorate '{}' does not match sha of file on disk '{}' - deleting surrogate binary at {}", - embeded_file_sha, + embedded_file_sha, file_on_disk_sha, &surrogate_process_path.display() ); diff --git a/src/hyperlight_host/src/mem/exe.rs b/src/hyperlight_host/src/mem/exe.rs index 89bf9f88..4c82e6af 100644 --- a/src/hyperlight_host/src/mem/exe.rs +++ b/src/hyperlight_host/src/mem/exe.rs @@ -24,7 +24,7 @@ use super::pe::pe_info::PEInfo; use super::ptr_offset::Offset; use crate::Result; -// This is used extremely infrequently, so being unusally large for PE +// This is used extremely infrequently, so being unusually large for PE // files _really_ doesn't matter, and probably isn't really worth the // cost of an indirection. #[allow(clippy::large_enum_variant)] diff --git a/src/hyperlight_host/src/mem/layout.rs b/src/hyperlight_host/src/mem/layout.rs index 14103559..14295fb7 100644 --- a/src/hyperlight_host/src/mem/layout.rs +++ b/src/hyperlight_host/src/mem/layout.rs @@ -515,7 +515,7 @@ impl SandboxMemoryLayout { /// Get the offset in guest memory to the output data pointer. #[instrument(skip_all, parent = Span::current(), level= "Trace")] fn get_output_data_pointer_offset(&self) -> usize { - // This field is immedaitely after the output data size field, + // This field is immediately after the output data size field, // which is a `u64`. self.get_output_data_size_offset() + size_of::() } @@ -626,7 +626,7 @@ impl SandboxMemoryLayout { #[instrument(skip_all, parent = Span::current(), level= "Trace")] pub(crate) fn get_guest_panic_context_buffer_pointer_offset(&self) -> usize { // The guest panic data pointer is immediately after the guest - // panic data size field in the `GuestPanicCOntext` data which is a `u64` + // panic data size field in the `GuestPanicContext` data which is a `u64` self.get_guest_panic_context_size_offset() + size_of::() } @@ -715,7 +715,7 @@ impl SandboxMemoryLayout { stack_size: usize, heap_size: usize, ) -> usize { - // Get the conigured memory size (assume each section is 4K aligned) + // Get the configured memory size (assume each section is 4K aligned) let mut total_mapped_memory_size: usize = round_up_to(code_size, PAGE_SIZE_USIZE); total_mapped_memory_size += round_up_to(stack_size, PAGE_SIZE_USIZE); diff --git a/src/hyperlight_host/src/mem/loaded_lib.rs b/src/hyperlight_host/src/mem/loaded_lib.rs index 0e45dd4a..f579d2e1 100644 --- a/src/hyperlight_host/src/mem/loaded_lib.rs +++ b/src/hyperlight_host/src/mem/loaded_lib.rs @@ -57,7 +57,7 @@ impl LoadedLib { let mut lock = LOADED_LIB.lock().unwrap(); if lock.upgrade().is_some() { // An owning copy of the loaded library still exists somewhere, - // we can't load a new libary yet + // we can't load a new library yet log_then_return!("LoadedLib: Only one guest binary can be loaded at any single time"); } let inner = Arc::new(LoadedLibInner::load(path)?); diff --git a/src/hyperlight_host/src/mem/mgr.rs b/src/hyperlight_host/src/mem/mgr.rs index e6537a9e..dd5749cf 100644 --- a/src/hyperlight_host/src/mem/mgr.rs +++ b/src/hyperlight_host/src/mem/mgr.rs @@ -207,7 +207,7 @@ where PAGE_PRESENT | PAGE_RW | PAGE_USER | PAGE_NX } // The guard page is marked RW and User so that if it gets written to we can detect it in the host - // If/When we implement an interupt handler for page faults in the guest then we can remove this access and handle things properly there + // If/When we implement an interrupt handler for page faults in the guest then we can remove this access and handle things properly there MemoryRegionType::GuardPage => { PAGE_PRESENT | PAGE_RW | PAGE_USER | PAGE_NX } @@ -585,7 +585,7 @@ impl SandboxMemoryManager { // addresses that are valid are in its own address space. // // When executing in-process, maniulating this pointer could cause the - // host to execute arbitary functions. + // host to execute arbitrary functions. let guest_ptr = GuestPtr::try_from(RawPtr::from(guest_dispatch_function_ptr))?; guest_ptr.absolute() } diff --git a/src/hyperlight_host/src/mem/mod.rs b/src/hyperlight_host/src/mem/mod.rs index ea679fc4..3e6c2aa5 100644 --- a/src/hyperlight_host/src/mem/mod.rs +++ b/src/hyperlight_host/src/mem/mod.rs @@ -29,7 +29,7 @@ pub mod layout; pub(super) mod loaded_lib; /// memory regions to be mapped inside a vm pub mod memory_region; -/// Functionality taht wraps a `SandboxMemoryLayout` and a +/// Functionality that wraps a `SandboxMemoryLayout` and a /// `SandboxMemoryConfig` to mutate a sandbox's memory as necessary. pub mod mgr; /// Functionality to read and mutate a PE file in a structured manner. diff --git a/src/hyperlight_host/src/mem/pe/mod.rs b/src/hyperlight_host/src/mem/pe/mod.rs index 37bad24e..554aaffd 100644 --- a/src/hyperlight_host/src/mem/pe/mod.rs +++ b/src/hyperlight_host/src/mem/pe/mod.rs @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -/// Extends goblin to suport base relocations in PE file +/// Extends goblin to support base relocations in PE file pub(super) mod base_relocations; /// PE file headers pub(super) mod headers; diff --git a/src/hyperlight_host/src/mem/shared_mem.rs b/src/hyperlight_host/src/mem/shared_mem.rs index 517c3f52..88db56dc 100644 --- a/src/hyperlight_host/src/mem/shared_mem.rs +++ b/src/hyperlight_host/src/mem/shared_mem.rs @@ -560,7 +560,7 @@ impl ExclusiveSharedMemory { /// Convert the ExclusiveSharedMemory, which may be freely /// modified, into a GuestSharedMemory, which may be somewhat /// freely modified (mostly by the guest), and a HostSharedMemory, - /// which may only make certain kinds of acceses that do not race + /// which may only make certain kinds of accesses that do not race /// in the presence of malicious code inside the guest mutating /// the GuestSharedMemory. pub fn build(self) -> (HostSharedMemory, GuestSharedMemory) { @@ -1095,7 +1095,7 @@ mod tests { /// Marking this test as ignored means that running `cargo test` will not /// run it. This feature will allow a developer who runs that command /// from their workstation to be successful without needing to know about - /// test interdependencies. This test will, however, be run explcitly as a + /// test interdependencies. This test will, however, be run explicitly as a /// part of the CI pipeline. #[test] #[ignore] diff --git a/src/hyperlight_host/src/metrics/mod.rs b/src/hyperlight_host/src/metrics/mod.rs index 5d4171ac..7ff3e6fa 100644 --- a/src/hyperlight_host/src/metrics/mod.rs +++ b/src/hyperlight_host/src/metrics/mod.rs @@ -243,7 +243,7 @@ pub fn set_metrics_registry(registry: &'static Registry) -> Result<()> { REGISTRY .set(registry) // This should be impossible - .map_err(|e| new_error!("Registry alread set : {0:?}", e)) + .map_err(|e| new_error!("Registry already set : {0:?}", e)) } } } @@ -259,7 +259,7 @@ fn get_histogram_opts(name: &str, help: &str, buckets: Vec) -> HistogramOpt opts.buckets(buckets) } -/// Provides functionaility to help with testing Hyperlight Metrics +/// Provides functionality to help with testing Hyperlight Metrics pub mod tests { use std::collections::HashSet; @@ -281,11 +281,11 @@ pub mod tests { fn enum_has_variant_for_all_metrics() { let metric_definitions = Self::get_metric_definitions().iter(); for metric_definition in metric_definitions { - let metric_defintion_name = metric_definition.name; + let metric_definition_name = metric_definition.name; assert!( - Self::get_enum_variant_names().contains(&metric_defintion_name), + Self::get_enum_variant_names().contains(&metric_definition_name), "Metric Definition Name {} not found", - metric_defintion_name, + metric_definition_name, ); } } diff --git a/src/hyperlight_host/src/sandbox/initialized_multi_use.rs b/src/hyperlight_host/src/sandbox/initialized_multi_use.rs index 4e0490d9..7e40b0bb 100644 --- a/src/hyperlight_host/src/sandbox/initialized_multi_use.rs +++ b/src/hyperlight_host/src/sandbox/initialized_multi_use.rs @@ -91,7 +91,7 @@ impl MultiUseSandbox { /// `MultiUseGuestCallContext` is guaranteed mutual exclusion for calling /// functions within the sandbox. This guarantee is enforced at compile /// time, and no locks, atomics, or any other mutual exclusion mechanisms - /// are used at rumtime. + /// are used at runtime. /// /// If you have called this function, have a `MultiUseGuestCallContext`, /// and wish to "return" it to a `MultiUseSandbox`, call the `finish` @@ -238,7 +238,7 @@ where /// An implementation such as HyperlightJs or HyperlightWasm can use this to call guest functions to load JS or WASM code and then evolve the sandbox causing state to be captured. /// The new MultiUseSandbox can then be used to call guest functions to execute the loaded code. /// - /// The evolve function creates a new MutliUseCallContext which is then passed to a callback function allowing the + /// The evolve function creates a new MultiUseCallContext which is then passed to a callback function allowing the /// callback function to call guest functions as part of the evolve process, once the callback function is complete /// the context is finished using a crate internal method that does not restore the prior state of the Sanbbox. /// It then creates a mew memory snapshot on the snapshot stack and returns the MultiUseSandbox diff --git a/src/hyperlight_host/src/sandbox/initialized_single_use.rs b/src/hyperlight_host/src/sandbox/initialized_single_use.rs index 7b3a0809..27e5be0c 100644 --- a/src/hyperlight_host/src/sandbox/initialized_single_use.rs +++ b/src/hyperlight_host/src/sandbox/initialized_single_use.rs @@ -76,7 +76,7 @@ impl SingleUseSandbox { } /// Create a new `SingleUseCallContext` . The main purpose of the - /// a SingleUseSandbox is to allow mutiple calls to guest functions from within a callback function. + /// a SingleUseSandbox is to allow multiple calls to guest functions from within a callback function. /// /// Since this function consumes `self`, the returned /// `SingleUseGuestCallContext` is guaranteed mutual exclusion for calling diff --git a/src/hyperlight_host/src/sandbox/metrics.rs b/src/hyperlight_host/src/sandbox/metrics.rs index 5f2da3a7..840b003a 100644 --- a/src/hyperlight_host/src/sandbox/metrics.rs +++ b/src/hyperlight_host/src/sandbox/metrics.rs @@ -15,7 +15,7 @@ limitations under the License. */ /*! -This modue contains the definitions and implementations of the metrics used by the sandbox module +This module contains the definitions and implementations of the metrics used by the sandbox module */ use std::collections::HashMap; use std::sync::Once; @@ -150,7 +150,7 @@ mod tests { /// Marking this test as ignored means that running `cargo test` will not /// run it. This feature will allow a developer who runs that command /// from their workstation to be successful without needing to know about - /// test interdependencies. This test will, however, be run explcitly as a + /// test interdependencies. This test will, however, be run explicitly as a /// part of the CI pipeline. fn test_metrics() { let iter: SandboxMetricIter = SandboxMetric::iter(); @@ -226,7 +226,7 @@ mod tests { assert_eq!(histogram.get_sample_sum(&label_vals).unwrap(), 1.0); } _ => { - panic!("metric is not an IntGauge,IntCounterVec or HistorgamVec"); + panic!("metric is not an IntGauge,IntCounterVec or HistogramVec"); } }, Err(e) => { @@ -242,7 +242,7 @@ mod tests { /// Marking this test as ignored means that running `cargo test` will not /// run it. This feature will allow a developer who runs that command /// from their workstation to be successful without needing to know about - /// test interdependencies. This test will, however, be run explcitly as a + /// test interdependencies. This test will, however, be run explicitly as a /// part of the CI pipeline. fn test_gather_metrics() { lazy_static! { diff --git a/src/hyperlight_host/src/sandbox/mod.rs b/src/hyperlight_host/src/sandbox/mod.rs index 47a78cec..baf1360c 100644 --- a/src/hyperlight_host/src/sandbox/mod.rs +++ b/src/hyperlight_host/src/sandbox/mod.rs @@ -44,7 +44,7 @@ mod run_options; /// Functionality for creating uninitialized sandboxes, manipulating them, /// and converting them to initialized sandboxes. pub mod uninitialized; -/// Functionality for properly converting `UninitailizedSandbox`es to +/// Functionality for properly converting `UninitializedSandbox`es to /// initialized `Sandbox`es. pub(crate) mod uninitialized_evolve; diff --git a/src/hyperlight_host/src/sandbox/outb.rs b/src/hyperlight_host/src/sandbox/outb.rs index 4f5f0ce1..dd359ebb 100644 --- a/src/hyperlight_host/src/sandbox/outb.rs +++ b/src/hyperlight_host/src/sandbox/outb.rs @@ -322,7 +322,7 @@ mod tests { // this test is ignored because it is incompatible with other tests , specifically those which require a logger for tracing // marking this test as ignored means that running `cargo test` will not run this test but will allow a developer who runs that command // from their workstation to be successful without needed to know about test interdependencies - // this test will be run explcitly as a part of the CI pipeline + // this test will be run explicitly as a part of the CI pipeline #[ignore] #[test] fn test_trace_outb_log() { diff --git a/src/hyperlight_host/src/sandbox/uninitialized.rs b/src/hyperlight_host/src/sandbox/uninitialized.rs index 394f157d..eaa573de 100644 --- a/src/hyperlight_host/src/sandbox/uninitialized.rs +++ b/src/hyperlight_host/src/sandbox/uninitialized.rs @@ -856,7 +856,7 @@ mod tests { // this test is ignored because it is incompatible with other tests , specifically those which require a logger for tracing // marking this test as ignored means that running `cargo test` will not run this test but will allow a developer who runs that command // from their workstation to be successful without needed to know about test interdependencies - // this test will be run explcitly as a part of the CI pipeline + // this test will be run explicitly as a part of the CI pipeline #[ignore] fn test_trace_trace() { TestLogger::initialize_log_tracer(); diff --git a/src/hyperlight_host/src/sandbox_state/mod.rs b/src/hyperlight_host/src/sandbox_state/mod.rs index de1a8108..3a7bd52d 100644 --- a/src/hyperlight_host/src/sandbox_state/mod.rs +++ b/src/hyperlight_host/src/sandbox_state/mod.rs @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -/// The standarized `Sandbox` trait and the ways it ban be transitioned +/// The standardized `Sandbox` trait and the ways it ban be transitioned /// to a different `Sandbox` trait pub mod sandbox; /// Metadata about transitions between `Sandbox` states diff --git a/src/hyperlight_host/src/sandbox_state/sandbox.rs b/src/hyperlight_host/src/sandbox_state/sandbox.rs index d0b5b8c0..258de8b2 100644 --- a/src/hyperlight_host/src/sandbox_state/sandbox.rs +++ b/src/hyperlight_host/src/sandbox_state/sandbox.rs @@ -43,7 +43,7 @@ pub trait Sandbox: Sized + Debug { /// `Ok(true)` in the same situation where the stack guard does match. /// - // NOTE: this is only needed for UnitilizedSandbox, SingleUseSandbox, and MultiUseSandbox + // NOTE: this is only needed for UninitializedSandbox, SingleUseSandbox, and MultiUseSandbox // Those are the only types that need implement this trait // The default implementation is provided so that types that implement Sandbox (e.g. JSSandbox) but do not need to implement this trait do not need to provide an implementation #[instrument(skip_all, parent = Span::current(), level= "Trace")] diff --git a/src/hyperlight_host/src/testing/log_values.rs b/src/hyperlight_host/src/testing/log_values.rs index 79643107..9017d394 100644 --- a/src/hyperlight_host/src/testing/log_values.rs +++ b/src/hyperlight_host/src/testing/log_values.rs @@ -68,7 +68,7 @@ pub(crate) type MapLookup<'a> = (&'a Map, &'a str); /// Given a constant-size slice of `MapLookup`s, attempt to look up the /// string value in each `MapLookup`'s map (the first tuple element) for /// that `MapLookup`'s key (the second tuple element). If the lookup -/// succeeded, attempt to conver the resulting value to a string. Return +/// succeeded, attempt to convert the resulting value to a string. Return /// `Ok` with all the successfully looked-up string values, or `Err` /// if any one or more lookups or string conversions failed. pub(crate) fn try_to_strings<'a, const NUM: usize>( diff --git a/src/hyperlight_host/tests/common/mod.rs b/src/hyperlight_host/tests/common/mod.rs index d8ed8edd..a616c3d5 100644 --- a/src/hyperlight_host/tests/common/mod.rs +++ b/src/hyperlight_host/tests/common/mod.rs @@ -24,7 +24,7 @@ use hyperlight_testing::{ }; /// Returns a rust/c simpleguest depending on environment variable GUEST. -/// Uses rust guest by default. Run test with envirnoment variable GUEST="c" to use the c version +/// Uses rust guest by default. Run test with environment variable GUEST="c" to use the c version /// If a test is only applicable to rust, use `new_uninit_rust`` instead pub fn new_uninit() -> Result { UninitializedSandbox::new( diff --git a/src/schema/function_call.fbs b/src/schema/function_call.fbs index fe723f5e..9ad0d8dd 100644 --- a/src/schema/function_call.fbs +++ b/src/schema/function_call.fbs @@ -3,7 +3,7 @@ include "function_types.fbs"; namespace Hyperlight.Generated; enum FunctionCallType : ubyte { - // none is invalid, its the default, its only here to ensure that the type is explicity set to guest or host as none should fail validation if a buffer using it is written to memory + // none is invalid, its the default, its only here to ensure that the type is explicitly set to guest or host as none should fail validation if a buffer using it is written to memory none, guest, host, diff --git a/src/schema/function_types.fbs b/src/schema/function_types.fbs index 679cdb3d..d5c209ff 100644 --- a/src/schema/function_types.fbs +++ b/src/schema/function_types.fbs @@ -1,6 +1,6 @@ namespace Hyperlight.Generated; -// the folowing tables are used to hold the values of the parameters and return values of functions +// the following tables are used to hold the values of the parameters and return values of functions // they are named with hl prefix to avoid reserved word clashes in generated code // hlint is a 32 bit signed integer diff --git a/typos.toml b/typos.toml new file mode 100644 index 00000000..434a71b6 --- /dev/null +++ b/typos.toml @@ -0,0 +1,5 @@ +[default] +extend-ignore-identifiers-re = ["Fo"] + +[files] +extend-exclude = ["**/*.patch", "src/hyperlight_guest/third_party/**/*", "NOTICE.txt"]