06_AvxDisable.py 527 B

1234567891011121314151617181920212223
  1. import os, sys, mmap
  2. from regression import Regression
  3. loader = os.environ['PAL_LOADER']
  4. sgx = os.environ.get('SGX_RUN') == '1'
  5. def manifest_file(file):
  6. if sgx:
  7. return file + '.manifest.sgx'
  8. else:
  9. return file + '.manifest'
  10. if not sgx:
  11. sys.exit(0)
  12. # Running AvxDisable
  13. regression = Regression(loader, "AvxDisable")
  14. regression.add_check(name="Disable AVX bit in XFRM",
  15. check=lambda res: "Illegal instruction executed in enclave" in res[0].log)
  16. rv = regression.run_checks()
  17. if rv: sys.exit(rv)