├── .clang-format ├── .clang-tidy ├── .codecov.yml ├── .doxygen ├── .github ├── images │ ├── ais.png │ └── hypervisor_logo.png └── workflows │ └── ccpp.yml ├── .gitignore ├── CMakeLists.txt ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── LICENSE.md ├── PreLoad.cmake ├── README.md ├── SUPPORT.md ├── cmake ├── config │ └── default.cmake ├── depend │ └── bsl.cmake ├── efi_cross_compile │ └── CMakeLists.txt ├── ext_cross_compile │ ├── CMakeLists.txt │ ├── Cargo.toml │ └── src │ │ └── Cargo.toml ├── function │ ├── hypervisor_add_cmake_args.cmake │ ├── hypervisor_add_efi_cross_compile.cmake │ ├── hypervisor_add_ext_cross_compile.cmake │ ├── hypervisor_add_info.cmake │ ├── hypervisor_add_integration.cmake │ ├── hypervisor_add_integration_target.cmake │ ├── hypervisor_add_mk_cross_compile.cmake │ ├── hypervisor_silence.cmake │ └── hypervisor_target_source.cmake ├── init_build.cmake ├── init_cross_compile_build.cmake ├── interface │ └── hypervisor.cmake ├── mk_cross_compile │ └── CMakeLists.txt ├── silence.cmake ├── target │ ├── copy_to_efi_partition.cmake │ ├── dump.cmake │ ├── info.cmake │ ├── loader_build.cmake │ ├── loader_clean.cmake │ ├── loader_load.cmake │ ├── loader_quick.cmake │ ├── loader_unload.cmake │ ├── rust_clean.cmake │ ├── rust_fmt.cmake │ ├── start.cmake │ └── stop.cmake ├── toolchain │ ├── aarch64 │ │ ├── efi.cmake │ │ ├── ext.cmake │ │ └── mk.cmake │ └── x64 │ │ ├── efi.cmake │ │ ├── ext.cmake │ │ └── mk.cmake ├── validate.cmake ├── write_constants.cmake ├── write_toolchain_aarch64_ext_ld.cmake ├── write_toolchain_aarch64_mk_ld.cmake ├── write_toolchain_x64_ext_ld.cmake └── write_toolchain_x64_mk_ld.cmake ├── docs ├── Failure Analysis.md ├── Memory Layout.md ├── Microkernel Syscall Specification.md ├── Optimizations.md ├── Security.md └── Testing.md ├── example ├── default │ ├── .clang-tidy │ ├── CMakeLists.txt │ ├── include │ │ └── allocated_status_t.hpp │ ├── mocks │ │ ├── dispatch_bootstrap.hpp │ │ ├── dispatch_fail.hpp │ │ ├── dispatch_vmexit.hpp │ │ ├── gs_initialize.hpp │ │ ├── gs_t.hpp │ │ ├── intrinsic_t.hpp │ │ ├── tls_initialize.hpp │ │ ├── tls_t.hpp │ │ ├── vp_pool_t.hpp │ │ ├── vp_t.hpp │ │ ├── vs_pool_t.hpp │ │ ├── vs_t.hpp │ │ └── x64 │ │ │ ├── dispatch_vmexit_cpuid.hpp │ │ │ ├── gs_t.hpp │ │ │ ├── intel │ │ │ ├── dispatch_vmexit_nmi.hpp │ │ │ ├── dispatch_vmexit_nmi_window.hpp │ │ │ ├── gs_t.hpp │ │ │ └── tls_t.hpp │ │ │ ├── intrinsic_cpuid_impl.hpp │ │ │ ├── intrinsic_t.hpp │ │ │ └── tls_t.hpp │ ├── src │ │ ├── dispatch_bootstrap.hpp │ │ ├── dispatch_fail.hpp │ │ ├── main.cpp │ │ ├── vp_pool_t.hpp │ │ ├── vp_t.hpp │ │ ├── vs_pool_t.hpp │ │ └── x64 │ │ │ ├── amd │ │ │ ├── dispatch_vmexit.hpp │ │ │ ├── gs_initialize.hpp │ │ │ ├── gs_t.hpp │ │ │ ├── tls_initialize.hpp │ │ │ ├── tls_t.hpp │ │ │ └── vs_t.hpp │ │ │ ├── dispatch_vmexit_cpuid.hpp │ │ │ ├── intel │ │ │ ├── dispatch_vmexit.hpp │ │ │ ├── dispatch_vmexit_nmi.hpp │ │ │ ├── dispatch_vmexit_nmi_window.hpp │ │ │ ├── gs_initialize.hpp │ │ │ ├── gs_t.hpp │ │ │ ├── tls_initialize.hpp │ │ │ ├── tls_t.hpp │ │ │ └── vs_t.hpp │ │ │ ├── intrinsic_cpuid_impl.S │ │ │ ├── intrinsic_cpuid_impl.hpp │ │ │ └── intrinsic_t.hpp │ └── tests │ │ ├── .clang-tidy │ │ ├── CMakeLists.txt │ │ ├── mocks │ │ ├── dispatch_bootstrap │ │ │ ├── CMakeLists.txt │ │ │ ├── behavior.cpp │ │ │ └── requirements.cpp │ │ ├── dispatch_fail │ │ │ ├── CMakeLists.txt │ │ │ ├── behavior.cpp │ │ │ └── requirements.cpp │ │ ├── dispatch_vmexit │ │ │ ├── CMakeLists.txt │ │ │ ├── behavior.cpp │ │ │ └── requirements.cpp │ │ ├── gs_initialize │ │ │ ├── CMakeLists.txt │ │ │ ├── behavior.cpp │ │ │ └── requirements.cpp │ │ ├── intrinsic_t │ │ │ ├── CMakeLists.txt │ │ │ ├── behavior.cpp │ │ │ └── requirements.cpp │ │ ├── tls_initialize │ │ │ ├── CMakeLists.txt │ │ │ ├── behavior.cpp │ │ │ └── requirements.cpp │ │ ├── vp_pool_t │ │ │ ├── CMakeLists.txt │ │ │ ├── behavior.cpp │ │ │ └── requirements.cpp │ │ ├── vp_t │ │ │ ├── CMakeLists.txt │ │ │ ├── behavior.cpp │ │ │ └── requirements.cpp │ │ ├── vs_pool_t │ │ │ ├── CMakeLists.txt │ │ │ ├── behavior.cpp │ │ │ └── requirements.cpp │ │ ├── vs_t │ │ │ ├── CMakeLists.txt │ │ │ ├── behavior.cpp │ │ │ └── requirements.cpp │ │ └── x64 │ │ │ ├── dispatch_vmexit_cpuid │ │ │ ├── CMakeLists.txt │ │ │ ├── behavior.cpp │ │ │ └── requirements.cpp │ │ │ ├── intel │ │ │ ├── dispatch_vmexit_nmi │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── behavior.cpp │ │ │ │ └── requirements.cpp │ │ │ └── dispatch_vmexit_nmi_window │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── behavior.cpp │ │ │ │ └── requirements.cpp │ │ │ ├── intrinsic_cpuid_impl │ │ │ ├── CMakeLists.txt │ │ │ ├── behavior.cpp │ │ │ └── requirements.cpp │ │ │ └── intrinsic_t │ │ │ ├── CMakeLists.txt │ │ │ ├── behavior.cpp │ │ │ └── requirements.cpp │ │ ├── src │ │ ├── dispatch_bootstrap │ │ │ ├── CMakeLists.txt │ │ │ ├── behavior.cpp │ │ │ └── requirements.cpp │ │ ├── dispatch_fail │ │ │ ├── CMakeLists.txt │ │ │ ├── behavior.cpp │ │ │ └── requirements.cpp │ │ ├── main │ │ │ ├── CMakeLists.txt │ │ │ └── behavior.cpp │ │ ├── vp_pool_t │ │ │ ├── CMakeLists.txt │ │ │ ├── behavior.cpp │ │ │ └── requirements.cpp │ │ ├── vp_t │ │ │ ├── CMakeLists.txt │ │ │ ├── behavior.cpp │ │ │ └── requirements.cpp │ │ ├── vs_pool_t │ │ │ ├── CMakeLists.txt │ │ │ ├── behavior.cpp │ │ │ └── requirements.cpp │ │ └── x64 │ │ │ ├── amd │ │ │ ├── dispatch_vmexit │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── behavior.cpp │ │ │ │ └── requirements.cpp │ │ │ ├── gs_initialize │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── behavior.cpp │ │ │ │ └── requirements.cpp │ │ │ ├── tls_initialize │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── behavior.cpp │ │ │ │ └── requirements.cpp │ │ │ └── vs_t │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── behavior.cpp │ │ │ │ └── requirements.cpp │ │ │ ├── dispatch_vmexit_cpuid │ │ │ ├── CMakeLists.txt │ │ │ ├── behavior.cpp │ │ │ └── requirements.cpp │ │ │ ├── intel │ │ │ ├── dispatch_vmexit │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── behavior.cpp │ │ │ │ └── requirements.cpp │ │ │ ├── dispatch_vmexit_nmi │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── behavior.cpp │ │ │ │ └── requirements.cpp │ │ │ ├── dispatch_vmexit_nmi_window │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── behavior.cpp │ │ │ │ └── requirements.cpp │ │ │ ├── gs_initialize │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── behavior.cpp │ │ │ │ └── requirements.cpp │ │ │ ├── tls_initialize │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── behavior.cpp │ │ │ │ └── requirements.cpp │ │ │ └── vs_t │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── behavior.cpp │ │ │ │ └── requirements.cpp │ │ │ └── intrinsic_t │ │ │ ├── CMakeLists.txt │ │ │ ├── behavior.cpp │ │ │ └── requirements.cpp │ │ └── template │ │ ├── CMakeLists.txt │ │ ├── behavior.cpp │ │ └── requirements.cpp └── default_rust │ ├── .cargo │ └── config.toml │ ├── CMakeLists.txt │ ├── empty.cpp │ ├── include │ └── allocated_status_t.rs │ ├── src │ ├── dispatch_bootstrap.rs │ ├── dispatch_fail.rs │ ├── lib.rs │ ├── vp_pool_t.rs │ ├── vp_t.rs │ ├── vs_pool_t.rs │ └── x64 │ │ ├── amd │ │ ├── dispatch_vmexit.rs │ │ ├── gs_initialize.rs │ │ ├── gs_t.rs │ │ ├── tls_initialize.rs │ │ ├── tls_t.rs │ │ └── vs_t.rs │ │ ├── dispatch_vmexit_cpuid.rs │ │ ├── intel │ │ ├── dispatch_vmexit.rs │ │ ├── dispatch_vmexit_nmi.rs │ │ ├── dispatch_vmexit_nmi_window.rs │ │ ├── gs_initialize.rs │ │ ├── gs_t.rs │ │ ├── tls_initialize.rs │ │ ├── tls_t.rs │ │ └── vs_t.rs │ │ ├── intrinsic_cpuid_impl.S │ │ ├── intrinsic_cpuid_impl.rs │ │ └── intrinsic_t.rs │ └── x86_64-unknown-none.json ├── kernel ├── CMakeLists.txt ├── include │ ├── alloc_huge_t.hpp │ ├── alloc_page_t.hpp │ ├── allocated_status_t.hpp │ ├── arm │ │ └── aarch64 │ │ │ ├── general_purpose_regs_t.hpp │ │ │ ├── l0t_t.hpp │ │ │ ├── l0te_t.hpp │ │ │ ├── l1t_t.hpp │ │ │ ├── l1te_t.hpp │ │ │ ├── l2t_t.hpp │ │ │ ├── l2te_t.hpp │ │ │ ├── l3t_t.hpp │ │ │ ├── l3te_t.hpp │ │ │ ├── tls_t.hpp │ │ │ ├── vmcb_t.hpp │ │ │ ├── vmexit_log_pp_t.hpp │ │ │ └── vmexit_log_record_t.hpp │ ├── bfelf │ │ ├── elf64_ehdr_t.hpp │ │ ├── elf64_phdr_t.hpp │ │ └── elf64_shdr_t.hpp │ ├── errc_types.hpp │ ├── ext_tcb_t.hpp │ ├── map_page_flags.hpp │ ├── page_4k_t.hpp │ ├── page_aligned_bytes_t.hpp │ └── x64 │ │ ├── amd │ │ └── vmcb_t.hpp │ │ ├── general_purpose_regs_t.hpp │ │ ├── intel │ │ ├── invept_descriptor_t.hpp │ │ ├── invvpid_descriptor_t.hpp │ │ └── vmcs_t.hpp │ │ ├── l0e_t.hpp │ │ ├── l1e_t.hpp │ │ ├── l2e_t.hpp │ │ ├── l3e_t.hpp │ │ ├── missing_registers_t.hpp │ │ ├── vmexit_log_pp_t.hpp │ │ └── vmexit_log_record_t.hpp ├── integration │ ├── CMakeLists.txt │ ├── CMakeLists_Targets.cmake │ ├── bf_callback_op_register_bootstrap.cpp │ ├── bf_callback_op_register_fail.cpp │ ├── bf_callback_op_register_vmexit.cpp │ ├── bf_debug_op_dump_ext.cpp │ ├── bf_debug_op_dump_huge_pool.cpp │ ├── bf_debug_op_dump_page_pool.cpp │ ├── bf_debug_op_dump_vm.cpp │ ├── bf_debug_op_dump_vmexit_log.cpp │ ├── bf_debug_op_dump_vp.cpp │ ├── bf_debug_op_dump_vs.cpp │ ├── bf_debug_op_out.cpp │ ├── bf_debug_op_write_c.cpp │ ├── bf_debug_op_write_str.cpp │ ├── bf_handle_op_close_handle.cpp │ ├── bf_handle_op_open_handle.cpp │ ├── bf_intrinsic_op_rdmsr.cpp │ ├── bf_intrinsic_op_wrmsr.cpp │ ├── bf_mem_op_alloc_huge.cpp │ ├── bf_mem_op_alloc_page.cpp │ ├── bf_vm_op_create_vm.cpp │ ├── bf_vm_op_destroy_vm.cpp │ ├── bf_vm_op_map_direct.cpp │ ├── bf_vm_op_tlb_flush.cpp │ ├── bf_vm_op_unmap_direct.cpp │ ├── bf_vp_op_create_vp.cpp │ ├── bf_vp_op_destroy_vp.cpp │ ├── bf_vs_op_advance_ip_and_run.cpp │ ├── bf_vs_op_advance_ip_and_run_current.cpp │ ├── bf_vs_op_advance_ip_and_set_active.cpp │ ├── bf_vs_op_clear.cpp │ ├── bf_vs_op_create_vs.cpp │ ├── bf_vs_op_destroy_vs.cpp │ ├── bf_vs_op_init_as_root.cpp │ ├── bf_vs_op_migrate.cpp │ ├── bf_vs_op_promote.cpp │ ├── bf_vs_op_read.cpp │ ├── bf_vs_op_run.cpp │ ├── bf_vs_op_run_current.cpp │ ├── bf_vs_op_set_active.cpp │ ├── bf_vs_op_tlb_flush.cpp │ ├── bf_vs_op_write.cpp │ ├── fast_fail_exit_from_bootstrap.cpp │ ├── fast_fail_exit_from_bootstrap_with_no_syscall.cpp │ ├── fast_fail_exit_from_bootstrap_with_segfault.cpp │ ├── fast_fail_exit_from_bootstrap_with_wait.cpp │ ├── fast_fail_exit_from_fail.cpp │ ├── fast_fail_exit_from_fail_with_no_syscall.cpp │ ├── fast_fail_exit_from_fail_with_segfault.cpp │ ├── fast_fail_exit_from_fail_with_wait.cpp │ ├── fast_fail_exit_from_main.cpp │ ├── fast_fail_exit_from_main_with_no_syscall.cpp │ ├── fast_fail_exit_from_main_with_segfault.cpp │ ├── fast_fail_exit_from_vmexit.cpp │ ├── fast_fail_exit_from_vmexit_with_no_syscall.cpp │ ├── fast_fail_exit_from_vmexit_with_segfault.cpp │ ├── fast_fail_exit_from_vmexit_with_wait.cpp │ ├── fast_fail_recover_from_assert.cpp │ ├── fast_fail_recover_from_page_fault.cpp │ ├── fast_fail_wait_no_bootstrap.cpp │ ├── fast_fail_wait_no_fail.cpp │ ├── fast_fail_wait_no_vmexit.cpp │ └── support │ │ ├── include │ │ ├── allocated_status_t.hpp │ │ └── page_4k_t.hpp │ │ ├── integration_utils.hpp │ │ └── src │ │ ├── dispatch_bootstrap.hpp │ │ ├── dispatch_fail.hpp │ │ ├── main.cpp │ │ ├── vp_pool_t.hpp │ │ ├── vp_t.hpp │ │ ├── vs_pool_t.hpp │ │ └── x64 │ │ ├── amd │ │ ├── dispatch_vmexit.hpp │ │ ├── gs_initialize.hpp │ │ ├── gs_t.hpp │ │ ├── tls_initialize.hpp │ │ ├── tls_t.hpp │ │ └── vs_t.hpp │ │ ├── dispatch_vmexit_cpuid.hpp │ │ ├── intel │ │ ├── dispatch_vmexit.hpp │ │ ├── dispatch_vmexit_nmi.hpp │ │ ├── dispatch_vmexit_nmi_window.hpp │ │ ├── gs_initialize.hpp │ │ ├── gs_t.hpp │ │ ├── tls_initialize.hpp │ │ ├── tls_t.hpp │ │ └── vs_t.hpp │ │ ├── intrinsic_cpuid_impl.S │ │ ├── intrinsic_cpuid_impl.hpp │ │ └── intrinsic_t.hpp ├── mocks │ ├── call_ext.hpp │ ├── debug_ring_write.hpp │ ├── dispatch_esr.hpp │ ├── dispatch_syscall.hpp │ ├── dispatch_syscall_bf_callback_op.hpp │ ├── dispatch_syscall_bf_control_op.hpp │ ├── dispatch_syscall_bf_debug_op.hpp │ ├── dispatch_syscall_bf_handle_op.hpp │ ├── dispatch_syscall_bf_intrinsic_op.hpp │ ├── dispatch_syscall_bf_mem_op.hpp │ ├── dispatch_syscall_bf_vm_op.hpp │ ├── dispatch_syscall_bf_vp_op.hpp │ ├── dispatch_syscall_bf_vs_op.hpp │ ├── ext_pool_t.hpp │ ├── ext_t.hpp │ ├── huge_pool_t.hpp │ ├── intrinsic_t.hpp │ ├── mk_main_t.hpp │ ├── promote.hpp │ ├── return_to_mk.hpp │ ├── serial_write.hpp │ ├── serial_write_c.hpp │ ├── vm_pool_t.hpp │ ├── vm_t.hpp │ ├── vmexit_log_record_t.hpp │ ├── vmexit_log_t.hpp │ ├── vmexit_loop.hpp │ ├── vp_pool_t.hpp │ ├── vp_t.hpp │ ├── vs_pool_t.hpp │ ├── vs_t.hpp │ └── x64 │ │ ├── amd │ │ ├── intrinsic_invlpga.hpp │ │ ├── intrinsic_t.hpp │ │ └── intrinsic_vmrun.hpp │ │ ├── dispatch_esr_nmi.hpp │ │ ├── intel │ │ ├── intrinsic_invept.hpp │ │ ├── intrinsic_invvpid.hpp │ │ ├── intrinsic_t.hpp │ │ ├── intrinsic_vmcl.hpp │ │ ├── intrinsic_vmld.hpp │ │ ├── intrinsic_vmrd16.hpp │ │ ├── intrinsic_vmrd32.hpp │ │ ├── intrinsic_vmrd64.hpp │ │ ├── intrinsic_vmrun.hpp │ │ ├── intrinsic_vmwr16.hpp │ │ ├── intrinsic_vmwr32.hpp │ │ ├── intrinsic_vmwr64.hpp │ │ └── intrinsic_vmwrfunc.hpp │ │ ├── intrinsic_cr0.hpp │ │ ├── intrinsic_cr3.hpp │ │ ├── intrinsic_cr4.hpp │ │ ├── intrinsic_cs_selector.hpp │ │ ├── intrinsic_ds_selector.hpp │ │ ├── intrinsic_es_selector.hpp │ │ ├── intrinsic_fs_selector.hpp │ │ ├── intrinsic_gs_selector.hpp │ │ ├── intrinsic_invlpg.hpp │ │ ├── intrinsic_rdmsr.hpp │ │ ├── intrinsic_set_cr3.hpp │ │ ├── intrinsic_set_tls_reg.hpp │ │ ├── intrinsic_set_tp.hpp │ │ ├── intrinsic_ss_selector.hpp │ │ ├── intrinsic_t.hpp │ │ ├── intrinsic_tls_reg.hpp │ │ ├── intrinsic_tr_selector.hpp │ │ └── intrinsic_wrmsr.hpp ├── src │ ├── arm │ │ └── aarch64 │ │ │ ├── __stack_chk_fail.S │ │ │ ├── call_ext.S │ │ │ ├── dispatch_esr.hpp │ │ │ ├── dispatch_esr_entry.S │ │ │ ├── dispatch_syscall_entry.S │ │ │ ├── dispatch_syscall_intrinsic_op.hpp │ │ │ ├── fast_fail_entry.S │ │ │ ├── get_current_tls.S │ │ │ ├── intrinsic_t.S │ │ │ ├── intrinsic_t.hpp │ │ │ ├── mk_main_entry.S │ │ │ ├── promote.S │ │ │ ├── return_to_current_fast_fail.S │ │ │ ├── return_to_mk.S │ │ │ ├── return_to_vmexit_loop.S │ │ │ ├── serial_write_c.S │ │ │ ├── serial_write_hex.S │ │ │ ├── vmexit_log_t.hpp │ │ │ ├── vmexit_loop_entry.S │ │ │ └── yield.S │ ├── bsl │ │ ├── cstdio.hpp │ │ ├── cstdlib.hpp │ │ └── details │ │ │ └── print_thread_id.hpp │ ├── call_ext.hpp │ ├── debug_ring_write.hpp │ ├── dispatch_syscall.hpp │ ├── dispatch_syscall_bf_callback_op.hpp │ ├── dispatch_syscall_bf_control_op.hpp │ ├── dispatch_syscall_bf_debug_op.hpp │ ├── dispatch_syscall_bf_handle_op.hpp │ ├── dispatch_syscall_bf_mem_op.hpp │ ├── dispatch_syscall_bf_vm_op.hpp │ ├── dispatch_syscall_bf_vp_op.hpp │ ├── dispatch_syscall_bf_vs_op.hpp │ ├── dispatch_syscall_helpers.hpp │ ├── ext_pool_t.hpp │ ├── ext_t.hpp │ ├── get_current_tls.hpp │ ├── huge_pool_t.hpp │ ├── lock_guard_helpers.hpp │ ├── lock_guard_t.hpp │ ├── main.cpp │ ├── mk_main_t.hpp │ ├── msg_halt.cpp │ ├── msg_stack_chk_fail.cpp │ ├── page_pool_helpers.hpp │ ├── page_pool_t.hpp │ ├── pause.hpp │ ├── promote.hpp │ ├── return_to_mk.hpp │ ├── root_page_table_t.hpp │ ├── serial_write.hpp │ ├── serial_write_c.hpp │ ├── serial_write_hex.hpp │ ├── spinlock_helpers.hpp │ ├── spinlock_t.hpp │ ├── vm_pool_t.hpp │ ├── vm_t.hpp │ ├── vmexit_loop.hpp │ ├── vp_pool_t.hpp │ ├── vp_t.hpp │ ├── vs_pool_t.hpp │ └── x64 │ │ ├── __stack_chk_fail.S │ │ ├── amd │ │ ├── dispatch_esr_nmi.hpp │ │ ├── intrinsic_invlpga.S │ │ ├── intrinsic_invlpga.hpp │ │ ├── intrinsic_t.hpp │ │ ├── intrinsic_vmrun.S │ │ ├── intrinsic_vmrun.hpp │ │ ├── promote.S │ │ └── vs_t.hpp │ │ ├── call_ext.S │ │ ├── dispatch_esr.hpp │ │ ├── dispatch_esr_entry.S │ │ ├── dispatch_syscall_bf_intrinsic_op.hpp │ │ ├── dispatch_syscall_entry.S │ │ ├── get_current_tls.S │ │ ├── intel │ │ ├── dispatch_esr_nmi.hpp │ │ ├── intrinsic_invept.S │ │ ├── intrinsic_invept.hpp │ │ ├── intrinsic_invvpid.S │ │ ├── intrinsic_invvpid.hpp │ │ ├── intrinsic_t.hpp │ │ ├── intrinsic_vmcl.S │ │ ├── intrinsic_vmcl.hpp │ │ ├── intrinsic_vmld.S │ │ ├── intrinsic_vmld.hpp │ │ ├── intrinsic_vmrd16.S │ │ ├── intrinsic_vmrd16.hpp │ │ ├── intrinsic_vmrd32.S │ │ ├── intrinsic_vmrd32.hpp │ │ ├── intrinsic_vmrd64.S │ │ ├── intrinsic_vmrd64.hpp │ │ ├── intrinsic_vmrun.S │ │ ├── intrinsic_vmrun.hpp │ │ ├── intrinsic_vmwr16.S │ │ ├── intrinsic_vmwr16.hpp │ │ ├── intrinsic_vmwr32.S │ │ ├── intrinsic_vmwr32.hpp │ │ ├── intrinsic_vmwr64.S │ │ ├── intrinsic_vmwr64.hpp │ │ ├── intrinsic_vmwrfunc.S │ │ ├── intrinsic_vmwrfunc.hpp │ │ ├── promote.S │ │ └── vs_t.hpp │ │ ├── intrinsic_assert.S │ │ ├── intrinsic_cr0.S │ │ ├── intrinsic_cr0.hpp │ │ ├── intrinsic_cr3.S │ │ ├── intrinsic_cr3.hpp │ │ ├── intrinsic_cr4.S │ │ ├── intrinsic_cr4.hpp │ │ ├── intrinsic_cs_selector.S │ │ ├── intrinsic_cs_selector.hpp │ │ ├── intrinsic_ds_selector.S │ │ ├── intrinsic_ds_selector.hpp │ │ ├── intrinsic_es_selector.S │ │ ├── intrinsic_es_selector.hpp │ │ ├── intrinsic_fs_selector.S │ │ ├── intrinsic_fs_selector.hpp │ │ ├── intrinsic_gs_selector.S │ │ ├── intrinsic_gs_selector.hpp │ │ ├── intrinsic_halt.S │ │ ├── intrinsic_invlpg.S │ │ ├── intrinsic_invlpg.hpp │ │ ├── intrinsic_rdmsr.S │ │ ├── intrinsic_rdmsr.hpp │ │ ├── intrinsic_rdmsr_unsafe.S │ │ ├── intrinsic_set_cr3.S │ │ ├── intrinsic_set_cr3.hpp │ │ ├── intrinsic_set_tls_reg.S │ │ ├── intrinsic_set_tls_reg.hpp │ │ ├── intrinsic_set_tp.S │ │ ├── intrinsic_set_tp.hpp │ │ ├── intrinsic_ss_selector.S │ │ ├── intrinsic_ss_selector.hpp │ │ ├── intrinsic_tls_reg.S │ │ ├── intrinsic_tls_reg.hpp │ │ ├── intrinsic_tr_selector.S │ │ ├── intrinsic_tr_selector.hpp │ │ ├── intrinsic_wrmsr.S │ │ ├── intrinsic_wrmsr.hpp │ │ ├── intrinsic_wrmsr_unsafe.S │ │ ├── mk_main_entry.S │ │ ├── pause.S │ │ ├── return_to_mk.S │ │ ├── root_page_table_helpers.hpp │ │ ├── serial_write_c.S │ │ ├── serial_write_hex.S │ │ ├── set_esr.S │ │ ├── tls_t.hpp │ │ └── vmexit_log_t.hpp └── tests │ ├── .clang-tidy │ ├── CMakeLists.txt │ ├── include │ ├── l0e_t.hpp │ ├── l1e_t.hpp │ ├── l2e_t.hpp │ ├── l3e_t.hpp │ ├── lock_guard_helpers.hpp │ ├── lock_guard_t.hpp │ ├── page_pool_helpers.hpp │ ├── page_pool_t.hpp │ ├── root_page_table_helpers.hpp │ ├── root_page_table_t.hpp │ ├── spinlock_helpers.hpp │ ├── spinlock_t.hpp │ ├── state_save_t.hpp │ ├── tls_t.hpp │ ├── vmcb_t.hpp │ ├── vmcs_t.hpp │ └── x64 │ │ └── tls_t.hpp │ ├── mocks │ ├── debug_ring_write │ │ ├── CMakeLists.txt │ │ ├── behavior.cpp │ │ └── requirements.cpp │ ├── dispatch_esr │ │ ├── CMakeLists.txt │ │ ├── behavior.cpp │ │ └── requirements.cpp │ ├── dispatch_syscall │ │ ├── CMakeLists.txt │ │ ├── behavior.cpp │ │ └── requirements.cpp │ ├── dispatch_syscall_bf_callback_op │ │ ├── CMakeLists.txt │ │ ├── behavior.cpp │ │ └── requirements.cpp │ ├── dispatch_syscall_bf_control_op │ │ ├── CMakeLists.txt │ │ ├── behavior.cpp │ │ └── requirements.cpp │ ├── dispatch_syscall_bf_debug_op │ │ ├── CMakeLists.txt │ │ ├── behavior.cpp │ │ └── requirements.cpp │ ├── dispatch_syscall_bf_handle_op │ │ ├── CMakeLists.txt │ │ ├── behavior.cpp │ │ └── requirements.cpp │ ├── dispatch_syscall_bf_intrinsic_op │ │ ├── CMakeLists.txt │ │ ├── behavior.cpp │ │ └── requirements.cpp │ ├── dispatch_syscall_bf_mem_op │ │ ├── CMakeLists.txt │ │ ├── behavior.cpp │ │ └── requirements.cpp │ ├── dispatch_syscall_bf_vm_op │ │ ├── CMakeLists.txt │ │ ├── behavior.cpp │ │ └── requirements.cpp │ ├── dispatch_syscall_bf_vp_op │ │ ├── CMakeLists.txt │ │ ├── behavior.cpp │ │ └── requirements.cpp │ ├── dispatch_syscall_bf_vs_op │ │ ├── CMakeLists.txt │ │ ├── behavior.cpp │ │ └── requirements.cpp │ ├── ext_pool_t │ │ ├── CMakeLists.txt │ │ ├── behavior.cpp │ │ └── requirements.cpp │ ├── ext_t │ │ ├── CMakeLists.txt │ │ ├── behavior.cpp │ │ └── requirements.cpp │ ├── huge_pool_t │ │ ├── CMakeLists.txt │ │ ├── behavior.cpp │ │ └── requirements.cpp │ ├── intrinsic_t │ │ ├── CMakeLists.txt │ │ ├── behavior.cpp │ │ └── requirements.cpp │ ├── mk_main_t │ │ ├── CMakeLists.txt │ │ ├── behavior.cpp │ │ └── requirements.cpp │ ├── serial_write │ │ ├── CMakeLists.txt │ │ ├── behavior.cpp │ │ └── requirements.cpp │ ├── vm_pool_t │ │ ├── CMakeLists.txt │ │ ├── behavior.cpp │ │ └── requirements.cpp │ ├── vm_t │ │ ├── CMakeLists.txt │ │ ├── behavior.cpp │ │ └── requirements.cpp │ ├── vmexit_log_t │ │ ├── CMakeLists.txt │ │ ├── behavior.cpp │ │ └── requirements.cpp │ ├── vmexit_loop │ │ ├── CMakeLists.txt │ │ ├── behavior.cpp │ │ └── requirements.cpp │ ├── vp_pool_t │ │ ├── CMakeLists.txt │ │ ├── behavior.cpp │ │ └── requirements.cpp │ ├── vp_t │ │ ├── CMakeLists.txt │ │ ├── behavior.cpp │ │ └── requirements.cpp │ ├── vs_pool_t │ │ ├── CMakeLists.txt │ │ ├── behavior.cpp │ │ └── requirements.cpp │ ├── vs_t │ │ ├── CMakeLists.txt │ │ ├── behavior.cpp │ │ └── requirements.cpp │ └── x64 │ │ ├── amd │ │ └── intrinsic_t │ │ │ ├── CMakeLists.txt │ │ │ ├── behavior.cpp │ │ │ └── requirements.cpp │ │ ├── dispatch_esr_nmi │ │ ├── CMakeLists.txt │ │ ├── behavior.cpp │ │ └── requirements.cpp │ │ ├── intel │ │ └── intrinsic_t │ │ │ ├── CMakeLists.txt │ │ │ ├── behavior.cpp │ │ │ └── requirements.cpp │ │ └── intrinsic_t │ │ ├── CMakeLists.txt │ │ ├── behavior.cpp │ │ └── requirements.cpp │ └── src │ ├── debug_ring_write │ ├── CMakeLists.txt │ ├── behavior.cpp │ └── requirements.cpp │ ├── dispatch_esr_page_fault │ ├── CMakeLists.txt │ ├── behavior.cpp │ └── requirements.cpp │ ├── dispatch_syscall │ ├── CMakeLists.txt │ ├── behavior.cpp │ └── requirements.cpp │ ├── dispatch_syscall_bf_callback_op │ ├── CMakeLists.txt │ ├── behavior.cpp │ └── requirements.cpp │ ├── dispatch_syscall_bf_control_op │ ├── CMakeLists.txt │ ├── behavior.cpp │ └── requirements.cpp │ ├── dispatch_syscall_bf_debug_op │ ├── CMakeLists.txt │ ├── behavior.cpp │ └── requirements.cpp │ ├── dispatch_syscall_bf_handle_op │ ├── CMakeLists.txt │ ├── behavior.cpp │ └── requirements.cpp │ ├── dispatch_syscall_bf_mem_op │ ├── CMakeLists.txt │ ├── behavior.cpp │ └── requirements.cpp │ ├── dispatch_syscall_bf_vm_op │ ├── CMakeLists.txt │ ├── behavior.cpp │ └── requirements.cpp │ ├── dispatch_syscall_bf_vp_op │ ├── CMakeLists.txt │ ├── behavior.cpp │ └── requirements.cpp │ ├── dispatch_syscall_bf_vs_op │ ├── CMakeLists.txt │ ├── behavior.cpp │ └── requirements.cpp │ ├── ext_pool_t │ ├── CMakeLists.txt │ ├── behavior.cpp │ └── requirements.cpp │ ├── ext_t │ ├── CMakeLists.txt │ ├── behavior.cpp │ └── requirements.cpp │ ├── huge_pool_t │ ├── CMakeLists.txt │ ├── behavior.cpp │ └── requirements.cpp │ ├── mk_main_t │ ├── CMakeLists.txt │ ├── behavior.cpp │ └── requirements.cpp │ ├── serial_write │ ├── CMakeLists.txt │ ├── behavior.cpp │ └── requirements.cpp │ ├── vm_pool_t │ ├── CMakeLists.txt │ ├── behavior.cpp │ └── requirements.cpp │ ├── vm_t │ ├── CMakeLists.txt │ ├── behavior.cpp │ └── requirements.cpp │ ├── vmexit_loop │ ├── CMakeLists.txt │ ├── behavior.cpp │ └── requirements.cpp │ ├── vp_pool_t │ ├── CMakeLists.txt │ ├── behavior.cpp │ └── requirements.cpp │ ├── vp_t │ ├── CMakeLists.txt │ ├── behavior.cpp │ └── requirements.cpp │ ├── vs_pool_t │ ├── CMakeLists.txt │ ├── behavior.cpp │ └── requirements.cpp │ └── x64 │ ├── amd │ ├── dispatch_esr_nmi │ │ ├── CMakeLists.txt │ │ ├── behavior.cpp │ │ └── requirements.cpp │ ├── intrinsic_t │ │ ├── CMakeLists.txt │ │ ├── behavior.cpp │ │ └── requirements.cpp │ └── vs_t │ │ ├── CMakeLists.txt │ │ ├── behavior.cpp │ │ └── requirements.cpp │ ├── dispatch_esr │ ├── CMakeLists.txt │ ├── behavior.cpp │ └── requirements.cpp │ ├── dispatch_syscall_bf_intrinsic_op │ ├── CMakeLists.txt │ ├── behavior.cpp │ └── requirements.cpp │ ├── intel │ ├── dispatch_esr_nmi │ │ ├── CMakeLists.txt │ │ ├── behavior.cpp │ │ └── requirements.cpp │ ├── intrinsic_t │ │ ├── CMakeLists.txt │ │ ├── behavior.cpp │ │ └── requirements.cpp │ └── vs_t │ │ ├── CMakeLists.txt │ │ ├── behavior.cpp │ │ └── requirements.cpp │ └── vmexit_log_t │ ├── CMakeLists.txt │ ├── behavior.cpp │ └── requirements.cpp ├── lib ├── CMakeLists.txt ├── Cargo.toml ├── include │ ├── basic_alloc_huge_t.hpp │ ├── basic_alloc_page_t.hpp │ ├── basic_allocated_status_t.hpp │ ├── basic_entries_t.hpp │ ├── basic_entry_status_t.hpp │ ├── basic_lock_guard_t.hpp │ ├── basic_map_page_flags.hpp │ ├── basic_page_1g_t.hpp │ ├── basic_page_2m_t.hpp │ ├── basic_page_4k_t.hpp │ ├── basic_page_pool_node_t.hpp │ ├── basic_page_table_t.hpp │ └── basic_queue_t.hpp ├── lib.rs ├── mocks │ ├── basic_ifmap_t.hpp │ ├── basic_ioctl_helpers.hpp │ ├── basic_ioctl_t.hpp │ ├── basic_page_pool_helpers.hpp │ ├── basic_page_pool_t.hpp │ ├── basic_root_page_table_t.hpp │ └── basic_spinlock_t.hpp ├── src │ ├── basic_page_pool_t.hpp │ ├── basic_root_page_table_t.hpp │ ├── basic_spinlock_t.hpp │ ├── linux │ │ ├── basic_ifmap_t.hpp │ │ └── basic_ioctl_t.hpp │ └── windows │ │ ├── basic_ifmap_t.hpp │ │ └── basic_ioctl_t.hpp └── tests │ ├── .clang-tidy │ ├── CMakeLists.txt │ ├── include │ ├── basic_lock_guard_t │ │ ├── CMakeLists.txt │ │ ├── behavior.cpp │ │ └── requirements.cpp │ ├── basic_queue_t │ │ ├── CMakeLists.txt │ │ ├── behavior.cpp │ │ └── requirements.cpp │ ├── dump_vmm_args_t.hpp │ ├── ext_tcb_t.hpp │ ├── l0e_t.hpp │ ├── l1e_t.hpp │ ├── l2e_t.hpp │ ├── l3e_t.hpp │ ├── start_vmm_args_t.hpp │ ├── stop_vmm_args_t.hpp │ ├── tls_t.hpp │ ├── vmcb_t.hpp │ └── vmcs_t.hpp │ ├── mocks │ ├── basic_ifmap_t │ │ ├── CMakeLists.txt │ │ ├── behavior.cpp │ │ └── requirements.cpp │ ├── basic_ioctl_t │ │ ├── CMakeLists.txt │ │ ├── behavior.cpp │ │ └── requirements.cpp │ ├── basic_page_pool_t │ │ ├── CMakeLists.txt │ │ ├── behavior.cpp │ │ └── requirements.cpp │ ├── basic_root_page_table_t │ │ ├── CMakeLists.txt │ │ ├── behavior.cpp │ │ └── requirements.cpp │ └── basic_spinlock_t │ │ ├── CMakeLists.txt │ │ ├── behavior.cpp │ │ └── requirements.cpp │ └── src │ ├── basic_page_pool_t │ ├── CMakeLists.txt │ ├── basic_page_pool_helpers.hpp │ ├── behavior.cpp │ └── requirements.cpp │ ├── basic_root_page_table_t │ ├── CMakeLists.txt │ ├── basic_root_page_table_helpers.hpp │ ├── behavior.cpp │ └── requirements.cpp │ ├── basic_spinlock_t │ ├── CMakeLists.txt │ ├── basic_spinlock_helpers.hpp │ ├── behavior.cpp │ └── requirements.cpp │ ├── intrinsic_t.hpp │ ├── linux │ ├── basic_ifmap_t │ │ ├── CMakeLists.txt │ │ └── requirements.cpp │ └── basic_ioctl_t │ │ ├── CMakeLists.txt │ │ └── requirements.cpp │ └── windows │ ├── basic_ifmap_t │ ├── CMakeLists.txt │ └── requirements.cpp │ └── basic_ioctl_t │ ├── CMakeLists.txt │ └── requirements.cpp ├── loader ├── .clang-tidy ├── CMakeLists.txt ├── efi │ ├── CMakeLists.txt │ ├── include │ │ ├── arch_init.h │ │ ├── arch_locate_protocols.h │ │ ├── arch_num_online_cpus.h │ │ ├── arch_work_on_cpu.h │ │ ├── debug.h │ │ ├── efi │ │ │ ├── efi_allocate_type.h │ │ │ ├── efi_boot_services.h │ │ │ ├── efi_configuration_table.h │ │ │ ├── efi_cpu_physical_location.h │ │ │ ├── efi_cpu_physical_location2.h │ │ │ ├── efi_device_path_protocol.h │ │ │ ├── efi_file_info.h │ │ │ ├── efi_file_io_token.h │ │ │ ├── efi_file_protocol.h │ │ │ ├── efi_guid.h │ │ │ ├── efi_interface_type.h │ │ │ ├── efi_list_entry.h │ │ │ ├── efi_loaded_image_protocol.h │ │ │ ├── efi_locate_search_type.h │ │ │ ├── efi_memory_descriptor.h │ │ │ ├── efi_memory_type.h │ │ │ ├── efi_mp_services_protocol.h │ │ │ ├── efi_open_protocol_information_entry.h │ │ │ ├── efi_processor_information.h │ │ │ ├── efi_runtime_services.h │ │ │ ├── efi_shell_file_info.h │ │ │ ├── efi_shell_protocol.h │ │ │ ├── efi_simple_file_system_protocol.h │ │ │ ├── efi_simple_text_input_protocol.h │ │ │ ├── efi_simple_text_output_mode.h │ │ │ ├── efi_simple_text_output_protocol.h │ │ │ ├── efi_status.h │ │ │ ├── efi_system_table.h │ │ │ ├── efi_table_header.h │ │ │ ├── efi_time.h │ │ │ ├── efi_timer_delay.h │ │ │ ├── efi_types.h │ │ │ └── extened_processor_information.h │ │ ├── std │ │ │ └── inttypes.h │ │ ├── work_on_cpu_callback.h │ │ ├── work_on_cpu_callback_args.h │ │ └── x64 │ │ │ ├── setup_cr0.h │ │ │ ├── setup_cr4.h │ │ │ └── setup_tss.h │ └── src │ │ ├── arm │ │ └── aarch64 │ │ │ ├── arch_init.c │ │ │ ├── arch_locate_protocols.c │ │ │ ├── arch_num_online_cpus.c │ │ │ ├── arch_work_on_cpu.c │ │ │ ├── demote.S │ │ │ ├── esr.S │ │ │ ├── exception_vectors.S │ │ │ ├── flush_cache.S │ │ │ ├── memcpy.S │ │ │ ├── memset.S │ │ │ ├── promote.S │ │ │ ├── read_currentel.S │ │ │ ├── read_daif.S │ │ │ ├── read_hcr_el2.S │ │ │ ├── read_mair_el2.S │ │ │ ├── read_sctlr_el2.S │ │ │ ├── read_spsel.S │ │ │ ├── read_tcr_el2.S │ │ │ ├── read_ttbr0_el2.S │ │ │ ├── read_vbar_el2.S │ │ │ ├── serial_write_c.S │ │ │ └── serial_write_hex.S │ │ ├── entry.c │ │ ├── platform.c │ │ ├── work_on_cpu_callback.c │ │ └── x64 │ │ ├── amd │ │ ├── disable_interrupts.S │ │ ├── enable_interrupts.S │ │ ├── setup_cr0.c │ │ └── setup_cr4.c │ │ ├── arch_init.c │ │ ├── arch_locate_protocols.c │ │ ├── arch_num_online_cpus.c │ │ ├── arch_work_on_cpu.c │ │ ├── demote.S │ │ ├── esr_default.S │ │ ├── esr_df.S │ │ ├── esr_gpf.S │ │ ├── esr_nmi.S │ │ ├── esr_pf.S │ │ ├── flush_cache.S │ │ ├── intel │ │ ├── disable_interrupts.S │ │ ├── enable_interrupts.S │ │ ├── intrinsic_vmxoff.S │ │ ├── intrinsic_vmxon.S │ │ ├── setup_cr0.c │ │ └── setup_cr4.c │ │ ├── intrinsic_cpuid.S │ │ ├── intrinsic_inb.S │ │ ├── intrinsic_lcr0.S │ │ ├── intrinsic_lcr4.S │ │ ├── intrinsic_lgdt.S │ │ ├── intrinsic_ltr.S │ │ ├── intrinsic_outb.S │ │ ├── intrinsic_rdmsr.S │ │ ├── intrinsic_scr0.S │ │ ├── intrinsic_scr4.S │ │ ├── intrinsic_scs.S │ │ ├── intrinsic_sds.S │ │ ├── intrinsic_ses.S │ │ ├── intrinsic_sfs.S │ │ ├── intrinsic_sgdt.S │ │ ├── intrinsic_sgs.S │ │ ├── intrinsic_sidt.S │ │ ├── intrinsic_sldtr.S │ │ ├── intrinsic_sss.S │ │ ├── intrinsic_str.S │ │ ├── intrinsic_wrmsr.S │ │ ├── memops.S │ │ ├── promote.S │ │ ├── serial_write_c.S │ │ ├── serial_write_hex.S │ │ └── setup_tss.c ├── include │ ├── alloc_and_copy_ext_elf_files_from_user.h │ ├── alloc_and_copy_mk_code_aliases.h │ ├── alloc_and_copy_mk_elf_file_from_user.h │ ├── alloc_and_copy_mk_elf_segments.h │ ├── alloc_and_copy_mk_state.h │ ├── alloc_and_copy_root_vp_state.h │ ├── alloc_mk_args.h │ ├── alloc_mk_debug_ring.h │ ├── alloc_mk_huge_pool.h │ ├── alloc_mk_page_pool.h │ ├── alloc_mk_root_page_table.h │ ├── alloc_mk_stack.h │ ├── arm │ │ └── aarch64 │ │ │ ├── alloc_l1t.h │ │ │ ├── alloc_l2t.h │ │ │ ├── alloc_l3t.h │ │ │ ├── code_aliases_t.h │ │ │ ├── esr.h │ │ │ ├── exception_vectors.h │ │ │ ├── free_l0t.h │ │ │ ├── free_l1t.h │ │ │ ├── free_l2t.h │ │ │ ├── l0t_t.h │ │ │ ├── l0te_t.h │ │ │ ├── l0to.h │ │ │ ├── l1t_t.h │ │ │ ├── l1te_t.h │ │ │ ├── l1to.h │ │ │ ├── l2t_t.h │ │ │ ├── l2te_t.h │ │ │ ├── l2to.h │ │ │ ├── l3t_t.h │ │ │ ├── l3te_t.h │ │ │ ├── l3to.h │ │ │ ├── read_currentel.h │ │ │ ├── read_daif.h │ │ │ ├── read_hcr_el2.h │ │ │ ├── read_mair_el2.h │ │ │ ├── read_sctlr_el2.h │ │ │ ├── read_spsel.h │ │ │ ├── read_tcr_el2.h │ │ │ ├── read_ttbr0_el2.h │ │ │ ├── read_vbar_el2.h │ │ │ └── root_page_table_t.h │ ├── bfelf │ │ ├── bfelf_elf64_ehdr_t.h │ │ ├── bfelf_elf64_phdr_t.h │ │ └── bfelf_elf64_shdr_t.h │ ├── check_cpu_configuration.h │ ├── demote.h │ ├── dump_ext_elf_files.h │ ├── dump_mk_args.h │ ├── dump_mk_code_aliases.h │ ├── dump_mk_debug_ring.h │ ├── dump_mk_elf_file.h │ ├── dump_mk_elf_segments.h │ ├── dump_mk_huge_pool.h │ ├── dump_mk_page_pool.h │ ├── dump_mk_root_page_table.h │ ├── dump_mk_stack.h │ ├── dump_mk_state.h │ ├── dump_root_vp_state.h │ ├── dump_vmm.h │ ├── dump_vmm_on_error_if_needed.h │ ├── elf_file_t.h │ ├── elf_segment_t.h │ ├── flush_cache.h │ ├── free_ext_elf_files.h │ ├── free_mk_args.h │ ├── free_mk_code_aliases.h │ ├── free_mk_debug_ring.h │ ├── free_mk_elf_file.h │ ├── free_mk_elf_segments.h │ ├── free_mk_huge_pool.h │ ├── free_mk_page_pool.h │ ├── free_mk_root_page_table.h │ ├── free_mk_stack.h │ ├── free_mk_state.h │ ├── free_root_vp_state.h │ ├── g_mut_cpu_status.h │ ├── g_mut_ext_elf_files.h │ ├── g_mut_mk_args.h │ ├── g_mut_mk_code_aliases.h │ ├── g_mut_mk_elf_file.h │ ├── g_mut_mk_elf_segments.h │ ├── g_mut_mk_huge_pool.h │ ├── g_mut_mk_page_pool.h │ ├── g_mut_mk_stack.h │ ├── g_mut_mk_state.h │ ├── g_mut_root_vp_state.h │ ├── g_mut_vmm_status.h │ ├── g_pmut_mut_mk_debug_ring.h │ ├── g_pmut_mut_mk_root_page_table.h │ ├── get_mk_huge_pool_addr.h │ ├── get_mk_page_pool_addr.h │ ├── interface │ │ ├── aarch64 │ │ │ └── state_save_t.h │ │ ├── debug_ring_t.h │ │ ├── debug_ring_t.hpp │ │ ├── dump_vmm_args_t.h │ │ ├── dump_vmm_args_t.hpp │ │ ├── mk_args_t.h │ │ ├── mk_args_t.hpp │ │ ├── start_vmm_args_t.h │ │ ├── start_vmm_args_t.hpp │ │ ├── stop_vmm_args_t.h │ │ ├── stop_vmm_args_t.hpp │ │ └── x64 │ │ │ ├── cpuid_commands.h │ │ │ ├── cpuid_commands.hpp │ │ │ ├── global_descriptor_table_register_t.h │ │ │ ├── global_descriptor_table_register_t.hpp │ │ │ ├── interrupt_descriptor_table_register_t.h │ │ │ ├── interrupt_descriptor_table_register_t.hpp │ │ │ ├── state_save_t.h │ │ │ ├── state_save_t.hpp │ │ │ ├── tss_t.h │ │ │ └── tss_t.hpp │ ├── itoa.h │ ├── loader_fini.h │ ├── loader_init.h │ ├── map_4k_page.h │ ├── map_4k_page_rw.h │ ├── map_4k_page_rx.h │ ├── map_ext_elf_files.h │ ├── map_mk_args.h │ ├── map_mk_code_aliases.h │ ├── map_mk_debug_ring.h │ ├── map_mk_elf_file.h │ ├── map_mk_elf_segments.h │ ├── map_mk_huge_pool.h │ ├── map_mk_page_pool.h │ ├── map_mk_stack.h │ ├── map_mk_state.h │ ├── map_root_vp_state.h │ ├── mutable_span_t.h │ ├── platform.h │ ├── promote.h │ ├── send_command_report_off.h │ ├── send_command_report_on.h │ ├── send_command_stop.h │ ├── serial_init.h │ ├── serial_write.h │ ├── serial_write_c.h │ ├── serial_write_hex.h │ ├── span_t.h │ ├── start_vmm.h │ ├── start_vmm_per_cpu.h │ ├── stop_and_free_the_vmm.h │ ├── stop_vmm.h │ ├── stop_vmm_per_cpu.h │ ├── types.h │ └── x64 │ │ ├── alloc_pdpt.h │ │ ├── alloc_pdt.h │ │ ├── alloc_pt.h │ │ ├── code_aliases_t.h │ │ ├── disable_hve.h │ │ ├── enable_hve.h │ │ ├── esr_default.h │ │ ├── esr_df.h │ │ ├── esr_gpf.h │ │ ├── esr_nmi.h │ │ ├── esr_pf.h │ │ ├── free_pdpt.h │ │ ├── free_pdt.h │ │ ├── free_pml4t.h │ │ ├── get_gdt_descriptor_attrib.h │ │ ├── get_gdt_descriptor_base.h │ │ ├── get_gdt_descriptor_limit.h │ │ ├── intel │ │ ├── intrinsic_vmxoff.h │ │ └── intrinsic_vmxon.h │ │ ├── intrinsic_cpuid.h │ │ ├── intrinsic_inb.h │ │ ├── intrinsic_lcr0.h │ │ ├── intrinsic_lcr4.h │ │ ├── intrinsic_lgdt.h │ │ ├── intrinsic_ltr.h │ │ ├── intrinsic_outb.h │ │ ├── intrinsic_rdmsr.h │ │ ├── intrinsic_scr0.h │ │ ├── intrinsic_scr4.h │ │ ├── intrinsic_scs.h │ │ ├── intrinsic_sds.h │ │ ├── intrinsic_ses.h │ │ ├── intrinsic_sfs.h │ │ ├── intrinsic_sgdt.h │ │ ├── intrinsic_sgs.h │ │ ├── intrinsic_sidt.h │ │ ├── intrinsic_sldtr.h │ │ ├── intrinsic_sss.h │ │ ├── intrinsic_str.h │ │ ├── intrinsic_wrmsr.h │ │ ├── pdpt_t.h │ │ ├── pdpte_t.h │ │ ├── pdpto.h │ │ ├── pdt_t.h │ │ ├── pdte_t.h │ │ ├── pdto.h │ │ ├── pml4t_t.h │ │ ├── pml4te_t.h │ │ ├── pml4to.h │ │ ├── pt_t.h │ │ ├── pte_t.h │ │ ├── pto.h │ │ ├── root_page_table_t.h │ │ ├── set_gdt_descriptor.h │ │ └── set_idt_descriptor.h ├── linux │ ├── .clang-format │ ├── Makefile.in │ ├── include │ │ ├── debug.h │ │ ├── platform_interface │ │ │ ├── loader_platform_interface.h │ │ │ └── loader_platform_interface.hpp │ │ ├── std │ │ │ ├── inttypes.h │ │ │ └── stdint.h │ │ └── work_on_cpu_callback_args.h │ └── src │ │ ├── entry.c │ │ ├── platform.c │ │ └── x64 │ │ ├── amd │ │ ├── disable_interrupts.S │ │ └── enable_interrupts.S │ │ ├── demote.S │ │ ├── esr_default.S │ │ ├── esr_df.S │ │ ├── esr_gpf.S │ │ ├── esr_nmi.S │ │ ├── esr_pf.S │ │ ├── flush_cache.S │ │ ├── intel │ │ ├── disable_interrupts.S │ │ ├── enable_interrupts.S │ │ ├── intrinsic_vmxoff.S │ │ └── intrinsic_vmxon.S │ │ ├── intrinsic_cpuid.S │ │ ├── intrinsic_inb.S │ │ ├── intrinsic_lcr4.S │ │ ├── intrinsic_outb.S │ │ ├── intrinsic_rdmsr.S │ │ ├── intrinsic_scr0.S │ │ ├── intrinsic_scr4.S │ │ ├── intrinsic_scs.S │ │ ├── intrinsic_sds.S │ │ ├── intrinsic_ses.S │ │ ├── intrinsic_sfs.S │ │ ├── intrinsic_sgdt.S │ │ ├── intrinsic_sgs.S │ │ ├── intrinsic_sidt.S │ │ ├── intrinsic_sldtr.S │ │ ├── intrinsic_sss.S │ │ ├── intrinsic_str.S │ │ ├── intrinsic_wrmsr.S │ │ ├── promote.S │ │ ├── serial_write_c.S │ │ └── serial_write_hex.S ├── src │ ├── alloc_and_copy_ext_elf_files_from_user.c │ ├── alloc_and_copy_mk_elf_file_from_user.c │ ├── alloc_and_copy_mk_elf_segments.c │ ├── alloc_mk_args.c │ ├── alloc_mk_debug_ring.c │ ├── alloc_mk_huge_pool.c │ ├── alloc_mk_page_pool.c │ ├── alloc_mk_stack.c │ ├── arm │ │ └── aarch64 │ │ │ ├── alloc_and_copy_mk_code_aliases.c │ │ │ ├── alloc_and_copy_mk_state.c │ │ │ ├── alloc_and_copy_root_vp_state.c │ │ │ ├── alloc_l1t.c │ │ │ ├── alloc_l2t.c │ │ │ ├── alloc_l3t.c │ │ │ ├── alloc_mk_root_page_table.c │ │ │ ├── check_cpu_configuration.c │ │ │ ├── dump_mk_code_aliases.c │ │ │ ├── dump_mk_state.c │ │ │ ├── dump_root_vp_state.c │ │ │ ├── free_l0t.c │ │ │ ├── free_l1t.c │ │ │ ├── free_l2t.c │ │ │ ├── free_mk_code_aliases.c │ │ │ ├── free_mk_root_page_table.c │ │ │ ├── free_mk_state.c │ │ │ ├── free_root_vp_state.c │ │ │ ├── map_4k_page.c │ │ │ ├── map_mk_code_aliases.c │ │ │ ├── map_mk_state.c │ │ │ ├── map_root_vp_state.c │ │ │ ├── send_command_report_off.c │ │ │ ├── send_command_report_on.c │ │ │ ├── send_command_stop.c │ │ │ └── serial_init.c │ ├── dump_ext_elf_files.c │ ├── dump_mk_args.c │ ├── dump_mk_debug_ring.c │ ├── dump_mk_elf_file.c │ ├── dump_mk_elf_segments.c │ ├── dump_mk_huge_pool.c │ ├── dump_mk_page_pool.c │ ├── dump_mk_root_page_table.c │ ├── dump_mk_stack.c │ ├── dump_vmm.c │ ├── free_ext_elf_files.c │ ├── free_mk_args.c │ ├── free_mk_debug_ring.c │ ├── free_mk_elf_file.c │ ├── free_mk_elf_segments.c │ ├── free_mk_huge_pool.c │ ├── free_mk_page_pool.c │ ├── free_mk_stack.c │ ├── g_mut_cpu_status.c │ ├── g_mut_ext_elf_files.c │ ├── g_mut_mk_args.c │ ├── g_mut_mk_code_aliases.c │ ├── g_mut_mk_elf_file.c │ ├── g_mut_mk_elf_segments.c │ ├── g_mut_mk_huge_pool.c │ ├── g_mut_mk_page_pool.c │ ├── g_mut_mk_stack.c │ ├── g_mut_mk_state.c │ ├── g_mut_root_vp_state.c │ ├── g_mut_vmm_status.c │ ├── g_pmut_mut_mk_debug_ring.c │ ├── g_pmut_mut_mk_root_page_table.c │ ├── get_mk_huge_pool_addr.c │ ├── get_mk_page_pool_addr.c │ ├── loader_fini.c │ ├── loader_init.c │ ├── map_4k_page_rw.c │ ├── map_4k_page_rx.c │ ├── map_ext_elf_files.c │ ├── map_mk_args.c │ ├── map_mk_debug_ring.c │ ├── map_mk_elf_file.c │ ├── map_mk_elf_segments.c │ ├── map_mk_huge_pool.c │ ├── map_mk_page_pool.c │ ├── map_mk_stack.c │ ├── serial_write.c │ ├── start_vmm.c │ ├── start_vmm_per_cpu.c │ ├── stop_and_free_the_vmm.c │ ├── stop_vmm.c │ ├── stop_vmm_per_cpu.c │ └── x64 │ │ ├── alloc_and_copy_mk_code_aliases.c │ │ ├── alloc_and_copy_mk_state.c │ │ ├── alloc_and_copy_root_vp_state.c │ │ ├── alloc_mk_root_page_table.c │ │ ├── alloc_pdpt.c │ │ ├── alloc_pdt.c │ │ ├── alloc_pt.c │ │ ├── amd │ │ ├── check_cpu_configuration.c │ │ ├── disable_hve.c │ │ └── enable_hve.c │ │ ├── dump_mk_code_aliases.c │ │ ├── dump_mk_state.c │ │ ├── dump_root_vp_state.c │ │ ├── free_mk_code_aliases.c │ │ ├── free_mk_root_page_table.c │ │ ├── free_mk_state.c │ │ ├── free_pdpt.c │ │ ├── free_pdt.c │ │ ├── free_pml4t.c │ │ ├── free_root_vp_state.c │ │ ├── get_gdt_descriptor_attrib.c │ │ ├── get_gdt_descriptor_base.c │ │ ├── get_gdt_descriptor_limit.c │ │ ├── intel │ │ ├── check_cpu_configuration.c │ │ ├── disable_hve.c │ │ └── enable_hve.c │ │ ├── map_4k_page.c │ │ ├── map_mk_code_aliases.c │ │ ├── map_mk_state.c │ │ ├── map_root_vp_state.c │ │ ├── send_command_report_off.c │ │ ├── send_command_report_on.c │ │ ├── send_command_stop.c │ │ ├── serial_init.c │ │ ├── set_gdt_descriptor.c │ │ └── set_idt_descriptor.c ├── tests │ ├── CMakeLists.txt │ ├── include │ │ ├── code_aliases_t.h │ │ ├── constants.h │ │ ├── debug.h │ │ ├── helpers.hpp │ │ ├── l0t_t.h │ │ ├── root_page_table_t.h │ │ └── state_save_t.h │ └── src │ │ ├── CMakeLists.txt │ │ ├── alloc_and_copy_mk_code_aliases.c │ │ ├── alloc_and_copy_mk_state.c │ │ ├── alloc_and_copy_root_vp_state.c │ │ ├── alloc_mk_root_page_table.c │ │ ├── check_cpu_configuration.c │ │ ├── dump_mk_code_aliases.c │ │ ├── dump_mk_root_page_table.c │ │ ├── dump_mk_state.c │ │ ├── dump_root_vp_state.c │ │ ├── free_mk_code_aliases copy.c │ │ ├── free_mk_code_aliases.c │ │ ├── free_mk_root_page_table.c │ │ ├── free_mk_state.c │ │ ├── free_root_vp_state.c │ │ ├── map_4k_page.c │ │ ├── map_mk_code_aliases.c │ │ ├── map_mk_state.c │ │ ├── map_root_vp_state.c │ │ ├── platform.c │ │ ├── send_command_report_off.c │ │ ├── send_command_report_on.c │ │ ├── send_command_stop.c │ │ ├── test_alloc_and_copy_ext_elf_files_from_user.cpp │ │ ├── test_alloc_and_copy_mk_elf_file_from_user.cpp │ │ ├── test_alloc_and_copy_mk_elf_segments.cpp │ │ ├── test_alloc_mk_args.cpp │ │ ├── test_alloc_mk_debug_ring.cpp │ │ ├── test_alloc_mk_huge_pool.cpp │ │ ├── test_alloc_mk_page_pool.cpp │ │ ├── test_alloc_mk_stack.cpp │ │ ├── test_dump_ext_elf_files.cpp │ │ ├── test_dump_mk_args.cpp │ │ ├── test_dump_mk_debug_ring.cpp │ │ ├── test_dump_mk_elf_file.cpp │ │ ├── test_dump_mk_elf_segments.cpp │ │ ├── test_dump_mk_huge_pool.cpp │ │ ├── test_dump_mk_page_pool.cpp │ │ ├── test_dump_mk_root_page_table.cpp │ │ ├── test_dump_mk_stack.cpp │ │ ├── test_dump_vmm.cpp │ │ ├── test_free_ext_elf_files.cpp │ │ ├── test_free_mk_args.cpp │ │ ├── test_free_mk_debug_ring.cpp │ │ ├── test_free_mk_elf_file.cpp │ │ ├── test_free_mk_elf_segments.cpp │ │ ├── test_free_mk_huge_pool.cpp │ │ ├── test_free_mk_page_pool.cpp │ │ ├── test_free_mk_stack.cpp │ │ ├── test_get_mk_huge_pool_addr.cpp │ │ ├── test_get_mk_page_pool_addr.cpp │ │ ├── test_helpers.cpp │ │ ├── test_loader_fini.cpp │ │ ├── test_loader_init.cpp │ │ ├── test_map_4k_page_rw.cpp │ │ ├── test_map_4k_page_rx.cpp │ │ ├── test_map_ext_elf_files.cpp │ │ ├── test_map_mk_args.cpp │ │ ├── test_map_mk_debug_ring.cpp │ │ ├── test_map_mk_elf_file.cpp │ │ ├── test_map_mk_elf_segments.cpp │ │ ├── test_map_mk_huge_pool.cpp │ │ ├── test_map_mk_page_pool.cpp │ │ ├── test_map_mk_stack.cpp │ │ ├── test_platform.cpp │ │ ├── test_serial_write.cpp │ │ ├── test_start_vmm.cpp │ │ ├── test_start_vmm_per_cpu.cpp │ │ ├── test_stop_vmm.cpp │ │ ├── test_stop_vmm_per_cpu.cpp │ │ └── x64 │ │ ├── CMakeLists.txt │ │ ├── demote.S │ │ ├── esr_default.S │ │ ├── esr_df.S │ │ ├── esr_gpf.S │ │ ├── esr_nmi.S │ │ ├── esr_pf.S │ │ ├── promote.S │ │ ├── serial_write_c.S │ │ ├── serial_write_hex.S │ │ ├── test_alloc_and_copy_mk_code_aliases.cpp │ │ ├── test_alloc_and_copy_mk_state.cpp │ │ ├── test_alloc_and_copy_root_vp_state.cpp │ │ ├── test_alloc_mk_root_page_table.cpp │ │ ├── test_alloc_pdpt.cpp │ │ ├── test_alloc_pdt.cpp │ │ ├── test_alloc_pt.cpp │ │ ├── test_dump_mk_code_aliases.cpp │ │ ├── test_dump_mk_state.cpp │ │ ├── test_dump_root_vp_state.cpp │ │ ├── test_free_mk_code_aliases.cpp │ │ ├── test_free_mk_root_page_table.cpp │ │ ├── test_free_mk_state.cpp │ │ ├── test_free_pdpt.cpp │ │ ├── test_free_pdt.cpp │ │ ├── test_free_pml4t.cpp │ │ ├── test_free_root_vp_state.cpp │ │ ├── test_get_gdt_descriptor_attrib.cpp │ │ ├── test_get_gdt_descriptor_base.cpp │ │ ├── test_get_gdt_descriptor_limit.cpp │ │ ├── test_map_4k_page.cpp │ │ ├── test_map_mk_code_aliases.cpp │ │ ├── test_map_mk_state.cpp │ │ ├── test_map_root_vp_state.cpp │ │ ├── test_send_command_report_off.cpp │ │ ├── test_send_command_report_on.cpp │ │ ├── test_send_command_stop.cpp │ │ └── test_serial_init.cpp └── windows │ ├── include │ ├── Device.h │ ├── Driver.h │ ├── Queue.h │ ├── Trace.h │ ├── debug.h │ ├── platform_interface │ │ ├── loader_platform_interface.h │ │ └── loader_platform_interface.hpp │ ├── std │ │ ├── inttypes.h │ │ └── stdint.h │ └── work_on_cpu_callback_args.h │ ├── loader.inf │ ├── loader.sln │ ├── loader.vcxproj │ ├── loader.vcxproj.filters │ └── src │ ├── Device.c │ ├── Driver.c │ ├── Queue.c │ ├── platform.c │ └── x64 │ ├── amd │ ├── disable_interrupts.asm │ └── enable_interrupts.asm │ ├── demote.asm │ ├── esr_default.asm │ ├── esr_df.asm │ ├── esr_gpf.asm │ ├── esr_nmi.asm │ ├── esr_pf.asm │ ├── flush_cache.asm │ ├── intel │ ├── disable_interrupts.asm │ ├── enable_interrupts.asm │ ├── intrinsic_vmxoff.asm │ └── intrinsic_vmxon.asm │ ├── intrinsic_cpuid.asm │ ├── intrinsic_inb.asm │ ├── intrinsic_lcr4.asm │ ├── intrinsic_outb.asm │ ├── intrinsic_rdmsr.asm │ ├── intrinsic_scr0.asm │ ├── intrinsic_scr4.asm │ ├── intrinsic_scs.asm │ ├── intrinsic_sds.asm │ ├── intrinsic_ses.asm │ ├── intrinsic_sfs.asm │ ├── intrinsic_sgdt.asm │ ├── intrinsic_sgs.asm │ ├── intrinsic_sidt.asm │ ├── intrinsic_sldtr.asm │ ├── intrinsic_sss.asm │ ├── intrinsic_str.asm │ ├── intrinsic_wrmsr.asm │ ├── promote.asm │ ├── serial_write_c.asm │ └── serial_write_hex.asm ├── runtime ├── CMakeLists.txt ├── src │ ├── __stack_chk_fail.cpp │ ├── arm │ │ └── aarch64 │ │ │ ├── __stack_chk_fail.S │ │ │ ├── __stack_chk_guard.S │ │ │ ├── _start.S │ │ │ ├── memcpy.S │ │ │ └── memset.S │ ├── bsl │ │ ├── cstdio.hpp │ │ ├── cstdlib.hpp │ │ └── details │ │ │ └── print_thread_id.hpp │ └── x64 │ │ ├── __stack_chk_guard.S │ │ ├── _start.S │ │ ├── intrinsic_assert.S │ │ ├── memcpy.S │ │ └── memset.S └── tests │ ├── .clang-tidy │ ├── CMakeLists.txt │ └── src │ ├── __stack_chk_fail │ ├── CMakeLists.txt │ └── behavior.cpp │ ├── __stack_chk_guard │ ├── CMakeLists.txt │ └── behavior.cpp │ ├── _start │ ├── CMakeLists.txt │ └── behavior.cpp │ ├── bsl │ ├── cstdio │ │ ├── CMakeLists.txt │ │ ├── behavior.cpp │ │ └── requirements.cpp │ ├── cstdlib │ │ ├── CMakeLists.txt │ │ └── requirements.cpp │ └── details │ │ └── print_thread_id │ │ ├── CMakeLists.txt │ │ ├── behavior.cpp │ │ └── requirements.cpp │ ├── memcpy │ ├── CMakeLists.txt │ └── behavior.cpp │ └── memset │ ├── CMakeLists.txt │ └── behavior.cpp ├── syscall ├── CMakeLists.txt ├── ext_lib_cpp.cmake ├── include │ ├── bf_constants.hpp │ ├── bf_constants.rs │ ├── bf_types.hpp │ ├── bf_types.rs │ └── x64 │ │ ├── amd │ │ ├── bf_reg_t.hpp │ │ └── bf_reg_t.rs │ │ └── intel │ │ ├── bf_reg_t.hpp │ │ └── bf_reg_t.rs ├── lib.rs ├── mk_lib.cmake ├── mocks │ ├── bf_control_ops.hpp │ ├── bf_debug_ops.hpp │ ├── bf_reg_t.hpp │ ├── bf_syscall_impl.hpp │ └── bf_syscall_t.hpp ├── src │ ├── bf_control_ops.hpp │ ├── bf_control_ops.rs │ ├── bf_debug_ops.hpp │ ├── bf_debug_ops.rs │ ├── bf_syscall_impl.hpp │ ├── bf_syscall_impl.rs │ ├── bf_syscall_t.hpp │ ├── bf_syscall_t.rs │ └── x64 │ │ ├── bf_callback_op_register_bootstrap_impl.S │ │ ├── bf_callback_op_register_fail_impl.S │ │ ├── bf_callback_op_register_vmexit_impl.S │ │ ├── bf_control_op_again_impl.S │ │ ├── bf_control_op_exit_impl.S │ │ ├── bf_control_op_wait_impl.S │ │ ├── bf_debug_op_dump_ext_impl.S │ │ ├── bf_debug_op_dump_huge_pool_impl.S │ │ ├── bf_debug_op_dump_page_pool_impl.S │ │ ├── bf_debug_op_dump_vm_impl.S │ │ ├── bf_debug_op_dump_vmexit_log_impl.S │ │ ├── bf_debug_op_dump_vp_impl.S │ │ ├── bf_debug_op_dump_vs_impl.S │ │ ├── bf_debug_op_out_impl.S │ │ ├── bf_debug_op_write_c_impl.S │ │ ├── bf_debug_op_write_str_impl.S │ │ ├── bf_handle_op_close_handle_impl.S │ │ ├── bf_handle_op_open_handle_impl.S │ │ ├── bf_intrinsic_op_rdmsr_impl.S │ │ ├── bf_intrinsic_op_wrmsr_impl.S │ │ ├── bf_mem_op_alloc_huge_impl.S │ │ ├── bf_mem_op_alloc_page_impl.S │ │ ├── bf_tls_extid_impl.S │ │ ├── bf_tls_online_pps_impl.S │ │ ├── bf_tls_ppid_impl.S │ │ ├── bf_tls_r10_impl.S │ │ ├── bf_tls_r11_impl.S │ │ ├── bf_tls_r12_impl.S │ │ ├── bf_tls_r13_impl.S │ │ ├── bf_tls_r14_impl.S │ │ ├── bf_tls_r15_impl.S │ │ ├── bf_tls_r8_impl.S │ │ ├── bf_tls_r9_impl.S │ │ ├── bf_tls_rax_impl.S │ │ ├── bf_tls_rbp_impl.S │ │ ├── bf_tls_rbx_impl.S │ │ ├── bf_tls_rcx_impl.S │ │ ├── bf_tls_rdi_impl.S │ │ ├── bf_tls_rdx_impl.S │ │ ├── bf_tls_rsi_impl.S │ │ ├── bf_tls_set_r10_impl.S │ │ ├── bf_tls_set_r11_impl.S │ │ ├── bf_tls_set_r12_impl.S │ │ ├── bf_tls_set_r13_impl.S │ │ ├── bf_tls_set_r14_impl.S │ │ ├── bf_tls_set_r15_impl.S │ │ ├── bf_tls_set_r8_impl.S │ │ ├── bf_tls_set_r9_impl.S │ │ ├── bf_tls_set_rax_impl.S │ │ ├── bf_tls_set_rbp_impl.S │ │ ├── bf_tls_set_rbx_impl.S │ │ ├── bf_tls_set_rcx_impl.S │ │ ├── bf_tls_set_rdi_impl.S │ │ ├── bf_tls_set_rdx_impl.S │ │ ├── bf_tls_set_rsi_impl.S │ │ ├── bf_tls_thread_id_impl.S │ │ ├── bf_tls_vmid_impl.S │ │ ├── bf_tls_vpid_impl.S │ │ ├── bf_tls_vsid_impl.S │ │ ├── bf_vm_op_create_vm_impl.S │ │ ├── bf_vm_op_destroy_vm_impl.S │ │ ├── bf_vm_op_map_direct_impl.S │ │ ├── bf_vm_op_tlb_flush_impl.S │ │ ├── bf_vm_op_unmap_direct_broadcast_impl.S │ │ ├── bf_vm_op_unmap_direct_impl.S │ │ ├── bf_vp_op_create_vp_impl.S │ │ ├── bf_vp_op_destroy_vp_impl.S │ │ ├── bf_vs_op_advance_ip_and_run_current_impl.S │ │ ├── bf_vs_op_advance_ip_and_run_impl.S │ │ ├── bf_vs_op_advance_ip_and_set_active_impl.S │ │ ├── bf_vs_op_clear_impl.S │ │ ├── bf_vs_op_create_vs_impl.S │ │ ├── bf_vs_op_destroy_vs_impl.S │ │ ├── bf_vs_op_init_as_root_impl.S │ │ ├── bf_vs_op_migrate_impl.S │ │ ├── bf_vs_op_promote_impl.S │ │ ├── bf_vs_op_read_impl.S │ │ ├── bf_vs_op_run_current_impl.S │ │ ├── bf_vs_op_run_impl.S │ │ ├── bf_vs_op_set_active_impl.S │ │ ├── bf_vs_op_tlb_flush_impl.S │ │ └── bf_vs_op_write_impl.S └── tests │ ├── .clang-tidy │ ├── CMakeLists.txt │ ├── mocks │ ├── bf_control_ops │ │ ├── CMakeLists.txt │ │ ├── behavior.cpp │ │ └── requirements.cpp │ ├── bf_debug_ops │ │ ├── CMakeLists.txt │ │ ├── behavior.cpp │ │ └── requirements.cpp │ ├── bf_syscall_impl │ │ ├── CMakeLists.txt │ │ ├── behavior.cpp │ │ └── requirements.cpp │ └── bf_syscall_t │ │ ├── CMakeLists.txt │ │ ├── behavior.cpp │ │ └── requirements.cpp │ └── src │ ├── bf_control_ops │ ├── CMakeLists.txt │ ├── behavior.cpp │ └── requirements.cpp │ ├── bf_debug_ops │ ├── CMakeLists.txt │ ├── behavior.cpp │ └── requirements.cpp │ ├── bf_syscall_impl │ ├── CMakeLists.txt │ └── requirements.cpp │ └── bf_syscall_t │ ├── CMakeLists.txt │ ├── behavior.cpp │ └── requirements.cpp ├── utils ├── Shell.efi ├── cpuid_test.S ├── get_target_arch.c ├── get_target_arch_get_vendor.S ├── iwyu_tool.py ├── linux │ ├── doxygen │ ├── get_target_arch │ └── include-what-you-use ├── loop.sh └── windows │ └── get_target_arch └── vmmctl ├── CMakeLists.txt ├── mocks └── vmmctl_main.hpp ├── src ├── ifmap_t.hpp ├── ioctl_t.hpp ├── main.cpp └── vmmctl_main.hpp └── tests ├── .clang-tidy ├── CMakeLists.txt ├── include ├── ifmap_t.hpp ├── ioctl_t.hpp └── loader_platform_interface.hpp ├── mocks └── vmmctl_main │ ├── CMakeLists.txt │ ├── behavior.cpp │ └── requirements.cpp └── src ├── main ├── CMakeLists.txt └── behavior.cpp └── vmmctl_main ├── CMakeLists.txt ├── behavior.cpp └── requirements.cpp /.github/images/ais.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bareflank/hypervisor/10af879f58a0b1d9ace17b84cd9b1e41a1cc67d0/.github/images/ais.png -------------------------------------------------------------------------------- /.github/images/hypervisor_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bareflank/hypervisor/10af879f58a0b1d9ace17b84cd9b1e41a1cc67d0/.github/images/hypervisor_logo.png -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | # **License** 2 | 3 | **MIT License** 4 | 5 | Copyright © 2016 - 2019 Martin Donath 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy 8 | of this software and associated documentation files (the "Software"), to 9 | deal in the Software without restriction, including without limitation the 10 | rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 11 | sell copies of the Software, and to permit persons to whom the Software is 12 | furnished to do so, subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be included in 15 | all copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE 20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 22 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 23 | IN THE SOFTWARE. 24 | -------------------------------------------------------------------------------- /SUPPORT.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bareflank/hypervisor/10af879f58a0b1d9ace17b84cd9b1e41a1cc67d0/SUPPORT.md -------------------------------------------------------------------------------- /cmake/efi_cross_compile/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2020 Assured Information Security, Inc. 3 | # 4 | # Permission is hereby granted, free of charge, to any person obtaining a copy 5 | # of this software and associated documentation files (the "Software"), to deal 6 | # in the Software without restriction, including without limitation the rights 7 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | # copies of the Software, and to permit persons to whom the Software is 9 | # furnished to do so, subject to the following conditions: 10 | # 11 | # The above copyright notice and this permission notice shall be included in all 12 | # copies or substantial portions of the Software. 13 | # 14 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | # SOFTWARE. 21 | 22 | cmake_minimum_required(VERSION 3.13) 23 | project(hypervisor_efi C ASM) 24 | 25 | include(${CMAKE_CURRENT_LIST_DIR}/../silence.cmake) 26 | include(${CMAKE_CURRENT_LIST_DIR}/../write_constants.cmake) 27 | 28 | add_subdirectory(../../loader/efi loader) 29 | -------------------------------------------------------------------------------- /cmake/ext_cross_compile/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "rust" 3 | version = "1.0.0" 4 | edition = "2018" 5 | 6 | [lib] 7 | path = "lib.rs" 8 | crate-type = ["staticlib"] 9 | 10 | [features] 11 | default = ["GenuineIntel","debug_level_v"] 12 | debug_level_v = [] 13 | debug_level_vv = [] 14 | debug_level_vvv = [] 15 | disable_color = [] 16 | release_mode = [] 17 | AuthenticAMD = [] 18 | GenuineIntel = [] 19 | 20 | [dependencies] 21 | bsl = { path = "C:/working/bsl" } 22 | syscall = { path = "C:/working/hypervisor/syscall" } 23 | -------------------------------------------------------------------------------- /cmake/ext_cross_compile/src/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "rust" 3 | version = "1.0.0" 4 | edition = "2018" 5 | 6 | [lib] 7 | path = "lib.rs" 8 | crate-type = ["staticlib"] 9 | 10 | [features] 11 | default = ["GenuineIntel","debug_level_v"] 12 | debug_level_v = [] 13 | debug_level_vv = [] 14 | debug_level_vvv = [] 15 | disable_color = [] 16 | release_mode = [] 17 | AuthenticAMD = [] 18 | GenuineIntel = [] 19 | 20 | [dependencies] 21 | bsl = { path = "C:/working/bsl" } 22 | syscall = { path = "C:/working/hypervisor/syscall" } 23 | -------------------------------------------------------------------------------- /cmake/function/hypervisor_silence.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2020 Assured Information Security, Inc. 3 | # 4 | # Permission is hereby granted, free of charge, to any person obtaining a copy 5 | # of this software and associated documentation files (the "Software"), to deal 6 | # in the Software without restriction, including without limitation the rights 7 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | # copies of the Software, and to permit persons to whom the Software is 9 | # furnished to do so, subject to the following conditions: 10 | # 11 | # The above copyright notice and this permission notice shall be included in all 12 | # copies or substantial portions of the Software. 13 | # 14 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | # SOFTWARE. 21 | 22 | # Silence unused variable warnings 23 | # 24 | macro(hypervisor_silence NAME) 25 | if(DEFINED ${NAME}) 26 | set(${NAME} ${${NAME}}) 27 | endif() 28 | endmacro(hypervisor_silence) 29 | -------------------------------------------------------------------------------- /cmake/target/info.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2020 Assured Information Security, Inc. 3 | # 4 | # Permission is hereby granted, free of charge, to any person obtaining a copy 5 | # of this software and associated documentation files (the "Software"), to deal 6 | # in the Software without restriction, including without limitation the rights 7 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | # copies of the Software, and to permit persons to whom the Software is 9 | # furnished to do so, subject to the following conditions: 10 | # 11 | # The above copyright notice and this permission notice shall be included in all 12 | # copies or substantial portions of the Software. 13 | # 14 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | # SOFTWARE. 21 | 22 | include(${bsl_SOURCE_DIR}/cmake/function/bf_add_info.cmake) 23 | include(${CMAKE_CURRENT_LIST_DIR}/../function/hypervisor_add_info.cmake) 24 | 25 | if(NOT HYPERVISOR_INCLUDE_INFO_OVERRIDE) 26 | bf_add_info(hypervisor) 27 | hypervisor_add_info() 28 | endif() 29 | -------------------------------------------------------------------------------- /cmake/target/rust_fmt.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2020 Assured Information Security, Inc. 3 | # 4 | # Permission is hereby granted, free of charge, to any person obtaining a copy 5 | # of this software and associated documentation files (the "Software"), to deal 6 | # in the Software without restriction, including without limitation the rights 7 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | # copies of the Software, and to permit persons to whom the Software is 9 | # furnished to do so, subject to the following conditions: 10 | # 11 | # The above copyright notice and this permission notice shall be included in all 12 | # copies or substantial portions of the Software. 13 | # 14 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | # SOFTWARE. 21 | 22 | add_custom_target(rust-fmt 23 | COMMAND ${CMAKE_COMMAND} -E chdir ${CMAKE_SOURCE_DIR}/syscall cargo fmt 24 | COMMAND ${CMAKE_COMMAND} -E chdir ${CMAKE_SOURCE_DIR}/example/default_rust cargo fmt 25 | VERBATIM 26 | ) 27 | -------------------------------------------------------------------------------- /example/default_rust/.cargo/config.toml: -------------------------------------------------------------------------------- 1 | [unstable] 2 | build-std = ["core", "compiler_builtins", "alloc"] 3 | build-std-features = ["compiler-builtins-mem"] 4 | 5 | [build] 6 | target = "x86_64-unknown-none.json" 7 | -------------------------------------------------------------------------------- /example/default_rust/empty.cpp: -------------------------------------------------------------------------------- 1 | /// @copyright 2 | /// Copyright (C) 2020 Assured Information Security, Inc. 3 | /// 4 | /// @copyright 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// @copyright 13 | /// The above copyright notice and this permission notice shall be included in 14 | /// all copies or substantial portions of the Software. 15 | /// 16 | /// @copyright 17 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 23 | /// SOFTWARE. 24 | 25 | /// NOTE: 26 | /// - This is just here to make CMake happy. We do not use C++ code in this 27 | /// example. 28 | /// 29 | -------------------------------------------------------------------------------- /example/default_rust/x86_64-unknown-none.json: -------------------------------------------------------------------------------- 1 | { 2 | "llvm-target": "x86_64-unknown-none", 3 | "data-layout": "e-m:e-i64:64-f80:128-n8:16:32:64-S128", 4 | "arch": "x86_64", 5 | "target-endian": "little", 6 | "target-pointer-width": "64", 7 | "target-c-int-width": "32", 8 | "os": "none", 9 | "executables": true, 10 | "linker-flavor": "ld.lld", 11 | "linker": "ld.lld", 12 | "panic-strategy": "abort", 13 | "features": "-mmx,-sse,+soft-float" 14 | } 15 | -------------------------------------------------------------------------------- /kernel/src/arm/aarch64/intrinsic_t.S: -------------------------------------------------------------------------------- 1 | /** 2 | * @copyright 3 | * Copyright (C) 2020 Assured Information Security, Inc. 4 | * 5 | * @copyright 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * @copyright 14 | * The above copyright notice and this permission notice shall be included in 15 | * all copies or substantial portions of the Software. 16 | * 17 | * @copyright 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 24 | * SOFTWARE. 25 | */ 26 | 27 | .text 28 | -------------------------------------------------------------------------------- /kernel/src/arm/aarch64/return_to_mk.S: -------------------------------------------------------------------------------- 1 | /** 2 | * @copyright 3 | * Copyright (C) 2020 Assured Information Security, Inc. 4 | * 5 | * @copyright 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * @copyright 14 | * The above copyright notice and this permission notice shall be included in 15 | * all copies or substantial portions of the Software. 16 | * 17 | * @copyright 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 24 | * SOFTWARE. 25 | */ 26 | 27 | .text 28 | 29 | .globl return_to_mk 30 | .type return_to_mk, @function 31 | return_to_mk: 32 | 33 | .size return_to_mk, .-return_to_mk 34 | -------------------------------------------------------------------------------- /kernel/src/arm/aarch64/yield.S: -------------------------------------------------------------------------------- 1 | /** 2 | * @copyright 3 | * Copyright (C) 2020 Assured Information Security, Inc. 4 | * 5 | * @copyright 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * @copyright 14 | * The above copyright notice and this permission notice shall be included in 15 | * all copies or substantial portions of the Software. 16 | * 17 | * @copyright 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 24 | * SOFTWARE. 25 | */ 26 | 27 | .text 28 | 29 | .globl yield 30 | .type yield, @function 31 | yield: 32 | 33 | .size yield, .-yield 34 | -------------------------------------------------------------------------------- /kernel/src/lock_guard_helpers.hpp: -------------------------------------------------------------------------------- 1 | /// @copyright 2 | /// Copyright (C) 2020 Assured Information Security, Inc. 3 | /// 4 | /// @copyright 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// @copyright 13 | /// The above copyright notice and this permission notice shall be included in 14 | /// all copies or substantial portions of the Software. 15 | /// 16 | /// @copyright 17 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 23 | /// SOFTWARE. 24 | 25 | #ifndef LOCK_GUARD_HELPERS_HPP 26 | #define LOCK_GUARD_HELPERS_HPP 27 | 28 | namespace helpers 29 | {} 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /kernel/tests/include/lock_guard_helpers.hpp: -------------------------------------------------------------------------------- 1 | /// @copyright 2 | /// Copyright (C) 2020 Assured Information Security, Inc. 3 | /// 4 | /// @copyright 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// @copyright 13 | /// The above copyright notice and this permission notice shall be included in 14 | /// all copies or substantial portions of the Software. 15 | /// 16 | /// @copyright 17 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 23 | /// SOFTWARE. 24 | 25 | #ifndef LOCK_GUARD_HELPERS_HPP 26 | #define LOCK_GUARD_HELPERS_HPP 27 | 28 | namespace helpers 29 | {} 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /kernel/tests/mocks/debug_ring_write/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2020 Assured Information Security, Inc. 3 | # 4 | # Permission is hereby granted, free of charge, to any person obtaining a copy 5 | # of this software and associated documentation files (the "Software"), to deal 6 | # in the Software without restriction, including without limitation the rights 7 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | # copies of the Software, and to permit persons to whom the Software is 9 | # furnished to do so, subject to the following conditions: 10 | # 11 | # The above copyright notice and this permission notice shall be included in all 12 | # copies or substantial portions of the Software. 13 | # 14 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | # SOFTWARE. 21 | 22 | bf_add_test(requirements INCLUDES ${COMMON_INCLUDES} SYSTEM_INCLUDES ${COMMON_SYSTEM_INCLUDES} DEFINES ${COMMON_DEFINES}) 23 | bf_add_test(behavior INCLUDES ${COMMON_INCLUDES} SYSTEM_INCLUDES ${COMMON_SYSTEM_INCLUDES} DEFINES ${COMMON_DEFINES}) 24 | -------------------------------------------------------------------------------- /kernel/tests/mocks/dispatch_esr/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2020 Assured Information Security, Inc. 3 | # 4 | # Permission is hereby granted, free of charge, to any person obtaining a copy 5 | # of this software and associated documentation files (the "Software"), to deal 6 | # in the Software without restriction, including without limitation the rights 7 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | # copies of the Software, and to permit persons to whom the Software is 9 | # furnished to do so, subject to the following conditions: 10 | # 11 | # The above copyright notice and this permission notice shall be included in all 12 | # copies or substantial portions of the Software. 13 | # 14 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | # SOFTWARE. 21 | 22 | bf_add_test(requirements INCLUDES ${COMMON_INCLUDES} SYSTEM_INCLUDES ${COMMON_SYSTEM_INCLUDES} DEFINES ${COMMON_DEFINES}) 23 | bf_add_test(behavior INCLUDES ${COMMON_INCLUDES} SYSTEM_INCLUDES ${COMMON_SYSTEM_INCLUDES} DEFINES ${COMMON_DEFINES}) 24 | -------------------------------------------------------------------------------- /kernel/tests/mocks/dispatch_syscall/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2020 Assured Information Security, Inc. 3 | # 4 | # Permission is hereby granted, free of charge, to any person obtaining a copy 5 | # of this software and associated documentation files (the "Software"), to deal 6 | # in the Software without restriction, including without limitation the rights 7 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | # copies of the Software, and to permit persons to whom the Software is 9 | # furnished to do so, subject to the following conditions: 10 | # 11 | # The above copyright notice and this permission notice shall be included in all 12 | # copies or substantial portions of the Software. 13 | # 14 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | # SOFTWARE. 21 | 22 | bf_add_test(requirements INCLUDES ${COMMON_INCLUDES} SYSTEM_INCLUDES ${COMMON_SYSTEM_INCLUDES} DEFINES ${COMMON_DEFINES}) 23 | bf_add_test(behavior INCLUDES ${COMMON_INCLUDES} SYSTEM_INCLUDES ${COMMON_SYSTEM_INCLUDES} DEFINES ${COMMON_DEFINES}) 24 | -------------------------------------------------------------------------------- /kernel/tests/mocks/dispatch_syscall_bf_callback_op/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2020 Assured Information Security, Inc. 3 | # 4 | # Permission is hereby granted, free of charge, to any person obtaining a copy 5 | # of this software and associated documentation files (the "Software"), to deal 6 | # in the Software without restriction, including without limitation the rights 7 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | # copies of the Software, and to permit persons to whom the Software is 9 | # furnished to do so, subject to the following conditions: 10 | # 11 | # The above copyright notice and this permission notice shall be included in all 12 | # copies or substantial portions of the Software. 13 | # 14 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | # SOFTWARE. 21 | 22 | bf_add_test(requirements INCLUDES ${COMMON_INCLUDES} SYSTEM_INCLUDES ${COMMON_SYSTEM_INCLUDES} DEFINES ${COMMON_DEFINES}) 23 | bf_add_test(behavior INCLUDES ${COMMON_INCLUDES} SYSTEM_INCLUDES ${COMMON_SYSTEM_INCLUDES} DEFINES ${COMMON_DEFINES}) 24 | -------------------------------------------------------------------------------- /kernel/tests/mocks/dispatch_syscall_bf_control_op/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2020 Assured Information Security, Inc. 3 | # 4 | # Permission is hereby granted, free of charge, to any person obtaining a copy 5 | # of this software and associated documentation files (the "Software"), to deal 6 | # in the Software without restriction, including without limitation the rights 7 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | # copies of the Software, and to permit persons to whom the Software is 9 | # furnished to do so, subject to the following conditions: 10 | # 11 | # The above copyright notice and this permission notice shall be included in all 12 | # copies or substantial portions of the Software. 13 | # 14 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | # SOFTWARE. 21 | 22 | bf_add_test(requirements INCLUDES ${COMMON_INCLUDES} SYSTEM_INCLUDES ${COMMON_SYSTEM_INCLUDES} DEFINES ${COMMON_DEFINES}) 23 | bf_add_test(behavior INCLUDES ${COMMON_INCLUDES} SYSTEM_INCLUDES ${COMMON_SYSTEM_INCLUDES} DEFINES ${COMMON_DEFINES}) 24 | -------------------------------------------------------------------------------- /kernel/tests/mocks/dispatch_syscall_bf_debug_op/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2020 Assured Information Security, Inc. 3 | # 4 | # Permission is hereby granted, free of charge, to any person obtaining a copy 5 | # of this software and associated documentation files (the "Software"), to deal 6 | # in the Software without restriction, including without limitation the rights 7 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | # copies of the Software, and to permit persons to whom the Software is 9 | # furnished to do so, subject to the following conditions: 10 | # 11 | # The above copyright notice and this permission notice shall be included in all 12 | # copies or substantial portions of the Software. 13 | # 14 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | # SOFTWARE. 21 | 22 | bf_add_test(requirements INCLUDES ${COMMON_INCLUDES} SYSTEM_INCLUDES ${COMMON_SYSTEM_INCLUDES} DEFINES ${COMMON_DEFINES}) 23 | bf_add_test(behavior INCLUDES ${COMMON_INCLUDES} SYSTEM_INCLUDES ${COMMON_SYSTEM_INCLUDES} DEFINES ${COMMON_DEFINES}) 24 | -------------------------------------------------------------------------------- /kernel/tests/mocks/dispatch_syscall_bf_mem_op/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2020 Assured Information Security, Inc. 3 | # 4 | # Permission is hereby granted, free of charge, to any person obtaining a copy 5 | # of this software and associated documentation files (the "Software"), to deal 6 | # in the Software without restriction, including without limitation the rights 7 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | # copies of the Software, and to permit persons to whom the Software is 9 | # furnished to do so, subject to the following conditions: 10 | # 11 | # The above copyright notice and this permission notice shall be included in all 12 | # copies or substantial portions of the Software. 13 | # 14 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | # SOFTWARE. 21 | 22 | bf_add_test(requirements INCLUDES ${COMMON_INCLUDES} SYSTEM_INCLUDES ${COMMON_SYSTEM_INCLUDES} DEFINES ${COMMON_DEFINES}) 23 | bf_add_test(behavior INCLUDES ${COMMON_INCLUDES} SYSTEM_INCLUDES ${COMMON_SYSTEM_INCLUDES} DEFINES ${COMMON_DEFINES}) 24 | -------------------------------------------------------------------------------- /kernel/tests/mocks/dispatch_syscall_bf_vm_op/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2020 Assured Information Security, Inc. 3 | # 4 | # Permission is hereby granted, free of charge, to any person obtaining a copy 5 | # of this software and associated documentation files (the "Software"), to deal 6 | # in the Software without restriction, including without limitation the rights 7 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | # copies of the Software, and to permit persons to whom the Software is 9 | # furnished to do so, subject to the following conditions: 10 | # 11 | # The above copyright notice and this permission notice shall be included in all 12 | # copies or substantial portions of the Software. 13 | # 14 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | # SOFTWARE. 21 | 22 | bf_add_test(requirements INCLUDES ${COMMON_INCLUDES} SYSTEM_INCLUDES ${COMMON_SYSTEM_INCLUDES} DEFINES ${COMMON_DEFINES}) 23 | bf_add_test(behavior INCLUDES ${COMMON_INCLUDES} SYSTEM_INCLUDES ${COMMON_SYSTEM_INCLUDES} DEFINES ${COMMON_DEFINES}) 24 | -------------------------------------------------------------------------------- /kernel/tests/mocks/dispatch_syscall_bf_vp_op/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2020 Assured Information Security, Inc. 3 | # 4 | # Permission is hereby granted, free of charge, to any person obtaining a copy 5 | # of this software and associated documentation files (the "Software"), to deal 6 | # in the Software without restriction, including without limitation the rights 7 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | # copies of the Software, and to permit persons to whom the Software is 9 | # furnished to do so, subject to the following conditions: 10 | # 11 | # The above copyright notice and this permission notice shall be included in all 12 | # copies or substantial portions of the Software. 13 | # 14 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | # SOFTWARE. 21 | 22 | bf_add_test(requirements INCLUDES ${COMMON_INCLUDES} SYSTEM_INCLUDES ${COMMON_SYSTEM_INCLUDES} DEFINES ${COMMON_DEFINES}) 23 | bf_add_test(behavior INCLUDES ${COMMON_INCLUDES} SYSTEM_INCLUDES ${COMMON_SYSTEM_INCLUDES} DEFINES ${COMMON_DEFINES}) 24 | -------------------------------------------------------------------------------- /kernel/tests/mocks/dispatch_syscall_bf_vs_op/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2020 Assured Information Security, Inc. 3 | # 4 | # Permission is hereby granted, free of charge, to any person obtaining a copy 5 | # of this software and associated documentation files (the "Software"), to deal 6 | # in the Software without restriction, including without limitation the rights 7 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | # copies of the Software, and to permit persons to whom the Software is 9 | # furnished to do so, subject to the following conditions: 10 | # 11 | # The above copyright notice and this permission notice shall be included in all 12 | # copies or substantial portions of the Software. 13 | # 14 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | # SOFTWARE. 21 | 22 | bf_add_test(requirements INCLUDES ${COMMON_INCLUDES} SYSTEM_INCLUDES ${COMMON_SYSTEM_INCLUDES} DEFINES ${COMMON_DEFINES}) 23 | bf_add_test(behavior INCLUDES ${COMMON_INCLUDES} SYSTEM_INCLUDES ${COMMON_SYSTEM_INCLUDES} DEFINES ${COMMON_DEFINES}) 24 | -------------------------------------------------------------------------------- /kernel/tests/mocks/ext_pool_t/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2020 Assured Information Security, Inc. 3 | # 4 | # Permission is hereby granted, free of charge, to any person obtaining a copy 5 | # of this software and associated documentation files (the "Software"), to deal 6 | # in the Software without restriction, including without limitation the rights 7 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | # copies of the Software, and to permit persons to whom the Software is 9 | # furnished to do so, subject to the following conditions: 10 | # 11 | # The above copyright notice and this permission notice shall be included in all 12 | # copies or substantial portions of the Software. 13 | # 14 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | # SOFTWARE. 21 | 22 | bf_add_test(requirements INCLUDES ${COMMON_INCLUDES} SYSTEM_INCLUDES ${COMMON_SYSTEM_INCLUDES} DEFINES ${COMMON_DEFINES}) 23 | bf_add_test(behavior INCLUDES ${COMMON_INCLUDES} SYSTEM_INCLUDES ${COMMON_SYSTEM_INCLUDES} DEFINES ${COMMON_DEFINES}) 24 | -------------------------------------------------------------------------------- /kernel/tests/mocks/ext_t/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2020 Assured Information Security, Inc. 3 | # 4 | # Permission is hereby granted, free of charge, to any person obtaining a copy 5 | # of this software and associated documentation files (the "Software"), to deal 6 | # in the Software without restriction, including without limitation the rights 7 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | # copies of the Software, and to permit persons to whom the Software is 9 | # furnished to do so, subject to the following conditions: 10 | # 11 | # The above copyright notice and this permission notice shall be included in all 12 | # copies or substantial portions of the Software. 13 | # 14 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | # SOFTWARE. 21 | 22 | bf_add_test(requirements INCLUDES ${COMMON_INCLUDES} SYSTEM_INCLUDES ${COMMON_SYSTEM_INCLUDES} DEFINES ${COMMON_DEFINES}) 23 | bf_add_test(behavior INCLUDES ${COMMON_INCLUDES} SYSTEM_INCLUDES ${COMMON_SYSTEM_INCLUDES} DEFINES ${COMMON_DEFINES}) 24 | -------------------------------------------------------------------------------- /kernel/tests/mocks/huge_pool_t/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2020 Assured Information Security, Inc. 3 | # 4 | # Permission is hereby granted, free of charge, to any person obtaining a copy 5 | # of this software and associated documentation files (the "Software"), to deal 6 | # in the Software without restriction, including without limitation the rights 7 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | # copies of the Software, and to permit persons to whom the Software is 9 | # furnished to do so, subject to the following conditions: 10 | # 11 | # The above copyright notice and this permission notice shall be included in all 12 | # copies or substantial portions of the Software. 13 | # 14 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | # SOFTWARE. 21 | 22 | bf_add_test(requirements INCLUDES ${COMMON_INCLUDES} SYSTEM_INCLUDES ${COMMON_SYSTEM_INCLUDES} DEFINES ${COMMON_DEFINES}) 23 | bf_add_test(behavior INCLUDES ${COMMON_INCLUDES} SYSTEM_INCLUDES ${COMMON_SYSTEM_INCLUDES} DEFINES ${COMMON_DEFINES}) 24 | -------------------------------------------------------------------------------- /kernel/tests/mocks/intrinsic_t/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2020 Assured Information Security, Inc. 3 | # 4 | # Permission is hereby granted, free of charge, to any person obtaining a copy 5 | # of this software and associated documentation files (the "Software"), to deal 6 | # in the Software without restriction, including without limitation the rights 7 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | # copies of the Software, and to permit persons to whom the Software is 9 | # furnished to do so, subject to the following conditions: 10 | # 11 | # The above copyright notice and this permission notice shall be included in all 12 | # copies or substantial portions of the Software. 13 | # 14 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | # SOFTWARE. 21 | 22 | bf_add_test(requirements INCLUDES ${COMMON_INCLUDES} SYSTEM_INCLUDES ${COMMON_SYSTEM_INCLUDES} DEFINES ${COMMON_DEFINES}) 23 | bf_add_test(behavior INCLUDES ${COMMON_INCLUDES} SYSTEM_INCLUDES ${COMMON_SYSTEM_INCLUDES} DEFINES ${COMMON_DEFINES}) 24 | -------------------------------------------------------------------------------- /kernel/tests/mocks/mk_main_t/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2020 Assured Information Security, Inc. 3 | # 4 | # Permission is hereby granted, free of charge, to any person obtaining a copy 5 | # of this software and associated documentation files (the "Software"), to deal 6 | # in the Software without restriction, including without limitation the rights 7 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | # copies of the Software, and to permit persons to whom the Software is 9 | # furnished to do so, subject to the following conditions: 10 | # 11 | # The above copyright notice and this permission notice shall be included in all 12 | # copies or substantial portions of the Software. 13 | # 14 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | # SOFTWARE. 21 | 22 | bf_add_test(requirements INCLUDES ${COMMON_INCLUDES} SYSTEM_INCLUDES ${COMMON_SYSTEM_INCLUDES} DEFINES ${COMMON_DEFINES}) 23 | bf_add_test(behavior INCLUDES ${COMMON_INCLUDES} SYSTEM_INCLUDES ${COMMON_SYSTEM_INCLUDES} DEFINES ${COMMON_DEFINES}) 24 | -------------------------------------------------------------------------------- /kernel/tests/mocks/serial_write/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2020 Assured Information Security, Inc. 3 | # 4 | # Permission is hereby granted, free of charge, to any person obtaining a copy 5 | # of this software and associated documentation files (the "Software"), to deal 6 | # in the Software without restriction, including without limitation the rights 7 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | # copies of the Software, and to permit persons to whom the Software is 9 | # furnished to do so, subject to the following conditions: 10 | # 11 | # The above copyright notice and this permission notice shall be included in all 12 | # copies or substantial portions of the Software. 13 | # 14 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | # SOFTWARE. 21 | 22 | bf_add_test(requirements INCLUDES ${COMMON_INCLUDES} SYSTEM_INCLUDES ${COMMON_SYSTEM_INCLUDES} DEFINES ${COMMON_DEFINES}) 23 | bf_add_test(behavior INCLUDES ${COMMON_INCLUDES} SYSTEM_INCLUDES ${COMMON_SYSTEM_INCLUDES} DEFINES ${COMMON_DEFINES}) 24 | -------------------------------------------------------------------------------- /kernel/tests/mocks/vm_pool_t/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2020 Assured Information Security, Inc. 3 | # 4 | # Permission is hereby granted, free of charge, to any person obtaining a copy 5 | # of this software and associated documentation files (the "Software"), to deal 6 | # in the Software without restriction, including without limitation the rights 7 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | # copies of the Software, and to permit persons to whom the Software is 9 | # furnished to do so, subject to the following conditions: 10 | # 11 | # The above copyright notice and this permission notice shall be included in all 12 | # copies or substantial portions of the Software. 13 | # 14 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | # SOFTWARE. 21 | 22 | bf_add_test(requirements INCLUDES ${COMMON_INCLUDES} SYSTEM_INCLUDES ${COMMON_SYSTEM_INCLUDES} DEFINES ${COMMON_DEFINES}) 23 | bf_add_test(behavior INCLUDES ${COMMON_INCLUDES} SYSTEM_INCLUDES ${COMMON_SYSTEM_INCLUDES} DEFINES ${COMMON_DEFINES}) 24 | -------------------------------------------------------------------------------- /kernel/tests/mocks/vm_t/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2020 Assured Information Security, Inc. 3 | # 4 | # Permission is hereby granted, free of charge, to any person obtaining a copy 5 | # of this software and associated documentation files (the "Software"), to deal 6 | # in the Software without restriction, including without limitation the rights 7 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | # copies of the Software, and to permit persons to whom the Software is 9 | # furnished to do so, subject to the following conditions: 10 | # 11 | # The above copyright notice and this permission notice shall be included in all 12 | # copies or substantial portions of the Software. 13 | # 14 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | # SOFTWARE. 21 | 22 | bf_add_test(requirements INCLUDES ${COMMON_INCLUDES} SYSTEM_INCLUDES ${COMMON_SYSTEM_INCLUDES} DEFINES ${COMMON_DEFINES}) 23 | bf_add_test(behavior INCLUDES ${COMMON_INCLUDES} SYSTEM_INCLUDES ${COMMON_SYSTEM_INCLUDES} DEFINES ${COMMON_DEFINES}) 24 | -------------------------------------------------------------------------------- /kernel/tests/mocks/vmexit_log_t/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2020 Assured Information Security, Inc. 3 | # 4 | # Permission is hereby granted, free of charge, to any person obtaining a copy 5 | # of this software and associated documentation files (the "Software"), to deal 6 | # in the Software without restriction, including without limitation the rights 7 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | # copies of the Software, and to permit persons to whom the Software is 9 | # furnished to do so, subject to the following conditions: 10 | # 11 | # The above copyright notice and this permission notice shall be included in all 12 | # copies or substantial portions of the Software. 13 | # 14 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | # SOFTWARE. 21 | 22 | bf_add_test(requirements INCLUDES ${COMMON_INCLUDES} SYSTEM_INCLUDES ${COMMON_SYSTEM_INCLUDES} DEFINES ${COMMON_DEFINES}) 23 | bf_add_test(behavior INCLUDES ${COMMON_INCLUDES} SYSTEM_INCLUDES ${COMMON_SYSTEM_INCLUDES} DEFINES ${COMMON_DEFINES}) 24 | -------------------------------------------------------------------------------- /kernel/tests/mocks/vmexit_loop/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2020 Assured Information Security, Inc. 3 | # 4 | # Permission is hereby granted, free of charge, to any person obtaining a copy 5 | # of this software and associated documentation files (the "Software"), to deal 6 | # in the Software without restriction, including without limitation the rights 7 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | # copies of the Software, and to permit persons to whom the Software is 9 | # furnished to do so, subject to the following conditions: 10 | # 11 | # The above copyright notice and this permission notice shall be included in all 12 | # copies or substantial portions of the Software. 13 | # 14 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | # SOFTWARE. 21 | 22 | bf_add_test(requirements INCLUDES ${COMMON_INCLUDES} SYSTEM_INCLUDES ${COMMON_SYSTEM_INCLUDES} DEFINES ${COMMON_DEFINES}) 23 | bf_add_test(behavior INCLUDES ${COMMON_INCLUDES} SYSTEM_INCLUDES ${COMMON_SYSTEM_INCLUDES} DEFINES ${COMMON_DEFINES}) 24 | -------------------------------------------------------------------------------- /kernel/tests/mocks/vp_pool_t/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2020 Assured Information Security, Inc. 3 | # 4 | # Permission is hereby granted, free of charge, to any person obtaining a copy 5 | # of this software and associated documentation files (the "Software"), to deal 6 | # in the Software without restriction, including without limitation the rights 7 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | # copies of the Software, and to permit persons to whom the Software is 9 | # furnished to do so, subject to the following conditions: 10 | # 11 | # The above copyright notice and this permission notice shall be included in all 12 | # copies or substantial portions of the Software. 13 | # 14 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | # SOFTWARE. 21 | 22 | bf_add_test(requirements INCLUDES ${COMMON_INCLUDES} SYSTEM_INCLUDES ${COMMON_SYSTEM_INCLUDES} DEFINES ${COMMON_DEFINES}) 23 | bf_add_test(behavior INCLUDES ${COMMON_INCLUDES} SYSTEM_INCLUDES ${COMMON_SYSTEM_INCLUDES} DEFINES ${COMMON_DEFINES}) 24 | -------------------------------------------------------------------------------- /kernel/tests/mocks/vp_t/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2020 Assured Information Security, Inc. 3 | # 4 | # Permission is hereby granted, free of charge, to any person obtaining a copy 5 | # of this software and associated documentation files (the "Software"), to deal 6 | # in the Software without restriction, including without limitation the rights 7 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | # copies of the Software, and to permit persons to whom the Software is 9 | # furnished to do so, subject to the following conditions: 10 | # 11 | # The above copyright notice and this permission notice shall be included in all 12 | # copies or substantial portions of the Software. 13 | # 14 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | # SOFTWARE. 21 | 22 | bf_add_test(requirements INCLUDES ${COMMON_INCLUDES} SYSTEM_INCLUDES ${COMMON_SYSTEM_INCLUDES} DEFINES ${COMMON_DEFINES}) 23 | bf_add_test(behavior INCLUDES ${COMMON_INCLUDES} SYSTEM_INCLUDES ${COMMON_SYSTEM_INCLUDES} DEFINES ${COMMON_DEFINES}) 24 | -------------------------------------------------------------------------------- /kernel/tests/mocks/vs_pool_t/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2020 Assured Information Security, Inc. 3 | # 4 | # Permission is hereby granted, free of charge, to any person obtaining a copy 5 | # of this software and associated documentation files (the "Software"), to deal 6 | # in the Software without restriction, including without limitation the rights 7 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | # copies of the Software, and to permit persons to whom the Software is 9 | # furnished to do so, subject to the following conditions: 10 | # 11 | # The above copyright notice and this permission notice shall be included in all 12 | # copies or substantial portions of the Software. 13 | # 14 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | # SOFTWARE. 21 | 22 | bf_add_test(requirements INCLUDES ${COMMON_INCLUDES} SYSTEM_INCLUDES ${COMMON_SYSTEM_INCLUDES} DEFINES ${COMMON_DEFINES}) 23 | bf_add_test(behavior INCLUDES ${COMMON_INCLUDES} SYSTEM_INCLUDES ${COMMON_SYSTEM_INCLUDES} DEFINES ${COMMON_DEFINES}) 24 | -------------------------------------------------------------------------------- /kernel/tests/mocks/vs_t/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2020 Assured Information Security, Inc. 3 | # 4 | # Permission is hereby granted, free of charge, to any person obtaining a copy 5 | # of this software and associated documentation files (the "Software"), to deal 6 | # in the Software without restriction, including without limitation the rights 7 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | # copies of the Software, and to permit persons to whom the Software is 9 | # furnished to do so, subject to the following conditions: 10 | # 11 | # The above copyright notice and this permission notice shall be included in all 12 | # copies or substantial portions of the Software. 13 | # 14 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | # SOFTWARE. 21 | 22 | bf_add_test(requirements INCLUDES ${COMMON_INCLUDES} SYSTEM_INCLUDES ${COMMON_SYSTEM_INCLUDES} DEFINES ${COMMON_DEFINES}) 23 | bf_add_test(behavior INCLUDES ${COMMON_INCLUDES} SYSTEM_INCLUDES ${COMMON_SYSTEM_INCLUDES} DEFINES ${COMMON_DEFINES}) 24 | -------------------------------------------------------------------------------- /kernel/tests/mocks/x64/amd/intrinsic_t/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2020 Assured Information Security, Inc. 3 | # 4 | # Permission is hereby granted, free of charge, to any person obtaining a copy 5 | # of this software and associated documentation files (the "Software"), to deal 6 | # in the Software without restriction, including without limitation the rights 7 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | # copies of the Software, and to permit persons to whom the Software is 9 | # furnished to do so, subject to the following conditions: 10 | # 11 | # The above copyright notice and this permission notice shall be included in all 12 | # copies or substantial portions of the Software. 13 | # 14 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | # SOFTWARE. 21 | 22 | bf_add_test(requirements INCLUDES ${AMD_INCLUDES} SYSTEM_INCLUDES ${AMD_SYSTEM_INCLUDES} DEFINES ${AMD_DEFINES}) 23 | bf_add_test(behavior INCLUDES ${AMD_INCLUDES} SYSTEM_INCLUDES ${AMD_SYSTEM_INCLUDES} DEFINES ${AMD_DEFINES}) 24 | -------------------------------------------------------------------------------- /kernel/tests/mocks/x64/dispatch_esr_nmi/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2020 Assured Information Security, Inc. 3 | # 4 | # Permission is hereby granted, free of charge, to any person obtaining a copy 5 | # of this software and associated documentation files (the "Software"), to deal 6 | # in the Software without restriction, including without limitation the rights 7 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | # copies of the Software, and to permit persons to whom the Software is 9 | # furnished to do so, subject to the following conditions: 10 | # 11 | # The above copyright notice and this permission notice shall be included in all 12 | # copies or substantial portions of the Software. 13 | # 14 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | # SOFTWARE. 21 | 22 | bf_add_test(requirements INCLUDES ${X64_INCLUDES} SYSTEM_INCLUDES ${X64_SYSTEM_INCLUDES} DEFINES ${X64_DEFINES}) 23 | bf_add_test(behavior INCLUDES ${X64_INCLUDES} SYSTEM_INCLUDES ${X64_SYSTEM_INCLUDES} DEFINES ${X64_DEFINES}) 24 | -------------------------------------------------------------------------------- /kernel/tests/mocks/x64/intel/intrinsic_t/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2020 Assured Information Security, Inc. 3 | # 4 | # Permission is hereby granted, free of charge, to any person obtaining a copy 5 | # of this software and associated documentation files (the "Software"), to deal 6 | # in the Software without restriction, including without limitation the rights 7 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | # copies of the Software, and to permit persons to whom the Software is 9 | # furnished to do so, subject to the following conditions: 10 | # 11 | # The above copyright notice and this permission notice shall be included in all 12 | # copies or substantial portions of the Software. 13 | # 14 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | # SOFTWARE. 21 | 22 | bf_add_test(requirements INCLUDES ${INTEL_INCLUDES} SYSTEM_INCLUDES ${INTEL_SYSTEM_INCLUDES} DEFINES ${INTEL_DEFINES}) 23 | bf_add_test(behavior INCLUDES ${INTEL_INCLUDES} SYSTEM_INCLUDES ${INTEL_SYSTEM_INCLUDES} DEFINES ${INTEL_DEFINES}) 24 | -------------------------------------------------------------------------------- /kernel/tests/mocks/x64/intrinsic_t/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2020 Assured Information Security, Inc. 3 | # 4 | # Permission is hereby granted, free of charge, to any person obtaining a copy 5 | # of this software and associated documentation files (the "Software"), to deal 6 | # in the Software without restriction, including without limitation the rights 7 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | # copies of the Software, and to permit persons to whom the Software is 9 | # furnished to do so, subject to the following conditions: 10 | # 11 | # The above copyright notice and this permission notice shall be included in all 12 | # copies or substantial portions of the Software. 13 | # 14 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | # SOFTWARE. 21 | 22 | bf_add_test(requirements INCLUDES ${X64_INCLUDES} SYSTEM_INCLUDES ${X64_SYSTEM_INCLUDES} DEFINES ${X64_DEFINES}) 23 | bf_add_test(behavior INCLUDES ${X64_INCLUDES} SYSTEM_INCLUDES ${X64_SYSTEM_INCLUDES} DEFINES ${X64_DEFINES}) 24 | -------------------------------------------------------------------------------- /kernel/tests/src/debug_ring_write/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2020 Assured Information Security, Inc. 3 | # 4 | # Permission is hereby granted, free of charge, to any person obtaining a copy 5 | # of this software and associated documentation files (the "Software"), to deal 6 | # in the Software without restriction, including without limitation the rights 7 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | # copies of the Software, and to permit persons to whom the Software is 9 | # furnished to do so, subject to the following conditions: 10 | # 11 | # The above copyright notice and this permission notice shall be included in all 12 | # copies or substantial portions of the Software. 13 | # 14 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | # SOFTWARE. 21 | 22 | bf_add_test(requirements INCLUDES ${COMMON_INCLUDES} SYSTEM_INCLUDES ${COMMON_SYSTEM_INCLUDES} DEFINES ${COMMON_DEFINES}) 23 | bf_add_test(behavior INCLUDES ${COMMON_INCLUDES} SYSTEM_INCLUDES ${COMMON_SYSTEM_INCLUDES} DEFINES ${COMMON_DEFINES}) 24 | -------------------------------------------------------------------------------- /kernel/tests/src/dispatch_esr_page_fault/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2020 Assured Information Security, Inc. 3 | # 4 | # Permission is hereby granted, free of charge, to any person obtaining a copy 5 | # of this software and associated documentation files (the "Software"), to deal 6 | # in the Software without restriction, including without limitation the rights 7 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | # copies of the Software, and to permit persons to whom the Software is 9 | # furnished to do so, subject to the following conditions: 10 | # 11 | # The above copyright notice and this permission notice shall be included in all 12 | # copies or substantial portions of the Software. 13 | # 14 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | # SOFTWARE. 21 | 22 | bf_add_test(requirements INCLUDES ${COMMON_INCLUDES} SYSTEM_INCLUDES ${COMMON_SYSTEM_INCLUDES} DEFINES ${COMMON_DEFINES}) 23 | bf_add_test(behavior INCLUDES ${COMMON_INCLUDES} SYSTEM_INCLUDES ${COMMON_SYSTEM_INCLUDES} DEFINES ${COMMON_DEFINES}) 24 | -------------------------------------------------------------------------------- /kernel/tests/src/dispatch_syscall/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2020 Assured Information Security, Inc. 3 | # 4 | # Permission is hereby granted, free of charge, to any person obtaining a copy 5 | # of this software and associated documentation files (the "Software"), to deal 6 | # in the Software without restriction, including without limitation the rights 7 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | # copies of the Software, and to permit persons to whom the Software is 9 | # furnished to do so, subject to the following conditions: 10 | # 11 | # The above copyright notice and this permission notice shall be included in all 12 | # copies or substantial portions of the Software. 13 | # 14 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | # SOFTWARE. 21 | 22 | bf_add_test(requirements INCLUDES ${COMMON_INCLUDES} SYSTEM_INCLUDES ${COMMON_SYSTEM_INCLUDES} DEFINES ${COMMON_DEFINES}) 23 | bf_add_test(behavior INCLUDES ${COMMON_INCLUDES} SYSTEM_INCLUDES ${COMMON_SYSTEM_INCLUDES} DEFINES ${COMMON_DEFINES}) 24 | -------------------------------------------------------------------------------- /kernel/tests/src/dispatch_syscall_bf_debug_op/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2020 Assured Information Security, Inc. 3 | # 4 | # Permission is hereby granted, free of charge, to any person obtaining a copy 5 | # of this software and associated documentation files (the "Software"), to deal 6 | # in the Software without restriction, including without limitation the rights 7 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | # copies of the Software, and to permit persons to whom the Software is 9 | # furnished to do so, subject to the following conditions: 10 | # 11 | # The above copyright notice and this permission notice shall be included in all 12 | # copies or substantial portions of the Software. 13 | # 14 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | # SOFTWARE. 21 | 22 | bf_add_test(requirements INCLUDES ${COMMON_INCLUDES} SYSTEM_INCLUDES ${COMMON_SYSTEM_INCLUDES} DEFINES ${COMMON_DEFINES}) 23 | bf_add_test(behavior INCLUDES ${COMMON_INCLUDES} SYSTEM_INCLUDES ${COMMON_SYSTEM_INCLUDES} DEFINES ${COMMON_DEFINES}) 24 | -------------------------------------------------------------------------------- /kernel/tests/src/dispatch_syscall_bf_handle_op/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2020 Assured Information Security, Inc. 3 | # 4 | # Permission is hereby granted, free of charge, to any person obtaining a copy 5 | # of this software and associated documentation files (the "Software"), to deal 6 | # in the Software without restriction, including without limitation the rights 7 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | # copies of the Software, and to permit persons to whom the Software is 9 | # furnished to do so, subject to the following conditions: 10 | # 11 | # The above copyright notice and this permission notice shall be included in all 12 | # copies or substantial portions of the Software. 13 | # 14 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | # SOFTWARE. 21 | 22 | bf_add_test(requirements INCLUDES ${COMMON_INCLUDES} SYSTEM_INCLUDES ${COMMON_SYSTEM_INCLUDES} DEFINES ${COMMON_DEFINES}) 23 | bf_add_test(behavior INCLUDES ${COMMON_INCLUDES} SYSTEM_INCLUDES ${COMMON_SYSTEM_INCLUDES} DEFINES ${COMMON_DEFINES}) 24 | -------------------------------------------------------------------------------- /kernel/tests/src/dispatch_syscall_bf_mem_op/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2020 Assured Information Security, Inc. 3 | # 4 | # Permission is hereby granted, free of charge, to any person obtaining a copy 5 | # of this software and associated documentation files (the "Software"), to deal 6 | # in the Software without restriction, including without limitation the rights 7 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | # copies of the Software, and to permit persons to whom the Software is 9 | # furnished to do so, subject to the following conditions: 10 | # 11 | # The above copyright notice and this permission notice shall be included in all 12 | # copies or substantial portions of the Software. 13 | # 14 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | # SOFTWARE. 21 | 22 | bf_add_test(requirements INCLUDES ${COMMON_INCLUDES} SYSTEM_INCLUDES ${COMMON_SYSTEM_INCLUDES} DEFINES ${COMMON_DEFINES}) 23 | bf_add_test(behavior INCLUDES ${COMMON_INCLUDES} SYSTEM_INCLUDES ${COMMON_SYSTEM_INCLUDES} DEFINES ${COMMON_DEFINES}) 24 | -------------------------------------------------------------------------------- /kernel/tests/src/dispatch_syscall_bf_vm_op/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2020 Assured Information Security, Inc. 3 | # 4 | # Permission is hereby granted, free of charge, to any person obtaining a copy 5 | # of this software and associated documentation files (the "Software"), to deal 6 | # in the Software without restriction, including without limitation the rights 7 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | # copies of the Software, and to permit persons to whom the Software is 9 | # furnished to do so, subject to the following conditions: 10 | # 11 | # The above copyright notice and this permission notice shall be included in all 12 | # copies or substantial portions of the Software. 13 | # 14 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | # SOFTWARE. 21 | 22 | bf_add_test(requirements INCLUDES ${COMMON_INCLUDES} SYSTEM_INCLUDES ${COMMON_SYSTEM_INCLUDES} DEFINES ${COMMON_DEFINES}) 23 | bf_add_test(behavior INCLUDES ${COMMON_INCLUDES} SYSTEM_INCLUDES ${COMMON_SYSTEM_INCLUDES} DEFINES ${COMMON_DEFINES}) 24 | -------------------------------------------------------------------------------- /kernel/tests/src/dispatch_syscall_bf_vp_op/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2020 Assured Information Security, Inc. 3 | # 4 | # Permission is hereby granted, free of charge, to any person obtaining a copy 5 | # of this software and associated documentation files (the "Software"), to deal 6 | # in the Software without restriction, including without limitation the rights 7 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | # copies of the Software, and to permit persons to whom the Software is 9 | # furnished to do so, subject to the following conditions: 10 | # 11 | # The above copyright notice and this permission notice shall be included in all 12 | # copies or substantial portions of the Software. 13 | # 14 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | # SOFTWARE. 21 | 22 | bf_add_test(requirements INCLUDES ${COMMON_INCLUDES} SYSTEM_INCLUDES ${COMMON_SYSTEM_INCLUDES} DEFINES ${COMMON_DEFINES}) 23 | bf_add_test(behavior INCLUDES ${COMMON_INCLUDES} SYSTEM_INCLUDES ${COMMON_SYSTEM_INCLUDES} DEFINES ${COMMON_DEFINES}) 24 | -------------------------------------------------------------------------------- /kernel/tests/src/dispatch_syscall_bf_vs_op/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2020 Assured Information Security, Inc. 3 | # 4 | # Permission is hereby granted, free of charge, to any person obtaining a copy 5 | # of this software and associated documentation files (the "Software"), to deal 6 | # in the Software without restriction, including without limitation the rights 7 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | # copies of the Software, and to permit persons to whom the Software is 9 | # furnished to do so, subject to the following conditions: 10 | # 11 | # The above copyright notice and this permission notice shall be included in all 12 | # copies or substantial portions of the Software. 13 | # 14 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | # SOFTWARE. 21 | 22 | bf_add_test(requirements INCLUDES ${COMMON_INCLUDES} SYSTEM_INCLUDES ${COMMON_SYSTEM_INCLUDES} DEFINES ${COMMON_DEFINES}) 23 | bf_add_test(behavior INCLUDES ${COMMON_INCLUDES} SYSTEM_INCLUDES ${COMMON_SYSTEM_INCLUDES} DEFINES ${COMMON_DEFINES}) 24 | -------------------------------------------------------------------------------- /kernel/tests/src/ext_pool_t/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2020 Assured Information Security, Inc. 3 | # 4 | # Permission is hereby granted, free of charge, to any person obtaining a copy 5 | # of this software and associated documentation files (the "Software"), to deal 6 | # in the Software without restriction, including without limitation the rights 7 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | # copies of the Software, and to permit persons to whom the Software is 9 | # furnished to do so, subject to the following conditions: 10 | # 11 | # The above copyright notice and this permission notice shall be included in all 12 | # copies or substantial portions of the Software. 13 | # 14 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | # SOFTWARE. 21 | 22 | bf_add_test(requirements INCLUDES ${COMMON_INCLUDES} SYSTEM_INCLUDES ${COMMON_SYSTEM_INCLUDES} DEFINES ${COMMON_DEFINES}) 23 | bf_add_test(behavior INCLUDES ${COMMON_INCLUDES} SYSTEM_INCLUDES ${COMMON_SYSTEM_INCLUDES} DEFINES ${COMMON_DEFINES}) 24 | -------------------------------------------------------------------------------- /kernel/tests/src/ext_t/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2020 Assured Information Security, Inc. 3 | # 4 | # Permission is hereby granted, free of charge, to any person obtaining a copy 5 | # of this software and associated documentation files (the "Software"), to deal 6 | # in the Software without restriction, including without limitation the rights 7 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | # copies of the Software, and to permit persons to whom the Software is 9 | # furnished to do so, subject to the following conditions: 10 | # 11 | # The above copyright notice and this permission notice shall be included in all 12 | # copies or substantial portions of the Software. 13 | # 14 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | # SOFTWARE. 21 | 22 | bf_add_test(requirements INCLUDES ${COMMON_INCLUDES} SYSTEM_INCLUDES ${COMMON_SYSTEM_INCLUDES} DEFINES ${COMMON_DEFINES}) 23 | bf_add_test(behavior INCLUDES ${COMMON_INCLUDES} SYSTEM_INCLUDES ${COMMON_SYSTEM_INCLUDES} DEFINES ${COMMON_DEFINES}) 24 | -------------------------------------------------------------------------------- /kernel/tests/src/huge_pool_t/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2020 Assured Information Security, Inc. 3 | # 4 | # Permission is hereby granted, free of charge, to any person obtaining a copy 5 | # of this software and associated documentation files (the "Software"), to deal 6 | # in the Software without restriction, including without limitation the rights 7 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | # copies of the Software, and to permit persons to whom the Software is 9 | # furnished to do so, subject to the following conditions: 10 | # 11 | # The above copyright notice and this permission notice shall be included in all 12 | # copies or substantial portions of the Software. 13 | # 14 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | # SOFTWARE. 21 | 22 | bf_add_test(requirements INCLUDES ${COMMON_INCLUDES} SYSTEM_INCLUDES ${COMMON_SYSTEM_INCLUDES} DEFINES ${COMMON_DEFINES}) 23 | bf_add_test(behavior INCLUDES ${COMMON_INCLUDES} SYSTEM_INCLUDES ${COMMON_SYSTEM_INCLUDES} DEFINES ${COMMON_DEFINES}) 24 | -------------------------------------------------------------------------------- /kernel/tests/src/mk_main_t/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2020 Assured Information Security, Inc. 3 | # 4 | # Permission is hereby granted, free of charge, to any person obtaining a copy 5 | # of this software and associated documentation files (the "Software"), to deal 6 | # in the Software without restriction, including without limitation the rights 7 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | # copies of the Software, and to permit persons to whom the Software is 9 | # furnished to do so, subject to the following conditions: 10 | # 11 | # The above copyright notice and this permission notice shall be included in all 12 | # copies or substantial portions of the Software. 13 | # 14 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | # SOFTWARE. 21 | 22 | bf_add_test(requirements INCLUDES ${COMMON_INCLUDES} SYSTEM_INCLUDES ${COMMON_SYSTEM_INCLUDES} DEFINES ${COMMON_DEFINES}) 23 | bf_add_test(behavior INCLUDES ${COMMON_INCLUDES} SYSTEM_INCLUDES ${COMMON_SYSTEM_INCLUDES} DEFINES ${COMMON_DEFINES}) 24 | -------------------------------------------------------------------------------- /kernel/tests/src/serial_write/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2020 Assured Information Security, Inc. 3 | # 4 | # Permission is hereby granted, free of charge, to any person obtaining a copy 5 | # of this software and associated documentation files (the "Software"), to deal 6 | # in the Software without restriction, including without limitation the rights 7 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | # copies of the Software, and to permit persons to whom the Software is 9 | # furnished to do so, subject to the following conditions: 10 | # 11 | # The above copyright notice and this permission notice shall be included in all 12 | # copies or substantial portions of the Software. 13 | # 14 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | # SOFTWARE. 21 | 22 | bf_add_test(requirements INCLUDES ${COMMON_INCLUDES} SYSTEM_INCLUDES ${COMMON_SYSTEM_INCLUDES} DEFINES ${COMMON_DEFINES}) 23 | bf_add_test(behavior INCLUDES ${COMMON_INCLUDES} SYSTEM_INCLUDES ${COMMON_SYSTEM_INCLUDES} DEFINES ${COMMON_DEFINES}) 24 | -------------------------------------------------------------------------------- /kernel/tests/src/vm_pool_t/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2020 Assured Information Security, Inc. 3 | # 4 | # Permission is hereby granted, free of charge, to any person obtaining a copy 5 | # of this software and associated documentation files (the "Software"), to deal 6 | # in the Software without restriction, including without limitation the rights 7 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | # copies of the Software, and to permit persons to whom the Software is 9 | # furnished to do so, subject to the following conditions: 10 | # 11 | # The above copyright notice and this permission notice shall be included in all 12 | # copies or substantial portions of the Software. 13 | # 14 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | # SOFTWARE. 21 | 22 | bf_add_test(requirements INCLUDES ${COMMON_INCLUDES} SYSTEM_INCLUDES ${COMMON_SYSTEM_INCLUDES} DEFINES ${COMMON_DEFINES}) 23 | bf_add_test(behavior INCLUDES ${COMMON_INCLUDES} SYSTEM_INCLUDES ${COMMON_SYSTEM_INCLUDES} DEFINES ${COMMON_DEFINES}) 24 | -------------------------------------------------------------------------------- /kernel/tests/src/vm_t/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2020 Assured Information Security, Inc. 3 | # 4 | # Permission is hereby granted, free of charge, to any person obtaining a copy 5 | # of this software and associated documentation files (the "Software"), to deal 6 | # in the Software without restriction, including without limitation the rights 7 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | # copies of the Software, and to permit persons to whom the Software is 9 | # furnished to do so, subject to the following conditions: 10 | # 11 | # The above copyright notice and this permission notice shall be included in all 12 | # copies or substantial portions of the Software. 13 | # 14 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | # SOFTWARE. 21 | 22 | bf_add_test(requirements INCLUDES ${COMMON_INCLUDES} SYSTEM_INCLUDES ${COMMON_SYSTEM_INCLUDES} DEFINES ${COMMON_DEFINES}) 23 | bf_add_test(behavior INCLUDES ${COMMON_INCLUDES} SYSTEM_INCLUDES ${COMMON_SYSTEM_INCLUDES} DEFINES ${COMMON_DEFINES}) 24 | -------------------------------------------------------------------------------- /kernel/tests/src/vmexit_loop/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2020 Assured Information Security, Inc. 3 | # 4 | # Permission is hereby granted, free of charge, to any person obtaining a copy 5 | # of this software and associated documentation files (the "Software"), to deal 6 | # in the Software without restriction, including without limitation the rights 7 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | # copies of the Software, and to permit persons to whom the Software is 9 | # furnished to do so, subject to the following conditions: 10 | # 11 | # The above copyright notice and this permission notice shall be included in all 12 | # copies or substantial portions of the Software. 13 | # 14 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | # SOFTWARE. 21 | 22 | bf_add_test(requirements INCLUDES ${COMMON_INCLUDES} SYSTEM_INCLUDES ${COMMON_SYSTEM_INCLUDES} DEFINES ${COMMON_DEFINES}) 23 | bf_add_test(behavior INCLUDES ${COMMON_INCLUDES} SYSTEM_INCLUDES ${COMMON_SYSTEM_INCLUDES} DEFINES ${COMMON_DEFINES}) 24 | -------------------------------------------------------------------------------- /kernel/tests/src/vp_pool_t/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2020 Assured Information Security, Inc. 3 | # 4 | # Permission is hereby granted, free of charge, to any person obtaining a copy 5 | # of this software and associated documentation files (the "Software"), to deal 6 | # in the Software without restriction, including without limitation the rights 7 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | # copies of the Software, and to permit persons to whom the Software is 9 | # furnished to do so, subject to the following conditions: 10 | # 11 | # The above copyright notice and this permission notice shall be included in all 12 | # copies or substantial portions of the Software. 13 | # 14 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | # SOFTWARE. 21 | 22 | bf_add_test(requirements INCLUDES ${COMMON_INCLUDES} SYSTEM_INCLUDES ${COMMON_SYSTEM_INCLUDES} DEFINES ${COMMON_DEFINES}) 23 | bf_add_test(behavior INCLUDES ${COMMON_INCLUDES} SYSTEM_INCLUDES ${COMMON_SYSTEM_INCLUDES} DEFINES ${COMMON_DEFINES}) 24 | -------------------------------------------------------------------------------- /kernel/tests/src/vp_t/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2020 Assured Information Security, Inc. 3 | # 4 | # Permission is hereby granted, free of charge, to any person obtaining a copy 5 | # of this software and associated documentation files (the "Software"), to deal 6 | # in the Software without restriction, including without limitation the rights 7 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | # copies of the Software, and to permit persons to whom the Software is 9 | # furnished to do so, subject to the following conditions: 10 | # 11 | # The above copyright notice and this permission notice shall be included in all 12 | # copies or substantial portions of the Software. 13 | # 14 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | # SOFTWARE. 21 | 22 | bf_add_test(requirements INCLUDES ${COMMON_INCLUDES} SYSTEM_INCLUDES ${COMMON_SYSTEM_INCLUDES} DEFINES ${COMMON_DEFINES}) 23 | bf_add_test(behavior INCLUDES ${COMMON_INCLUDES} SYSTEM_INCLUDES ${COMMON_SYSTEM_INCLUDES} DEFINES ${COMMON_DEFINES}) 24 | -------------------------------------------------------------------------------- /kernel/tests/src/vs_pool_t/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2020 Assured Information Security, Inc. 3 | # 4 | # Permission is hereby granted, free of charge, to any person obtaining a copy 5 | # of this software and associated documentation files (the "Software"), to deal 6 | # in the Software without restriction, including without limitation the rights 7 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | # copies of the Software, and to permit persons to whom the Software is 9 | # furnished to do so, subject to the following conditions: 10 | # 11 | # The above copyright notice and this permission notice shall be included in all 12 | # copies or substantial portions of the Software. 13 | # 14 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | # SOFTWARE. 21 | 22 | bf_add_test(requirements INCLUDES ${COMMON_INCLUDES} SYSTEM_INCLUDES ${COMMON_SYSTEM_INCLUDES} DEFINES ${COMMON_DEFINES}) 23 | bf_add_test(behavior INCLUDES ${COMMON_INCLUDES} SYSTEM_INCLUDES ${COMMON_SYSTEM_INCLUDES} DEFINES ${COMMON_DEFINES}) 24 | -------------------------------------------------------------------------------- /kernel/tests/src/x64/amd/dispatch_esr_nmi/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2020 Assured Information Security, Inc. 3 | # 4 | # Permission is hereby granted, free of charge, to any person obtaining a copy 5 | # of this software and associated documentation files (the "Software"), to deal 6 | # in the Software without restriction, including without limitation the rights 7 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | # copies of the Software, and to permit persons to whom the Software is 9 | # furnished to do so, subject to the following conditions: 10 | # 11 | # The above copyright notice and this permission notice shall be included in all 12 | # copies or substantial portions of the Software. 13 | # 14 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | # SOFTWARE. 21 | 22 | bf_add_test(requirements INCLUDES ${AMD_INCLUDES} SYSTEM_INCLUDES ${AMD_SYSTEM_INCLUDES} DEFINES ${AMD_DEFINES}) 23 | bf_add_test(behavior INCLUDES ${AMD_INCLUDES} SYSTEM_INCLUDES ${AMD_SYSTEM_INCLUDES} DEFINES ${AMD_DEFINES}) 24 | -------------------------------------------------------------------------------- /kernel/tests/src/x64/amd/intrinsic_t/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2020 Assured Information Security, Inc. 3 | # 4 | # Permission is hereby granted, free of charge, to any person obtaining a copy 5 | # of this software and associated documentation files (the "Software"), to deal 6 | # in the Software without restriction, including without limitation the rights 7 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | # copies of the Software, and to permit persons to whom the Software is 9 | # furnished to do so, subject to the following conditions: 10 | # 11 | # The above copyright notice and this permission notice shall be included in all 12 | # copies or substantial portions of the Software. 13 | # 14 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | # SOFTWARE. 21 | 22 | bf_add_test(requirements INCLUDES ${AMD_INCLUDES} SYSTEM_INCLUDES ${AMD_SYSTEM_INCLUDES} DEFINES ${AMD_DEFINES}) 23 | bf_add_test(behavior INCLUDES ${AMD_INCLUDES} SYSTEM_INCLUDES ${AMD_SYSTEM_INCLUDES} DEFINES ${AMD_DEFINES}) 24 | -------------------------------------------------------------------------------- /kernel/tests/src/x64/amd/vs_t/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2020 Assured Information Security, Inc. 3 | # 4 | # Permission is hereby granted, free of charge, to any person obtaining a copy 5 | # of this software and associated documentation files (the "Software"), to deal 6 | # in the Software without restriction, including without limitation the rights 7 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | # copies of the Software, and to permit persons to whom the Software is 9 | # furnished to do so, subject to the following conditions: 10 | # 11 | # The above copyright notice and this permission notice shall be included in all 12 | # copies or substantial portions of the Software. 13 | # 14 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | # SOFTWARE. 21 | 22 | bf_add_test(requirements INCLUDES ${AMD_INCLUDES} SYSTEM_INCLUDES ${AMD_SYSTEM_INCLUDES} DEFINES ${AMD_DEFINES}) 23 | bf_add_test(behavior INCLUDES ${AMD_INCLUDES} SYSTEM_INCLUDES ${AMD_SYSTEM_INCLUDES} DEFINES ${AMD_DEFINES}) 24 | -------------------------------------------------------------------------------- /kernel/tests/src/x64/dispatch_esr/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2020 Assured Information Security, Inc. 3 | # 4 | # Permission is hereby granted, free of charge, to any person obtaining a copy 5 | # of this software and associated documentation files (the "Software"), to deal 6 | # in the Software without restriction, including without limitation the rights 7 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | # copies of the Software, and to permit persons to whom the Software is 9 | # furnished to do so, subject to the following conditions: 10 | # 11 | # The above copyright notice and this permission notice shall be included in all 12 | # copies or substantial portions of the Software. 13 | # 14 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | # SOFTWARE. 21 | 22 | bf_add_test(requirements INCLUDES ${X64_INCLUDES} SYSTEM_INCLUDES ${X64_SYSTEM_INCLUDES} DEFINES ${X64_DEFINES}) 23 | bf_add_test(behavior INCLUDES ${X64_INCLUDES} SYSTEM_INCLUDES ${X64_SYSTEM_INCLUDES} DEFINES ${X64_DEFINES}) 24 | -------------------------------------------------------------------------------- /kernel/tests/src/x64/dispatch_syscall_bf_intrinsic_op/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2020 Assured Information Security, Inc. 3 | # 4 | # Permission is hereby granted, free of charge, to any person obtaining a copy 5 | # of this software and associated documentation files (the "Software"), to deal 6 | # in the Software without restriction, including without limitation the rights 7 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | # copies of the Software, and to permit persons to whom the Software is 9 | # furnished to do so, subject to the following conditions: 10 | # 11 | # The above copyright notice and this permission notice shall be included in all 12 | # copies or substantial portions of the Software. 13 | # 14 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | # SOFTWARE. 21 | 22 | bf_add_test(requirements INCLUDES ${X64_INCLUDES} SYSTEM_INCLUDES ${X64_SYSTEM_INCLUDES} DEFINES ${X64_DEFINES}) 23 | bf_add_test(behavior INCLUDES ${X64_INCLUDES} SYSTEM_INCLUDES ${X64_SYSTEM_INCLUDES} DEFINES ${X64_DEFINES}) 24 | -------------------------------------------------------------------------------- /kernel/tests/src/x64/intel/dispatch_esr_nmi/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2020 Assured Information Security, Inc. 3 | # 4 | # Permission is hereby granted, free of charge, to any person obtaining a copy 5 | # of this software and associated documentation files (the "Software"), to deal 6 | # in the Software without restriction, including without limitation the rights 7 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | # copies of the Software, and to permit persons to whom the Software is 9 | # furnished to do so, subject to the following conditions: 10 | # 11 | # The above copyright notice and this permission notice shall be included in all 12 | # copies or substantial portions of the Software. 13 | # 14 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | # SOFTWARE. 21 | 22 | bf_add_test(requirements INCLUDES ${INTEL_INCLUDES} SYSTEM_INCLUDES ${INTEL_SYSTEM_INCLUDES} DEFINES ${INTEL_DEFINES}) 23 | bf_add_test(behavior INCLUDES ${INTEL_INCLUDES} SYSTEM_INCLUDES ${INTEL_SYSTEM_INCLUDES} DEFINES ${INTEL_DEFINES}) 24 | -------------------------------------------------------------------------------- /kernel/tests/src/x64/intel/intrinsic_t/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2020 Assured Information Security, Inc. 3 | # 4 | # Permission is hereby granted, free of charge, to any person obtaining a copy 5 | # of this software and associated documentation files (the "Software"), to deal 6 | # in the Software without restriction, including without limitation the rights 7 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | # copies of the Software, and to permit persons to whom the Software is 9 | # furnished to do so, subject to the following conditions: 10 | # 11 | # The above copyright notice and this permission notice shall be included in all 12 | # copies or substantial portions of the Software. 13 | # 14 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | # SOFTWARE. 21 | 22 | bf_add_test(requirements INCLUDES ${INTEL_INCLUDES} SYSTEM_INCLUDES ${INTEL_SYSTEM_INCLUDES} DEFINES ${INTEL_DEFINES}) 23 | bf_add_test(behavior INCLUDES ${INTEL_INCLUDES} SYSTEM_INCLUDES ${INTEL_SYSTEM_INCLUDES} DEFINES ${INTEL_DEFINES}) 24 | -------------------------------------------------------------------------------- /kernel/tests/src/x64/intel/vs_t/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2020 Assured Information Security, Inc. 3 | # 4 | # Permission is hereby granted, free of charge, to any person obtaining a copy 5 | # of this software and associated documentation files (the "Software"), to deal 6 | # in the Software without restriction, including without limitation the rights 7 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | # copies of the Software, and to permit persons to whom the Software is 9 | # furnished to do so, subject to the following conditions: 10 | # 11 | # The above copyright notice and this permission notice shall be included in all 12 | # copies or substantial portions of the Software. 13 | # 14 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | # SOFTWARE. 21 | 22 | bf_add_test(requirements INCLUDES ${INTEL_INCLUDES} SYSTEM_INCLUDES ${INTEL_SYSTEM_INCLUDES} DEFINES ${INTEL_DEFINES}) 23 | bf_add_test(behavior INCLUDES ${INTEL_INCLUDES} SYSTEM_INCLUDES ${INTEL_SYSTEM_INCLUDES} DEFINES ${INTEL_DEFINES}) 24 | -------------------------------------------------------------------------------- /kernel/tests/src/x64/vmexit_log_t/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2020 Assured Information Security, Inc. 3 | # 4 | # Permission is hereby granted, free of charge, to any person obtaining a copy 5 | # of this software and associated documentation files (the "Software"), to deal 6 | # in the Software without restriction, including without limitation the rights 7 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | # copies of the Software, and to permit persons to whom the Software is 9 | # furnished to do so, subject to the following conditions: 10 | # 11 | # The above copyright notice and this permission notice shall be included in all 12 | # copies or substantial portions of the Software. 13 | # 14 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | # SOFTWARE. 21 | 22 | bf_add_test(requirements INCLUDES ${X64_INCLUDES} SYSTEM_INCLUDES ${X64_SYSTEM_INCLUDES} DEFINES ${X64_DEFINES}) 23 | bf_add_test(behavior INCLUDES ${X64_INCLUDES} SYSTEM_INCLUDES ${X64_SYSTEM_INCLUDES} DEFINES ${X64_DEFINES}) 24 | -------------------------------------------------------------------------------- /lib/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "lib" 3 | version = "0.1.0" 4 | edition = "2018" 5 | -------------------------------------------------------------------------------- /lib/lib.rs: -------------------------------------------------------------------------------- 1 | // @copyright 2 | // Copyright (C) 2020 Assured Information Security, Inc. 3 | // 4 | // @copyright 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // @copyright 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // @copyright 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 23 | // SOFTWARE. 24 | -------------------------------------------------------------------------------- /lib/tests/include/basic_lock_guard_t/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2020 Assured Information Security, Inc. 3 | # 4 | # Permission is hereby granted, free of charge, to any person obtaining a copy 5 | # of this software and associated documentation files (the "Software"), to deal 6 | # in the Software without restriction, including without limitation the rights 7 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | # copies of the Software, and to permit persons to whom the Software is 9 | # furnished to do so, subject to the following conditions: 10 | # 11 | # The above copyright notice and this permission notice shall be included in all 12 | # copies or substantial portions of the Software. 13 | # 14 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | # SOFTWARE. 21 | 22 | bf_add_test(requirements INCLUDES ${COMMON_INCLUDES} SYSTEM_INCLUDES ${COMMON_SYSTEM_INCLUDES} DEFINES ${COMMON_DEFINES}) 23 | bf_add_test(behavior INCLUDES ${COMMON_INCLUDES} SYSTEM_INCLUDES ${COMMON_SYSTEM_INCLUDES} DEFINES ${COMMON_DEFINES}) 24 | -------------------------------------------------------------------------------- /lib/tests/include/basic_queue_t/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2020 Assured Information Security, Inc. 3 | # 4 | # Permission is hereby granted, free of charge, to any person obtaining a copy 5 | # of this software and associated documentation files (the "Software"), to deal 6 | # in the Software without restriction, including without limitation the rights 7 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | # copies of the Software, and to permit persons to whom the Software is 9 | # furnished to do so, subject to the following conditions: 10 | # 11 | # The above copyright notice and this permission notice shall be included in all 12 | # copies or substantial portions of the Software. 13 | # 14 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | # SOFTWARE. 21 | 22 | bf_add_test(requirements INCLUDES ${COMMON_INCLUDES} SYSTEM_INCLUDES ${COMMON_SYSTEM_INCLUDES} DEFINES ${COMMON_DEFINES}) 23 | bf_add_test(behavior INCLUDES ${COMMON_INCLUDES} SYSTEM_INCLUDES ${COMMON_SYSTEM_INCLUDES} DEFINES ${COMMON_DEFINES}) 24 | -------------------------------------------------------------------------------- /lib/tests/mocks/basic_ifmap_t/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2020 Assured Information Security, Inc. 3 | # 4 | # Permission is hereby granted, free of charge, to any person obtaining a copy 5 | # of this software and associated documentation files (the "Software"), to deal 6 | # in the Software without restriction, including without limitation the rights 7 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | # copies of the Software, and to permit persons to whom the Software is 9 | # furnished to do so, subject to the following conditions: 10 | # 11 | # The above copyright notice and this permission notice shall be included in all 12 | # copies or substantial portions of the Software. 13 | # 14 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | # SOFTWARE. 21 | 22 | bf_add_test(requirements INCLUDES ${COMMON_INCLUDES} SYSTEM_INCLUDES ${COMMON_SYSTEM_INCLUDES} DEFINES ${COMMON_DEFINES}) 23 | bf_add_test(behavior INCLUDES ${COMMON_INCLUDES} SYSTEM_INCLUDES ${COMMON_SYSTEM_INCLUDES} DEFINES ${COMMON_DEFINES}) 24 | -------------------------------------------------------------------------------- /lib/tests/mocks/basic_ioctl_t/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2020 Assured Information Security, Inc. 3 | # 4 | # Permission is hereby granted, free of charge, to any person obtaining a copy 5 | # of this software and associated documentation files (the "Software"), to deal 6 | # in the Software without restriction, including without limitation the rights 7 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | # copies of the Software, and to permit persons to whom the Software is 9 | # furnished to do so, subject to the following conditions: 10 | # 11 | # The above copyright notice and this permission notice shall be included in all 12 | # copies or substantial portions of the Software. 13 | # 14 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | # SOFTWARE. 21 | 22 | bf_add_test(requirements INCLUDES ${COMMON_INCLUDES} SYSTEM_INCLUDES ${COMMON_SYSTEM_INCLUDES} DEFINES ${COMMON_DEFINES}) 23 | bf_add_test(behavior INCLUDES ${COMMON_INCLUDES} SYSTEM_INCLUDES ${COMMON_SYSTEM_INCLUDES} DEFINES ${COMMON_DEFINES}) 24 | -------------------------------------------------------------------------------- /lib/tests/mocks/basic_page_pool_t/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2020 Assured Information Security, Inc. 3 | # 4 | # Permission is hereby granted, free of charge, to any person obtaining a copy 5 | # of this software and associated documentation files (the "Software"), to deal 6 | # in the Software without restriction, including without limitation the rights 7 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | # copies of the Software, and to permit persons to whom the Software is 9 | # furnished to do so, subject to the following conditions: 10 | # 11 | # The above copyright notice and this permission notice shall be included in all 12 | # copies or substantial portions of the Software. 13 | # 14 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | # SOFTWARE. 21 | 22 | bf_add_test(requirements INCLUDES ${COMMON_INCLUDES} SYSTEM_INCLUDES ${COMMON_SYSTEM_INCLUDES} DEFINES ${COMMON_DEFINES}) 23 | bf_add_test(behavior INCLUDES ${COMMON_INCLUDES} SYSTEM_INCLUDES ${COMMON_SYSTEM_INCLUDES} DEFINES ${COMMON_DEFINES}) 24 | -------------------------------------------------------------------------------- /lib/tests/mocks/basic_root_page_table_t/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2020 Assured Information Security, Inc. 3 | # 4 | # Permission is hereby granted, free of charge, to any person obtaining a copy 5 | # of this software and associated documentation files (the "Software"), to deal 6 | # in the Software without restriction, including without limitation the rights 7 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | # copies of the Software, and to permit persons to whom the Software is 9 | # furnished to do so, subject to the following conditions: 10 | # 11 | # The above copyright notice and this permission notice shall be included in all 12 | # copies or substantial portions of the Software. 13 | # 14 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | # SOFTWARE. 21 | 22 | bf_add_test(requirements INCLUDES ${COMMON_INCLUDES} SYSTEM_INCLUDES ${COMMON_SYSTEM_INCLUDES} DEFINES ${COMMON_DEFINES}) 23 | bf_add_test(behavior INCLUDES ${COMMON_INCLUDES} SYSTEM_INCLUDES ${COMMON_SYSTEM_INCLUDES} DEFINES ${COMMON_DEFINES}) 24 | -------------------------------------------------------------------------------- /lib/tests/mocks/basic_spinlock_t/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2020 Assured Information Security, Inc. 3 | # 4 | # Permission is hereby granted, free of charge, to any person obtaining a copy 5 | # of this software and associated documentation files (the "Software"), to deal 6 | # in the Software without restriction, including without limitation the rights 7 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | # copies of the Software, and to permit persons to whom the Software is 9 | # furnished to do so, subject to the following conditions: 10 | # 11 | # The above copyright notice and this permission notice shall be included in all 12 | # copies or substantial portions of the Software. 13 | # 14 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | # SOFTWARE. 21 | 22 | bf_add_test(requirements INCLUDES ${COMMON_INCLUDES} SYSTEM_INCLUDES ${COMMON_SYSTEM_INCLUDES} DEFINES ${COMMON_DEFINES}) 23 | bf_add_test(behavior INCLUDES ${COMMON_INCLUDES} SYSTEM_INCLUDES ${COMMON_SYSTEM_INCLUDES} DEFINES ${COMMON_DEFINES}) 24 | -------------------------------------------------------------------------------- /lib/tests/src/linux/basic_ifmap_t/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2020 Assured Information Security, Inc. 3 | # 4 | # Permission is hereby granted, free of charge, to any person obtaining a copy 5 | # of this software and associated documentation files (the "Software"), to deal 6 | # in the Software without restriction, including without limitation the rights 7 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | # copies of the Software, and to permit persons to whom the Software is 9 | # furnished to do so, subject to the following conditions: 10 | # 11 | # The above copyright notice and this permission notice shall be included in all 12 | # copies or substantial portions of the Software. 13 | # 14 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | # SOFTWARE. 21 | 22 | bf_add_test(requirements INCLUDES ${COMMON_INCLUDES} SYSTEM_INCLUDES ${COMMON_SYSTEM_INCLUDES} DEFINES ${COMMON_DEFINES}) 23 | -------------------------------------------------------------------------------- /lib/tests/src/linux/basic_ioctl_t/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2020 Assured Information Security, Inc. 3 | # 4 | # Permission is hereby granted, free of charge, to any person obtaining a copy 5 | # of this software and associated documentation files (the "Software"), to deal 6 | # in the Software without restriction, including without limitation the rights 7 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | # copies of the Software, and to permit persons to whom the Software is 9 | # furnished to do so, subject to the following conditions: 10 | # 11 | # The above copyright notice and this permission notice shall be included in all 12 | # copies or substantial portions of the Software. 13 | # 14 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | # SOFTWARE. 21 | 22 | bf_add_test(requirements INCLUDES ${COMMON_INCLUDES} SYSTEM_INCLUDES ${COMMON_SYSTEM_INCLUDES} DEFINES ${COMMON_DEFINES}) 23 | -------------------------------------------------------------------------------- /lib/tests/src/windows/basic_ifmap_t/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2020 Assured Information Security, Inc. 3 | # 4 | # Permission is hereby granted, free of charge, to any person obtaining a copy 5 | # of this software and associated documentation files (the "Software"), to deal 6 | # in the Software without restriction, including without limitation the rights 7 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | # copies of the Software, and to permit persons to whom the Software is 9 | # furnished to do so, subject to the following conditions: 10 | # 11 | # The above copyright notice and this permission notice shall be included in all 12 | # copies or substantial portions of the Software. 13 | # 14 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | # SOFTWARE. 21 | 22 | bf_add_test(requirements INCLUDES ${COMMON_INCLUDES} SYSTEM_INCLUDES ${COMMON_SYSTEM_INCLUDES} DEFINES ${COMMON_DEFINES}) 23 | -------------------------------------------------------------------------------- /lib/tests/src/windows/basic_ioctl_t/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2020 Assured Information Security, Inc. 3 | # 4 | # Permission is hereby granted, free of charge, to any person obtaining a copy 5 | # of this software and associated documentation files (the "Software"), to deal 6 | # in the Software without restriction, including without limitation the rights 7 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | # copies of the Software, and to permit persons to whom the Software is 9 | # furnished to do so, subject to the following conditions: 10 | # 11 | # The above copyright notice and this permission notice shall be included in all 12 | # copies or substantial portions of the Software. 13 | # 14 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | # SOFTWARE. 21 | 22 | bf_add_test(requirements INCLUDES ${COMMON_INCLUDES} SYSTEM_INCLUDES ${COMMON_SYSTEM_INCLUDES} DEFINES ${COMMON_DEFINES}) 23 | -------------------------------------------------------------------------------- /loader/efi/include/std/inttypes.h: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: SPDX-License-Identifier: GPL-2.0 OR MIT */ 2 | 3 | /** 4 | * @copyright 5 | * Copyright (C) 2020 Assured Information Security, Inc. 6 | * 7 | * @copyright 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * @copyright 16 | * The above copyright notice and this permission notice shall be included in 17 | * all copies or substantial portions of the Software. 18 | * 19 | * @copyright 20 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 21 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 22 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 23 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 24 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 25 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 26 | * SOFTWARE. 27 | */ 28 | 29 | #ifndef INTTYPES_H 30 | #define INTTYPES_H 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /loader/efi/src/arm/aarch64/flush_cache.S: -------------------------------------------------------------------------------- 1 | /** 2 | * @copyright 3 | * Copyright (C) 2020 Assured Information Security, Inc. 4 | * 5 | * @copyright 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * @copyright 14 | * The above copyright notice and this permission notice shall be included in 15 | * all copies or substantial portions of the Software. 16 | * 17 | * @copyright 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 24 | * SOFTWARE. 25 | */ 26 | 27 | .global flush_cache 28 | flush_cache: 29 | 30 | dc civac, x0 31 | dsb sy 32 | 33 | ret 34 | -------------------------------------------------------------------------------- /loader/efi/src/arm/aarch64/read_currentel.S: -------------------------------------------------------------------------------- 1 | /** 2 | * @copyright 3 | * Copyright (C) 2020 Assured Information Security, Inc. 4 | * 5 | * @copyright 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * @copyright 14 | * The above copyright notice and this permission notice shall be included in 15 | * all copies or substantial portions of the Software. 16 | * 17 | * @copyright 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 24 | * SOFTWARE. 25 | */ 26 | 27 | .global read_currentel 28 | read_currentel: 29 | 30 | mrs x0, CurrentEL 31 | ret 32 | -------------------------------------------------------------------------------- /loader/efi/src/arm/aarch64/read_daif.S: -------------------------------------------------------------------------------- 1 | /** 2 | * @copyright 3 | * Copyright (C) 2020 Assured Information Security, Inc. 4 | * 5 | * @copyright 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * @copyright 14 | * The above copyright notice and this permission notice shall be included in 15 | * all copies or substantial portions of the Software. 16 | * 17 | * @copyright 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 24 | * SOFTWARE. 25 | */ 26 | 27 | .global read_daif 28 | read_daif: 29 | 30 | mrs x0, daif 31 | ret 32 | -------------------------------------------------------------------------------- /loader/efi/src/arm/aarch64/read_hcr_el2.S: -------------------------------------------------------------------------------- 1 | /** 2 | * @copyright 3 | * Copyright (C) 2020 Assured Information Security, Inc. 4 | * 5 | * @copyright 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * @copyright 14 | * The above copyright notice and this permission notice shall be included in 15 | * all copies or substantial portions of the Software. 16 | * 17 | * @copyright 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 24 | * SOFTWARE. 25 | */ 26 | 27 | .global read_hcr_el2 28 | read_hcr_el2: 29 | 30 | mrs x0, hcr_el2 31 | ret 32 | -------------------------------------------------------------------------------- /loader/efi/src/arm/aarch64/read_mair_el2.S: -------------------------------------------------------------------------------- 1 | /** 2 | * @copyright 3 | * Copyright (C) 2020 Assured Information Security, Inc. 4 | * 5 | * @copyright 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * @copyright 14 | * The above copyright notice and this permission notice shall be included in 15 | * all copies or substantial portions of the Software. 16 | * 17 | * @copyright 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 24 | * SOFTWARE. 25 | */ 26 | 27 | .global read_mair_el2 28 | read_mair_el2: 29 | 30 | mrs x0, mair_el2 31 | ret 32 | -------------------------------------------------------------------------------- /loader/efi/src/arm/aarch64/read_sctlr_el2.S: -------------------------------------------------------------------------------- 1 | /** 2 | * @copyright 3 | * Copyright (C) 2020 Assured Information Security, Inc. 4 | * 5 | * @copyright 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * @copyright 14 | * The above copyright notice and this permission notice shall be included in 15 | * all copies or substantial portions of the Software. 16 | * 17 | * @copyright 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 24 | * SOFTWARE. 25 | */ 26 | 27 | .global read_sctlr_el2 28 | read_sctlr_el2: 29 | 30 | mrs x0, sctlr_el2 31 | ret 32 | -------------------------------------------------------------------------------- /loader/efi/src/arm/aarch64/read_spsel.S: -------------------------------------------------------------------------------- 1 | /** 2 | * @copyright 3 | * Copyright (C) 2020 Assured Information Security, Inc. 4 | * 5 | * @copyright 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * @copyright 14 | * The above copyright notice and this permission notice shall be included in 15 | * all copies or substantial portions of the Software. 16 | * 17 | * @copyright 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 24 | * SOFTWARE. 25 | */ 26 | 27 | .global read_spsel 28 | read_spsel: 29 | 30 | mrs x0, spsel 31 | ret 32 | -------------------------------------------------------------------------------- /loader/efi/src/arm/aarch64/read_tcr_el2.S: -------------------------------------------------------------------------------- 1 | /** 2 | * @copyright 3 | * Copyright (C) 2020 Assured Information Security, Inc. 4 | * 5 | * @copyright 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * @copyright 14 | * The above copyright notice and this permission notice shall be included in 15 | * all copies or substantial portions of the Software. 16 | * 17 | * @copyright 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 24 | * SOFTWARE. 25 | */ 26 | 27 | .global read_tcr_el2 28 | read_tcr_el2: 29 | 30 | mrs x0, tcr_el2 31 | ret 32 | -------------------------------------------------------------------------------- /loader/efi/src/arm/aarch64/read_ttbr0_el2.S: -------------------------------------------------------------------------------- 1 | /** 2 | * @copyright 3 | * Copyright (C) 2020 Assured Information Security, Inc. 4 | * 5 | * @copyright 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * @copyright 14 | * The above copyright notice and this permission notice shall be included in 15 | * all copies or substantial portions of the Software. 16 | * 17 | * @copyright 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 24 | * SOFTWARE. 25 | */ 26 | 27 | .global read_ttbr0_el2 28 | read_ttbr0_el2: 29 | 30 | mrs x0, ttbr0_el2 31 | ret 32 | -------------------------------------------------------------------------------- /loader/efi/src/arm/aarch64/read_vbar_el2.S: -------------------------------------------------------------------------------- 1 | /** 2 | * @copyright 3 | * Copyright (C) 2020 Assured Information Security, Inc. 4 | * 5 | * @copyright 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * @copyright 14 | * The above copyright notice and this permission notice shall be included in 15 | * all copies or substantial portions of the Software. 16 | * 17 | * @copyright 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 24 | * SOFTWARE. 25 | */ 26 | 27 | .global read_vbar_el2 28 | read_vbar_el2: 29 | 30 | mrs x0, vbar_el2 31 | ret 32 | -------------------------------------------------------------------------------- /loader/efi/src/x64/amd/enable_interrupts.S: -------------------------------------------------------------------------------- 1 | /** 2 | * @copyright 3 | * Copyright (C) 2020 Assured Information Security, Inc. 4 | * 5 | * @copyright 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * @copyright 14 | * The above copyright notice and this permission notice shall be included in 15 | * all copies or substantial portions of the Software. 16 | * 17 | * @copyright 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 24 | * SOFTWARE. 25 | */ 26 | 27 | .code64 28 | .intel_syntax noprefix 29 | 30 | .globl enable_interrupts 31 | enable_interrupts: 32 | 33 | stgi 34 | ret 35 | int 3 36 | -------------------------------------------------------------------------------- /loader/efi/src/x64/amd/setup_cr0.c: -------------------------------------------------------------------------------- 1 | /** 2 | * @copyright 3 | * Copyright (C) 2020 Assured Information Security, Inc. 4 | * 5 | * @copyright 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * @copyright 14 | * The above copyright notice and this permission notice shall be included in 15 | * all copies or substantial portions of the Software. 16 | * 17 | * @copyright 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 24 | * SOFTWARE. 25 | */ 26 | 27 | /** 28 | * 29 | * @brief Ensures that CR0 is set up properly. 30 | */ 31 | void 32 | setup_cr0(void) 33 | {} 34 | -------------------------------------------------------------------------------- /loader/efi/src/x64/amd/setup_cr4.c: -------------------------------------------------------------------------------- 1 | /** 2 | * @copyright 3 | * Copyright (C) 2020 Assured Information Security, Inc. 4 | * 5 | * @copyright 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * @copyright 14 | * The above copyright notice and this permission notice shall be included in 15 | * all copies or substantial portions of the Software. 16 | * 17 | * @copyright 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 24 | * SOFTWARE. 25 | */ 26 | 27 | /** 28 | * 29 | * @brief Ensures that CR4 is set up properly. 30 | */ 31 | void 32 | setup_cr4(void) 33 | {} 34 | -------------------------------------------------------------------------------- /loader/efi/src/x64/flush_cache.S: -------------------------------------------------------------------------------- 1 | /** 2 | * @copyright 3 | * Copyright (C) 2020 Assured Information Security, Inc. 4 | * 5 | * @copyright 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * @copyright 14 | * The above copyright notice and this permission notice shall be included in 15 | * all copies or substantial portions of the Software. 16 | * 17 | * @copyright 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 24 | * SOFTWARE. 25 | */ 26 | 27 | .code64 28 | .intel_syntax noprefix 29 | 30 | .global flush_cache 31 | flush_cache: 32 | 33 | clflush [rdi] 34 | ret 35 | int 3 36 | -------------------------------------------------------------------------------- /loader/efi/src/x64/intel/enable_interrupts.S: -------------------------------------------------------------------------------- 1 | /** 2 | * @copyright 3 | * Copyright (C) 2020 Assured Information Security, Inc. 4 | * 5 | * @copyright 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * @copyright 14 | * The above copyright notice and this permission notice shall be included in 15 | * all copies or substantial portions of the Software. 16 | * 17 | * @copyright 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 24 | * SOFTWARE. 25 | */ 26 | 27 | .code64 28 | .intel_syntax noprefix 29 | 30 | .globl enable_interrupts 31 | enable_interrupts: 32 | 33 | sti 34 | ret 35 | int 3 36 | -------------------------------------------------------------------------------- /loader/efi/src/x64/intrinsic_lcr0.S: -------------------------------------------------------------------------------- 1 | /** 2 | * @copyright 3 | * Copyright (C) 2020 Assured Information Security, Inc. 4 | * 5 | * @copyright 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * @copyright 14 | * The above copyright notice and this permission notice shall be included in 15 | * all copies or substantial portions of the Software. 16 | * 17 | * @copyright 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 24 | * SOFTWARE. 25 | */ 26 | 27 | .code64 28 | .intel_syntax noprefix 29 | 30 | .globl intrinsic_lcr0 31 | intrinsic_lcr0: 32 | 33 | mov cr0, rcx 34 | 35 | ret 36 | int 3 37 | -------------------------------------------------------------------------------- /loader/efi/src/x64/intrinsic_lcr4.S: -------------------------------------------------------------------------------- 1 | /** 2 | * @copyright 3 | * Copyright (C) 2020 Assured Information Security, Inc. 4 | * 5 | * @copyright 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * @copyright 14 | * The above copyright notice and this permission notice shall be included in 15 | * all copies or substantial portions of the Software. 16 | * 17 | * @copyright 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 24 | * SOFTWARE. 25 | */ 26 | 27 | .code64 28 | .intel_syntax noprefix 29 | 30 | .globl intrinsic_lcr4 31 | intrinsic_lcr4: 32 | 33 | mov cr4, rcx 34 | 35 | ret 36 | int 3 37 | -------------------------------------------------------------------------------- /loader/efi/src/x64/intrinsic_lgdt.S: -------------------------------------------------------------------------------- 1 | /** 2 | * @copyright 3 | * Copyright (C) 2020 Assured Information Security, Inc. 4 | * 5 | * @copyright 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * @copyright 14 | * The above copyright notice and this permission notice shall be included in 15 | * all copies or substantial portions of the Software. 16 | * 17 | * @copyright 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 24 | * SOFTWARE. 25 | */ 26 | 27 | .code64 28 | .intel_syntax noprefix 29 | 30 | .globl intrinsic_lgdt 31 | intrinsic_lgdt: 32 | 33 | lgdt [rcx] 34 | 35 | ret 36 | int 3 37 | -------------------------------------------------------------------------------- /loader/efi/src/x64/intrinsic_ltr.S: -------------------------------------------------------------------------------- 1 | /** 2 | * @copyright 3 | * Copyright (C) 2020 Assured Information Security, Inc. 4 | * 5 | * @copyright 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * @copyright 14 | * The above copyright notice and this permission notice shall be included in 15 | * all copies or substantial portions of the Software. 16 | * 17 | * @copyright 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 24 | * SOFTWARE. 25 | */ 26 | 27 | .code64 28 | .intel_syntax noprefix 29 | 30 | .globl intrinsic_ltr 31 | intrinsic_ltr: 32 | 33 | ltr cx 34 | 35 | ret 36 | int 3 37 | -------------------------------------------------------------------------------- /loader/efi/src/x64/intrinsic_scr0.S: -------------------------------------------------------------------------------- 1 | /** 2 | * @copyright 3 | * Copyright (C) 2020 Assured Information Security, Inc. 4 | * 5 | * @copyright 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * @copyright 14 | * The above copyright notice and this permission notice shall be included in 15 | * all copies or substantial portions of the Software. 16 | * 17 | * @copyright 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 24 | * SOFTWARE. 25 | */ 26 | 27 | .code64 28 | .intel_syntax noprefix 29 | 30 | .globl intrinsic_scr0 31 | intrinsic_scr0: 32 | 33 | mov rax, cr0 34 | 35 | ret 36 | int 3 37 | -------------------------------------------------------------------------------- /loader/efi/src/x64/intrinsic_scr4.S: -------------------------------------------------------------------------------- 1 | /** 2 | * @copyright 3 | * Copyright (C) 2020 Assured Information Security, Inc. 4 | * 5 | * @copyright 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * @copyright 14 | * The above copyright notice and this permission notice shall be included in 15 | * all copies or substantial portions of the Software. 16 | * 17 | * @copyright 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 24 | * SOFTWARE. 25 | */ 26 | 27 | .code64 28 | .intel_syntax noprefix 29 | 30 | .globl intrinsic_scr4 31 | intrinsic_scr4: 32 | 33 | mov rax, cr4 34 | 35 | ret 36 | int 3 37 | -------------------------------------------------------------------------------- /loader/efi/src/x64/intrinsic_sgdt.S: -------------------------------------------------------------------------------- 1 | /** 2 | * @copyright 3 | * Copyright (C) 2020 Assured Information Security, Inc. 4 | * 5 | * @copyright 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * @copyright 14 | * The above copyright notice and this permission notice shall be included in 15 | * all copies or substantial portions of the Software. 16 | * 17 | * @copyright 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 24 | * SOFTWARE. 25 | */ 26 | 27 | .code64 28 | .intel_syntax noprefix 29 | 30 | .globl intrinsic_sgdt 31 | intrinsic_sgdt: 32 | 33 | sgdt [rcx] 34 | 35 | ret 36 | int 3 37 | -------------------------------------------------------------------------------- /loader/efi/src/x64/intrinsic_sidt.S: -------------------------------------------------------------------------------- 1 | /** 2 | * @copyright 3 | * Copyright (C) 2020 Assured Information Security, Inc. 4 | * 5 | * @copyright 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * @copyright 14 | * The above copyright notice and this permission notice shall be included in 15 | * all copies or substantial portions of the Software. 16 | * 17 | * @copyright 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 24 | * SOFTWARE. 25 | */ 26 | 27 | .code64 28 | .intel_syntax noprefix 29 | 30 | .globl intrinsic_sidt 31 | intrinsic_sidt: 32 | 33 | sidt [rcx] 34 | 35 | ret 36 | int 3 37 | -------------------------------------------------------------------------------- /loader/linux/include/std/inttypes.h: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: SPDX-License-Identifier: GPL-2.0 OR MIT */ 2 | 3 | /** 4 | * @copyright 5 | * Copyright (C) 2020 Assured Information Security, Inc. 6 | * 7 | * @copyright 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * @copyright 16 | * The above copyright notice and this permission notice shall be included in 17 | * all copies or substantial portions of the Software. 18 | * 19 | * @copyright 20 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 21 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 22 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 23 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 24 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 25 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 26 | * SOFTWARE. 27 | */ 28 | 29 | #ifndef INTTYPES_H 30 | #define INTTYPES_H 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /loader/src/g_mut_vmm_status.c: -------------------------------------------------------------------------------- 1 | /** 2 | * @copyright 3 | * Copyright (C) 2020 Assured Information Security, Inc. 4 | * 5 | * @copyright 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * @copyright 14 | * The above copyright notice and this permission notice shall be included in 15 | * all copies or substantial portions of the Software. 16 | * 17 | * @copyright 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 24 | * SOFTWARE. 25 | */ 26 | 27 | #include 28 | #include 29 | 30 | /** @brief stores the current state of the VMM */ 31 | uint32_t g_mut_vmm_status = VMM_STATUS_STOPPED; 32 | -------------------------------------------------------------------------------- /loader/windows/include/Device.h: -------------------------------------------------------------------------------- 1 | /*++ 2 | 3 | Module Name: 4 | 5 | device.h 6 | 7 | Abstract: 8 | 9 | This file contains the device definitions. 10 | 11 | Environment: 12 | 13 | Kernel-mode Driver Framework 14 | 15 | --*/ 16 | 17 | EXTERN_C_START 18 | 19 | // 20 | // The device context performs the same job as 21 | // a WDM device extension in the driver frameworks 22 | // 23 | typedef struct _DEVICE_CONTEXT 24 | { 25 | ULONG PrivateDeviceData; // just a placeholder 26 | 27 | } DEVICE_CONTEXT, *PDEVICE_CONTEXT; 28 | 29 | // 30 | // This macro will generate an inline function called DeviceGetContext 31 | // which will be used to get a pointer to the device context memory 32 | // in a type safe manner. 33 | // 34 | WDF_DECLARE_CONTEXT_TYPE_WITH_NAME(DEVICE_CONTEXT, DeviceGetContext) 35 | 36 | // 37 | // Function to initialize the device and its callbacks 38 | // 39 | NTSTATUS 40 | loaderCreateDevice(_Inout_ PWDFDEVICE_INIT DeviceInit); 41 | 42 | EXTERN_C_END 43 | -------------------------------------------------------------------------------- /loader/windows/include/Driver.h: -------------------------------------------------------------------------------- 1 | /*++ 2 | 3 | Module Name: 4 | 5 | driver.h 6 | 7 | Abstract: 8 | 9 | This file contains the driver definitions. 10 | 11 | Environment: 12 | 13 | Kernel-mode Driver Framework 14 | 15 | --*/ 16 | 17 | // clang-format off 18 | 19 | /// NOTE: 20 | /// - The windows includes that we use here need to remain in this order. 21 | /// Otherwise the code will not compile. 22 | /// 23 | 24 | #include 25 | #include 26 | #include 27 | 28 | #include "device.h" 29 | #include "queue.h" 30 | #include "trace.h" 31 | 32 | // clang-format on 33 | 34 | EXTERN_C_START 35 | 36 | // 37 | // WDFDRIVER Events 38 | // 39 | 40 | DRIVER_INITIALIZE DriverEntry; 41 | EVT_WDF_DRIVER_DEVICE_ADD loaderEvtDeviceAdd; 42 | EVT_WDF_OBJECT_CONTEXT_CLEANUP loaderEvtDriverContextCleanup; 43 | 44 | EXTERN_C_END 45 | -------------------------------------------------------------------------------- /loader/windows/include/Queue.h: -------------------------------------------------------------------------------- 1 | /*++ 2 | 3 | Module Name: 4 | 5 | queue.h 6 | 7 | Abstract: 8 | 9 | This file contains the queue definitions. 10 | 11 | Environment: 12 | 13 | Kernel-mode Driver Framework 14 | 15 | --*/ 16 | 17 | EXTERN_C_START 18 | 19 | // 20 | // This is the context that can be placed per queue 21 | // and would contain per queue information. 22 | // 23 | typedef struct _QUEUE_CONTEXT 24 | { 25 | 26 | ULONG PrivateDeviceData; // just a placeholder 27 | 28 | } QUEUE_CONTEXT, *PQUEUE_CONTEXT; 29 | 30 | WDF_DECLARE_CONTEXT_TYPE_WITH_NAME(QUEUE_CONTEXT, QueueGetContext) 31 | 32 | NTSTATUS 33 | loaderQueueInitialize(_In_ WDFDEVICE Device); 34 | 35 | // 36 | // Events from the IoQueue object 37 | // 38 | EVT_WDF_IO_QUEUE_IO_DEVICE_CONTROL loaderEvtIoDeviceControl; 39 | EVT_WDF_IO_QUEUE_IO_STOP loaderEvtIoStop; 40 | 41 | EXTERN_C_END 42 | -------------------------------------------------------------------------------- /loader/windows/include/std/inttypes.h: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: SPDX-License-Identifier: GPL-2.0 OR MIT */ 2 | 3 | /** 4 | * @copyright 5 | * Copyright (C) 2020 Assured Information Security, Inc. 6 | * 7 | * @copyright 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * @copyright 16 | * The above copyright notice and this permission notice shall be included in 17 | * all copies or substantial portions of the Software. 18 | * 19 | * @copyright 20 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 21 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 22 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 23 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 24 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 25 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 26 | * SOFTWARE. 27 | */ 28 | 29 | #ifndef INTTYPES_H 30 | #define INTTYPES_H 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /loader/windows/src/x64/amd/disable_interrupts.asm: -------------------------------------------------------------------------------- 1 | ; @copyright 2 | ; Copyright (C) 2020 Assured Information Security, Inc. 3 | ; 4 | ; @copyright 5 | ; Permission is hereby granted, free of charge, to any person obtaining a copy 6 | ; of this software and associated documentation files (the "Software"), to deal 7 | ; in the Software without restriction, including without limitation the rights 8 | ; to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | ; copies of the Software, and to permit persons to whom the Software is 10 | ; furnished to do so, subject to the following conditions: 11 | ; 12 | ; @copyright 13 | ; The above copyright notice and this permission notice shall be included in 14 | ; all copies or substantial portions of the Software. 15 | ; 16 | ; @copyright 17 | ; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | ; IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | ; FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | ; AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | ; LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | ; OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 23 | ; SOFTWARE. 24 | 25 | .code 26 | 27 | disable_interrupts PROC 28 | 29 | clgi 30 | ret 31 | int 3 32 | 33 | disable_interrupts ENDP 34 | end 35 | -------------------------------------------------------------------------------- /loader/windows/src/x64/amd/enable_interrupts.asm: -------------------------------------------------------------------------------- 1 | ; @copyright 2 | ; Copyright (C) 2020 Assured Information Security, Inc. 3 | ; 4 | ; @copyright 5 | ; Permission is hereby granted, free of charge, to any person obtaining a copy 6 | ; of this software and associated documentation files (the "Software"), to deal 7 | ; in the Software without restriction, including without limitation the rights 8 | ; to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | ; copies of the Software, and to permit persons to whom the Software is 10 | ; furnished to do so, subject to the following conditions: 11 | ; 12 | ; @copyright 13 | ; The above copyright notice and this permission notice shall be included in 14 | ; all copies or substantial portions of the Software. 15 | ; 16 | ; @copyright 17 | ; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | ; IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | ; FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | ; AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | ; LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | ; OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 23 | ; SOFTWARE. 24 | 25 | .code 26 | 27 | enable_interrupts PROC 28 | 29 | stgi 30 | ret 31 | int 3 32 | 33 | enable_interrupts ENDP 34 | end 35 | -------------------------------------------------------------------------------- /loader/windows/src/x64/flush_cache.asm: -------------------------------------------------------------------------------- 1 | ; @copyright 2 | ; Copyright (C) 2020 Assured Information Security, Inc. 3 | ; 4 | ; @copyright 5 | ; Permission is hereby granted, free of charge, to any person obtaining a copy 6 | ; of this software and associated documentation files (the "Software"), to deal 7 | ; in the Software without restriction, including without limitation the rights 8 | ; to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | ; copies of the Software, and to permit persons to whom the Software is 10 | ; furnished to do so, subject to the following conditions: 11 | ; 12 | ; @copyright 13 | ; The above copyright notice and this permission notice shall be included in 14 | ; all copies or substantial portions of the Software. 15 | ; 16 | ; @copyright 17 | ; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | ; IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | ; FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | ; AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | ; LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | ; OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 23 | ; SOFTWARE. 24 | 25 | .code 26 | 27 | flush_cache PROC 28 | 29 | clflush [rcx] 30 | ret 31 | int 3 32 | 33 | flush_cache ENDP 34 | end 35 | -------------------------------------------------------------------------------- /loader/windows/src/x64/intel/disable_interrupts.asm: -------------------------------------------------------------------------------- 1 | ; @copyright 2 | ; Copyright (C) 2020 Assured Information Security, Inc. 3 | ; 4 | ; @copyright 5 | ; Permission is hereby granted, free of charge, to any person obtaining a copy 6 | ; of this software and associated documentation files (the "Software"), to deal 7 | ; in the Software without restriction, including without limitation the rights 8 | ; to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | ; copies of the Software, and to permit persons to whom the Software is 10 | ; furnished to do so, subject to the following conditions: 11 | ; 12 | ; @copyright 13 | ; The above copyright notice and this permission notice shall be included in 14 | ; all copies or substantial portions of the Software. 15 | ; 16 | ; @copyright 17 | ; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | ; IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | ; FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | ; AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | ; LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | ; OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 23 | ; SOFTWARE. 24 | 25 | .code 26 | 27 | disable_interrupts PROC 28 | 29 | cli 30 | ret 31 | int 3 32 | 33 | disable_interrupts ENDP 34 | end 35 | -------------------------------------------------------------------------------- /loader/windows/src/x64/intel/enable_interrupts.asm: -------------------------------------------------------------------------------- 1 | ; @copyright 2 | ; Copyright (C) 2020 Assured Information Security, Inc. 3 | ; 4 | ; @copyright 5 | ; Permission is hereby granted, free of charge, to any person obtaining a copy 6 | ; of this software and associated documentation files (the "Software"), to deal 7 | ; in the Software without restriction, including without limitation the rights 8 | ; to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | ; copies of the Software, and to permit persons to whom the Software is 10 | ; furnished to do so, subject to the following conditions: 11 | ; 12 | ; @copyright 13 | ; The above copyright notice and this permission notice shall be included in 14 | ; all copies or substantial portions of the Software. 15 | ; 16 | ; @copyright 17 | ; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | ; IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | ; FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | ; AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | ; LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | ; OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 23 | ; SOFTWARE. 24 | 25 | .code 26 | 27 | enable_interrupts PROC 28 | 29 | sti 30 | ret 31 | int 3 32 | 33 | enable_interrupts ENDP 34 | end 35 | -------------------------------------------------------------------------------- /loader/windows/src/x64/intrinsic_inb.asm: -------------------------------------------------------------------------------- 1 | ; @copyright 2 | ; Copyright (C) 2020 Assured Information Security, Inc. 3 | ; 4 | ; @copyright 5 | ; Permission is hereby granted, free of charge, to any person obtaining a copy 6 | ; of this software and associated documentation files (the "Software"), to deal 7 | ; in the Software without restriction, including without limitation the rights 8 | ; to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | ; copies of the Software, and to permit persons to whom the Software is 10 | ; furnished to do so, subject to the following conditions: 11 | ; 12 | ; @copyright 13 | ; The above copyright notice and this permission notice shall be included in 14 | ; all copies or substantial portions of the Software. 15 | ; 16 | ; @copyright 17 | ; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | ; IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | ; FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | ; AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | ; LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | ; OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 23 | ; SOFTWARE. 24 | 25 | .code 26 | 27 | intrinsic_inb PROC 28 | 29 | xor rax, rax 30 | mov rdx, rcx 31 | in al, dx 32 | ret 33 | int 3 34 | 35 | intrinsic_inb ENDP 36 | end 37 | -------------------------------------------------------------------------------- /loader/windows/src/x64/intrinsic_lcr4.asm: -------------------------------------------------------------------------------- 1 | ; @copyright 2 | ; Copyright (C) 2020 Assured Information Security, Inc. 3 | ; 4 | ; @copyright 5 | ; Permission is hereby granted, free of charge, to any person obtaining a copy 6 | ; of this software and associated documentation files (the "Software"), to deal 7 | ; in the Software without restriction, including without limitation the rights 8 | ; to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | ; copies of the Software, and to permit persons to whom the Software is 10 | ; furnished to do so, subject to the following conditions: 11 | ; 12 | ; @copyright 13 | ; The above copyright notice and this permission notice shall be included in 14 | ; all copies or substantial portions of the Software. 15 | ; 16 | ; @copyright 17 | ; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | ; IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | ; FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | ; AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | ; LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | ; OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 23 | ; SOFTWARE. 24 | 25 | .code 26 | 27 | intrinsic_lcr4 PROC 28 | 29 | mov cr4, rcx 30 | ret 31 | int 3 32 | 33 | intrinsic_lcr4 ENDP 34 | end 35 | -------------------------------------------------------------------------------- /loader/windows/src/x64/intrinsic_scr0.asm: -------------------------------------------------------------------------------- 1 | ; @copyright 2 | ; Copyright (C) 2020 Assured Information Security, Inc. 3 | ; 4 | ; @copyright 5 | ; Permission is hereby granted, free of charge, to any person obtaining a copy 6 | ; of this software and associated documentation files (the "Software"), to deal 7 | ; in the Software without restriction, including without limitation the rights 8 | ; to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | ; copies of the Software, and to permit persons to whom the Software is 10 | ; furnished to do so, subject to the following conditions: 11 | ; 12 | ; @copyright 13 | ; The above copyright notice and this permission notice shall be included in 14 | ; all copies or substantial portions of the Software. 15 | ; 16 | ; @copyright 17 | ; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | ; IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | ; FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | ; AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | ; LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | ; OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 23 | ; SOFTWARE. 24 | 25 | .code 26 | 27 | intrinsic_scr0 PROC 28 | 29 | mov rax, cr0 30 | ret 31 | int 3 32 | 33 | intrinsic_scr0 ENDP 34 | end 35 | -------------------------------------------------------------------------------- /loader/windows/src/x64/intrinsic_scr4.asm: -------------------------------------------------------------------------------- 1 | ; @copyright 2 | ; Copyright (C) 2020 Assured Information Security, Inc. 3 | ; 4 | ; @copyright 5 | ; Permission is hereby granted, free of charge, to any person obtaining a copy 6 | ; of this software and associated documentation files (the "Software"), to deal 7 | ; in the Software without restriction, including without limitation the rights 8 | ; to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | ; copies of the Software, and to permit persons to whom the Software is 10 | ; furnished to do so, subject to the following conditions: 11 | ; 12 | ; @copyright 13 | ; The above copyright notice and this permission notice shall be included in 14 | ; all copies or substantial portions of the Software. 15 | ; 16 | ; @copyright 17 | ; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | ; IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | ; FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | ; AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | ; LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | ; OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 23 | ; SOFTWARE. 24 | 25 | .code 26 | 27 | intrinsic_scr4 PROC 28 | 29 | mov rax, cr4 30 | ret 31 | int 3 32 | 33 | intrinsic_scr4 ENDP 34 | end 35 | -------------------------------------------------------------------------------- /loader/windows/src/x64/intrinsic_scs.asm: -------------------------------------------------------------------------------- 1 | ; @copyright 2 | ; Copyright (C) 2020 Assured Information Security, Inc. 3 | ; 4 | ; @copyright 5 | ; Permission is hereby granted, free of charge, to any person obtaining a copy 6 | ; of this software and associated documentation files (the "Software"), to deal 7 | ; in the Software without restriction, including without limitation the rights 8 | ; to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | ; copies of the Software, and to permit persons to whom the Software is 10 | ; furnished to do so, subject to the following conditions: 11 | ; 12 | ; @copyright 13 | ; The above copyright notice and this permission notice shall be included in 14 | ; all copies or substantial portions of the Software. 15 | ; 16 | ; @copyright 17 | ; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | ; IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | ; FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | ; AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | ; LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | ; OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 23 | ; SOFTWARE. 24 | 25 | .code 26 | 27 | intrinsic_scs PROC 28 | 29 | xor rax, rax 30 | mov ax, cs 31 | ret 32 | int 3 33 | 34 | intrinsic_scs ENDP 35 | end 36 | -------------------------------------------------------------------------------- /loader/windows/src/x64/intrinsic_sds.asm: -------------------------------------------------------------------------------- 1 | ; @copyright 2 | ; Copyright (C) 2020 Assured Information Security, Inc. 3 | ; 4 | ; @copyright 5 | ; Permission is hereby granted, free of charge, to any person obtaining a copy 6 | ; of this software and associated documentation files (the "Software"), to deal 7 | ; in the Software without restriction, including without limitation the rights 8 | ; to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | ; copies of the Software, and to permit persons to whom the Software is 10 | ; furnished to do so, subject to the following conditions: 11 | ; 12 | ; @copyright 13 | ; The above copyright notice and this permission notice shall be included in 14 | ; all copies or substantial portions of the Software. 15 | ; 16 | ; @copyright 17 | ; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | ; IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | ; FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | ; AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | ; LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | ; OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 23 | ; SOFTWARE. 24 | 25 | .code 26 | 27 | intrinsic_sds PROC 28 | 29 | xor rax, rax 30 | mov ax, ds 31 | ret 32 | int 3 33 | 34 | intrinsic_sds ENDP 35 | end 36 | -------------------------------------------------------------------------------- /loader/windows/src/x64/intrinsic_ses.asm: -------------------------------------------------------------------------------- 1 | ; @copyright 2 | ; Copyright (C) 2020 Assured Information Security, Inc. 3 | ; 4 | ; @copyright 5 | ; Permission is hereby granted, free of charge, to any person obtaining a copy 6 | ; of this software and associated documentation files (the "Software"), to deal 7 | ; in the Software without restriction, including without limitation the rights 8 | ; to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | ; copies of the Software, and to permit persons to whom the Software is 10 | ; furnished to do so, subject to the following conditions: 11 | ; 12 | ; @copyright 13 | ; The above copyright notice and this permission notice shall be included in 14 | ; all copies or substantial portions of the Software. 15 | ; 16 | ; @copyright 17 | ; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | ; IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | ; FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | ; AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | ; LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | ; OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 23 | ; SOFTWARE. 24 | 25 | .code 26 | 27 | intrinsic_ses PROC 28 | 29 | xor rax, rax 30 | mov ax, es 31 | ret 32 | int 3 33 | 34 | intrinsic_ses ENDP 35 | end 36 | -------------------------------------------------------------------------------- /loader/windows/src/x64/intrinsic_sfs.asm: -------------------------------------------------------------------------------- 1 | ; @copyright 2 | ; Copyright (C) 2020 Assured Information Security, Inc. 3 | ; 4 | ; @copyright 5 | ; Permission is hereby granted, free of charge, to any person obtaining a copy 6 | ; of this software and associated documentation files (the "Software"), to deal 7 | ; in the Software without restriction, including without limitation the rights 8 | ; to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | ; copies of the Software, and to permit persons to whom the Software is 10 | ; furnished to do so, subject to the following conditions: 11 | ; 12 | ; @copyright 13 | ; The above copyright notice and this permission notice shall be included in 14 | ; all copies or substantial portions of the Software. 15 | ; 16 | ; @copyright 17 | ; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | ; IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | ; FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | ; AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | ; LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | ; OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 23 | ; SOFTWARE. 24 | 25 | .code 26 | 27 | intrinsic_sfs PROC 28 | 29 | xor rax, rax 30 | mov ax, fs 31 | ret 32 | int 3 33 | 34 | intrinsic_sfs ENDP 35 | end 36 | -------------------------------------------------------------------------------- /loader/windows/src/x64/intrinsic_sgdt.asm: -------------------------------------------------------------------------------- 1 | ; @copyright 2 | ; Copyright (C) 2020 Assured Information Security, Inc. 3 | ; 4 | ; @copyright 5 | ; Permission is hereby granted, free of charge, to any person obtaining a copy 6 | ; of this software and associated documentation files (the "Software"), to deal 7 | ; in the Software without restriction, including without limitation the rights 8 | ; to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | ; copies of the Software, and to permit persons to whom the Software is 10 | ; furnished to do so, subject to the following conditions: 11 | ; 12 | ; @copyright 13 | ; The above copyright notice and this permission notice shall be included in 14 | ; all copies or substantial portions of the Software. 15 | ; 16 | ; @copyright 17 | ; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | ; IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | ; FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | ; AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | ; LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | ; OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 23 | ; SOFTWARE. 24 | 25 | .code 26 | 27 | intrinsic_sgdt PROC 28 | 29 | sgdt fword ptr[rcx] 30 | ret 31 | int 3 32 | 33 | intrinsic_sgdt ENDP 34 | end 35 | -------------------------------------------------------------------------------- /loader/windows/src/x64/intrinsic_sgs.asm: -------------------------------------------------------------------------------- 1 | ; @copyright 2 | ; Copyright (C) 2020 Assured Information Security, Inc. 3 | ; 4 | ; @copyright 5 | ; Permission is hereby granted, free of charge, to any person obtaining a copy 6 | ; of this software and associated documentation files (the "Software"), to deal 7 | ; in the Software without restriction, including without limitation the rights 8 | ; to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | ; copies of the Software, and to permit persons to whom the Software is 10 | ; furnished to do so, subject to the following conditions: 11 | ; 12 | ; @copyright 13 | ; The above copyright notice and this permission notice shall be included in 14 | ; all copies or substantial portions of the Software. 15 | ; 16 | ; @copyright 17 | ; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | ; IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | ; FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | ; AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | ; LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | ; OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 23 | ; SOFTWARE. 24 | 25 | .code 26 | 27 | intrinsic_sgs PROC 28 | 29 | xor rax, rax 30 | mov ax, gs 31 | ret 32 | int 3 33 | 34 | intrinsic_sgs ENDP 35 | end 36 | -------------------------------------------------------------------------------- /loader/windows/src/x64/intrinsic_sidt.asm: -------------------------------------------------------------------------------- 1 | ; @copyright 2 | ; Copyright (C) 2020 Assured Information Security, Inc. 3 | ; 4 | ; @copyright 5 | ; Permission is hereby granted, free of charge, to any person obtaining a copy 6 | ; of this software and associated documentation files (the "Software"), to deal 7 | ; in the Software without restriction, including without limitation the rights 8 | ; to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | ; copies of the Software, and to permit persons to whom the Software is 10 | ; furnished to do so, subject to the following conditions: 11 | ; 12 | ; @copyright 13 | ; The above copyright notice and this permission notice shall be included in 14 | ; all copies or substantial portions of the Software. 15 | ; 16 | ; @copyright 17 | ; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | ; IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | ; FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | ; AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | ; LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | ; OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 23 | ; SOFTWARE. 24 | 25 | .code 26 | 27 | intrinsic_sidt PROC 28 | 29 | sidt fword ptr[rcx] 30 | ret 31 | int 3 32 | 33 | intrinsic_sidt ENDP 34 | end 35 | -------------------------------------------------------------------------------- /loader/windows/src/x64/intrinsic_sldtr.asm: -------------------------------------------------------------------------------- 1 | ; @copyright 2 | ; Copyright (C) 2020 Assured Information Security, Inc. 3 | ; 4 | ; @copyright 5 | ; Permission is hereby granted, free of charge, to any person obtaining a copy 6 | ; of this software and associated documentation files (the "Software"), to deal 7 | ; in the Software without restriction, including without limitation the rights 8 | ; to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | ; copies of the Software, and to permit persons to whom the Software is 10 | ; furnished to do so, subject to the following conditions: 11 | ; 12 | ; @copyright 13 | ; The above copyright notice and this permission notice shall be included in 14 | ; all copies or substantial portions of the Software. 15 | ; 16 | ; @copyright 17 | ; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | ; IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | ; FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | ; AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | ; LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | ; OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 23 | ; SOFTWARE. 24 | 25 | .code 26 | 27 | intrinsic_sldtr PROC 28 | 29 | xor rax, rax 30 | sldt ax 31 | ret 32 | int 3 33 | 34 | intrinsic_sldtr ENDP 35 | end 36 | -------------------------------------------------------------------------------- /loader/windows/src/x64/intrinsic_sss.asm: -------------------------------------------------------------------------------- 1 | ; @copyright 2 | ; Copyright (C) 2020 Assured Information Security, Inc. 3 | ; 4 | ; @copyright 5 | ; Permission is hereby granted, free of charge, to any person obtaining a copy 6 | ; of this software and associated documentation files (the "Software"), to deal 7 | ; in the Software without restriction, including without limitation the rights 8 | ; to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | ; copies of the Software, and to permit persons to whom the Software is 10 | ; furnished to do so, subject to the following conditions: 11 | ; 12 | ; @copyright 13 | ; The above copyright notice and this permission notice shall be included in 14 | ; all copies or substantial portions of the Software. 15 | ; 16 | ; @copyright 17 | ; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | ; IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | ; FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | ; AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | ; LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | ; OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 23 | ; SOFTWARE. 24 | 25 | .code 26 | 27 | intrinsic_sss PROC 28 | 29 | xor rax, rax 30 | mov ax, ss 31 | ret 32 | int 3 33 | 34 | intrinsic_sss ENDP 35 | end 36 | -------------------------------------------------------------------------------- /loader/windows/src/x64/intrinsic_str.asm: -------------------------------------------------------------------------------- 1 | ; @copyright 2 | ; Copyright (C) 2020 Assured Information Security, Inc. 3 | ; 4 | ; @copyright 5 | ; Permission is hereby granted, free of charge, to any person obtaining a copy 6 | ; of this software and associated documentation files (the "Software"), to deal 7 | ; in the Software without restriction, including without limitation the rights 8 | ; to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | ; copies of the Software, and to permit persons to whom the Software is 10 | ; furnished to do so, subject to the following conditions: 11 | ; 12 | ; @copyright 13 | ; The above copyright notice and this permission notice shall be included in 14 | ; all copies or substantial portions of the Software. 15 | ; 16 | ; @copyright 17 | ; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | ; IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | ; FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | ; AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | ; LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | ; OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 23 | ; SOFTWARE. 24 | 25 | .code 26 | 27 | intrinsic_str PROC 28 | 29 | xor rax, rax 30 | str ax 31 | ret 32 | int 3 33 | 34 | intrinsic_str ENDP 35 | end 36 | -------------------------------------------------------------------------------- /loader/windows/src/x64/intrinsic_wrmsr.asm: -------------------------------------------------------------------------------- 1 | ; @copyright 2 | ; Copyright (C) 2020 Assured Information Security, Inc. 3 | ; 4 | ; @copyright 5 | ; Permission is hereby granted, free of charge, to any person obtaining a copy 6 | ; of this software and associated documentation files (the "Software"), to deal 7 | ; in the Software without restriction, including without limitation the rights 8 | ; to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | ; copies of the Software, and to permit persons to whom the Software is 10 | ; furnished to do so, subject to the following conditions: 11 | ; 12 | ; @copyright 13 | ; The above copyright notice and this permission notice shall be included in 14 | ; all copies or substantial portions of the Software. 15 | ; 16 | ; @copyright 17 | ; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | ; IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | ; FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | ; AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | ; LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | ; OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 23 | ; SOFTWARE. 24 | 25 | .code 26 | 27 | intrinsic_wrmsr PROC 28 | 29 | mov rax, rdx 30 | shr rdx, 32 31 | wrmsr 32 | ret 33 | int 3 34 | 35 | intrinsic_wrmsr ENDP 36 | end 37 | -------------------------------------------------------------------------------- /runtime/src/arm/aarch64/__stack_chk_guard.S: -------------------------------------------------------------------------------- 1 | /** 2 | * @copyright 3 | * Copyright (C) 2020 Assured Information Security, Inc. 4 | * 5 | * @copyright 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * @copyright 14 | * The above copyright notice and this permission notice shall be included in 15 | * all copies or substantial portions of the Software. 16 | * 17 | * @copyright 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 24 | * SOFTWARE. 25 | */ 26 | 27 | .rodata 28 | 29 | .globl HYPERVISOR_STACK_CHK_GUARD_NAME 30 | HYPERVISOR_STACK_CHK_GUARD_NAME: 31 | .quad 0xDEADBEEFDEADBEEF 32 | -------------------------------------------------------------------------------- /runtime/tests/src/__stack_chk_fail/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2020 Assured Information Security, Inc. 3 | # 4 | # Permission is hereby granted, free of charge, to any person obtaining a copy 5 | # of this software and associated documentation files (the "Software"), to deal 6 | # in the Software without restriction, including without limitation the rights 7 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | # copies of the Software, and to permit persons to whom the Software is 9 | # furnished to do so, subject to the following conditions: 10 | # 11 | # The above copyright notice and this permission notice shall be included in all 12 | # copies or substantial portions of the Software. 13 | # 14 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | # SOFTWARE. 21 | 22 | list(APPEND SOURCES 23 | ../../../src/__stack_chk_fail.cpp 24 | ) 25 | 26 | bf_add_test(behavior INCLUDES ${INCLUDES} SYSTEM_INCLUDES ${SYSTEM_INCLUDES} DEFINES ${DEFINES} SOURCES ${SOURCES}) 27 | -------------------------------------------------------------------------------- /runtime/tests/src/bsl/cstdio/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2020 Assured Information Security, Inc. 3 | # 4 | # Permission is hereby granted, free of charge, to any person obtaining a copy 5 | # of this software and associated documentation files (the "Software"), to deal 6 | # in the Software without restriction, including without limitation the rights 7 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | # copies of the Software, and to permit persons to whom the Software is 9 | # furnished to do so, subject to the following conditions: 10 | # 11 | # The above copyright notice and this permission notice shall be included in all 12 | # copies or substantial portions of the Software. 13 | # 14 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | # SOFTWARE. 21 | 22 | bf_add_test(requirements INCLUDES ${INCLUDES} SYSTEM_INCLUDES ${SYSTEM_INCLUDES} DEFINES ${DEFINES}) 23 | bf_add_test(behavior INCLUDES ${INCLUDES} SYSTEM_INCLUDES ${SYSTEM_INCLUDES} DEFINES ${DEFINES}) 24 | -------------------------------------------------------------------------------- /runtime/tests/src/bsl/cstdlib/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2020 Assured Information Security, Inc. 3 | # 4 | # Permission is hereby granted, free of charge, to any person obtaining a copy 5 | # of this software and associated documentation files (the "Software"), to deal 6 | # in the Software without restriction, including without limitation the rights 7 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | # copies of the Software, and to permit persons to whom the Software is 9 | # furnished to do so, subject to the following conditions: 10 | # 11 | # The above copyright notice and this permission notice shall be included in all 12 | # copies or substantial portions of the Software. 13 | # 14 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | # SOFTWARE. 21 | 22 | bf_add_test(requirements INCLUDES ${INCLUDES} SYSTEM_INCLUDES ${SYSTEM_INCLUDES} DEFINES ${DEFINES}) 23 | -------------------------------------------------------------------------------- /runtime/tests/src/bsl/details/print_thread_id/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2020 Assured Information Security, Inc. 3 | # 4 | # Permission is hereby granted, free of charge, to any person obtaining a copy 5 | # of this software and associated documentation files (the "Software"), to deal 6 | # in the Software without restriction, including without limitation the rights 7 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | # copies of the Software, and to permit persons to whom the Software is 9 | # furnished to do so, subject to the following conditions: 10 | # 11 | # The above copyright notice and this permission notice shall be included in all 12 | # copies or substantial portions of the Software. 13 | # 14 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | # SOFTWARE. 21 | 22 | bf_add_test(requirements INCLUDES ${INCLUDES} SYSTEM_INCLUDES ${SYSTEM_INCLUDES} DEFINES ${DEFINES}) 23 | bf_add_test(behavior INCLUDES ${INCLUDES} SYSTEM_INCLUDES ${SYSTEM_INCLUDES} DEFINES ${DEFINES}) 24 | -------------------------------------------------------------------------------- /syscall/tests/mocks/bf_control_ops/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2020 Assured Information Security, Inc. 3 | # 4 | # Permission is hereby granted, free of charge, to any person obtaining a copy 5 | # of this software and associated documentation files (the "Software"), to deal 6 | # in the Software without restriction, including without limitation the rights 7 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | # copies of the Software, and to permit persons to whom the Software is 9 | # furnished to do so, subject to the following conditions: 10 | # 11 | # The above copyright notice and this permission notice shall be included in all 12 | # copies or substantial portions of the Software. 13 | # 14 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | # SOFTWARE. 21 | 22 | bf_add_test(requirements INCLUDES ${INCLUDES} SYSTEM_INCLUDES ${SYSTEM_INCLUDES} DEFINES ${DEFINES}) 23 | bf_add_test(behavior INCLUDES ${INCLUDES} SYSTEM_INCLUDES ${SYSTEM_INCLUDES} DEFINES ${DEFINES}) 24 | -------------------------------------------------------------------------------- /syscall/tests/mocks/bf_debug_ops/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2020 Assured Information Security, Inc. 3 | # 4 | # Permission is hereby granted, free of charge, to any person obtaining a copy 5 | # of this software and associated documentation files (the "Software"), to deal 6 | # in the Software without restriction, including without limitation the rights 7 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | # copies of the Software, and to permit persons to whom the Software is 9 | # furnished to do so, subject to the following conditions: 10 | # 11 | # The above copyright notice and this permission notice shall be included in all 12 | # copies or substantial portions of the Software. 13 | # 14 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | # SOFTWARE. 21 | 22 | bf_add_test(requirements INCLUDES ${INCLUDES} SYSTEM_INCLUDES ${SYSTEM_INCLUDES} DEFINES ${DEFINES}) 23 | bf_add_test(behavior INCLUDES ${INCLUDES} SYSTEM_INCLUDES ${SYSTEM_INCLUDES} DEFINES ${DEFINES}) 24 | -------------------------------------------------------------------------------- /syscall/tests/mocks/bf_syscall_impl/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2020 Assured Information Security, Inc. 3 | # 4 | # Permission is hereby granted, free of charge, to any person obtaining a copy 5 | # of this software and associated documentation files (the "Software"), to deal 6 | # in the Software without restriction, including without limitation the rights 7 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | # copies of the Software, and to permit persons to whom the Software is 9 | # furnished to do so, subject to the following conditions: 10 | # 11 | # The above copyright notice and this permission notice shall be included in all 12 | # copies or substantial portions of the Software. 13 | # 14 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | # SOFTWARE. 21 | 22 | bf_add_test(requirements INCLUDES ${INCLUDES} SYSTEM_INCLUDES ${SYSTEM_INCLUDES} DEFINES ${DEFINES}) 23 | bf_add_test(behavior INCLUDES ${INCLUDES} SYSTEM_INCLUDES ${SYSTEM_INCLUDES} DEFINES ${DEFINES}) 24 | -------------------------------------------------------------------------------- /syscall/tests/mocks/bf_syscall_t/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2020 Assured Information Security, Inc. 3 | # 4 | # Permission is hereby granted, free of charge, to any person obtaining a copy 5 | # of this software and associated documentation files (the "Software"), to deal 6 | # in the Software without restriction, including without limitation the rights 7 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | # copies of the Software, and to permit persons to whom the Software is 9 | # furnished to do so, subject to the following conditions: 10 | # 11 | # The above copyright notice and this permission notice shall be included in all 12 | # copies or substantial portions of the Software. 13 | # 14 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | # SOFTWARE. 21 | 22 | bf_add_test(requirements INCLUDES ${INCLUDES} SYSTEM_INCLUDES ${SYSTEM_INCLUDES} DEFINES ${DEFINES}) 23 | bf_add_test(behavior INCLUDES ${INCLUDES} SYSTEM_INCLUDES ${SYSTEM_INCLUDES} DEFINES ${DEFINES}) 24 | -------------------------------------------------------------------------------- /syscall/tests/src/bf_control_ops/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2020 Assured Information Security, Inc. 3 | # 4 | # Permission is hereby granted, free of charge, to any person obtaining a copy 5 | # of this software and associated documentation files (the "Software"), to deal 6 | # in the Software without restriction, including without limitation the rights 7 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | # copies of the Software, and to permit persons to whom the Software is 9 | # furnished to do so, subject to the following conditions: 10 | # 11 | # The above copyright notice and this permission notice shall be included in all 12 | # copies or substantial portions of the Software. 13 | # 14 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | # SOFTWARE. 21 | 22 | bf_add_test(requirements INCLUDES ${INCLUDES} SYSTEM_INCLUDES ${SYSTEM_INCLUDES} DEFINES ${DEFINES}) 23 | bf_add_test(behavior INCLUDES ${INCLUDES} SYSTEM_INCLUDES ${SYSTEM_INCLUDES} DEFINES ${DEFINES}) 24 | -------------------------------------------------------------------------------- /syscall/tests/src/bf_debug_ops/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2020 Assured Information Security, Inc. 3 | # 4 | # Permission is hereby granted, free of charge, to any person obtaining a copy 5 | # of this software and associated documentation files (the "Software"), to deal 6 | # in the Software without restriction, including without limitation the rights 7 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | # copies of the Software, and to permit persons to whom the Software is 9 | # furnished to do so, subject to the following conditions: 10 | # 11 | # The above copyright notice and this permission notice shall be included in all 12 | # copies or substantial portions of the Software. 13 | # 14 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | # SOFTWARE. 21 | 22 | bf_add_test(requirements INCLUDES ${INCLUDES} SYSTEM_INCLUDES ${SYSTEM_INCLUDES} DEFINES ${DEFINES}) 23 | bf_add_test(behavior INCLUDES ${INCLUDES} SYSTEM_INCLUDES ${SYSTEM_INCLUDES} DEFINES ${DEFINES}) 24 | -------------------------------------------------------------------------------- /syscall/tests/src/bf_syscall_impl/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2020 Assured Information Security, Inc. 3 | # 4 | # Permission is hereby granted, free of charge, to any person obtaining a copy 5 | # of this software and associated documentation files (the "Software"), to deal 6 | # in the Software without restriction, including without limitation the rights 7 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | # copies of the Software, and to permit persons to whom the Software is 9 | # furnished to do so, subject to the following conditions: 10 | # 11 | # The above copyright notice and this permission notice shall be included in all 12 | # copies or substantial portions of the Software. 13 | # 14 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | # SOFTWARE. 21 | 22 | bf_add_test(requirements INCLUDES ${INCLUDES} SYSTEM_INCLUDES ${SYSTEM_INCLUDES} DEFINES ${DEFINES}) 23 | -------------------------------------------------------------------------------- /syscall/tests/src/bf_syscall_t/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2020 Assured Information Security, Inc. 3 | # 4 | # Permission is hereby granted, free of charge, to any person obtaining a copy 5 | # of this software and associated documentation files (the "Software"), to deal 6 | # in the Software without restriction, including without limitation the rights 7 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | # copies of the Software, and to permit persons to whom the Software is 9 | # furnished to do so, subject to the following conditions: 10 | # 11 | # The above copyright notice and this permission notice shall be included in all 12 | # copies or substantial portions of the Software. 13 | # 14 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | # SOFTWARE. 21 | 22 | bf_add_test(requirements INCLUDES ${INCLUDES} SYSTEM_INCLUDES ${SYSTEM_INCLUDES} DEFINES ${DEFINES}) 23 | bf_add_test(behavior INCLUDES ${INCLUDES} SYSTEM_INCLUDES ${SYSTEM_INCLUDES} DEFINES ${DEFINES}) 24 | -------------------------------------------------------------------------------- /utils/Shell.efi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bareflank/hypervisor/10af879f58a0b1d9ace17b84cd9b1e41a1cc67d0/utils/Shell.efi -------------------------------------------------------------------------------- /utils/linux/doxygen: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bareflank/hypervisor/10af879f58a0b1d9ace17b84cd9b1e41a1cc67d0/utils/linux/doxygen -------------------------------------------------------------------------------- /utils/linux/get_target_arch: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bareflank/hypervisor/10af879f58a0b1d9ace17b84cd9b1e41a1cc67d0/utils/linux/get_target_arch -------------------------------------------------------------------------------- /utils/linux/include-what-you-use: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bareflank/hypervisor/10af879f58a0b1d9ace17b84cd9b1e41a1cc67d0/utils/linux/include-what-you-use -------------------------------------------------------------------------------- /utils/loop.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Copyright (C) 2020 Assured Information Security, Inc. 4 | # 5 | # Permission is hereby granted, free of charge, to any person obtaining a copy 6 | # of this software and associated documentation files (the "Software"), to deal 7 | # in the Software without restriction, including without limitation the rights 8 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | # copies of the Software, and to permit persons to whom the Software is 10 | # furnished to do so, subject to the following conditions: 11 | # 12 | # The above copyright notice and this permission notice shall be included in all 13 | # copies or substantial portions of the Software. 14 | # 15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | # SOFTWARE. 22 | 23 | if [ $# -ne 0 ]; then 24 | ITERATIONS=$1 25 | else 26 | ITERATIONS=100 27 | fi 28 | 29 | for ((i = 0 ; i <= $ITERATIONS ; i++)); 30 | do 31 | cmake --build . --target start 32 | cmake --build . --target stop 33 | done 34 | -------------------------------------------------------------------------------- /utils/windows/get_target_arch: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bareflank/hypervisor/10af879f58a0b1d9ace17b84cd9b1e41a1cc67d0/utils/windows/get_target_arch -------------------------------------------------------------------------------- /vmmctl/tests/mocks/vmmctl_main/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2020 Assured Information Security, Inc. 3 | # 4 | # Permission is hereby granted, free of charge, to any person obtaining a copy 5 | # of this software and associated documentation files (the "Software"), to deal 6 | # in the Software without restriction, including without limitation the rights 7 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | # copies of the Software, and to permit persons to whom the Software is 9 | # furnished to do so, subject to the following conditions: 10 | # 11 | # The above copyright notice and this permission notice shall be included in all 12 | # copies or substantial portions of the Software. 13 | # 14 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | # SOFTWARE. 21 | 22 | bf_add_test(requirements INCLUDES ${INCLUDES} SYSTEM_INCLUDES ${SYSTEM_INCLUDES} DEFINES ${DEFINES}) 23 | bf_add_test(behavior INCLUDES ${INCLUDES} SYSTEM_INCLUDES ${SYSTEM_INCLUDES} DEFINES ${DEFINES}) 24 | -------------------------------------------------------------------------------- /vmmctl/tests/src/main/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2020 Assured Information Security, Inc. 3 | # 4 | # Permission is hereby granted, free of charge, to any person obtaining a copy 5 | # of this software and associated documentation files (the "Software"), to deal 6 | # in the Software without restriction, including without limitation the rights 7 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | # copies of the Software, and to permit persons to whom the Software is 9 | # furnished to do so, subject to the following conditions: 10 | # 11 | # The above copyright notice and this permission notice shall be included in all 12 | # copies or substantial portions of the Software. 13 | # 14 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | # SOFTWARE. 21 | 22 | list(APPEND SOURCES 23 | ../../../src/main.cpp 24 | ) 25 | 26 | bf_add_test(behavior INCLUDES ${INCLUDES} SYSTEM_INCLUDES ${SYSTEM_INCLUDES} DEFINES ${DEFINES} SOURCES ${SOURCES}) 27 | -------------------------------------------------------------------------------- /vmmctl/tests/src/vmmctl_main/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2020 Assured Information Security, Inc. 3 | # 4 | # Permission is hereby granted, free of charge, to any person obtaining a copy 5 | # of this software and associated documentation files (the "Software"), to deal 6 | # in the Software without restriction, including without limitation the rights 7 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | # copies of the Software, and to permit persons to whom the Software is 9 | # furnished to do so, subject to the following conditions: 10 | # 11 | # The above copyright notice and this permission notice shall be included in all 12 | # copies or substantial portions of the Software. 13 | # 14 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 20 | # SOFTWARE. 21 | 22 | bf_add_test(requirements INCLUDES ${INCLUDES} SYSTEM_INCLUDES ${SYSTEM_INCLUDES} DEFINES ${DEFINES}) 23 | bf_add_test(behavior INCLUDES ${INCLUDES} SYSTEM_INCLUDES ${SYSTEM_INCLUDES} DEFINES ${DEFINES}) 24 | --------------------------------------------------------------------------------