evaluation/2_detection_speed: stable version

This commit is contained in:
Oleksii Oleksenko 2021-02-10 16:33:51 +01:00
Родитель 3492a9305b
Коммит 4fff6fcf1a
10 изменённых файлов: 42 добавлений и 67 удалений

Просмотреть файл

@ -1,4 +1,5 @@
#!/usr/bin/env bash
set -e
if [ -z "${REVIZOR_DIR}" ]; then
echo "Env. variable REVIZOR_DIR must be set!"
@ -12,21 +13,23 @@ SCRIPT=$(realpath $0)
SCRIPT_DIR=$(dirname $SCRIPT)
TIMEOUT=3600
cd "$REVIZOR_DIR" || exit
timestamp=$(date '+%y-%m-%d-%H-%M')
instructions='instruction_sets/x86/base.xml'
cd "$REVIZOR_DIR" || exit
for name in bcm-cond-bpas bm-cond-bpas bm-bpas bc-seq lfence-bc-seq; do
echo "--------------------------------------------------------------------"
echo "Running $name"
exp_dir="$WORK_DIR/$timestamp/$name"
log="$exp_dir"/experiment.log
config="$SCRIPT_DIR/$name.yaml"
mkdir -p "$exp_dir"
touch "$exp_dir"/experiment.log
echo "./cli.py fuzz -s instruction_sets/x86/base.xml -n 100000 -i 10000 -v --nonstop --timeout $TIMEOUT -w $exp_dir -c $SCRIPT_DIR/${name}.yaml 2>&1 | tee -a $exp_dir/experiment.log"
./cli.py fuzz -s instruction_sets/x86/base.xml -n 100000 -i 10000 -v --nonstop \
--timeout $TIMEOUT -w $exp_dir \
-c $SCRIPT_DIR/${name}.yaml 2>&1 | tee -a $exp_dir/experiment.log
echo "./cli.py fuzz -s $instructions -n 100000 -i 10000 -v --nonstop --timeout $TIMEOUT -w $exp_dir -c $config"
./cli.py fuzz -s $instructions -n 100000 -i 10000 -v --nonstop --timeout $TIMEOUT -w $exp_dir -c $config 2>&1 | tee -a $log
done
cd - || exit

Просмотреть файл

@ -16,10 +16,6 @@ contracts:
test_case_size: 64
max_mem_accesses: 32
enable_mds: True
# temporary
#attacker_capability: l1d
#model: x86-serializing
#num_measurements: 50
#max_outliers: 0
enable_ssbp_patch: false
enable_mds: true

Просмотреть файл

@ -17,10 +17,6 @@ contracts:
test_case_size: 64
max_mem_accesses: 32
enable_mds: True
# temporary
#attacker_capability: l1d
#model: x86-serializing
#num_measurements: 50
#max_outliers: 0
enable_ssbp_patch: false
enable_mds: true

Просмотреть файл

@ -16,10 +16,6 @@ contracts:
test_case_size: 64
max_mem_accesses: 32
enable_mds: True
# temporary
#attacker_capability: l1d
#model: x86-serializing
#num_measurements: 50
#max_outliers: 0
enable_ssbp_patch: false
enable_mds: true

Просмотреть файл

@ -15,32 +15,24 @@ NUM_TESTS=1000
timestamp=$(date '+%y-%m-%d-%H-%M')
instructions='instruction_sets/x86/base.xml'
exp_dir="$WORK_DIR/fail-$timestamp"
log="$exp_dir"/experiment.log
log="$WORK_DIR/$timestamp/experiment.log"
mkdir -p "$exp_dir"
touch "$log"
mkdir -p "$WORK_DIR/$timestamp"
touch $log
cd "$REVIZOR_DIR" || exit
#for name in v1-ct-bpas v4-ct-seq v4-ct-cond ; do
for name in v4-ct-cond ; do
echo "----------------------------------------------------"
echo "$name" 2>&1 | tee -a "$log"
for name in v1-ct-seq v1-ct-bpas v4-ct-seq v4-ct-cond mds-ct-seq mds-ct-bpas mds-ct-cond ; do
echo "--------------------------------------------------------------------"
echo "Running $name" 2>&1 | tee -a "$log"
exp_dir="$WORK_DIR/$timestamp/$name"
config="$SCRIPT_DIR/$name.yaml"
mkdir -p "$exp_dir"
echo "./cli.py fuzz -s $instructions -n $NUM_TESTS -i 10000 -v --nonstop -w $exp_dir -c $config"
./cli.py fuzz -s $instructions -n $NUM_TESTS -i 10000 -v --nonstop -w $exp_dir -c $config 2>&1 | tee -a $exp_dir/experiment.log
./cli.py fuzz -s $instructions -n $NUM_TESTS -i 10000 -v --nonstop -w $exp_dir -c $config 2>&1 | tee -a $log
# ./cli.py fuzz -s $instructions -n $NUM_TESTS -i 10000 -v -w $exp_dir -c $config 2>&1 | tee -a $log
done
#echo "Is patch disabled?"
#for name in v1-ct-seq; do
# echo "----------------------------------------------------"
# echo "$name" 2>&1 | tee -a "$log"
# config="$SCRIPT_DIR/$name.yaml"
#
# echo "./cli.py fuzz -s $instructions -n $NUM_TESTS -i 10000 -v --nonstop -w $exp_dir -c $config"
# ./cli.py fuzz -s $instructions -n $NUM_TESTS -i 10000 -v --nonstop -w $exp_dir -c $config 2>&1 | tee -a $exp_dir/experiment.log
#done
cd - || exit

Просмотреть файл

@ -1,20 +0,0 @@
supported_categories:
- NOP
- BINARY
- BITBYTE
- COND_BR
- CMOV
- CONVERT
- DATAXFER
- FLAGOP
- SETCC
- LOGICAL
- POP
- PUSH
attacker_capability: l1d
contracts:
- seq
model: x86-serializing
test_case_size: 64
max_mem_accesses: 32

Просмотреть файл

@ -16,4 +16,7 @@ contracts:
- bpas
test_case_size: 64
max_mem_accesses: 32
max_mem_accesses: 32
enable_ssbp_patch: false
enable_mds: false

Просмотреть файл

@ -16,4 +16,7 @@ contracts:
- seq
test_case_size: 64
max_mem_accesses: 32
max_mem_accesses: 32
enable_ssbp_patch: true
enable_mds: false

Просмотреть файл

@ -16,4 +16,7 @@ contracts:
- cond
test_case_size: 64
max_mem_accesses: 32
max_mem_accesses: 32
enable_ssbp_patch: false
enable_mds: false

Просмотреть файл

@ -15,4 +15,7 @@ contracts:
- seq
test_case_size: 64
max_mem_accesses: 32
max_mem_accesses: 32
enable_ssbp_patch: false
enable_mds: false