Skip to content

Commit

Permalink
Fix LVI tests after making frame pointers enabled by default
Browse files Browse the repository at this point in the history
  • Loading branch information
raoulstrackx committed Feb 27, 2024
1 parent 9afdb8d commit 210130a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
CHECK: cmake_plus_one_cxx_global_asm
CHECK: lfence
CHECK-NEXT: movl
CHECK-NEXT: lfence
CHECK-NEXT: incl
CHECK-NEXT: shlq $0x0, (%rsp)
CHECK-NEXT: lfence
CHECK-NEXT: retq
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
CHECK: print
CHECK: lfence
CHECK: popq
CHECK: popq
CHECK-NEXT: popq [[REGISTER:%[a-z]+]]
CHECK-NEXT: lfence
CHECK-NEXT: jmpq *[[REGISTER]]
5 changes: 3 additions & 2 deletions tests/run-make/x86_64-fortanix-unknown-sgx-lvi/script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,9 @@ function check {
${enclave} > ${asm}
${filecheck} --input-file ${asm} ${checks}

if [ "${func_re}" != "rust_plus_one_global_asm" &&
"${func_re}" != "cmake_plus_one_c_global_asm" ]; then
if [ "${func_re}" != "rust_plus_one_global_asm" ] &&
[ "${func_re}" != "cmake_plus_one_c_global_asm" &&
[ "${func_re}" != "cmake_plus_one_cxx_global_asm" ]; then
# The assembler cannot avoid explicit `ret` instructions. Sequences
# of `shlq $0x0, (%rsp); lfence; retq` are used instead.
# https://www.intel.com/content/www/us/en/developer/articles/technical/
Expand Down

0 comments on commit 210130a

Please sign in to comment.