Skip to content

DSN 2017 Tutorial Activity

Justin Li edited this page Jun 26, 2017 · 13 revisions

DSN 2017 Tutorial Activity - Instructions

Tutorial Slides

http://blogs.ubc.ca/karthik/files/2017/06/LLFI-part1.pdf http://blogs.ubc.ca/karthik/files/2017/06/LLFI-part2.pdf

Setup

For Windows, install Putty. For Mac and Linux, no installation is necessary.

Connecting to the LLFI Server

Windows

Use Putty to connect to the LLFI Server.
Launch Putty and enter the host name, 45.79.106.97. The port number should remain at 22.
Login with the username "llfi".

Mac and Linux

For Mac and Linux, ssh to the LLFI server. ssh llfi@45.79.106.97

Folder Assignments

You will be assigned a folder on the server for this tutorial. Please navigate to that folder and only make changes within that folder.

Part 1: Hardware Fault Injection

  1. Navigate to the Hardware folder.

  2. Compilation from C file to IR.
    clang -S -emit-llvm binarytree.c -o binarytree.ll

  3. Instrumentation
    instrument --readable binarytree.ll -lm

  4. Profiling
    profile llfi/binarytree-profiling.exe 6

  5. Fault Injection
    injectfault llfi/binarytree-faultinjection.exe 6

Part 2: Software Fault Injection

  1. Navigate to the Software folder.

  2. Compilation from C file to IR.
    clang -S -emit-llvm binarytree.c -o binarytree.ll

  3. Instrumentation
    instrument --readable binarytree.ll -lm

  4. Profiling
    profile llfi/binarytree-profiling.exe 6

  5. Fault Injection
    injectfault llfi/binarytree-faultinjection.exe 6

  6. Trace Propagation
    You will not be able to run zgrviewer on the server, as it requires a GUI interface.

tracediff llfi/baseline/llfi.stat.trace.prof.txt llfi/llfi_stat_output/llfi.stat.trace.0-5.txt > diffReport.txt (Modify the 5 to the desired trace number.)
traceontograph diffReport.txt llfi.stat.graph.dot > tracedGraph.dot
zgrviewer tracedGraph.dot

Useful Commands

  1. Count how many files contain the text of "128,4,-128 32,6,-32" in the current directory.

grep -r "128,4,-128 32,6,-32" ./ | wc -l

  1. Count how many files are there in the directory.

find . -type f | wc -l