Skip to content

Commit

Permalink
support adaptive FP reduction option
Browse files Browse the repository at this point in the history
  • Loading branch information
jkrshnmenon committed Apr 29, 2022
1 parent e521de7 commit 2898411
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 11 deletions.
27 changes: 16 additions & 11 deletions vuln_templates/kubernetes_wrapper.sh
Original file line number Diff line number Diff line change
@@ -1,34 +1,34 @@
#!/bin/bash

usage () {
echo "Usage : $0 -f <VD> -t <TARGET>"
echo "Usage : $0 -f <VD> -t <TARGET> [ -r <LEVEL> ]"
echo -e " -f VD\t\t: The VD inside vuln_templates to use"
echo -e " -t TARGET\t: The path to the target binary"
echo -e " -r LEVEL\t: The level of Adaptive FP reduction"
echo ""
exit 0
}


VD=${VD-}
TARGET=${TARGET-}
NFS_DIR=/shared/arbiter
VD=${VD:-}
TARGET=${TARGET:-}
LEVEL=${LEVEL:--1}
NFS_DIR=/shared/arbiter/dataset
TEMPLATE_DIR=$(realpath $(dirname $0))
RUNNER=$TEMPLATE_DIR/run_arbiter.py


if [ $# -lt 2 ]; then
usage
fi


while getopts "f:t:" OPTION; do
while getopts "f:t:r:" OPTION; do
case $OPTION in
f)
VD=$OPTARG
;;
t)
TARGET=$OPTARG
;;
r)
LEVEL=$OPTARG
;;
*|h)
usage
;;
Expand All @@ -54,4 +54,9 @@ elif [ ! -f "$BIN_PATH" ]; then
exit 1
fi

$RUNNER -f $VD_PATH -t $BIN_PATH -l $HOME/logs -j $HOME/logs
if [ -n "$LEVEL" ]; then
$RUNNER -f $VD_PATH -t $BIN_PATH -l $HOME/logs -j $HOME/logs -r $LEVEL
else
$RUNNER -f $VD_PATH -t $BIN_PATH -l $HOME/logs -j $HOME/logs
fi

1 change: 1 addition & 0 deletions vuln_templates/run_arbiter.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
STRICT_MODE = False
IDENTIFIER = None
LOG_LEVEL = logging.DEBUG
CALLER_LEVEL = -1

logging.getLogger('angr').setLevel(logging.CRITICAL)

Expand Down

0 comments on commit 2898411

Please sign in to comment.