Quellcode durchsuchen

README tweaks and SGX_FLAG fix

sshsshy vor 2 Jahren
Ursprung
Commit
a8d6090e76
2 geänderte Dateien mit 16 neuen und 10 gelöschten Zeilen
  1. 8 3
      README.md
  2. 8 7
      reproduce_results.sh

+ 8 - 3
README.md

@@ -1,9 +1,14 @@
-To reproduce our experiments:
+Prerequisites:
+For plotting the graphs from the experiment data gathered, our plotter script requires python3, and the python modules numpy and matplotlib.
+
 
+To reproduce our experiments:
 
-1) Run ./build_dockers.sh to create the docker images to reproduce XPIR, SealPIR and ZeroTrace microbenchmarks
+1) Run ./build_dockers.sh to create the docker images to reproduce XPIR, SealPIR and ZeroTrace microbenchmarks. To build and run the ZeroTrace microbenchmarks, the host machine must have the SGX driver installed on it; refer to README.sgx.md for instructions on installing the SGX driver.
+(This takes about 30 mins to complete)
 
 2) Run ./reproduce_results.sh to run all the experiments in their respective dockers, populate the plotter folder with the output log files for these libraries and generate the graphs from these output logs.
+(This takes about 15 mins to complete)
 
 _______________________________________________________________________________
 
@@ -41,7 +46,7 @@ For the XPIR microbenchmark:
 
 
 
-For the ZeroTrace microbenchmark:
+For the ZeroTrace microbenchmark, ensure that the SGX driver is installed on the host machine. Refer to README.sgx.md for instructions to do so.
 
 1) Go to the ZT_docker folder
 

+ 8 - 7
reproduce_results.sh

@@ -1,14 +1,15 @@
 #!/bin/bash
 
-SGX_FLAG=[ -e "/dev/isgx" ]
-SGX_FLAG=0
-if $SGX_FLAG
+SGX_DRIVER_FILE=/dev/isgx
+test -e "$SGX_DRIVER_FILE"
+SGX_FLAG=$?
+if [ $SGX_FLAG ]
 then
   docker run --device /dev/isgx -dt --name zt_container zt_image bash -c "start-aesmd && exec bash"
-  #docker exec -t zt_container bash -c "cd /pir/ && ./run_ztlsoram.sh"
-  #docker exec -t zt_container bash -c "cd /pir/ && ./run_zthsoram.sh"
-  #docker cp zt_container:/pir/log_ZTLSORAM ./plotter
-  #docker cp zt_container:/pir/log_ZTCIRCUITORAM ./plotter
+  docker exec -t zt_container bash -c "cd /pir/ && ./run_ztlsoram.sh"
+  docker exec -t zt_container bash -c "cd /pir/ && ./run_zthsoram.sh"
+  docker cp zt_container:/pir/log_ZTLSORAM ./plotter
+  docker cp zt_container:/pir/log_ZTCIRCUITORAM ./plotter
   docker rm -f zt_container
 else
   echo "Skipping ZeroTrace since the device does not have SGX driver installed."