forked from microsoft/sca-fuzzer
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
205 additions
and
114 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
.intel_syntax noprefix | ||
.test_case_enter: | ||
.section .data.main | ||
.function_main_0: | ||
|
||
mov rcx, 0x00000048 | ||
rdmsr | ||
mov dword ptr [r14], eax | ||
mov dword ptr [r14 + 4], edx | ||
|
||
mov edx, 0 | ||
mov eax, 1 | ||
shl eax, 16 | ||
wrmsr | ||
|
||
# Procs 16th cache line | ||
mov rax, qword ptr [r14 + 0x400] | ||
|
||
.macro.fault_handler: | ||
mov eax, dword ptr [r14] | ||
mov edx, dword ptr [r14 + 4] | ||
mov rcx, 0x00000048 | ||
wrmsr | ||
|
||
# Procs 8th cache line | ||
mov rax, qword ptr [r14 + 0x200] | ||
|
||
.test_case_exit: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
executor_mode: P+P | ||
|
||
color: true | ||
logging_modes: | ||
- info | ||
# - stat | ||
# - dbg_generator | ||
# - dbg_timestamp | ||
# - dbg_violation | ||
# - dbg_dump_htraces | ||
# - dbg_dump_ctraces | ||
# - dbg_dump_traces_unlimited | ||
# - dbg_model # uncomment to debug execution on the model | ||
# - dbg_coverage | ||
# - dbg_isa_loader | ||
# - dbg_priming | ||
- dbg_executor_raw |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
# Macros are at src/x86/x86_model.py::interpret() | ||
.intel_syntax noprefix | ||
.test_case_enter: | ||
|
||
.section .data.main | ||
.function_main_0: | ||
# Disable PFs; edx:eax; store edx:eax, id ecx | ||
mov ecx, 0x1a4 # noremove | ||
mov edx, 0 # noremove | ||
mov eax, 0b101111 # noremove | ||
wrmsr # noremove | ||
# # Disable DDP | ||
# mov ecx, 0x48 # noremove | ||
# rdmsr # noremove | ||
# and eax, 0xFFFFFFFB # noremove; Disable SSBD | ||
# or eax, 0x100 # noremove; Disable DDP | ||
# wrmsr # noremove | ||
# mfence # noremove | ||
# lfence # noremove | ||
.macro.measurement_start: | ||
# Enable PFs; edx:eax; store edx:eax, id ecx | ||
mov ecx, 0x1a4 # noremove | ||
mov edx, 0 # noremove | ||
mov eax, 0b000000 # noremove | ||
# # Enable DDP | ||
# mov ecx, 0x48 # noremove | ||
# rdmsr # noremove | ||
# and eax, 0xFFFFFFFB # noremove; Disable SSBD | ||
# and eax, 0xFFFFFEFF # noremove; Enable DDP | ||
# wrmsr # noremove | ||
# mfence # noremove | ||
# lfence # noremove | ||
|
||
# 64 random instructions, 32 mem. accesses | ||
.macro.random_instructions.64.32: | ||
|
||
# Disable PFs; edx:eax; store edx:eax, id ecx | ||
mov ecx, 0x1a4 # noremove | ||
mov edx, 0 # noremove | ||
mov eax, 0b101111 # noremove | ||
wrmsr # noremove | ||
# # Disable DDP | ||
# mov ecx, 0x48 # noremove | ||
# rdmsr # noremove | ||
# and eax, 0xFFFFFFFB # noremove; Disable SSBD | ||
# or eax, 0x100 # noremove; Disable DDP | ||
# wrmsr # noremove | ||
# mfence # noremove | ||
# lfence # noremove | ||
.macro.measurement_end: | ||
# Enable PFs; edx:eax; store edx:eax, id ecx | ||
mov ecx, 0x1a4 # noremove | ||
mov edx, 0 # noremove | ||
mov eax, 0b000000 # noremove | ||
# # Enable DDP | ||
# mov ecx, 0x48 # noremove | ||
# rdmsr # noremove | ||
# and eax, 0xFFFFFFFB # noremove; Disable SSBD | ||
# and eax, 0xFFFFFEFF # noremove; Enable DDP | ||
# wrmsr # noremove | ||
# mfence # noremove | ||
# lfence # noremove | ||
.section .data.main | ||
.test_case_exit: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.