Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Z
Zipr Toolchain
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Open Source Software
Zipr Toolchain
Commits
10a24488
Commit
10a24488
authored
13 years ago
by
an7s
Browse files
Options
Downloads
Patches
Plain Diff
Update the p1 xform to filter out (some) libc functions
parent
c4900e63
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
tools/p1xform.sh
+8
-6
8 additions, 6 deletions
tools/p1xform.sh
tools/ps_analyze.sh
+17
-3
17 additions, 3 deletions
tools/ps_analyze.sh
with
25 additions
and
9 deletions
tools/p1xform.sh
+
8
−
6
View file @
10a24488
#!/bin/sh
#
# This is the main driver script for the P1 transform
# Run this script from top-level directory created by the peasoup script
#
...
...
@@ -21,9 +22,6 @@ echo "=========================================="
$PEASOUP_HOME
/tools/p1xform.genspri.sh
$P1_DIR
a.ncexe a.ncexe.annot
>
$P1_DIR
/genspri.out 2>
$P1_DIR
/genspri.err
# NOT NEEDED ANYMORE????
#$PEASOUP_HOME/tools/generate_io_baseline.sh $CURRENT_DIR a.ncexe concolic.files_a.stratafied_0001 > gen_baseline.out 2> gen_baseline.err
#
# remove any candidate functions not covered
# this will go away once GrACE gives us the instruction coverage information
...
...
@@ -36,15 +34,19 @@ FILTERED_OUT=$P1_DIR/p1.fn_coverage.filtered_out
KEEPS
=
$P1_DIR
/p1.keep
FINAL_XFORM_FNS
=
$P1_DIR
/p1.final
EXECUTED_ADDRESS_FILE
=
$CONCOLIC
/executed_address_list.txt
LIBC_FILTER
=
$PEASOUP_HOME
/tools/p1xform.filter.libc.txt
#grep "^0x" $CONCOLIC/trace_manager.run_*.log | cut -f2 -d":" | sort | uniq > tmp.$$
#$SECURITY_TRANSFORMS_HOME/tools/cover/cover a.ncexe a.ncexe.annot tmp.$$ $COVERAGE_FNS
#
# Prune out functions that do not have sufficient coverage
# Any function whose coverage metric starts with 0.0, e.g. 0.09, 0.0123, is pruned out
# We effectively prune out any functions whose coverage is not at least 10%
#
$SECURITY_TRANSFORMS_HOME
/tools/cover/cover a.ncexe a.ncexe.annot
$EXECUTED_ADDRESS_FILE
$COVERAGE_FNS
grep
-v
"0
\.
0"
$COVERAGE_FNS
|
cut
-f1
-d
" "
>
$CANDIDATE_FNS
grep
"0
\.
0"
$COVERAGE_FNS
|
cut
-f1
-d
" "
>
$FILTERED_OUT
#rm tmp.$$
cp
$CANDIDATE_FNS
$KEEPS
$PEASOUP_HOME
/tools/p1xform.filter.sh
$CANDIDATE_FNS
$LIBC_FILTER
>
$KEEPS
echo
"====================================================="
echo
"Run BED"
...
...
This diff is collapsed.
Click to expand it.
tools/ps_analyze.sh
+
17
−
3
View file @
10a24488
...
...
@@ -82,16 +82,30 @@ echo Done.
# Uncomment this part to test the P1 xform
#
#-----------------------------------------
# Start P1 transform
#-----------------------------------------
#
# P1 transform
#
#echo Starting the P1 transform
#date
#$PEASOUP_HOME/tools/p1xform.sh $newdir > p1xform.out 2> p1xform.err
#
#echo $current_dir/$newdir/p1.xform/p1.final
#
#if [ -f $current_dir/p1.xform/p1.final ]; then
# echo List of functions transformed:
# cat $current_dir/p1.xform/p1.final
#else
# echo P1 was unable to transform the subject program
#fi
#
#date
#echo Done with the P1 transform
#-----------------------------------------
# End P1 transform
#-----------------------------------------
# go back to original directory
cd
-
>
/dev/null 2>&1
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment